EasyColor::AssignNearestClassCenter
Assigns to every pixel of the source image the nearest class center and stores its value in the destination image.
Namespace: Euresys::Open_eVision
[C++]
void AssignNearestClassCenter(
EROIC24* sourceImage,
EROIC24* destinationImage,
EC24Vector* classCenters
)
Parameters
sourceImage
Pointer to the source image/ROI.
destinationImage
Pointer to the destination image/ROI.
classCenters
Pointer to the vector of the class centers.
Remarks
This generates a labeled color image.
Color image segmentation allows you to decompose a color image in different regions by assigning a "class" (integer index) to every pixel. The nearest neighbor method is used, i.e. for each class a representative center is specified, and a given pixel is associated to the class with the closest center.
Color image segmentation can be used in conjunction with EasyObject to perform blob analysis on the segmented regions.
To use the color segmentation functions, the set of class centers must be specified as a vector of EC24 elements. In this sense, the method is termed supervised clustering. A good way to obtain these values is to compute the average color in an ROI.
Unsupervised clustering is also made available by implementing the so called K-means method that automatically improves an initial choice of class centers.
EasyColor.AssignNearestClassCenter
Assigns to every pixel of the source image the nearest class center and stores its value in the destination image.
Namespace: Euresys.Open_eVision
[C#]
void AssignNearestClassCenter(
Euresys.Open_eVision.EROIC24 sourceImage,
Euresys.Open_eVision.EROIC24 destinationImage,
Euresys.Open_eVision.EC24Vector classCenters
)
Parameters
sourceImage
Pointer to the source image/ROI.
destinationImage
Pointer to the destination image/ROI.
classCenters
Pointer to the vector of the class centers.
Remarks
This generates a labeled color image.
Color image segmentation allows you to decompose a color image in different regions by assigning a "class" (integer index) to every pixel. The nearest neighbor method is used, i.e. for each class a representative center is specified, and a given pixel is associated to the class with the closest center.
Color image segmentation can be used in conjunction with EasyObject to perform blob analysis on the segmented regions.
To use the color segmentation functions, the set of class centers must be specified as a vector of EC24 elements. In this sense, the method is termed supervised clustering. A good way to obtain these values is to compute the average color in an ROI.
Unsupervised clustering is also made available by implementing the so called K-means method that automatically improves an initial choice of class centers.