Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Pattern Track Position

Hi 

 

i was wondering how to use two patterns to calculate if one is out of position or not.

 

Take an Object like a dish with a pattern in the top right corner of the dish. This pattern is always fixed in position. Then another pattern is printed on the dish, sometimes this pattern is printed out of position and it need to be rejected if done so.

 

would you calculate the distance between the patterns for a know good dish or use the X Y offsets or how would this be done? Thanks

Pattern

0 Kudos
Message 1 of 5
(4,640 Views)

You 'd better use both X and Y offset as a limit.

0 Kudos
Message 2 of 5
(4,626 Views)

Hello,

 

I agree to use the offset in U and V direction.

Is the reference pattern circular or does it have a more distinct shape? Is your background uniform (the area where the reference pattern is positioned)? Is the camera position constant?

You should find the reference pattern first and apply a reference coordinate system. In the next step, you can measure the offset from this reference coordinate system. If your position of the reference pattern is repeatable (so that every sample with its reference pattern is in the same position every time), then you even don't need the coordinate system to be able to calculate the offset.

 

You should also calibrate the camera to correct the lens distortion. The tangential component should not be a problem with most cameras as this error is mostly the result of the lens misalignment, but the radial error usually enlarges when moving away from the optical center of the camera. I do not know what kind of setup you have.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 3 of 5
(4,619 Views)

thanks both patterns have a distinct feature.

if the first pattern returned x,y,angle and the second pattern returned x,y,angle is it simply a case of calculating the x y offsets. What about determining if the second pattern is rotated?

0 Kudos
Message 4 of 5
(4,607 Views)

Hello,

 

i have attached a simple example created in NI assistant in LV2013 (I am saying this, because the pattern matching algorithms were upgraded since LV2012. It is saved for LV2010, so i hope you can make it work).

 

In the attachment there are two images and two templates. The algorithm calculates the offset difference and the angular difference. Keep in mind that the origin of the image coordinate system is in the top-left corner.

 

Tell me if you have any problems with it.

 

Hope this helps,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 5 of 5
(4,591 Views)