37 ImageOf<PixelRgb> *imageL;
38 ImageOf<PixelRgb> *imageR;
60 yarp::dev::PolyDriver polyHead;
61 yarp::dev::IEncoders *posHead;
63 yarp::dev::PolyDriver polyTorso;
64 yarp::dev::IEncoders *posTorso;
69 string inputLeftPortName;
70 string inputRightPortName;
74 string currentPathDir;
75 std::vector<string> imageListR;
76 std::vector<string> imageListL;
77 std::vector<string> imageListLR;
79 BufferedPort<ImageOf<PixelRgb> > imagePortInLeft;
80 BufferedPort<ImageOf<PixelRgb> > imagePortInRight;
81 BufferedPort<ImageOf<PixelRgb> > outPortRight;
82 BufferedPort<ImageOf<PixelRgb> > outPortLeft;
93 void printMatrix(Mat &matrix);
94 bool checkTS(
double TSLeft,
double TSRight,
double th=0.08);
95 void preparePath(
const char * imageDir,
char* pathL,
char* pathR,
int num);
96 void saveStereoImage(
const char * imageDir,
const Mat& left,
const Mat& right,
int num);
97 void monoCalibration(
const vector<string>& imageList,
int boardWidth,
int boardHeight, Mat &K, Mat &Dist);
98 void stereoCalibration(
const vector<string>& imagelist,
int boardWidth,
int boardHeight,
float sqsizee);
99 void saveCalibration(
const string& extrinsicFilePath,
const string& intrinsicFilePath);
100 void calcChessboardCorners(Size boardSize,
float squareSize, vector<Point3f>& corners);
101 bool updateIntrinsics(
int width,
int height,
double fx,
double fy,
double cx,
double cy,
double k1,
double k2,
double p1,
double p2,
const string& groupname);
102 bool updateExtrinsics(Mat Rot, Mat Tr,
const string& groupname);
103 void saveImage(
const char * imageDir,
const Mat& left,
int num);
104 void stereoCalibRun();