Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find diffuse patterns in an image?

Dear colleagues

 

I am trying to use "IMAQ Find Geometric Pattern.vi" to find the rotation of the diffuse spots in the attatched image. Ideally the spot centres should bi placed on a horzontal line and want to find the angular deviation of this centre line. The template is created by calculating the horizontal and vertical profiles, and then multiplying them to create a new image with horizontal spots, quite similar to the original image.

 

Hoping that someone has some experience in similar applications. The solution might be to fiddle with the parameters in "IMAQ Setup Match Geometric Pattern", but these seem more adapted patters with distinct edges. The help for the parameter settings are quite hard to understand.

0 Kudos
Message 1 of 9
(4,225 Views)

Are you trying to find the three large spots, or the little bumps visible within each spot?

 

There is no way pattern matching will work to find the three large spots.  You could probably use standard pattern matching to find the bumps, though, since they all look about the same.

 

To find the large spots, you will probably want to smooth the image enough to eliminate the bumps, then locate the bright spots.  It is going to be difficult.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 9
(4,208 Views)

Dear Bruce

 

Thanks for the reply. I also found it diffucult, at least with the IMAQ functions, so I solved this by dividing the image in three smaller images ("IMAQ Extract") containing the three spots. By using "IMAQ Linear Averages" and fitting a Gaussian curve to the vertical profile, I could get the centres of the diffuse spots.

 

This is something I really miss in the the Vision Development Module, some kind of cross-correlation of images. Or is it just that I haven't found the appropriate functions?

0 Kudos
Message 3 of 9
(4,175 Views)

Do you just want to find the centre of the 3 spots? Use circle detection.

0 Kudos
Message 4 of 9
(4,173 Views)

18607iA3E96CA6084CEC66

 

 

Or you can extract the images and use Imaq centroid as well

 

18609i60DADCA4DAE2941E

 

0 Kudos
Message 5 of 9
(4,168 Views)

Dear muks

 

It seems like you have used threasholding before finding the centres of the circles. Can you give me the calculated vertical centre positions that you got? Then I can compare them with my results.

0 Kudos
Message 6 of 9
(4,163 Views)

I have used dialte also before the circle detection. Anyway this is what i get

 

292,526

 

683,521

 

1048,521

 

as the centres

0 Kudos
Message 7 of 9
(4,157 Views)

Dear muks

 

Horizontal and vertical can be a bit confusing, but I meant the "height" or the "y position" of the centres. Anyway, this is what I got:

 

527,462

521,718

517,089

 

My horizontal position of the centre spot is 678,632.

 

However there is not "truth" when dealing with measurements, I believe that using as much information as possible when analysing data, gives more relevant results. This is one of the reasons that I wanted to make some kind of cross-correlation between a template and this image. As I couldn't find any such IMAQ function, I choosed to use the y average, which also uses all the data from the image.

0 Kudos
Message 8 of 9
(4,153 Views)

I guess you are posting the values like y,x from the 520s value that you have posted. Here is my script

 

 

0 Kudos
Message 9 of 9
(4,151 Views)