segmentation.h file
Functions for segmentation and binarization. See Segmentation.
Classes
-
struct dip::
PerObjectEllipsoidFitParameters - Defines the parameters for the
PerObjectEllipsoidFit
function.
Functions
-
auto dip::
KMeansClustering(dip::Image const& in, dip::Image& out, dip::Random& random, dip::uint nClusters = 2) -> dip::CoordinateArray - Applies k-means clustering to an image, yielding
nClusters
labeled regions. -
auto dip::
KMeansClustering(dip::Image const& in, dip::Image& out, dip::uint nClusters = 2) -> dip::CoordinateArray - Like above, using a default-initialized
dip::Random
object. -
auto dip::
MinimumVariancePartitioning(dip::Image const& in, dip::Image& out, dip::uint nClusters = 2) -> dip::CoordinateArray - Spatially partitions an image into
nClusters
partitions iteratively, minimizing the variance of the partitions. -
auto dip::
IsodataThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint nThresholds = 1) -> dip::FloatArray - Thresholds the image
in
usingnThresholds
thresholds, determined using the Isodata algorithm (k-means clustering), and the histogram ofin
. -
auto dip::
OtsuThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out) -> dip::dfloat - Thresholds the image
in
using the maximal inter-class variance method by Otsu, and the histogram ofin
. -
auto dip::
MinimumErrorThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out) -> dip::dfloat - Thresholds the image
in
using the minimal error method by Kittler and Illingworth, and the histogram ofin
. -
auto dip::
GaussianMixtureModelThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::uint nThresholds = 1) -> dip::FloatArray - Thresholds the image
in
usingnThresholds
thresholds, determined by fitting a Gaussian Mixture Model to the histogram ofin
. -
auto dip::
TriangleThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat sigma = 4.0) -> dip::dfloat - Thresholds the image
in
using the chord method (a.k.a. skewed bi-modality, maximum distance to triangle), and the histogram ofin
. -
auto dip::
BackgroundThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat distance = 2.0, dip::dfloat sigma = 4.0) -> dip::dfloat - Thresholds the image
in
using the unimodal background-symmetry method, and the histogram ofin
. -
auto dip::
VolumeThreshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::dfloat volumeFraction = 0.5) -> dip::dfloat - Thresholds an image such that a fraction
volumeFraction
of pixels is foreground. -
void dip::
FixedThreshold(dip::Image const& in, dip::Image& out, dip::dfloat threshold, dip::dfloat foreground = 1.0, dip::dfloat background = 0.0, dip::String const& output = S::BINARY) - Thresholds an image at the
threshold
value. -
void dip::
RangeThreshold(dip::Image const& in, dip::Image& out, dip::dfloat lowerBound, dip::dfloat upperBound, dip::String const& output = S::BINARY, dip::dfloat foreground = 1.0, dip::dfloat background = 0.0) - Thresholds an image at two values, equivalent to
lowerBound <= in && in <= upperBound
. -
void dip::
HysteresisThreshold(dip::Image const& in, dip::Image& out, dip::dfloat lowThreshold, dip::dfloat highThreshold) - Hysteresis threshold.
-
void dip::
MultipleThresholds(dip::Image const& in, dip::Image& out, dip::FloatArray const& thresholds) - Thresholds an image at multiple values, yielding a labeled image.
-
auto dip::
Threshold(dip::Image const& in, dip::Image const& mask, dip::Image& out, dip::String const& method = S::OTSU, dip::dfloat parameter = infinity) -> dip::dfloat - Automated threshold using
method
. -
void dip::
PerObjectEllipsoidFit(dip::Image const& in, dip::Image& out, dip::PerObjectEllipsoidFitParameters const& parameters) - Finds a per-object threshold such that found objects are maximally ellipsoidal.
-
void dip::
Canny(dip::Image const& in, dip::Image& out, dip::FloatArray const& sigmas = {1}, dip::dfloat lower = 0.5, dip::dfloat upper = 0.9, dip::String const& selection = S::ALL) - Detect edges in the grey-value image by finding salient ridges in the gradient magnitude
-
void dip::
Superpixels(dip::Image const& in, dip::Image& out, dip::Random& random, dip::dfloat density = 0.005, dip::dfloat compactness = 1.0, dip::String const& method = S::CW, dip::StringSet const& flags = {}) - Generates superpixels (oversegmentation)
-
void dip::
Superpixels(dip::Image const& in, dip::Image& out, dip::dfloat density = 0.005, dip::dfloat compactness = 1.0, dip::String const& method = S::CW, dip::StringSet const& flags = {}) - Like above, using a default-initialized
dip::Random
object.