00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __SlamImageProcessorTools_h_
00011 #define __SlamImageProcessorTools_h_
00012
00013
00014
00015 #include "Modules/ImageProcessor/ImageProcessorTools/ImageProcessorUtilityClasses.h"
00016
00017
00018
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
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
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 #endif // __SlamImageProcessorTools_h_