I have an example, I just looked it up… it is VB6 but let’s look at the logic
creating a pixellist, in my case I’ve incorporated it into a threshold operation from a scrollbar. It looks like you are ok there.
pixelList = CreatePixelList(2)
For x = 1 To xdim - 1
For y = 1 To ydim - 1
gl = PixVal(imghandle, 0, x, y)
If gl < HScrThresh.Value Then
point(Index) = x
point(Index + 1) = y
result = AddPixel(pixelList, point(Index))
Index = Index + 2
End If
Next
Next
Generally: The edge image you show does not really contain a circle, the structure to me looks elliptic (as if looking at a circle from an angle), so even if the regression does yield a result, it will probably be a fairly poor match to a circle.
thanks for coming back to me and sorry for the late reply as I started to do something else and disregarded this approach.
I did try to replicate it again, but it does not seem to crash (if I use the supplied image). New application. Maybe something was corrupt while I was handling it in my main application… who knows…
My hope was that it would give me the best circle regardless how much “crap” I put in.
However, you are right, the form I want to look at is elliptical. Unfortunately, this adds much more to the complexity. I did try hough circles (which went all over the place) and I am currently looking at smallest enclosing circles (I was thinking of using smallest enclosing ellipsoids but it adds too many unknowns and for the first version it might be enough).