Classes | Functions
Color Processing

Classes

class  CRGBColorModel
 Training and application of an RGB color model on the basis of the Mahalanobis distance. More...

Functions

bool ImageProcessor::CalculateHSVImage (const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion *pROI=0)
 Computes the HSV image for a RGB CByteImage and writes the result to a CByteImage.
bool ImageProcessor::FilterColor (const CByteImage *pInputImage, CByteImage *pOutputImage, ObjectColor cColor, CColorParameterSet *pColorParameterSet, bool bImageIsHSV=true)
 Performs color filtering with binarization for a CByteImage and writes the result to a grayscale CByteImage.
bool ImageProcessor::FilterHSV (const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char hue, unsigned char tol_hue, unsigned char min_sat, unsigned char max_sat, unsigned char min_v, unsigned char max_v, const MyRegion *pROI=0)
 Performs color filtering with binarization for an HSV CByteImage and writes the result to a grayscale CByteImage.
bool ImageProcessor::FilterHSV2 (const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char min_hue, unsigned char max_hue, unsigned char min_sat, unsigned char max_sat, unsigned char min_v, unsigned char max_v, const MyRegion *pROI=0)
 Performs color filtering with binarization for an HSV CByteImage and writes the result to a grayscale CByteImage.
bool ImageProcessor::FilterRGB (const CByteImage *pInputImage, CByteImage *pOutputImage, CRGBColorModel *pColorModel, float fThreshold)
 Performs color filtering with binarization for an RGB CByteImage, given a CRGBColorModel, and writes the result to a grayscale CByteImage.

Function Documentation

bool ImageProcessor::CalculateHSVImage ( const CByteImage pInputImage,
CByteImage pOutputImage,
const MyRegion pROI = 0 
)

Computes the HSV image for a RGB CByteImage and writes the result to a CByteImage.

Converts each pInputImage from RGB24 to HSV24 (Hue, Saturation, Value) and writes the result pOutputImage.

The width and height of pInputImage and pOutputImage must match.
pInputImage and pOutputImage must be both of type CByteImage::eRGB24.

The pixels of pOutputImage are after completion encoded according to the HSV color model, although the type of the image is CByteImage::eRGB24. The values S (Saturation) and V (Value) have a possible range of [0, 255]. The value H (Hue) has a possible range of [0, 179].

As this is a point operation, there is no copy overhead if pInputImage and pOutputImage share the same memory area.

Parameters:
pInputImageThe input image.
pOutputImageThe output image.
pROIDescribes the area containing the pixels which shall be converted. If pROI is 0, then the whole image is processed.

Definition at line 4656 of file ImageProcessor.cpp.

bool ImageProcessor::FilterColor ( const CByteImage pInputImage,
CByteImage pOutputImage,
ObjectColor  cColor,
CColorParameterSet pColorParameterSet,
bool  bImageIsHSV = true 
)

Performs color filtering with binarization for a CByteImage and writes the result to a grayscale CByteImage.

The color segmentation is performed using the FilterHSV method using the min/max values for the chosen color as defined in the ColorParameterSet.

The width and height of pInputImage and pOutputImage must match.

Parameters:
pInputImageThe input image. Must be of type CByteImage::eRGB24 and be eithter in RGB oder HSV format.
pOutputImageThe output image. Must be of type CByteImage::eGrayScale.
cColorThe color that will be segmented.
pColorParameterSetContains color parameters, must contain the chosen color.
bImageIsHSVIndicates whether the image is already in HSV format.

Definition at line 4218 of file ImageProcessor.cpp.

bool ImageProcessor::FilterHSV ( const CByteImage pInputImage,
CByteImage pOutputImage,
unsigned char  hue,
unsigned char  tol_hue,
unsigned char  min_sat,
unsigned char  max_sat,
unsigned char  min_v,
unsigned char  max_v,
const MyRegion pROI = 0 
)

Performs color filtering with binarization for an HSV CByteImage and writes the result to a grayscale CByteImage.

The color segmentation is performed using fixed bounds (with the operator <= and >=) for each color channel, except of hue where a center value and a +- tolerance are specified.

The width and height of pInputImage and pOutputImage must match.

Parameters:
pInputImageThe input image. Must be of type CByteImage::eRGB24 and is assumed to be an HSV image (see also CalculateHSVImage(const CByteImage*, CByteImage*, const *pROI)).
pOutputImageThe output image. Must be of type CByteImage::eGrayScale.
hueThe hue center.
tol_hueThe hue tolerance.
min_satThe minimum saturation.
max_satThe maximum saturation.
min_vThe minimum value.
max_vThe maximum value.
pROIDescribes the area containing the pixels which shall be processed. If pROI is 0, then the whole image is processed.

Definition at line 4058 of file ImageProcessor.cpp.

bool ImageProcessor::FilterHSV2 ( const CByteImage pInputImage,
CByteImage pOutputImage,
unsigned char  min_hue,
unsigned char  max_hue,
unsigned char  min_sat,
unsigned char  max_sat,
unsigned char  min_v,
unsigned char  max_v,
const MyRegion pROI = 0 
)

Performs color filtering with binarization for an HSV CByteImage and writes the result to a grayscale CByteImage.

The color segmentation is performed using fixed bounds (with the operator <= and >=) for each color channel.

The width and height of pInputImage and pOutputImage must match.

Parameters:
pInputImageThe input image. Must be of type CByteImage::eRGB24 and is assumed to be a HSV image (see also CalculateHSVImage(const CByteImage*, CByteImage*, const *pROI)).
pOutputImageThe output image. Must be of type CByteImage::eGrayScale.
min_hueThe minimum hue.
max_hueThe maximum hue.
min_satThe minimum saturation.
max_satThe maximum saturation.
min_vThe minimum value.
max_vThe maximum value.
pROIDescribes the area containing the pixels which shall be processed. If pROI is 0, then the whole image is processed.

Definition at line 4085 of file ImageProcessor.cpp.

bool ImageProcessor::FilterRGB ( const CByteImage pInputImage,
CByteImage pOutputImage,
CRGBColorModel pColorModel,
float  fThreshold 
)

Performs color filtering with binarization for an RGB CByteImage, given a CRGBColorModel, and writes the result to a grayscale CByteImage.

Calculates the color probability of each pixel in pInputImage based on the Mahalanobis distance and write the result to pOutputImage.

Using the covariance matrix C the Mahalanobis distance is calculated by $ f_{+}(x) = exp(-\frac{1}{2}(x - \bar x)^T C^{-1} (x - \bar x)) $. pOutputImage is a binary image.

The width and height of pInputImage and pOutputImage must match.

Parameters:
pInputImageThe input image. Must be of type CByteImage::eRGB24.
pOutputImageThe output image. Must be of type CByteImage::eGrayScale.
pColorModelThe color model.
fThresholdThe threshold value. All color probabilities > fThreshold are set to 255, all other to 0.

Definition at line 4035 of file ImageProcessor.cpp.



asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Thu Jun 6 2019 21:46:58