Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

cannot achieve sub-pixel resolution

I have been working an instrument that takes a backlit profile image of a fixture. The fixture is a dome. A part is placed on the fixture and another image is taken. The fixture is moved and the process is repeated. The difference between the fixture alone and the fixture with the part is what I'm trying to measure. My goal is to achieve 1 micron resolution. Right now I'm using a 6.6Mp camera (~7 um/pix) and was trying to use sub-pixel techniques to achieve the high resolution needed.

I have reference features on the fixture that I'm finding with a pattern match. I use two points to register the profiles that I extract from the two images. Because of the high-precision fixturing, the images are only slightly different (typically a couple of pixels or less). I'm extracting the profile of the dome using the IMAQ Circular Rake function and exporting the (X,Y) edge location in pixel coordinates to Matlab for analysis. When I zoom in on the profile, I see a "stair-step" pattern with the steps being approximately 1 pixel apart. This was very suprising since I have specified 1/10 pixel resolution with a cubic spline. I'm not using any smoothing in the Rake function - I smooth the image using a Gaussian (7x7 kernel) before I do any edge finding.

My question is this - is there a flaw in the sub-pixel edge finder? Am I using the function incorrectly? When I subtract the two profiles with these artifacts, I get a very noisy thickness profile for the part. I believe this is due to the fact that once I register them, the pixel grids are slightly different and the steps don't line up. My noise is around 2.5 pixels (15-20um).

Has anyone else seen this type of effect? I've attached a graph of the effect - this is very magnified to show the detail.
0 Kudos
Message 1 of 6
(4,241 Views)
Jordan,

To get the accuracy you want - use the edge detect tool. The clamp and circular rake functions average out "fuzzy lines" (see ch 13 of the IMAQ Vision Concepts Manual) - whereas the edge detect tool will locate an edge with subpixel accuracy based upon the set threshold levels.

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.

Also, see the following post which is similar to what you might be seeing:
http://forums.ni.com/ni/board/message?board.id=200&message.id=5549#M5549

I hope this helps out. Post a pic or graph of the prob you are seeing if this does not prove to be a solution for you.
0 Kudos
Message 2 of 6
(4,227 Views)
I'm actually using IMAQ Spoke, not rake or concentric rake. I had mislabeled the function in the first posting. IMAQ Spoke has an option listed for sub-pixel resolution - that is where I'm selecting 1/10 with cubic-spline interpolation.
0 Kudos
Message 3 of 6
(4,222 Views)
I am confused. The Spoke function is only returning edges, not values along the line. Where are you seeing the stair step?

Find Circular Edge just combines the Spoke function with find best fit Circle. It uses 1/10 pixel interpolation, which is what you want. If you are trying to fit a circle, this may be a quicker route.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 6
(4,215 Views)
Sorry for the confusion. Since the object I'm trying to measure is round, I'm using the IMAQ Spoke to locate the edges. In this case, the real profile is what I'm interested in, so I can't just fit the data to a circle - I need to know where each edge point. I'm trying to make an edge profile or contour of the object. I had considered using an edge detection filter (Canny, Sobel, etc) but I don't believe I can get the accuracy I need with such an approach.

The stair-step effect is happening in the profile of the edge. I know I have a smooth, very circular dome that I'm imaging. Therefore, the edges should form a nice, smooth circle. However, I'm getting a pixelated or stair-step appearance when I plot all of the found edges in their x,y pixel coordinates. I had assumed that if I used sub-pixel resolution that these pixel-based artifacts would be reduced or eliminated. When I plot out the dome and compare the found edge locations to the best-fit circle, I get what looks like very high frequency oscillation of about 1-2 pixels around the average radius. (I convert the data to polar coordinates with the "best-fit" circle cneter point as the center of the data. The radius values can then be compared to the average radius very easily)

One approach I'm considering using is just a smoothing filter on the profile. However, I'd rather solve the problem in the edge finder since that is the real source of the problem.
0 Kudos
Message 5 of 6
(4,207 Views)
Jordan,

The reason you are seeing the "stair-step" appearance is because your smooth dome, is converted into pixel values in your camera. The CCD (or image chip in the camera) has a finite resolution. This will "pixelate" your smooth dome into an image with finite resolution.

Sub-pixel accuracy works on the basis that a camera will normally give a 'grey' level value to a pixel that is partially on an edge - the darker the pixel value, the closer it is to the edge (and visa-versa). Sub-pixel accuracy will convert that grey level to a partial pixel value.

Look at the grayscale values of the pixels on the edge of your dome and see if this will have correlation to the 'stair-step' problem you are seeing. In any case, you will have to average values to get the most accurate center of your circle (which is what IMAQ Find Circular Edge.vi does - but without the sub-pixel accuracy option).

I hope that this clarifies why you are still seeing a stair step pattern even with subpixel accuracy.
0 Kudos
Message 6 of 6
(4,193 Views)