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

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.

Definition at line 24 of file HsvImageSegmentation.h.

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.

Definition at line 9 of file HsvImageSegmentation.cpp.

◆ 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

Definition at line 14 of file HsvImageSegmentation.cpp.

◆ ~HsvImageSegmentation()

Frees all allocated memory.

Definition at line 31 of file HsvImageSegmentation.cpp.

◆ HsvImageSegmentation() [4/4]

move constructor

Definition at line 36 of file HsvImageSegmentation.cpp.

Member Function Documentation

◆ getInputImagesHsv()

CByteImage ** getInputImagesHsv ( ) const

Get the input images in HSV.

Only valid after calling processInputImages().

Returns
the input images in HSV

Definition at line 56 of file HsvImageSegmentation.cpp.

◆ getInputImagesRgb()

CByteImage ** getInputImagesRgb ( ) const

Get the input images (RGB) (buffer).

Write into this buffer to set new input images.

Returns
input images RGB (buffer)

Definition at line 51 of file HsvImageSegmentation.cpp.

+ Here is the caller graph for this function:

◆ 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

Definition at line 61 of file HsvImageSegmentation.cpp.

+ Here is the caller graph for this function:

◆ getNumImages()

int getNumImages ( ) const
Returns
the number of images

Definition at line 76 of file HsvImageSegmentation.cpp.

◆ getOutputImagesGray()

CByteImage ** getOutputImagesGray ( ) const

Get the output images in gray scale.

Only valid after calling processInputImages().

Returns
the output images (Gray)

Definition at line 66 of file HsvImageSegmentation.cpp.

◆ getOutputImagesRgb()

CByteImage ** getOutputImagesRgb ( ) const

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

Only valid after calling processInputImages().

Returns
the output images RGB

Definition at line 71 of file HsvImageSegmentation.cpp.

+ Here is the caller graph for this function:

◆ operator=()

HsvImageSegmentation & operator= ( HsvImageSegmentation &&  other)

Definition at line 41 of file HsvImageSegmentation.cpp.

◆ 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.

Definition at line 81 of file HsvImageSegmentation.cpp.

+ Here is the caller graph for this function:

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