Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Connected Component Labelling Algorithm

Hi,

 

I'm currently trying to implement a connected component labelling algoirhtm for a binary occupany grid.

 

The grid is 200 cells x 200 cells with values of 1 and 0 respectively.

 

I understand the fundamental concept of a CC labelling algorithm, and am trying to implement it using 8-connectivity (i.e. the 9 nearest neighbours are considered)

 

Is there any facility to support this in Labview other than actively indexing my array? My current implementation scans each element of the array looking for a non-zero value, once it finds one it is then supposed to interrogate the value of the previous four nearest neighbours to see if any of those have a non-zero value. If they do, the current cell is given that same value (the same class label), if all of the neighborus are zero then the cell is assigned a label kk is then incremented. I'm still working on this VI.

 

I know that MATLAB has some support for this type of algorihtm with functions such as bwconncomp and bwlabel, but I'm unfamiliar with any such functionality in Labview. Any advice would be greatly appreciated.

 

Many Thanks

 

P.S. I am currently using Labview 2015 and will post my attempt asap 

0 Kudos
Message 1 of 3
(3,649 Views)

I presume you have the Vision toolkit?  If so, the IMAQ Label vi would seem to do exactly what you want, with the option of 4- or 8-connectivity.

Message 2 of 3
(3,642 Views)

That was exactly what I was looking for thank you.

 

I suspected there was support for this in LV, but I'm not very familiar with the vision development module

 

0 Kudos
Message 3 of 3
(3,625 Views)