00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00037 #ifndef _XB3_H_
00038 #define _XB3_H_
00039
00040
00041
00042
00043
00044 #include <ros/ros.h>
00045 #include <image_transport/image_transport.h>
00046 #include <cv_bridge/cv_bridge.h>
00047 #include <sensor_msgs/image_encodings.h>
00048 #include <opencv2/imgproc/imgproc.hpp>
00049 #include <opencv2/highgui/highgui.hpp>
00050
00051 #include <signal.h>
00052
00053
00054
00055 #include "pgr_registers.h"
00056 #include "pgr_stereocam.h"
00057
00058 #define PFLN {printf("DEBUG PRINT FILE %s LINE %d\n",__FILE__,__LINE__);}
00059
00060
00061
00062 typedef struct{
00063 int use_shm;
00064 char dummymode;
00065 char debugmode;
00066 }TYPE_flg;
00067
00068
00069
00070
00071
00072 void handler_short_stereomask_change(char *a, char *b, char *c);
00073 void handler_wide_stereomask_change(char *a, char *b, char *c);
00074 int convert_triclopscolorimage_2_iplimage(TriclopsColorImage *TI, IplImage *IPL);
00075
00076
00077
00078
00079 #ifdef _XB3_CPP_
00080
00081
00082 IplImage *image,*uimage,*pimage;
00083 double filltime;
00084
00085 TriclopsInput colorInput;
00086 unsigned char* pucRightRGB = NULL;
00087 unsigned char* pucLeftRGB = NULL;
00088 unsigned char* pucCenterRGB = NULL;
00089
00090 TriclopsError e;
00091 TriclopsImage16 depthImage16;
00092 unsigned char* pucGreenBuffer;
00093 unsigned char* pucRGBBuffer;
00094 unsigned char* pucDeInterlacedBuffer;
00095 PGRStereoCamera_t stereoCamera;
00096 dc1394camera_t* camera;
00097 dc1394error_t err;
00098
00099 dc1394_t * d;
00100 dc1394camera_list_t * list;
00101 unsigned int nThisCam;
00102
00103 char file_shortcal[255] = "config/short.cal";
00104 char file_widecal[255] = "config/wide.cal";
00105
00106
00107
00108
00109
00110 TriclopsColorImage shortRectifiedColor;
00111 TriclopsColorImage wideRectifiedColor;
00112
00113
00114
00115
00116
00117 IplImage* RightCamera;
00118 IplImage* CenterCamera;
00119 IplImage* LeftCamera;
00120 IplImage *Ileft;
00121 IplImage *Iright;
00122 IplImage *InvalidStereoMask;
00123 IplImage *DicardedStereoMask;
00124 IplImage *ShortDisparityImage;
00125 IplImage *WideDisparityImage;
00126
00127
00128 #endif
00129
00130 #endif
00131