Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image offset and orientation

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".

0 Kudos
Message 1 of 15
(5,192 Views)
Image offset should be taken careof by pattern matching itself. If you have defined a very strick ROI try increasing it. Can you post a few camera images?
0 Kudos
Message 2 of 15
(5,191 Views)

Dear

 

The capture image is in attached.

In that image, the right-up part, "REC" area is my pattern.

 

Thank you.

0 Kudos
Message 3 of 15
(5,164 Views)
If can then post atleast a couple of images where there is a shift in "REC" so that i can work on it. Once immediate thought is to process the image (atleast a straight forward gamma correction) to enhance the dull image first and then go for pattern matching.
0 Kudos
Message 4 of 15
(5,140 Views)

your original

 

 

After brightness correction

 

after.jpg

 

 

Message Edited by muks on 04-28-2010 11:40 AM
0 Kudos
Message 5 of 15
(5,139 Views)

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.

0 Kudos
Message 6 of 15
(5,119 Views)

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?

0 Kudos
Message 7 of 15
(5,117 Views)

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

0 Kudos
Message 8 of 15
(5,100 Views)
If I understand you correctly (that you are using 1:88 as the template) then you are definetly choosing a very bad template to begin with. You already have 88 next to it that makes the probabilty of wrongly finding/matching very high. Choose the distinct "REC" the red one and if you are sure you can draw the overlay based on the number of pixels distance from the template matched.
0 Kudos
Message 9 of 15
(5,091 Views)

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.

0 Kudos
Message 10 of 15
(5,083 Views)