ChessboardPicture.hpp

Go to the documentation of this file.
00001 #ifndef LOPER_CHESSBOARDPICTURE
00002 #define LOPER_CHESSBOARDPICTURE
00003 
00014 #include <PortablePixmap.hpp>
00015 #include <PortableBitmap.hpp>
00016 #include <GLTexPicture.hpp>
00017 #include "ImageCalibrator.hpp"
00018 #include "ContourFinder.hpp"
00019 #include "ChessSquareMesh.hpp"
00020 
00021 
00024 class ChessboardPicture
00025 {
00026 public:
00027         ChessboardPicture();
00028 
00029         void load (const char *filename);
00030 
00031         void drawOriginalTexture (float originX, float originY, float width, float height);
00032         void drawThresholdedTexture (float originX, float originY, float width, float height);
00033         unsigned char getThreshold() const { return currentThreshold; }
00034         void recalculateThresholdedImage(int thresh = -1);
00035 
00036         bool findChessboardPoints ();
00037 
00038         PortableBitmap imgThresholded;
00039         ImageCalibrator imgCalib;
00040 
00041 private:
00042 
00043         // We draw our chessboards with texture mapping
00044         GLTexPicture texOriginal;
00045         GLTexPicture texThresholded;
00046 
00047 
00048         unsigned char autoCalculateThreshold (const PortablePixmap &img);
00049         void createTextures();
00050 
00051         unsigned char currentThreshold;
00052         bool bTexturesReady;
00053         PortablePixmap imgOriginal;
00054 };
00055 
00056 
00057 #endif // LOPER_CHESSBOARDPICTURE

Generated on Mon May 26 11:19:28 2003 for CamChecker by doxygen1.3