Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/ImageProcessor/SlamImageProcessor/SlamImageProcessorTools.h

Go to the documentation of this file.
00001 /**
00002 * @file SlamImageProcessorTools.h
00003 *
00004 * Tools and Definitons for SlamImageProcessor
00005 *
00006 * @author Max Risler
00007 * @author <a href="mailto:timlaue@tzi.de">Tim Laue</a>
00008 */
00009 
00010 #ifndef __SlamImageProcessorTools_h_
00011 #define __SlamImageProcessorTools_h_
00012 
00013 // Uncomment to use it with ColorTable32K
00014 //~ #define CT32K_LAYOUT
00015 #include "Modules/ImageProcessor/ImageProcessorTools/ImageProcessorUtilityClasses.h"
00016 
00017 // Cognition includes multiple xxxImageProcessorTools (but no file that actually uses the 
00018 // macros does) so apply a simple hack to avoid a redefinition error.
00019 #ifdef COLOR_CLASS
00020 #undef COLOR_CLASS
00021 #undef CORRECTED_COLOR_CLASS
00022 #endif
00023 
00024 
00025 #ifdef CT32K_LAYOUT
00026 #include "Representations/Perception/ColorTable32K.h"
00027 #else
00028 #include "Representations/Perception/ColorTable64.h"
00029 #endif
00030 #include "Modules/ImageProcessor/ImageProcessorTools/ColorCorrector.h"
00031 #include "Tools/Math/Vector2.h"
00032 #include "Tools/Math/Geometry.h"
00033 
00034 #ifdef CT32K_LAYOUT
00035 #define COLOR_CLASS(y,u,v) (colorClass)((ColorTable32K&) colorTable).colorClassesUnpacked[((y>>4)<<12)|((v>>2)<<6)|(u>>2)]
00036 #define C(px, py, layer, value) colorCorrector.correct(px,py, layer, value)
00037 #define CORRECTED_COLOR_CLASS(px,py,y,u,v) COLOR_CLASS(C(px, py, 0, y),C(px, py, 1, u),C(px, py, 2, v))
00038 #else
00039 // This is a hack to speed up color table access. It obviously only works with ColorTable64
00040 #define COLOR_CLASS(y,u,v) (colorClass)((ColorTable64&) colorTable).colorClasses[(y) >> 2][(u) >> 2][(v) >> 2]
00041 #define CORRECTED_COLOR_CLASS(px,py,y,u,v) (colorClass)((ColorTable64&) colorTable).colorClasses[colorCorrector.correct(px,py, 0, (y)) >> 2][colorCorrector.correct(px,py, 1, (u)) >> 2][colorCorrector.correct(px,py, 2, (v)) >> 2]
00042 #endif
00043 
00044 
00045 /**
00046 * @class SlamImageInfo
00047 *
00048 * Additional information about the current image,
00049 * computed by the ImageProcessor
00050 */
00051 //~ class SlamImageInfo
00052 //~ {
00053 //~ public:
00054   //~ /** The horizon*/
00055   //~ Geometry::Line horizon;
00056   //~ /** A line perpendicular to the horizon*/
00057   //~ Geometry::Line vertLine;
00058   //~ /** Flag, indicates whether the horizon is in the image or not*/
00059   //~ bool horizonInImage;
00060   //~ /** The starting point of the horizon*/
00061   //~ Vector2<int> horizonStart;
00062   //~ /** The end point of the horizon*/
00063   //~ Vector2<int> horizonEnd;
00064   //~ /** The bottom right corner of the image*/
00065   //~ Vector2<int> maxImageCoordinates;
00066 //~ };
00067 
00068 #endif // __SlamImageProcessorTools_h_

Generated on Mon Mar 20 21:59:51 2006 for GT2005 by doxygen 1.3.6