Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef Y8UV8ToRGB8Operator_H
00012 #define Y8UV8ToRGB8Operator_H
00013
00014 #include "ImagePairToImageOperator.h"
00015 #include "ColorImageUV8.h"
00016 #include "../../Workers/Puma2/GrayLevelImage8.h"
00017 #include "../../Workers/Puma2/ColorImageRGB8.h"
00018 #include "../../Workers/ImageSources/Mutex.h"
00019
00020 namespace puma2 {
00021
00026 class Y8UV8ToRGB8Operator :
00027 public ImagePairToImageOperator<GrayLevelImage8,ColorImageUV8,ColorImageRGB8>
00028 {
00029 public:
00030
00034 Y8UV8ToRGB8Operator();
00035
00039 Y8UV8ToRGB8Operator(const GrayLevelImage8& constYImage, const ColorImageUV8& constUvImage, ColorImageRGB8& imageRGB)
00040 {
00041 checkArgument(constYImage, constUvImage, imageRGB);
00042 apply(constYImage, constUvImage, imageRGB);
00043 }
00044
00048 virtual ~Y8UV8ToRGB8Operator();
00049
00051 virtual void apply(const GrayLevelImage8& imageY, const ColorImageUV8& imageUV, ColorImageRGB8& imageRGB);
00052
00053 private:
00054
00055 static void initialize();
00056
00057 static int yPalette[256];
00058 static int uPaletteG[256];
00059 static int uPaletteB[256];
00060 static int vPaletteR[256];
00061 static int vPaletteG[256];
00062 static bool initialized;
00063 static Mutex mutex;
00064
00065 };
00066
00067 }
00068
00069 #endif