FUNCTION REFERENCE

activecontour

Evolve a mask towards image region boundaries.

Evolve a mask towards image region boundaries.

Syntax

BW = activecontour(A, mask)

Syntax

BW = activecontour(A, mask, n, method, 'SmoothFactor', smooth, 'ContractionBias', bias)

mask is a binary image matching the first two image dimensions; multichannel images require a logical mask. Numeric zero/one masks are accepted for grayscale images, as in the public examples. n defaults to 100. method is 'Chan-Vese' (default) or 'edge'. The Chan-Vese method accepts multichannel images and minimises two-region intensity energy. The grayscale edge method uses a geodesic level set. SmoothFactor is nonnegative (defaults 0 and 1 respectively); positive ContractionBias encourages shrinking (defaults 0 and 0.3). Output BW is logical. Evolution is cancellable and the initial image-border layer is removed.

Example

I=zeros(9); I(3:7,3:7)=1; M=zeros(9); M(2:8,2:8)=1; activecontour(I,M,20)

Differences from MATLAB: 2-D spatial images only; discrete evolution and stopping can differ from MATLAB's numerical solver.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.