HsvImageSegmentation Class Reference

The HsvImageSegmentation class. More...

#include <VisionX/gui-plugins/HsvColorSegmentation/HsvImageSegmentation.h>

Public Member Functions

CByteImage ** getInputImagesHsv () const
 Get the input images in HSV.
 
CByteImage ** getInputImagesRgb () const
 Get the input images (RGB) (buffer).
 
CByteImage ** getInputVisuImages () const
 Get input visualization images.
 
int getNumImages () const
 
CByteImage ** getOutputImagesGray () const
 Get the output images in gray scale.
 
CByteImage ** getOutputImagesRgb () const
 Get the output images in RGB (from gray scale).
 
 HsvImageSegmentation ()
 No-initialization constructor.
 
 HsvImageSegmentation (const visionx::ImageProviderInfo &imageProviderInfo)
 Shortcut constructor for usage from an image processor.
 
 HsvImageSegmentation (HsvImageSegmentation &&other)
 move constructor
 
 HsvImageSegmentation (int numImages, int width, int height, CByteImage::ImageType colorType)
 Construct from the given image parameters.
 
HsvImageSegmentation & operator= (HsvImageSegmentation &&other)
 
void processInputImages (int hue, int hueTol, int satMin, int satMax, int valMin, int valMax)
 Processes the current input images.
 
 ~HsvImageSegmentation ()
 Frees all allocated memory.
 

Detailed Description

The HsvImageSegmentation class.

Allows for HSV color segmentation of images (e.g. in an image processor).

Pointer ownership: All memory for images is allocated and freed by this class. You may not and need not to allocate or delete memory for images.

All color images are of CByteImage::eRGB24 type. All grey images are of CByteImage::eGrayScale type.

Constructor & Destructor Documentation

◆ HsvImageSegmentation() [1/4]

No-initialization constructor.

Does not allocate any space. Overwrite an initialized object by overwriting it with a non-initalized object.

◆ HsvImageSegmentation() [2/4]

HsvImageSegmentation ( int numImages,
int width,
int height,
CByteImage::ImageType colorType )

Construct from the given image parameters.

Allocates space for the given number of images of given width and height.

Parameters
numImagesnumber of images
widthimage width
heightimage height
Exceptions
std::invalid_argumentif numImages <= 0

◆ HsvImageSegmentation() [3/4]

HsvImageSegmentation ( const visionx::ImageProviderInfo & imageProviderInfo)

Shortcut constructor for usage from an image processor.

Parameters
imageProviderInfothe image provider info
Exceptions
std::invalid_argumentif imageProviderInfo.numberImages <= 0

◆ ~HsvImageSegmentation()

Frees all allocated memory.

◆ HsvImageSegmentation() [4/4]

move constructor

Member Function Documentation

◆ getInputImagesHsv()

CByteImage ** getInputImagesHsv ( ) const

Get the input images in HSV.

Only valid after calling processInputImages().

Returns
the input images in HSV

◆ getInputImagesRgb()

CByteImage ** getInputImagesRgb ( ) const

Get the input images (RGB) (buffer).

Write into this buffer to set new input images.

Returns
input images RGB (buffer)

◆ getInputVisuImages()

CByteImage ** getInputVisuImages ( ) const

Get input visualization images.

Only valid after calling processInputImages(). These are the same as input images, but may be modified for visualization without affecting the input images.

Returns
modifiable input images for visualization

◆ getNumImages()

int getNumImages ( ) const
Returns
the number of images

◆ getOutputImagesGray()

CByteImage ** getOutputImagesGray ( ) const

Get the output images in gray scale.

Only valid after calling processInputImages().

Returns
the output images (Gray)

◆ getOutputImagesRgb()

CByteImage ** getOutputImagesRgb ( ) const

Get the output images in RGB (from gray scale).

Only valid after calling processInputImages().

Returns
the output images RGB

◆ operator=()

HsvImageSegmentation & operator= ( HsvImageSegmentation && other)

◆ processInputImages()

void processInputImages ( int hue,
int hueTol,
int satMin,
int satMax,
int valMin,
int valMax )

Processes the current input images.

Copies input RGB images to input visu images. Converts input RGB images to input HSV images. Performs segmentation on HSV image. Converts output grey image to output RGB image.


The documentation for this class was generated from the following files: