00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __GT2004ImageProcessorTools_h_
00011 #define __GT2004ImageProcessorTools_h_
00012
00013
00014
00015 #include "Modules/ImageProcessor/ImageProcessorTools/ImageProcessorUtilityClasses.h"
00016
00017 #ifdef CT32K_LAYOUT
00018 #include "Representations/Perception/ColorTable32K.h"
00019 #else
00020 #include "Representations/Perception/ColorTable64.h"
00021 #endif
00022 #include "Modules/ImageProcessor/ImageProcessorTools/ColorCorrector.h"
00023 #include "Tools/Math/Vector2.h"
00024 #include "Tools/Math/Geometry.h"
00025
00026 #ifdef CT32K_LAYOUT
00027 #define COLOR_CLASS(y,u,v) (colorClass)((ColorTable32K&) colorTable).colorClassesUnpacked[((y>>4)<<12)|((v>>2)<<6)|(u>>2)]
00028 #define C(px, py, layer, value) colorCorrector.correct(px,py, layer, value)
00029 #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))
00030 #else
00031
00032 #define COLOR_CLASS(y,u,v) (colorClass)((ColorTable64&) colorTable).colorClasses[(y) >> 2][(u) >> 2][(v) >> 2]
00033 #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]
00034 #endif
00035
00036 #endif // __GT2004ImageProcessorTools_h_
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057