EasyColor::ClassAverages

Computes the average source pixel colors for every class separately.

Namespace: Euresys::Open_eVision

[C++]

void ClassAverages(
   EROIC24* sourceImage,
   EC24Vector* classCenters,
   EColorVector* averages
)

Parameters

sourceImage

Pointer to the source image/ROI.

classCenters

Pointer to the vector of the class centers.

averages

Pointer to the vector of the average color values.

Remarks

This allows measuring the actual average color of the segmented regions.
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 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.ClassAverages

Computes the average source pixel colors for every class separately.

Namespace: Euresys.Open_eVision

[C#]

void ClassAverages(
   Euresys.Open_eVision.EROIC24 sourceImage,
   Euresys.Open_eVision.EC24Vector classCenters,
   Euresys.Open_eVision.EColorVector averages
)

Parameters

sourceImage

Pointer to the source image/ROI.

classCenters

Pointer to the vector of the class centers.

averages

Pointer to the vector of the average color values.

Remarks

This allows measuring the actual average color of the segmented regions.
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 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.