From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Search scaled object

Solved!
Go to solution

Hi

 

I'm sorry if I'm asking obvious question, I have a problem with finding pattern in a image from a camera.

Camera sees the calibration block and sends the the pixel values as a distance. The calibration block is seen from above like that:

imagepng.png

First step is to find the regions before first thin black line, and after the second one.

Because the calibration block can be further away or closer, this image can be stretched, and the further the block is, the brighter and shorter it gets. Black parts are when the object is out of range or the camera can't see it

 

I wanted to start from finding this pattern:

patern.png

and the found match will give me info how stretched is the image, so I can cut those fragments from pixel array.

 

It works all right, when the pattern is the same size as the image, but when I've re-sampled the image by 10%, the imaq couldn't find the pattern anymore. I was using the Setup Match Geometric Pattern with Scale selected to True, I was trying all different settings, but couldn't find this anymore.

 

Is there another way I could do this?

Thanks for ideas

Thanks

0 Kudos
Message 1 of 3
(2,454 Views)
Solution
Accepted by topic author siadajpan
-Pattern Matching doesn't work with scaled images.
-For Geometric Matching to work you need to select scaling option and also with template to be scaled or use pyramidal search.
-If you want to get the distance between those two bars, try IMAQ Rake to get the edges or IMAQ Horizontal Max Clamp Operations.
-When you say image stretched, I believe it is the Pattern region and not the entire image am i right?
Thanks
uday
0 Kudos
Message 2 of 3
(2,398 Views)

Hi

Thanks for reply. I was using the geometric match with scaling set to true. Please see the vi attached.

 

About image stretched, yes it should be the pattern region, but it doesn't really matter. If the whole image is stretched the pattern region will also be re-sampled same way

 

Thanks for the idea about IMAQ Clamp, I think this is the better way to do it! Just to understand what I was doing wrong, can you point me what was I missing in my solution, please?

0 Kudos
Message 3 of 3
(2,392 Views)