#include <HSIColorTableToolCore.h>
Definition at line 21 of file HSIColorTableToolCore.h.
anonymous enum |
The maximum number of undos.
Definition at line 27 of file HSIColorTableToolCore.h.
anonymous enum |
The number of images handled by the tool.
Definition at line 46 of file HSIColorTableToolCore.h.
void HSIColorTableToolCore::createColorTable64FromHSIColorTable | ( | ColorTable64 & | colorTable64 | ) |
The creates an YUV color table from the HSI color table of the tool.
colorTable64 | The YUV colortable. |
Definition at line 71 of file HSIColorTableToolCore.cpp.
References ColorTable64::addColorClass(), colorTable64, Image::convertFromYCbCrToHSI(), and getColorClassByHSI().
Referenced by saveHSIColorTableToFile(), and updateSegmentedImagesWithColorTable64().
void HSIColorTableToolCore::doImageSegmentation | ( | ) |
Definition at line 16 of file HSIColorTableToolCore.cpp.
References Image::cameraInfo, colorClassImages, ColorClassImage::height, hsiImages, Image::image, ColorClassImage::image, NUMBER_OF_IMAGES, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and ColorClassImage::width.
Referenced by HSIColorTableToolZoomDlg::editHSIColorRange(), CHSIColorTableToolDlgBar::OnHScroll(), CHSIColorTableToolDlgBar::OnHsicolortabletoolLoadcolortableButton(), setImageToPlace(), and undoEditHSIColorRange().
colorClass HSIColorTableToolCore::getColorClassByHSI | ( | int | H, | |
int | S, | |||
int | I | |||
) |
This determines the color class of a color in HSI color space using the HSI colortable.
H | The H value of the color. | |
S | The S value of the color. | |
I | The I value of the color. |
Definition at line 89 of file HSIColorTableToolCore.cpp.
References HSIColorTable::colorClasses, HSIColorRange::H_max, HSIColorRange::H_min, hsiColorTable, HSIColorRange::I_max, HSIColorRange::I_min, noColor, NUMBER_OF_COLOR_CLASSES, HSIColorRange::S_max, and HSIColorRange::S_min.
Referenced by createColorTable64FromHSIColorTable().
void HSIColorTableToolCore::growHSIColorRange | ( | int | h, | |
int | s, | |||
int | i, | |||
int | colorClass | |||
) |
Definition at line 302 of file HSIColorTableToolCore.cpp.
References HSIColorTable::colorClasses, HSIColorRange::H_max, HSIColorRange::H_min, hsiColorTable, HSIColorRange::I_max, HSIColorRange::I_min, HSIColorRange::S_max, HSIColorRange::S_min, and setUndo().
Referenced by HSIColorTableToolZoomDlg::editHSIColorRange().
void HSIColorTableToolCore::init | ( | ) |
This initialized the HSI colortable toolcore.
Definition at line 60 of file HSIColorTableToolCore.cpp.
References NUMBER_OF_IMAGES.
void HSIColorTableToolCore::loadHSIColorTableFromFile | ( | const char * | filename | ) |
This is loading an HSI colortable from a file.
filename | The name of the file. |
Definition at line 32 of file HSIColorTableToolCore.cpp.
References hsiColorTable.
Referenced by CHSIColorTableToolDlgBar::OnHsicolortabletoolLoadcolortableButton().
void HSIColorTableToolCore::saveHSIColorTableToFile | ( | const char * | filename | ) |
This is saving an HSI colortable to a file.
filename | The name of the file. |
Definition at line 39 of file HSIColorTableToolCore.cpp.
References colorTable64, createColorTable64FromHSIColorTable(), and hsiColorTable.
Referenced by CHSIColorTableToolDlgBar::OnHsicolortabletoolSavecolortableButton().
void HSIColorTableToolCore::setImageToPlace | ( | Image & | image, | |
int | index | |||
) |
Stores an image at the specified place in the tool
image | The image to store | |
index | The place where the image should be stored |
Definition at line 51 of file HSIColorTableToolCore.cpp.
References Image::convertFromYCbCrToHSI(), doImageSegmentation(), hsiImages, image, isImageAtPlace, originalYUVImages, and TRUE.
Referenced by CHSIColorTableToolDlgBar::captureImageInPlace().
void HSIColorTableToolCore::setUndo | ( | int | colorClass | ) |
This stores an HSI color range for the specified color class.
colorClass | The color class. |
Definition at line 159 of file HSIColorTableToolCore.cpp.
References actualUndo, HSIColorTable::colorClasses, HSIColorRange::H_max, HSIColorRange::H_min, hsiColorRangeEditUndo, hsiColorTable, HSIColorRange::I_max, HSIColorRange::I_min, MAXIMUM_NUMBER_OF_UNDOS, numberOfUndos, HSIColorRange::S_max, HSIColorRange::S_min, and HSIColorRangeUndo::setHSIColorRangeUndo().
Referenced by growHSIColorRange().
void HSIColorTableToolCore::shrinkHSIColorRange | ( | int | h, | |
int | i, | |||
int | s, | |||
int | colorClass | |||
) |
Definition at line 180 of file HSIColorTableToolCore.cpp.
References HSIColorTable::colorClasses, dist(), HSIColorRange::H_max, HSIColorRange::H_min, hsiColorTable, HSIColorRange::I_max, HSIColorRange::I_min, HSIColorRange::S_max, and HSIColorRange::S_min.
Referenced by HSIColorTableToolZoomDlg::editHSIColorRange().
void HSIColorTableToolCore::undoEditHSIColorRange | ( | ) |
This restores the last edited HSI color range.
Definition at line 130 of file HSIColorTableToolCore.cpp.
References actualUndo, HSIColorRangeUndo::colorClass, HSIColorTable::colorClasses, doImageSegmentation(), HSIColorRange::H_max, HSIColorRange::H_min, HSIColorRangeUndo::hsiColorRange, hsiColorRangeEditUndo, hsiColorTable, HSIColorRange::I_max, HSIColorRange::I_min, MAXIMUM_NUMBER_OF_UNDOS, numberOfUndos, HSIColorRange::S_max, HSIColorRange::S_min, and HSIColorRangeUndo::set.
Referenced by HSIColorTableToolZoomDlg::OnHsicolortabletoolZoomUndoButton().
void HSIColorTableToolCore::updateSegmentedImagesWithColorTable64 | ( | ) |
This updates color classification for the segmented images with the converted YUV colortable.
Definition at line 120 of file HSIColorTableToolCore.cpp.
References createColorTable64FromHSIColorTable(), and NUMBER_OF_IMAGES.
The actual undo number.
Definition at line 33 of file HSIColorTableToolCore.h.
Referenced by setUndo(), and undoEditHSIColorRange().
ColorClassImage HSIColorTableToolCore::colorClassImages[NUMBER_OF_IMAGES] |
The color classified images.
Definition at line 82 of file HSIColorTableToolCore.h.
Referenced by doImageSegmentation().
The colortable for segmentation in YUV color space .
Definition at line 86 of file HSIColorTableToolCore.h.
Referenced by createColorTable64FromHSIColorTable(), and saveHSIColorTableToFile().
HSIColorRangeUndo HSIColorTableToolCore::hsiColorRangeEditUndo[MAXIMUM_NUMBER_OF_UNDOS] |
The undos of HSI color range edit.
Definition at line 29 of file HSIColorTableToolCore.h.
Referenced by setUndo(), and undoEditHSIColorRange().
The HSI colortable of the tool.
Definition at line 84 of file HSIColorTableToolCore.h.
Referenced by getColorClassByHSI(), growHSIColorRange(), loadHSIColorTableFromFile(), CHSIColorTableToolDlgBar::OnHScroll(), saveHSIColorTableToFile(), CHSIColorTableToolDlgBar::setSlidersForColorClass(), setUndo(), shrinkHSIColorRange(), and undoEditHSIColorRange().
Image HSIColorTableToolCore::hsiImages[NUMBER_OF_IMAGES] |
The HSI image representation, converted from the YUV image.
Definition at line 80 of file HSIColorTableToolCore.h.
Referenced by doImageSegmentation(), HSIColorTableToolZoomDlg::editHSIColorRange(), and setImageToPlace().
bool HSIColorTableToolCore::isImageAtPlace[NUMBER_OF_IMAGES] |
The flags whether an image is stored in a place or not
Definition at line 88 of file HSIColorTableToolCore.h.
Referenced by setImageToPlace().
The number of stored undos.
Definition at line 31 of file HSIColorTableToolCore.h.
Referenced by setUndo(), and undoEditHSIColorRange().
Image HSIColorTableToolCore::originalYUVImages[NUMBER_OF_IMAGES] |
The original YUV images.
Definition at line 78 of file HSIColorTableToolCore.h.
Referenced by setImageToPlace().