LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Edge Tracking

The last part in the sequential algorithm is a bit tricky. This would be a lot easier with a map, but that's not there in LV18... It feels like it need some kind of recursion (get region equivalent, get that region's equivalent), but haven't giving it a lot of thought yet. If there is a bug, I put my bet on that part.

 

Other then that, I'm pretty confident that it correctly counts connected elements. It wouldn't matter to the total (sum of all regions).

 

Keeping track of N, NW, W, and NE regions can be done in shift registers. That might be more performant, but complexity will increase as well. I started with that, but decided to make it work first. Readability is important too...

Message 21 of 23
(989 Views)

Good Morning Wiebe! I tried looking at your VIs you posted and I couldn't view them because I only have labview 2016. Also when I tried your suggestion of getting rid of the local variables and only using the wires, I ran into a problem that said I couldn't connect polymorphic data into the terminal going from the input array to the first bundle by name at the top left of the vi. 

 

However, I think I figured out a way to count up how many elements are in the largest island. I attached my VI if you wanted to take a look. I would still love to look at the VIs you posted, as I'm sure there are areas where the code I posted can improve. Thanks so much for all your help!

0 Kudos
Message 22 of 23
(981 Views)

No problem!

 

I'd go straight for the Labeling.vi. It's more to the point, and probably much faster.

Download All
Message 23 of 23
(977 Views)