SOLUTIONS

BUILTIN MATHEMATICA SYMBOL
ChanVeseBinarize[image]
finds a twolevel segmentation of image by computing optimal contours around regions of consistent intensity in image.
ChanVeseBinarize[image, marker]
uses the foreground pixels of marker as the initial contours.
Details and OptionsDetails and Options
 ChanVeseBinarize implements an iterative active contour method to achieve a twolevel segmentation of an image.
 ChanVeseBinarize works with arbitrary grayscale and multichannel images.
 In ChanVeseBinarize[image, marker], marker can be given either as an image, a graphics object, or a list of points in the standard image coordinate system, where x runs from 0 to width and y runs from 0 to height, and position corresponds to the bottomleft corner of the image.
 ChanVeseBinarize uses the Euclidean distance between channel vectors to determine the similarity between pixels inside and outside of the contour.
 ChanVeseBinarize iteratively minimizes a functional that is a weighted sum of the contour length, the enclosed area, and the deviation between the image and the twolevel segmentation.
 The weights can be specified with the following options:

"AreaPenalty" 0 penalty associated with the area enclosed by the contour "LengthPenalty" 0.03 contour length penalty "LevelPenalty" {1.0,1.0} penalties for the total pixel deviations in the two segments "TargetColor" Automatic target foreground color  With the setting , both foreground and background colors can be specified.
 The maximum number of iteration steps is given by the MaxIterations option with default setting 100.
 The ChanVese segmentation of an image domain into the two segments and with contour minimizes the following functional of image :
 The ChanVese functional is parametrized by the length penalty , the area penalty , and level penalties and .
 The ChanVese algorithm partitions image such that the first segment will differ as little as possible from constant and the second segment will deviate as little as possible from constant . If constants and are not specified, one assumes c_{1}=Mean[f] in , and c_{2}=Mean[f] in .
 The contour between the two resulting segments and will exhibit a short length for , and for the area of will tend to be small or for tend to be large.
 The weighting coefficients , , , and are accessible through the following options.
 ChanVeseBinarize works with Image3D objects.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Binary segmentation of a satellite image:
In[1]:= 
Out[1]= 
New in 8  Last modified in 9
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »