| Image Processing Toolbox | ![]() |
Syntax
Description
BW = imregionalmin(I) computes the regional minima of I. The output binary image BW has value 1 corresponding to the pixels of I that belong to regional minima and 0 otherwise. BW is the same size as I.
Regional minima are connected components of pixels with the same intensity value, t, whose external boundary pixels all have a value greater than t.
By default, imregionalmin uses 8-connected neighborhoods for 2-D images and 26-connected neighborhoods for 3-D images. For higher dimensions, imregionalmin uses conndef(ndims(I),'maximal').
BW = imregionalmin(I,CONN) specifies the desired connectivity. CONN may have any of the following scalar values.
Connectivity may be defined in a more general way for any dimension by using for CONN a 3-by-3-by- ...-by-3 matrix of 0's and 1's. The 1-valued elements define neighborhood locations relative to the center element of CONN. Note that CONN must be symmetric about its center element.
Class Support
I can be any nonsparse, numeric class and any dimension. BW is logical.
Example
A = 10*ones(10,10); A(2:4,2:4) = 3; % minima 3 lower than surround A(6:8,6:8) = 8; % minima 8 lower than surround A = 10 10 10 10 10 10 10 10 10 10 10 7 7 7 10 10 10 10 10 10 10 7 7 7 10 10 10 10 10 10 10 7 7 7 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 2 2 2 10 10 10 10 10 10 10 2 2 2 10 10 10 10 10 10 10 2 2 2 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 B = imregionalmin(A) B = 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
See Also
conndef, imreconstruct, imregionalmax
| imregionalmax | imresize | ![]() |