Fills a connected region with a given value. More...
Go to the source code of this file.
Functions | |
| template<class T > | |
| void | vil_flood_fill_row (vil_image_view< T > &image, unsigned i, unsigned j, T v, T new_v, unsigned &ilo, unsigned &ihi) |
| Search along i direction either side for limits of pixels matching v. More... | |
| template<class T > | |
| void | vil_flood_fill4 (vil_image_view< T > &image, unsigned seed_i, unsigned seed_j, T v, T new_v) |
| Flood fill on a 4-connected region. More... | |
| template<class T > | |
| void | vil_flood_fill4 (vil_image_view< T > &image, unsigned seed_i, unsigned seed_j, T v, T new_v, std::vector< vil_chord > ®ion) |
| Flood fill on a 4-connected region, and record region. More... | |
| template<class T > | |
| void | vil_flood_fill8 (vil_image_view< T > &image, unsigned seed_i, unsigned seed_j, T v, T new_v) |
| Flood fill on a 8-connected region. More... | |
| template<class T > | |
| void | vil_flood_fill8 (vil_image_view< T > &image, unsigned seed_i, unsigned seed_j, T v, T new_v, std::vector< vil_chord > ®ion) |
| Flood fill on a 8-connected region, and record region. More... | |
Fills a connected region with a given value.
Definition in file vil_flood_fill.h.
| void vil_flood_fill4 | ( | vil_image_view< T > & | image, |
| unsigned | seed_i, | ||
| unsigned | seed_j, | ||
| T | v, | ||
| T | new_v | ||
| ) |
Flood fill on a 4-connected region.
Find every point in 4-connected region with values image(i,j)==v containing (seed_i,seed_j), and change their values to new_v
Note, currently uses inefficient (x,y) access to image. Could be improved using fast pointer access to work along the rows.
Definition at line 44 of file vil_flood_fill.h.
| void vil_flood_fill4 | ( | vil_image_view< T > & | image, |
| unsigned | seed_i, | ||
| unsigned | seed_j, | ||
| T | v, | ||
| T | new_v, | ||
| std::vector< vil_chord > & | region | ||
| ) |
Flood fill on a 4-connected region, and record region.
Find every point in 4-connected region with values image(i,j)==v containing (seed_i,seed_j), and change their values to new_v
On exit region is filled with a set of image chords which cover the region.
Note, currently uses inefficient (x,y) access to image. Could be improved using fast pointer access to work along the rows.
Definition at line 97 of file vil_flood_fill.h.
| void vil_flood_fill8 | ( | vil_image_view< T > & | image, |
| unsigned | seed_i, | ||
| unsigned | seed_j, | ||
| T | v, | ||
| T | new_v | ||
| ) |
Flood fill on a 8-connected region.
Find every point in 8-connected region with values image(i,j)==v containing (seed_i,seed_j), and change their values to new_v
Note, currently uses inefficient (x,y) access to image. Could be improved using fast pointer access to work along the rows.
Definition at line 152 of file vil_flood_fill.h.
| void vil_flood_fill8 | ( | vil_image_view< T > & | image, |
| unsigned | seed_i, | ||
| unsigned | seed_j, | ||
| T | v, | ||
| T | new_v, | ||
| std::vector< vil_chord > & | region | ||
| ) |
Flood fill on a 8-connected region, and record region.
Find every point in 8-connected region with values image(i,j)==v containing (seed_i,seed_j), and change their values to new_v
On exit region is filled with a set of image chords which cover the region.
Note, currently uses inefficient (x,y) access to image. Could be improved using fast pointer access to work along the rows.
Definition at line 208 of file vil_flood_fill.h.
|
inline |
Search along i direction either side for limits of pixels matching v.
Fills in all such pixels with new_v. Returns limits in ilo and ihi
Definition at line 20 of file vil_flood_fill.h.
1.8.15