Commit a5ce50b1 authored by baisheng lai's avatar baisheng lai

change include files

parent fb272047
...@@ -42,9 +42,8 @@ ...@@ -42,9 +42,8 @@
#ifndef __OPENCV_MULTICAMERACALIBRATION_HPP__ #ifndef __OPENCV_MULTICAMERACALIBRATION_HPP__
#define __OPENCV_MULTICAMERACALIBRATION_HPP__ #define __OPENCV_MULTICAMERACALIBRATION_HPP__
#include "precomp.hpp" #include "opencv2/randomPatten.hpp"
#include "randomPatten.hpp" #include "opencv2/omnidir.hpp"
#include "omnidir.hpp"
#include <string> #include <string>
#include <iostream> #include <iostream>
using namespace cv; using namespace cv;
......
...@@ -40,8 +40,7 @@ ...@@ -40,8 +40,7 @@
//M*/ //M*/
#ifndef __OPENCV_OMNIDIR_HPP__ #ifndef __OPENCV_OMNIDIR_HPP__
#define __OPENCV_OMNIDIR_HPP__ #define __OPENCV_OMNIDIR_HPP__
#include "precomp.hpp"
#include <iostream>
namespace cv namespace cv
{ {
namespace omnidir namespace omnidir
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#ifndef __OPENCV_RANDOMPATTERN_HPP__ #ifndef __OPENCV_RANDOMPATTERN_HPP__
#define __OPENCV_RANDOMPATTERN_HPP__ #define __OPENCV_RANDOMPATTERN_HPP__
#include "precomp.hpp"
#include "opencv2/features2d.hpp" #include "opencv2/features2d.hpp"
#include "opencv2/highgui.hpp" #include "opencv2/highgui.hpp"
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
using namespace std; using namespace std;
using namespace cv; using namespace cv;
const char * usage = const char * usage =
"\n example command line for multi-camera calibration by using random pattern \n" "\n example command line for multi-camera calibrsation by using random pattern \n"
" multiCamCalib -nc 5 -pw 800 -ph 600 -ct 1 -fe 0 -nm 10 multi_camera.xml \n" " multiCamCalib -nc 5 -pw 800 -ph 600 -ct 1 -fe 0 -nm 10 multi_camera.xml \n"
"\n" "\n"
" the file multi_camera.xml is generated by imagelist_creator as \n" " the file multi_camera.xml is generated by imagelist_creator as \n"
...@@ -101,11 +101,11 @@ int main(int argc, char** argv) ...@@ -101,11 +101,11 @@ int main(int argc, char** argv)
// do multi-camera calibration // do multi-camera calibration
multiCameraCalibration multiCalib(cameraType, nCamera, inputFilename, patternWidth, patternHeight, showFeatureExtraction, nMiniMatches); multiCameraCalibration multiCalib(cameraType, nCamera, inputFilename, patternWidth, patternHeight, showFeatureExtraction, nMiniMatches);
multiCalib.loadImages(); multiCalib.loadImages();
multiCalib.initialize(); multiCalib.initialize();
multiCalib.optimizeExtrinsics(); multiCalib.optimizeExtrinsics();
// the above three lines can be replaced by multiCalib.run(); // the above three lines can be replaced by multiCalib.run();
multiCalib.writeParameters(outputFilename); multiCalib.writeParameters(outputFilename);
} }
\ No newline at end of file
...@@ -274,7 +274,7 @@ int main(int argc, char** argv) ...@@ -274,7 +274,7 @@ int main(int argc, char** argv)
return fprintf( stderr, "Unknown option %s\n", s ), -1; return fprintf( stderr, "Unknown option %s\n", s ), -1;
} }
} }
// get image name list // get image name list
vector<string> image_list1, detec_list_1, image_list2, detec_list_2; vector<string> image_list1, detec_list_1, image_list2, detec_list_2;
if((!readStringList(inputFilename1, image_list1)) || (!readStringList(inputFilename2, image_list2))) if((!readStringList(inputFilename1, image_list1)) || (!readStringList(inputFilename2, image_list2)))
...@@ -293,7 +293,7 @@ int main(int argc, char** argv) ...@@ -293,7 +293,7 @@ int main(int argc, char** argv)
{ {
objectPoints.push_back(object); objectPoints.push_back(object);
} }
// run calibration, some images are discarded in calibration process because they are failed // run calibration, some images are discarded in calibration process because they are failed
// in initialization. Retained image indexes are in idx variable. // in initialization. Retained image indexes are in idx variable.
Mat K1, K2, D1, D2, xi1, xi2, idx; Mat K1, K2, D1, D2, xi1, xi2, idx;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
using namespace std; using namespace std;
using namespace cv; using namespace cv;
const char * usage = const char * usage =
"\n example command line for calibrate a camera by random pattern. \n" "\n example command line for calibrate a camera by random pattern. \n"
" randomPatternCalibration -pw 600 -ph 850 -mm 20 image_list.xml \n" " randomPatternCalibration -pw 600 -ph 850 -mm 20 image_list.xml \n"
"\n" "\n"
...@@ -152,7 +152,7 @@ int main(int argc, char** argv) ...@@ -152,7 +152,7 @@ int main(int argc, char** argv)
finder.computeObjectImagePoints(vecImg); finder.computeObjectImagePoints(vecImg);
vector<Mat> objectPoints = finder.getObjectPoints(); vector<Mat> objectPoints = finder.getObjectPoints();
vector<Mat> imagePoints = finder.getImagePoints(); vector<Mat> imagePoints = finder.getImagePoints();
Mat K; Mat K;
Mat D; Mat D;
vector<Mat> rvec, tvec; vector<Mat> rvec, tvec;
......
#include "opencv2/randomPatten.hpp"; #include "opencv2/randomPatten.hpp";
const char * usage = const char * usage =
"\n example command line for generating a random pattern. \n" "\n example command line for generating a random pattern. \n"
" randomPatternGenerator -iw 600 -ih 850 pattern.png\n" " randomPatternGenerator -iw 600 -ih 850 pattern.png\n"
"\n"; "\n";
......
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
#ifndef __OPENCV_PRECOMP_H__ #ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__ #define __OPENCV_PRECOMP_H__
#include "opencv2/calib3d/calib3d.hpp" #include <opencv2/core.hpp>
#include "opencv2/imgproc/imgproc.hpp" #include <opencv2/calib3d.hpp>
#include "opencv2/core/core.hpp" #include <opencv2/features2d.hpp>
#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <vector> #include <vector>
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment