remove warnings

pull/266/head
baisheng lai 9 years ago
parent 36636e5fc8
commit bf9dd72f0a
  1. 6
      modules/ccalib/samples/multi_cameras_calibration.cpp
  2. 11
      modules/ccalib/samples/omni_calibration.cpp
  3. 2
      modules/ccalib/samples/omni_stereo_calibration.cpp
  4. 8
      modules/ccalib/samples/random_pattern_calibration.cpp
  5. 2
      modules/ccalib/samples/random_pattern_generator.cpp

@ -34,11 +34,11 @@ static void help()
int main(int argc, char** argv)
{
float patternWidth, patternHeight;
int nCamera, nMiniMatches, cameraType;
float patternWidth = 0.0f, patternHeight = 0.0f;
int nCamera = 0, nMiniMatches = 0, cameraType = 0;
const char* outputFilename = "multi-camera-results.xml";
const char* inputFilename = 0;
int showFeatureExtraction, verbose;
int showFeatureExtraction = 0, verbose = 0;
if (argc < 2)
{
help();

@ -94,10 +94,9 @@ static bool readStringList( const string& filename, vector<string>& l )
return true;
}
static void saveCameraParams( const string & filename, Size imageSize, Size boardSize, double square_width,
double square_height, int flags, const Mat& cameraMatrix, const Mat& distCoeffs, const double xi,
const vector<Vec3d>& rvecs, const vector<Vec3d>& tvecs, vector<string> detec_list, const Mat& idx,
const double rms, const vector<Mat>& imagePoints)
static void saveCameraParams( const string & filename, int flags, const Mat& cameraMatrix,
const Mat& distCoeffs, const double xi, const vector<Vec3d>& rvecs, const vector<Vec3d>& tvecs,
vector<string> detec_list, const Mat& idx, const double rms, const vector<Mat>& imagePoints)
{
FileStorage fs( filename, FileStorage::WRITE );
@ -172,7 +171,7 @@ int main(int argc, char** argv)
{
Size boardSize, imageSize;
int flags = 0;
double square_width, square_height;
double square_width = 0.0, square_height = 0.0;
const char* outputFilename = "out_camera_params.xml";
const char* inputFilename = 0;
vector<Mat> objectPoints;
@ -253,6 +252,6 @@ int main(int argc, char** argv)
TermCriteria criteria(3, 200, 1e-8);
rms = omnidir::calibrate(objectPoints, imagePoints, imageSize, K, xi, D, rvecs, tvecs, flags, criteria, idx);
_xi = xi.at<double>(0);
saveCameraParams(outputFilename, imageSize, boardSize, square_width, square_height, flags, K, D, _xi,
saveCameraParams(outputFilename, flags, K, D, _xi,
rvecs, tvecs, detec_list, idx, rms, imagePoints);
}

@ -216,7 +216,7 @@ int main(int argc, char** argv)
{
Size boardSize, imageSize1, imageSize2;
int flags = 0;
double square_width, square_height;
double square_width = 0.0, square_height = 0.0;
const char* outputFilename = "out_camera_params_stereo.xml";
const char* inputFilename1 = 0;
const char* inputFilename2 = 0;

@ -92,13 +92,13 @@ static void saveCameraParams(const string& filename, Size imageSize, float patte
int main(int argc, char** argv)
{
const char* inputFilename;
const char* inputFilename = 0;
const char* outputFilename = "out_camera_params.xml";
vector<string> imglist;
vector<Mat> vecImg;
int flags = 0;
float patternWidth, patternHeight;
int nMiniMatches;
float patternWidth = 0.0f, patternHeight = 0.0f;
int nMiniMatches = 0;
if(argc < 2)
{
help();
@ -120,7 +120,7 @@ int main(int argc, char** argv)
}
else if (strcmp(s, "-mm") == 0)
{
if (sscanf(argv[++i], "%d", &nMiniMatches) != 1 || nMiniMatches < 5)
if (sscanf(argv[++i], "%d", &nMiniMatches) != 1 || nMiniMatches < 15)
return fprintf( stderr, "Invalid number of minimal matches or number is too small"), -1;
}
else if( strcmp( s, "-fp" ) == 0 )

@ -22,7 +22,7 @@ int main(int argc, char** argv)
{
const char* filename = 0;
Mat pattern;
int width, height;
int width = 0, height = 0;
if(argc < 2)
{
help();

Loading…
Cancel
Save