10-10-2024 08:39 AM
Hi guys, i am developing distance measuring system of 2 black dots for my research.
I'm using Match Pattern 4 Vi for this research but i am curious about subpixel accuracy.
my camera's resolution is 10um for 1pixel but matched pattern coordinates in pixel are not discretized by integer like (1000.12, 2003.54) not (1000, 2003)
In the situation of matched pattern coordinate's digits are 6. my question is can i measure much smaller scale when i put block dot in lower number of pixel (1.00001, 2.00002) zone than large number of pixel (1000.12, 2003.54) zone?
Thanks.
10-10-2024 10:10 AM
@moyong wrote:
I'm using Match Pattern 4 Vi for this research but i am curious about subpixel accuracy.
The output cluster of Match Pattern 4.vi contains only single precision floating point values, so at most you can expect around 6 significant digits of precision. Keep in mind the display format for that indicator is set to 2 decimals.
But of course precision is not the same as accuracy. I seriously doubt the pattern matching algorithm would give you pixel locations accurate within 4 decimals. If that were the case NI would have used double precision floating point values. Two decimals sounds more reasonable so I would keep it at that.
10-10-2024 10:54 AM
Your pixel intensities are quantized to probably 256 value and the position of each pixel is an integer. To get sub-pixel resolution adjacent pixels need to be utilized and e.g. fit to a 2D Gaussian (or similar) to get a fractional position. Obviously, you don't have "dots" but a black "peak" that covers quite a few pixels. The precision of determining the exact "center" position depends on noise and all the mentioned data limits. I doubt you get better than 10% of a pixel.
Can you explain what you mean by "zone" and what you are trying to put where? The subpixel determination will probably be most accurate near the center. Edge pixels with be more affected by optical aberrations.
10-10-2024 11:35 AM
@moyong wrote:
Hi guys, i am developing distance measuring system of 2 black dots for my research.
I'm using Match Pattern 4 Vi for this research but i am curious about subpixel accuracy.
If you have pure black dots, then I would like to recommend to stay away from Pattern Matching. Instead of that usually we placing multiple line profiles in all directions (for example, every 30 degrees or at smaller steps), then detecting edges by falling intensities with subpixel accuracy (with fractional part), then perform circle fit to locate the center, and then finally measure distance. To get better signal to noise ratio you can average multiple images (if your image is still and dots are not moving, of course). You can use Pattern Matching to get initial location of the dots (if threshold doesn't work for some reason), but fine measurement is better to perform by locating the edges.
10-10-2024 01:49 PM - edited 10-10-2024 01:56 PM
@altenbach 작성:
Your pixel intensities are quantized to probably 256 value and the position of each pixel is an integer. To get sub-pixel resolution adjacent pixels need to be utilized and e.g. fit to a 2D Gaussian (or similar) to get a fractional position. Obviously, you don't have "dots" but a black "peak" that covers quite a few pixels. The precision of determining the exact "center" position depends on noise and all the mentioned data limits. I doubt you get better than 10% of a pixel.
Can you explain what you mean by "zone" and what you are trying to put where? The subpixel determination will probably be most accurate near the center. Edge pixels with be more affected by optical aberrations.
dear altenbach,
thanks for you replying first.
The "zone" that I mean was left side of image has low x pixel value and right side of image has high x pixel value. so in single precision(6 digits) right side has less decimal than left side thus "can't I measure more accurate values when I put black dots in the right side?" was my question.
my goal is mark 2 black dots on paper or something and measure the distance between 2 black dots in real-time.
I'm doing that with match pattern 4 vi by subtracting each center coordinate(only x now) of matched pattern
I am appreciated your help. thanks.