Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision assistant measurement error

I have been working with both Vision Assistant and Labview with Vision development vis for the last month. While using the Vision assistant I have come across a very troubling observation. My application will require high accuracy (sub-pixel) which the documentation indicates is possible. While doing some simple measurements using Vision assistant, I have found the measurement functions seem to be off by about one pixel (dependent on type of measurement method/settings.

Example

I have an image (greyscale) with a pure white background and a black horizontal line which is exactly 2 pixels wide. The image resolution is 640X480. When I use the clamp function to measure the width of the black line I get the following results: distance = 2.82 pixels

When I use the edge detection method and set steep to 0, filter to 0 and contrast to 244 I get Y coordinate edges at 110.02 and 112.99

The actual Y coordinates of the two black rows are 111 and 112. I can understand the 110.02, but not the 112.99. It seems the clamp function just subtracts the smaller from the larger to get the 2.8 result.

We see the same result in longer measurements also. I was unable to find anything in the Knowledge base relating to this. Am I doing something wrong here, or does the vision package have a flaw?

Thanks,

Howard
0 Kudos
Message 1 of 5
(3,903 Views)
Howard,

Documentation about the edge detect tool can be found in Start >> All Programs >> National Instruments >> Vision >> Documentation >> IMAQ Vision Concepts Manual. Page 11-9 talks about sub-pixel accuracy.

To get the accuracy you want - use the edge detect tool. The clamp function is better used to average out a "fuzzy line" (see ch 13 of the concepts manual).

I performed the same test you described with a 2 pixel line in a 640x480 8 bit image. Attached is the screenshot of the results - notice that the threshold is set to 50% (relative).

I hope this solves your problem. Let me know if you have further questions about it.
Message 2 of 5
(3,890 Views)
Marc,

Thanks for the advise on measurement techniques for edge detection. I have a second question for you related to finding the center of a circular shaped object. I am using filtering and thresholding to produce the cleanest circle possible from a rather crude pixelated dot. I then use the particle analysis method to find the center of mass for the dot. Will this be more accurate then using the circular rake edge detection?

I would prefer to use the particle analysis since it does not involve as much "fine tuning" as the edge detection method. Having said that, I would change back to the circular rake if I found that it might be more accurate.

Thanks for your help,

Howard Spec
CMC Electronics
Canada
0 Kudos
Message 3 of 5
(3,864 Views)
I think your method will work better than the circular rake. You need to have a fairly smooth edge for the rake to work well. The key issue on your center of mass approach is proper thresholding. If you miss any pixels, the value will be off.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 5
(3,858 Views)

is an old post but I see in the forum that this problem is resolved, I've also been working for some time with high resolution Acama, with adequate lighting and digital zoom I can get 1mm menorahs measures nevertheless a margin of error brings , one might solve this?

 

1.png

0 Kudos
Message 5 of 5
(3,164 Views)