Showing results for 
Search instead for 
Did you mean: 

Floodfill Algorithm

Hmm, I didn't think about that.  Because now that you mention it, I redid the scenario, but it worked flawlessly.  Maybe I picked something that looked white (that was the color I was using).  Thanks again for your help.  I hope to talk to you again.


0 Kudos
Message 11 of 19

hey all,


did somebody actually tried to implement the scanline algorithm in labview?

iam not that good in labview and couldnt make it work 😕


the floodfill vi from wiebe@carya works for me but it just takes an awful time cause my 2D array is huge.

so therefore i need a much faster algorithm.


kind regards,


0 Kudos
Message 12 of 19

Hello re-fuse,


 I am currently unable to find an implemented scanline algorithm in LabVIEW. However, here is a suggestion to speed up the LabVIEW provided by wiebe@carya.


The link above describes a few ways to increase efficiency, including replacing a while loop with a for loop (if you know the iterations or size of the image).





Message 13 of 19

Firstly thank you for the floodfill contribution by wiebe@CARYA


I required a bit more performance, but only for 8bit images..... and improved the performance a bit.

I then replaced the array manipulation by a fixed array size, and 2 pointers, which improved performance by a factor of 10, but only for large arrays (images from a webcam)

Attached please find both options.

The searth path size is limited to 16*image size..... which occationally fails to fill a complex image.


I was hoping Opencvl would have the floodfill alrorithm included, but not yet....

If someone can beat this performance, please share.

Download All
Message 14 of 19

thx philippe for the input! 🙂


unfortunately i can't open your VIs cause i've only got LV 2013.

could you save it for LV2013 please?

0 Kudos
Message 15 of 19

I tried to send the vi in version 9, and then in v13, but the NI web site is saying:


0 Kudos
Message 16 of 19

maybe upload the VI somewhere else?

for example:

0 Kudos
Message 17 of 19

.zip your files

0 Kudos
Message 18 of 19

Zipped with version for 2009 attached

Download All
Message 19 of 19