File Exchange

image thumbnail

flood fill (scanline)

version 1.0.0.0 (23 KB) by Maxim Vedenyov
Flood fill or paint bucket tool in matlab, like imfill, scanline algoritm, with animation.

1.9K Downloads

Updated 14 Sep 2010

View License

http://simulations.narod.ru/
This is flood fill or paint bucket tool in matlab. scanline algoritm used because it fast. Seeds shown as red dots. The function itslef is flood_fill.m
rest files:
zz_flood_fill_test.m - run it to test flood_fill.m
zz_flood_fill_test_movie.m - run it to get animation
zz_flood_fill_movie.m used in animation
explane.png - this picture explane how scanline works
smile.png - used in flood fill test

The idea is fill the object with horizontal lines. during line scan the line set seeds up and down if there is a place (explane.png). In next iteration new scan lines start from seeds. seed accumulated to a stack.

Cite As

Maxim Vedenyov (2021). flood fill (scanline) (https://www.mathworks.com/matlabcentral/fileexchange/28716-flood-fill-scanline), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!