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: 

Orienting an array of dots in an image

I have images that consist of a circle within which is an array of 12x14 dots. The array remains constant in size, but it varies in intensity, rotation, and location within the circle and the circle itself varies in location in the image. My task is to measure the intensity of the dots. I need to figure out how to place the dot array into a known and repeatable (I can do it on any given image) orientation so I can locate the dots and measure them. Once I get them properly oriented, measuring them is easy. Figuring out how to get LabVIEW to programmatically orient the dot array to vertical or horizontal is not. Any suggestions? I've attached a sample image for reference.

 

Thanks

0 Kudos
Message 1 of 4
(2,564 Views)

You need to be a little systematic.  Often when doing things like Pattern Recognition, it is easier to work with Binary Images, i.e. pixels either On or Off.  There are various thresholding methods in IMAQ that will get you started in this.  You may want to do one for the Outer Circle(s) that define your substrate -- once you get the circle, you know (more or less) the location of your disk.  Now mask everything else away except the interior (which includes your red dots), and do another thresholding operation to get just the dots.  Now all you need is the orientation -- I would guess that if you did a 2D Fourier Transform of the binary image, you could deduce the axes along which the dots are aligned (there are obviously several, but the most intense should be through rows and columns).

 

I've not done much "machine recognition", so I can't be more specific.  However, I bet if you did searches on LabVIEW Object Recognition, you'd find useful hints and possibly even applicable code.

 

Bob Schor

0 Kudos
Message 2 of 4
(2,546 Views)

I've actually gone through the steps of limiting the image -- masking the interior of the circle, removing extraneous items, adjusting the brightness and contrast until the array is about all that is left. I will have to experiment with the 2D Fourier Transform to see what I can get from it. Thanks.

0 Kudos
Message 3 of 4
(2,518 Views)

FFT doesn't help. I'll have to keep looking.

0 Kudos
Message 4 of 4
(2,475 Views)