If X
is a pixel image with numeric values,
then levelset(X, thresh)
finds the region of space
where the pixel values are less than or equal to
the threshold value thresh
.
This region is returned as a spatial window. The argument compare
specifies how the pixel values should be
compared with the threshold value.
Instead of requiring pixel values to be less than or equal to
thresh
, you can specify that they must be less than (<
),
greater than (>
), equal to (==
), greater than or equal
to (>=
), or not equal to (!=
) the threshold value
thresh
.
If X
has non-numeric pixel values (for example, logical
or factor values) it is advisable to use only the comparisons
==
and !=
, unless you really know what you are doing.
For more complicated logical comparisons, see solutionset
.