HSIColorTableToolCore Class Reference

#include <HSIColorTableToolCore.h>

List of all members.

Public Types

 MAXIMUM_NUMBER_OF_UNDOS = 6
 NUMBER_OF_IMAGES = 4
enum  { MAXIMUM_NUMBER_OF_UNDOS = 6 }
enum  { NUMBER_OF_IMAGES = 4 }

Public Member Functions

void growHSIColorRange (int h, int s, int i, int colorClass)
void shrinkHSIColorRange (int h, int i, int s, int colorClass)
void setUndo (int colorClass)
void undoEditHSIColorRange ()
void updateSegmentedImagesWithColorTable64 ()
colorClass getColorClassByHSI (int H, int S, int I)
void createColorTable64FromHSIColorTable (ColorTable64 &colorTable64)
void init ()
void doImageSegmentation ()
void loadHSIColorTableFromFile (const char *filename)
void saveHSIColorTableToFile (const char *filename)
void setImageToPlace (Image &image, int index)

Public Attributes

HSIColorRangeUndo hsiColorRangeEditUndo [MAXIMUM_NUMBER_OF_UNDOS]
int numberOfUndos
int actualUndo
Image originalYUVImages [NUMBER_OF_IMAGES]
Image hsiImages [NUMBER_OF_IMAGES]
ColorClassImage colorClassImages [NUMBER_OF_IMAGES]
HSIColorTable hsiColorTable
ColorTable64 colorTable64
bool isImageAtPlace [NUMBER_OF_IMAGES]


Detailed Description

This class represents the core of the HSI colortable tool including colortables, images and methods for image segmentation, converting images from one color space to another and getting color classes from the colortable.

Definition at line 21 of file HSIColorTableToolCore.h.


Member Enumeration Documentation

anonymous enum

The maximum number of undos.

Enumerator:
MAXIMUM_NUMBER_OF_UNDOS 

Definition at line 27 of file HSIColorTableToolCore.h.

anonymous enum

The number of images handled by the tool.

Enumerator:
NUMBER_OF_IMAGES 

Definition at line 46 of file HSIColorTableToolCore.h.


Member Function Documentation

void HSIColorTableToolCore::createColorTable64FromHSIColorTable ( ColorTable64 colorTable64  ) 

The creates an YUV color table from the HSI color table of the tool.

Parameters:
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.

Parameters:
H The H value of the color.
S The S value of the color.
I The I value of the color.
Returns:
The color class of the given 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.

Parameters:
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.

Parameters:
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

Parameters:
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.

Parameters:
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.


Member Data Documentation

int HSIColorTableToolCore::actualUndo

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().

ColorTable64 HSIColorTableToolCore::colorTable64

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().

HSIColorTable HSIColorTableToolCore::hsiColorTable

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().

int HSIColorTableToolCore::numberOfUndos

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().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:37:29 2006 for DT2005.panorama by  doxygen 1.4.7