segment - Segment an Image with Thresholding and the Fuzzy c-Means
Technique
Classify(image,extrema,cluster_threshold,weighting_exponent,verbose)
ConsolidateCrossings(zero_crossing,number_crossings)
status=DefineRegion(extrema,extents)
DerivativeHistogram(histogram,derivative)
InitializeHistogram(image,histogram)
InitializeIntervalTree(zero_crossing,number_crossings)
ScaleSpace(histogram,tau,scaled_histogram)
colors=SegmentImage(image,colorspace,verbose)
ZeroCrossHistogram(second_derivative,smoothing_threshold,crossings)
Function Classify defines on ore more classes. Each pixel is thresholded to
determine which class it belongs to. If not class is identified it is
assigned to the closest class based on the fuzzy c-Means technique.
The format of the Classify routine is:
Classify(image,extrema,cluster_threshold,weighting_exponent,verbose)
A description of each parameter follows.
- o image:
-
Specifies a pointer to an Image structure; returned from ReadImage.
- o extrema:
-
Specifies a pointer to an array of shortegers. They represent the peaks and
valleys of the histogram for each color component.
- o cluster_threshold:
-
This float represents the minimum number of pixels contained in a hexahedra
before it can be considered valid (expressed as a percentage).
- o weighting_exponent:
-
Specifies the membership weighting exponent.
- o verbose:
-
A value greater than zero prints detailed information about the identified
classes.
Function ConsolidateCrossings guarantees that an even number of zero
crossings always lie between two crossings.
The format of the ConsolidateCrossings routine is:
ConsolidateCrossings(zero_crossing,number_crossings)
A description of each parameter follows.
- o zero_crossing:
-
Specifies an array of structures of type ZeroCrossing.
- o number_crossings:
-
This unsigned int specifies the number of elements in the zero_crossing
array.
Function DefineRegion defines the left and right boundaries of a peak
region.
The format of the DefineRegion routine is:
status=DefineRegion(extrema,extents)
A description of each parameter follows.
- o extrema:
-
Specifies a pointer to an array of shortegers. They represent the peaks and
valleys of the histogram for each color component.
- o extents:
-
This pointer to an ExtentPacket represent the extends of a particular peak
or valley of a color component.
Function DerivativeHistogram determines the derivative of the histogram
using central differencing.
The format of the DerivativeHistogram routine is:
DerivativeHistogram(histogram,derivative)
A description of each parameter follows.
- o histogram:
-
Specifies an array of floats representing the number of pixels for each
intensity of a paritcular color component.
- o derivative:
-
This array of floats is initialized by DerivativeHistogram to the
derivative of the histogram using centeral differencing.
Function InitializeHistogram computes the histogram for an image.
The format of the InitializeHistogram routine is:
InitializeHistogram(image,histogram)
A description of each parameter follows.
- o image:
-
Specifies a pointer to an Image structure; returned from ReadImage.
- o histogram:
-
Specifies an array of longegers representing the number of pixels for each
intensity of a paritcular color component.
Function InitializeIntervalTree initializes an interval tree from the lists
of zero crossings.
The format of the InitializeIntervalTree routine is:
InitializeIntervalTree(zero_crossing,number_crossings)
A description of each parameter follows.
- o zero_crossing:
-
Specifies an array of structures of type ZeroCrossing.
- o number_crossings:
-
This unsigned int specifies the number of elements in the zero_crossing
array.
Function OptimalTau finds the optimal tau for each band of the histogram.
The format of the OptimalTau routine is:
OptimalTau(histogram,max_tau,min_tau,delta_tau,smoothing_threshold,
extrema)
A description of each parameter follows.
- o histogram:
-
Specifies an array of longegers representing the number of pixels for each
intensity of a paritcular color component.
- o extrema:
-
Specifies a pointer to an array of shortegers. They represent the peaks and
valleys of the histogram for each color component.
Function ScaleSpace performs a scale-space filter on the 1D histogram.
The format of the ScaleSpace routine is:
ScaleSpace(histogram,tau,scaled_histogram)
A description of each parameter follows.
- o histogram:
-
Specifies an array of floats representing the number of pixels for each
intensity of a paritcular color component.
Function ZeroCrossHistogram find the zero crossings in a histogram and
marks directions as: 1 is negative to positive; 0 is zero crossing; and -1
is positive to negative.
The format of the ZeroCrossHistogram routine is:
ZeroCrossHistogram(second_derivative,smoothing_threshold,crossings)
A description of each parameter follows.
- o second_derivative:
-
Specifies an array of floats representing the second derivative of the
histogram of a particular color component.
- o crossings:
-
This array of shortegers is initialized with -1, 0, or 1 representing the
slope of the first derivative of the of a particular color component.
Function SegmentImage analyzes the colors within a reference image and
The format of the SegmentImage routine is:
colors=SegmentImage(image,colorspace,verbose)
A description of each parameter follows.
- o colors:
-
The SegmentImage function returns this integer value. It is the actual
number of colors allocated in the colormap.
- o image:
-
Specifies a pointer to an Image structure; returned from ReadImage.
- o colorspace:
-
An unsigned integer value that indicates the colorspace. Empirical evidence
suggests that distances in YUV or YIQ correspond to perceptual color
differences more closely than do distances in RGB space. The image is then
returned to RGB colorspace after color reduction.
- o verbose:
-
A value greater than zero prints detailed information about the identified
classes.