00001 /** 00002 * @file ColorClassImage.h 00003 * 00004 * Declaration of class ColorClassImage 00005 * 00006 * @author Martin Lötzsch 00007 */ 00008 00009 #ifndef __ColorClassImage_h_ 00010 #define __ColorClassImage_h_ 00011 00012 #include "Tools/ColorClasses.h" 00013 #include "Tools/Streams/InOut.h" 00014 00015 #include "Image.h" 00016 00017 /** 00018 * Represents a color segmented image. This doesn't have to be used by 00019 * image processors, because they might be faster without generating a 00020 * representation like ColorClassImage, but it is needed for visualizing 00021 * how color tables segment images. 00022 * 00023 * @author Martin Lötzsch 00024 */ 00025 class ColorClassImage 00026 { 00027 public: 00028 /** Constructor */ 00029 ColorClassImage(); 00030 00031 unsigned char getClassifiedColorAGILO(unsigned long index); 00032 00033 void convertToImage(Image& image); 00034 00035 /** A bitmap containing the color class for every pixel in the orignial image */ 00036 unsigned char image[cameraResolutionHeight_ERS7 * 2][cameraResolutionWidth_ERS7 * 2]; 00037 00038 /** the height of the image */ 00039 int height; 00040 00041 /** the width of the image */ 00042 int width; 00043 }; 00044 00045 /** 00046 * Streaming operator that writes a ColorClassImage to a stream. 00047 * @param stream The stream to write on. 00048 * @param colorClassImage The ColorClassImage object. 00049 * @return The stream. 00050 */ 00051 Out& operator << (Out& stream, const ColorClassImage& colorClassImage); 00052 00053 /** 00054 * Streaming operator that reads a ColorClassImage from a stream. 00055 * @param stream The stream from which is read. 00056 * @param colorClassImage The ColorClassImage object. 00057 * @return The stream. 00058 */ 00059 In& operator>>(In& stream,ColorClassImage& colorClassImage); 00060 00061 00062 #endif //__ColorClassImage_h_
1.3.6