00001 /******************************************************************************* 00002 * ImageProperties.h 00003 * 00004 * (C) 2007 AG Aktives Sehen <agas@uni-koblenz.de> 00005 * Universitaet Koblenz-Landau 00006 * 00007 * Additional information: 00008 * $Id: $ 00009 *******************************************************************************/ 00010 00011 #ifndef ImageProperties_H 00012 #define ImageProperties_H 00013 00014 #include <vector> 00015 00016 #include "Workers/Math/Point2D.h" 00017 00018 #include "Workers/KeyPointExtraction/KeyPoint.h" 00019 #include "Workers/Puma2/HistogramUV.h" 00020 #include "Workers/Puma2/ColorImageUV8.h" 00021 #include "Workers/Puma2/GrayLevelImage8.h" 00022 #include "Workers/Puma2/ImageMask.h" 00023 00024 #include "Workers/Math/Point2D.h" 00025 00026 00032 class ImageProperties 00033 { 00034 public: 00035 00036 ImageProperties(); 00037 00039 ImageProperties ( std::string name, puma2::GrayLevelImage8* imageY, puma2::ColorImageUV8* imageUV, ImageMask* imageMask=0 ); 00040 00041 ImageProperties ( const ImageProperties& other ); 00042 00044 ~ImageProperties(); 00045 00046 ImageProperties& operator= ( const ImageProperties& other ); 00047 00049 void applyMask(); 00050 void traceOutline(); 00051 void extractKeyPoints(); 00052 void calcHistogram(); 00053 00055 void calculateProperties(); 00056 00057 // GETTER FUNCTIONS 00058 00059 std::string getName() const { return m_Name; } 00060 00061 puma2::GrayLevelImage8* getImageY() const { return m_ImageY; } 00062 00063 puma2::ColorImageUV8* getImageUV() const { return m_ImageUV; } 00064 00065 puma2::GrayLevelImage8* getMaskedImageY() const { return m_MaskedImageY; } 00066 00067 puma2::ColorImageUV8* getMaskedImageUV() const { return m_MaskedImageUV; } 00068 00069 ImageMask* getImageMask() const { return m_ImageMask; } 00070 00071 HistogramUV* getHistogram() const { return m_Histogram; } 00072 00073 std::vector< KeyPoint >* getKeyPoints() const { return m_KeyPoints; } 00074 00075 std::vector<Point2D>* getOutline() const { return m_Outline; } 00076 00077 std::vector<Point2D> getBoundingBox() const; 00078 00079 Point2D getCenter() const { return m_Center; } 00080 00081 // TODO just remove? 00082 00083 // /** @brief Serialize to stream */ 00084 // void storer ( ExtendedOutStream& extStrm ); 00085 00086 // /** @brief Deserialize from stream */ 00087 // ImageProperties ( ExtendedInStream& extStrm ); 00088 00089 private: 00090 00091 void clear(); 00092 void deleteAll(); 00093 00095 std::string m_Name; 00096 puma2::GrayLevelImage8* m_ImageY; 00097 puma2::ColorImageUV8* m_ImageUV; 00098 ImageMask* m_ImageMask; 00099 ImageMask* m_ImageMaskWithBorder; 00100 00102 puma2::GrayLevelImage8* m_MaskedImageY; 00103 puma2::ColorImageUV8* m_MaskedImageUV; 00104 std::vector< KeyPoint >* m_KeyPoints; 00105 HistogramUV* m_Histogram; 00106 std::vector<Point2D>* m_Outline; 00107 Point2D m_Center; 00108 00109 int m_Border; 00110 }; 00111 00112 #endif