LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sort Grid array and find the 4 corner dots.

What I am trying to do is this:  I am using NI Visions find circles vi on a grid array or dots which gives me a 1D array of clusters.  In these clusters is the x,y coordinates of the grid dots that have been found.  I need to figure out which ones are the 4 corner dots and the 4 center dots along the edges.  The problem is the 1D array the find circle routine outputs is not in a logical order.  My grid could possibly change in size too.  Right now it is 14x12 but could be 13x12 or 14x13 or something like that. 
 
I have found that if I send the 1D array of clusters though the sort 1D array it will sort it from top to bottom left to right, which I will then know that teh 1st element is the top left corner and the last element is the bottom right corner, but I am not sure what the easiest way is to figure out the rest of them. 
 
Any help would be appreciated.
 
I am using labview 7.1 and NI Vision 8.0
 
Thanks
 
Brad
Brad Remenak
Certified LabVIEW Architect
0 Kudos
Message 1 of 2
(2,163 Views)
Hi Brad,

If you want to get the coordinates of specific dots on the image, you can search for the dots using different ROIs that only focus on certain areas of the image (ex: use an ROI that only searches in the upper-right corner so that you know the 1 match that shows up is definitely there).  Without knowing how consistent the dot locations are, I would suggest dividing up the ROI dimensions based on the variable size of the grid.

Hope this helps,
Irene Chow
National Instruments
0 Kudos
Message 2 of 2
(2,145 Views)