| |
- simple_region_growing(img, seed, threshold=1, conn=4)
- A (very) simple implementation of region growing.
Extracts a region of the input image depending on a start position and a stop condition.
The input should be a single channel 8 bits image and the seed a pixel position (x, y).
The threshold corresponds to the difference between outside pixel intensity and mean intensity of region.
In case no new pixel is found, the growing stops.
The connectivity can be set to 4 or 8. 4-connectivity is taken by default, and 8-connectiviy requires most computations.
Outputs a single channel 8 bits binary (0 or 255) image. Extracted region is highlighted in white.
|