![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
classifies pixels of an image using Kernel k-means algorithm More...
| IPSDKIPLCLASSIFICATION_API KernelKMeansResults | ipsdk::imaproc::classif::kernelKMeansImg (const image::ImageConstPtr &pInImg, const ipUInt32 nbClusters, const ipUInt32 nbSamples) |
| wrapper function for Kernel KMeans clustering algorithm More... | |
| IPSDKIPLCLASSIFICATION_API void | ipsdk::imaproc::classif::kernelKMeansImg (const image::ImageConstPtr &pInImg, const ipUInt32 nbClusters, const ipUInt32 nbSamples, const ipUInt32 nbAttempts, const attr::KernelKMeansParamsConstPtr &pKernelKMeansParams, const image::ImagePtr &pOutClassImg, const attr::KKMeansCentroidsPtr &pOutKKMeansCentroids) |
| wrapper function for Kernel KMeans clustering algorithm More... | |
classifies pixels of an image using Kernel k-means algorithm
Kernel K-means algorithm consists in clustering a set of n points of d dimensions in k clusters.
This is an adaptation of the classical K-means which uses a radial basis kernel function to compute distances instead of the classical Euclidian distance.
This algorithm works in an augmented features space dimension to allow handling non linear clustering case such as follows :
It also uses 'the kernel trick' to maintain reasonable feature space dimension and allows computation.
Applied here to image processing, for an input image
of size {x, y, z, c, t}, with c the number of color channels and t the number of elements in temporal sequence, it will clusters :
clusters.For each attempt (
parameter) :
image values will be samples to random image coordinates. Each sample will then agregate images values along color and temporal plans and will be used as a features vector.
parameter.Clustering result with the best separation value, which is defined by Dunn validity index (see ipsdk::math::clustering::eValidityIndexType), will be retained and stored into
.
Finally, a clustering assignment using the 'best' clustering result on sample value will be computed on whole input image to generate
.
contains the parameters allowing automatic computation of radial basis kernel sigma value and accuracy threshold used during linear dependency analysis.Here is an example of Kernel K-means based classification :
Attribute description for algorithm :
| Name | ToolTip | Default Initializer |
|---|---|---|
| ipsdk::imaproc::attr::InHomogeneousImg | [Input] Homogeneous image | X |
| ipsdk::imaproc::attr::InNbClusters | [Input] Number of clusters | X |
| ipsdk::imaproc::attr::InNbSamples | [Input] number of samples for processing operation | X |
| ipsdk::imaproc::attr::InOptNbAttempts | [Input Optional] Number of times k-means is executed using different initial clusters centers | X |
| ipsdk::imaproc::attr::InOptKernelKMeansParams | [Input Optional] parameters for kernel kmeans clustering algorithm | X |
| ipsdk::imaproc::attr::OutClassImg | [Output] Image of classes | customOutput (_pOutClassImg, outputKernelKMeans(_pInHomogeneousImg,_pInNbClusters)) |
| ipsdk::imaproc::attr::OutKKMeansCentroids | [Output] collection of kernel cluster centroid representation | allocate (_pOutKKMeansCentroids) |
Global rule description for algorithm :
ipsdk::imaproc::customImageProperty (_pOutClassImg,
matchKernelKMeansClassImg (_pInHomogeneousImg,_pInNbClusters))
| IPSDKIPLCLASSIFICATION_API KernelKMeansResults ipsdk::imaproc::classif::kernelKMeansImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipUInt32 | nbClusters, | ||
| const ipUInt32 | nbSamples | ||
| ) |
wrapper function for Kernel KMeans clustering algorithm
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLCLASSIFICATION_API void ipsdk::imaproc::classif::kernelKMeansImg | ( | const image::ImageConstPtr & | pInImg, |
| const ipUInt32 | nbClusters, | ||
| const ipUInt32 | nbSamples, | ||
| const ipUInt32 | nbAttempts, | ||
| const attr::KernelKMeansParamsConstPtr & | pKernelKMeansParams, | ||
| const image::ImagePtr & | pOutClassImg, | ||
| const attr::KKMeansCentroidsPtr & | pOutKKMeansCentroids | ||
| ) |
wrapper function for Kernel KMeans clustering algorithm
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
1.8.14