Commit 05a40a39 authored by baisheng lai's avatar baisheng lai

remove bugs

parent a88a7eb8
...@@ -38,6 +38,10 @@ ...@@ -38,6 +38,10 @@
// the use of this software, even if advised of the possibility of such damage. // the use of this software, even if advised of the possibility of such damage.
// //
//M*/ //M*/
#include <opencv2/core.hpp>
#include <vector>
#ifndef __OPENCV_OMNIDIR_HPP__ #ifndef __OPENCV_OMNIDIR_HPP__
#define __OPENCV_OMNIDIR_HPP__ #define __OPENCV_OMNIDIR_HPP__
......
...@@ -7,11 +7,11 @@ using namespace cv; ...@@ -7,11 +7,11 @@ 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 calibration 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 20 multi_camera_omnidir.xml \n"
"\n" "\n"
" the file multi_camera.xml is generated by imagelist_creator as \n" " the file multi_camera_omnidir.xml is generated by imagelist_creator as \n"
" imagelist_creator multi_camera.xml *.* \n" " imagelist_creator multi_camera_omnidir.xml *.* \n"
" note the first filename in multi_camera.xml is the pattern, the rest are photo names,\n" " note the first filename in multi_camera_omnidir.xml is the pattern, the rest are photo names,\n"
" photo names should be in form of cameraIdx-timestamp.*, and cameraIdx starts from 0"; " photo names should be in form of cameraIdx-timestamp.*, and cameraIdx starts from 0";
static void help() static void help()
......
#include"opencv2/omnidir.hpp" #include "opencv2/omnidir.hpp"
#include"opencv2/core/core.hpp" #include "opencv2/core.hpp"
#include"opencv2/imgproc/imgproc.hpp" #include "opencv2/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp" #include "opencv2/calib3d.hpp"
#include "opencv2/highgui.hpp"
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <string> #include <string>
...@@ -12,10 +13,10 @@ using namespace std; ...@@ -12,10 +13,10 @@ using namespace std;
const char * usage = const char * usage =
"\n example command line for omnidirectional camera calibration.\n" "\n example command line for omnidirectional camera calibration.\n"
" omniCalibration -w 6 -h 7 -sw 80 -sh 80 image_list.xml \n" " omniCalibration -w 6 -h 9 -sw 80 -sh 80 imagelist.xml \n"
" \n" " \n"
" the file image_list.xml is generated by imagelist_creator as\n" " the file imagelist.xml is generated by imagelist_creator as\n"
"imagelist_creator image_list.xml *.*"; "imagelist_creator imagelist.xml *.*";
static void help() static void help()
{ {
......
#include"opencv2/omnidir.hpp" #include "opencv2/omnidir.hpp"
#include"opencv2/core/core.hpp" #include "opencv2/core.hpp"
#include"opencv2/imgproc/imgproc.hpp" #include "opencv2/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui.hpp"
#include "opencv2/calib3d.hpp"
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <string> #include <string>
......
...@@ -157,5 +157,5 @@ int main(int argc, char** argv) ...@@ -157,5 +157,5 @@ int main(int argc, char** argv)
Mat D; Mat D;
vector<Mat> rvec, tvec; vector<Mat> rvec, tvec;
double rms = calibrateCamera(objectPoints, imagePoints, vecImg[0].size(), K, D, rvec, tvec); double rms = calibrateCamera(objectPoints, imagePoints, vecImg[0].size(), K, D, rvec, tvec);
saveCameraParams("camera_params.xml", vecImg[0].size(), patternWidth, patternHeight, flags, K, D, rvec, tvec, rms); saveCameraParams(outputFilename, vecImg[0].size(), patternWidth, patternHeight, flags, K, D, rvec, tvec, rms);
} }
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