R
roger.breton
Guest
I inherited a nice technical challenge. Do you see the "Ellipse" in the following image:
This image is the contents of a PictureBox control that I generate "points by points".
First I generate a series of horizontal and vertical lines using the following loops:
For i = 1 To Interval
x1 = i * GridStep
x2 = x1
e.Graphics.DrawLine(blackPen, x1, y1, x2, y2)
Next
(I only show the vertical lines above)
Then I either generate a red or green dot according to a complicated formula. My problem is to "extract" the parameters of the Ellipse out of that "Bitmap".
What you see above was generated using a grid size of 10 pixels ("GridStep"). To make the identification of the Ellipse, I intend to reduce the GridStep down to 1 pixel, so the shape of the Ellipse would stand out better. .
I don't want to use "heuristics" like inferring that the ellipse's top and left edge are *always" the "summit" of the ellipse: the ellipse can be rotated 360 degrees around the center of the bitmap.
I've looked around but I have not found much... Any help is appreciated. VB may not be the best language to do this kind of processing but that's the language I'm stuck with for this project.
Continue reading...
This image is the contents of a PictureBox control that I generate "points by points".
First I generate a series of horizontal and vertical lines using the following loops:
For i = 1 To Interval
x1 = i * GridStep
x2 = x1
e.Graphics.DrawLine(blackPen, x1, y1, x2, y2)
Next
(I only show the vertical lines above)
Then I either generate a red or green dot according to a complicated formula. My problem is to "extract" the parameters of the Ellipse out of that "Bitmap".
What you see above was generated using a grid size of 10 pixels ("GridStep"). To make the identification of the Ellipse, I intend to reduce the GridStep down to 1 pixel, so the shape of the Ellipse would stand out better. .
I don't want to use "heuristics" like inferring that the ellipse's top and left edge are *always" the "summit" of the ellipse: the ellipse can be rotated 360 degrees around the center of the bitmap.
I've looked around but I have not found much... Any help is appreciated. VB may not be the best language to do this kind of processing but that's the language I'm stuck with for this project.
Continue reading...