04-23-2010 07:46 AM
Dear
I use NI VISION to develop a image error detection program.
I use a CCD camera to capture a image then compare it with a golden image.
But, the position define is a big problem during my test.
Sometime I have a image offset problem between the captured image and golden image.
Is there any way I can re-define the image position between these two image?
Should I define some reference points on golden image then use it to adjust the captured image?
If so,could you please inform me how to define it and how perform the image position adjustment.
Thanks!
The file in attached is a part image of script file that include "Pattern Matching" and "Set Coordinate System".
04-23-2010 07:50 AM
04-25-2010 08:35 PM
Dear
The capture image is in attached.
In that image, the right-up part, "REC" area is my pattern.
Thank you.
04-28-2010 01:02 AM
04-28-2010 01:09 AM - edited 04-28-2010 01:10 AM
your original
After brightness correction
04-29-2010 06:24 AM
Hi, muks
I have two images, golden and test image. Then, make Pattern Match functioin for them.
I will got two sets of information from Pattern Match.
Those information inculding axis of center, left-up, right-up, right-down and left-down, respectively.
Thus, we must know the object size of full image.
If our object is 800 x 200, and pattern match is on right-up coner of object.
Then, using left-down axis to subtract a number, new axis is generated.
Using this new axis and right-up axis of coner, new rectangle is our target.
The same method for both standard and test image.
04-29-2010 06:48 AM
mengshu wrote:Hi, muks
I have two images, golden and test image. Then, make Pattern Match functioin for them.
I will got two sets of information from Pattern Match.
Those information inculding axis of center, left-up, right-up, right-down and left-down, respectively.
Thus, we must know the object size of full image.
If our object is 800 x 200, and pattern match is on right-up coner of object.
Then, using left-down axis to subtract a number, new axis is generated.
Using this new axis and right-up axis of coner, new rectangle is our target.
The same method for both standard and test image.
I am not getting it very clearly even after 3 readings. Can you attach some images so that i can understand it better?
04-29-2010 09:49 PM
1. Check the image file
2. White rectangle is our object
3. Green rectaangle is pattern
4. Position is the center axis of the pattern
5. Bounding have 4 axis information, array 0 is left-up, array 1 is right-up, array 2 is right-down and array 3 is left-down of green rectangle
6. Because we know the size of object, for example 200x100
7. Using left-up axis(237,730) to add a number of pair(150,100) and ensure the new rectangle can overlay all object area
8. The new rectangle is new extracted ROI
the same step of both golden and test image
04-30-2010 01:36 AM
04-30-2010 03:43 AM
Hi, muks
You are right.
How to choose a pattern is importance.
Because golden and test image both captured from CCD.
Both of them should have the same configuration, likes shutter, gain and brightness.
In general, pattern match offen used on high complexity image.
I think the complexity of VFD is not higher enough.
But, the orientation from pattern match and axis reference is ok.