LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to locate segments from a reference image to another image?

Solved!
Go to solution

Is there a way to locate segments from a reference image to another image? We need this in our project in order to compare the segments from a reference image(in our case, our subject is a PCB) and another image(other PCB) disregarding its position.

0 Kudos
Message 1 of 6
(2,551 Views)

I do not understand your description. Can you show an illustration?

0 Kudos
Message 2 of 6
(2,541 Views)

Here is an illustration sir. Sorry if its confusing.

 

segment.png

The segments from the reference image(circled in different colors) are being located in the actual image(circled in corresponding colors) disregarding its position. We are trying to compare segment by segment from both images. But before we do that, we filter the actual photo and threshold both images to make it look more similar and in binary.

 

Thank you sir.

0 Kudos
Message 3 of 6
(2,525 Views)
Solution
Accepted by topic author pinkman

OK, this is more complicated problem, and the vision module would probably a good choice at this moment, but I am not familiar with it.

 

Are both images at exactly the same size, scale and resolution and contain the same features? Do they (mostly, except for the mistakes you are trying to find) only differ by a horizontal vertical shift? Could there also be a rotation?

 

I assume that the colored circle are for illustration of the problem, and not actually present in the images. Right? How is the interesting area selected?

 

Assuming there is no rotation, tilt, or scale difference, As a first step, you need to find the offsets for alignment. Maybe a 2D crosscorrelation would give you that.

0 Kudos
Message 4 of 6
(2,520 Views)

We are trying to limit both images with the same resolution. By size and scale, do you mean the patterns? If you mean the patterns, that is our problem right now, since the patterns in the actual image usually does not fall in place based with the ideal position and the size usually differ due to printer error or etc. 

 

 

Horizontal and Vertical shift are also included in our problems, and so is rotation. The colored circles represents that the patterns from the reference image are being located in the actual image if it is present.

 

I will try that sir, thank you.

0 Kudos
Message 5 of 6
(2,514 Views)