Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Pattern match for rotational measurement

Solved!
Go to solution

Hi,

 

I am using the IMAQ Match Pattern 2 vi to try and measure the rotation of a component within an image. (LabVIEW 2011)

 

The input image is made up from data gathered from a laser profile scanner, and is converted into an 8-bit grey level image with height information replacing the usual light intensity data. (This: http://www.micro-epsilon.co.uk/laser-scanner-profile-sensor/index.html)

A copy of my raw image is attached.

 

I have done a bit of pre processing to the image before trying to pattern match, so am dealing with a binary image (just 0 and 255) of the central hexagon on the image. (assuming this will make it easier?)

 

I have also attached two images with the ROI from the pattern match overlaid. Both images are separate captures of a stationary object, so the pattern match should be in an identical position, however it is not, therefore an angle change of 1.6 degrees is reported when the object has remained stationary.

 

Does anyone have any tips as to how to set up the pattern match algorithm to be a bit more consistent and repeatable?

 

The settings I am currently using are:

Learn Pattern, learn mode = All

Setup Match, sub pixel accuracy = true, match mode = rotation invariant, rotation angle ranges = -10 +10

minimum match score = 500

 

Thanks in Advance.

 

 

 

Download All
0 Kudos
Message 1 of 3
(3,426 Views)
Solution
Accepted by Phil_

I suspect converting to binary is making it harder, not easier.  It really depends on how the algorithm works.

 

What does it look like when the part is rotated?  Based on the image, it looks like there are some perspective issues that you are going to have to deal with.  I would be interested in seeing an original image of the same part rotated a known angle, perhaps 30 degrees.  Will the shape remain the same?

 

If the binary shape is still the same after rotation (perfect match), I would consider using binary searches and analysis instead of pattern matching.  I seem to remember some tools that can measure several properties of a binary image that can be used to determine the rotation of the object.

 

If the binary shape is not the same, manipulating the original image may fix the problem.  I think if you resampled the image and increased the Y resolution to make the background ovals circular (assuming they are really circles), you could then measure rotation accurately.  I would still consider binary tools in this case.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 3
(3,418 Views)

Cheers Bruce, 

 

Looks like it was the binary that was making it worse. Now working much better with the full range of grey levels.

 

 

0 Kudos
Message 3 of 3
(3,408 Views)