regionFilling

Accepts a seed point which is used to fill regions with similar statistical characteristics in a BW image.
3 Downloads
Updated 10 Aug 2023

View License

Region Filling Algorithm for Selecting Regions of Localized Pixels
This function accepts an image and seed (mandatory)
Other variables are not needed but can be submitted as name value args
UseDefaults - logical - overrides other NV args if true
InitialTolerance - numeric - vector of length 2
ToleranceFactor - numeric - scalar
MaxIterations - uint - scalar
MinError - numeric - scalar
MaxPixels - numeric/int - must be smaller than nnz(image)
FillHoles - logical - fills holes in mask at end
OUTPUTS
mask - logical - size of image
indices - table - X, Y indices that correspond to mask trues
options - struct - Name-Value arguments specified or defaults
DIRECTIONS FOR USE
There are 3 mandatory inputs. The first is an image on which you would
like to place a mask.
The second is an error map which is an array equal
in size to the image, but contains an error quantity like R^2. This was
intended for use with quantitative secondary maps derived from
mathematical functions operating on raw images. If your image does not
have an associated error map, then you may submit an array of zeros equal
in size to the image or the algorithm will create that for you if the
second input does not meet the attribute validation criteria below.
The third input is a 2 element vector corresponding to two indices (x and
y) on the image. This is the seed point which is used to develop a mask.
All other inputs are optional.
Once you run this function it sends back a mask the same size as the
image with the seed point and surrounding points that meet the criteria
specified labeled as 1.
NOTES
It is recommended that you start by showing the image, drawing a seed
point with drawpoint and using the 'Position' field of the point ROI as
the seed point in the inputs.

Cite As

Alexander Moody (2024). regionFilling (https://www.mathworks.com/matlabcentral/fileexchange/133587-regionfilling), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0