Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

edges, radial points, elliptical fit, binary imaqs...

What you can see in the attachment is a light spot. I use the threshold function to generate a binary image. So I have an area with zeros and a spot area with filled pixel 1, so one can say it is an image mask.
My intention is very easy and already done succesfully. I want to extract the radial points of that image mask which define the edge / contour between zero and one values, which I want to pass to the elliptical fit vi.

Now I use the MasktoRoi and than the RoiProfile Function to get the radial points but is this the best way?

The problem is, that I want to use this function as fast as possible, on the fly, for image processing. And I think there must an easier way.
For that reason I just want to ask which possiblilities are the best to get the radial points for that "binary" mask I have.

I know all that edge detection ,fit circles tools and so on, but I think that is too much for that easy picture.

Thx for experiences
0 Kudos
Message 1 of 5
(4,068 Views)

Hi Bauch,

Well if you use threshold to make a binary picture and get the contour of it, you will have a result sensitive to 1 gray level, which is a lot in your case.

 

If you use circle fitting tool to get the data points, then you are sure that they are chosen with an optimal algorithm, much more robust. You can play on the detection speed by adapting the angle between in research line. So for me, no doubt, I would definitly use the second method.

 

Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 2 of 5
(3,981 Views)
The binary image which I get is a really binary. That means, all intensity values under my treshold are set to zero and all values equal or above my threshold are set to one.
Labview uses these kind of pictures as image masks. For that reason I can use the function Mask2Roi and than ROI profile which provides the contour points.

I use that threshold and ROI2mask functions because it is really really stable and easy, so that I can pass the contour points to the ellipse fit function. But I do not know whether it is the fastest.

@DOC-doc wrote:

If you use circle fitting tool to get the data points, then you are sure that they are chosen with an optimal algorithm, much more robust. You can play on the detection 

That does not make sense because I want to fit an ellipse after I have determined the contour points.

The problem is, that
I tried all other options like extract curves, find circular edge and Magic Wand and it is really diffcult to become them stable instead of Magic Wand.

Magic Wand
is more or less that what I am using now, defining a threshold, create an imange mask und get ROI Contour points.
So what can you advise?

It would be nice, if you could look at the attached example where all methods are implemented or give

Thx
0 Kudos
Message 3 of 5
(3,915 Views)
Hi Bauch@Bessy ,
 
You did not get my point, so I will try be more detailed.
 
When I propose that you use the circle fitting tool, it s not to get the fitting data of the circle : leave it away. You are just interrested in the array that contains the contour points, which is another output from the same VI on the top of it.
 
After, you use those points and to feend the ellipse fitting VI.
 
My other point, which is still my point, is that if you use a threshold to make a binary picture, you are losing some information because you are converting a 8 bits/pixel  image depth into a 1bit/pixel depth and the position is given at 1 pixel maximum accuracy (with the noise of CCD you have a much higher value in reallity, depending in the slope).
 
Whereas if you use the circle fitting tool on the gray level image : the algorithm  used to detect the edge is much more robust than a regular threshold : it is based on slope and minimum difference to define the position of the edge : the edge location in given with a resolution a 1/3 to 1/10 of a pixel. Some say 1/256 of a pixel but this is a theoretical value of no concern in reality.
 
Cheers,
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 4 of 5
(3,907 Views)
I would propose that you use this VI.
 
I used the picture you gave earlier to finetune the settings.
 
Note that the quality of the picture is very poor and the shape of the laser spot is not close to an ellipse, reason why you can get large errors...
 
Hope this helps.
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 5 of 5
(3,904 Views)