11-07-2006 05:13 PM
11-08-2006 05:40 AM
11-08-2006 08:02 AM
Thanks Wiebe. Would someone else have a LabVIEW program as well?
7J1L1M
11-08-2006 11:40 AM
11-08-2006 12:10 PM
Wiebe,
Thanks for you reply. I have two main reasons for the floodfill thing. For one program, I need it for a picture editor, but I can't use IMAQ (hard to use) and I don't have quite all the commands. I also need to use the algorithm to tailor up a mask for a picture interface. I was also hoping to use something that doesn't require outside files (just in case it causes a computer failure, my LabVIEW doesn't seem to like them very much...). I will try the C-Code, but how would I implement it into LabVIEW? I am not very good at the DLL interface node, everytime I do it myself, I always mess up. Thanks for your help, and I look forward to your next email.
7J1L1M
11-08-2006 12:12 PM
Oh, sorry, I forgot to specify the speed and other things.
I would prefer it to be a nice, fast, and simple algorithm.
Also, I need its sensitivity to be definable (4 and 8 connectivity). Sorry I forgot to say that!
7J1L1M
11-09-2006 08:31 AM
Ok... It's not that hard. Just don't try to do it with recursion, that would complicate things a lot! I might want to use the algorithm myself, so I made the vi. Although it spoils your fun of making the vi, I'll post it here.
This implementation uses the naive, simple algorithm. The scanline algorithm should be much ("orders of magnitude", wikipedia) faster, but harder to implement. So simple and fast are, as often, mutualy exclusive.
Regards,
Wiebe.
11-09-2006 08:48 AM
Wow! Thanks!
I was trying to make something that would recursively follow the outline of the fill thing. Would that have worked as well? Thanks again!
7J1L1M
11-09-2006 09:02 AM
By the way, I tried out the floodfill vi. It works great, but at first it seemed to have trouble coloring in a line when it got long. This was when the pixel selector was set to 8 and the line I tried to floodfill was at a 45 degree angle. It only partially colored it, then its like it got to a limit of pixels it could color in. Now it suddenly works. Maybe it was just me, but just in case, I thought you should know. Other than that, it works great! Thanks again!
7J1L1M
11-09-2006 10:40 AM