00001 /* 00002 * RL_StereoProcessor.h 00003 * 00004 * Created on: Jun 18, 2010 00005 * Author: taha 00006 */ 00007 00008 #ifndef RL_STEREOPROCESSOR_H_ 00009 #define RL_STEREOPROCESSOR_H_ 00010 00011 #include <cv.h> 00012 #include "RL_StereoParams.h" 00013 00015 class RL_StereoProcessor { 00016 public: 00017 bool parametersSet; 00018 00019 RL_StereoParams stereoParams; 00020 CvStereoBMState *cvBMState; 00021 00022 IplImage *rectLeftImage, *rectRightImage; 00023 IplImage *depthMap; 00024 CvMat *leftMapX, *leftMapY; 00025 CvMat *rightMapX, *rightMapY; 00026 00027 RL_StereoProcessor(int width,int height); 00028 virtual ~RL_StereoProcessor(); 00029 00030 IplImage *ComputeDepthMap(IplImage *left, IplImage *right, bool rectified = false); 00031 00032 bool ReadCameraParamsFromFile(unsigned id1, unsigned id2, const char* path); 00033 00034 void SetStereoParams(RL_StereoParams params); 00035 00036 void SetStereoCalibParams(RL_StereoParams params); 00037 00038 void UpdateRectifyMaps(); 00039 00040 IplImage * RectifyLeft(IplImage *); 00041 IplImage * RectifyRight(IplImage *); 00042 00043 void ConvertToColorDepth(IplImage *outRGB); 00044 }; 00045 00046 #endif /* RL_STEREOPROCESSOR_H_ */