comparison c/Parameters.cpp @ 506:13d4eb96a751

added needed parameters
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 28 Apr 2014 18:18:14 -0400
parents 17c5f378c283
children 081a9da6f85b
comparison
equal deleted inserted replaced
494:41a72146685e 506:13d4eb96a751
27 // common to cnnfiguration and command line 27 // common to cnnfiguration and command line
28 cmdLineAndFile.add_options() 28 cmdLineAndFile.add_options()
29 ("video-filename", po::value<string>(&videoFilename), "filename of the video to process") 29 ("video-filename", po::value<string>(&videoFilename), "filename of the video to process")
30 ("database-filename", po::value<string>(&databaseFilename), "filename of the database where results are saved") 30 ("database-filename", po::value<string>(&databaseFilename), "filename of the database where results are saved")
31 ("homography-filename", po::value<string>(&homographyFilename), "filename of the homography matrix") 31 ("homography-filename", po::value<string>(&homographyFilename), "filename of the homography matrix")
32 ("intrinsic-camera-filename", po::value<string>(&intrinsicCameraFilename), "filename of the homography matrix")
33 ("distortion-coefficients", po::value<std::vector<float> >(&distortionCoefficients)->multitoken(), "")
34 ("undistorted-size-multiplication", po::value<float>(&undistortedImageMultiplication), "undistorted image multiplication")
32 ("mask-filename", po::value<string>(&maskFilename), "filename of the mask image (where features are detected)") 35 ("mask-filename", po::value<string>(&maskFilename), "filename of the mask image (where features are detected)")
33 ("load-features", po::value<bool>(&loadFeatures), "load features from database") 36 ("load-features", po::value<bool>(&loadFeatures), "load features from database")
34 ("display", po::value<bool>(&display), "display trajectories on the video") 37 ("display", po::value<bool>(&display), "display trajectories on the video")
35 ("video-fps", po::value<float>(&videoFPS), "original video frame rate") 38 ("video-fps", po::value<float>(&videoFPS), "original video frame rate")
36 ("frame1", po::value<unsigned int>(&frame1), "first frame to process") 39 ("frame1", po::value<unsigned int>(&frame1), "first frame to process")
123 stream << boost::any_cast<unsigned int>(value) << separator; 126 stream << boost::any_cast<unsigned int>(value) << separator;
124 else if (value.type() == typeid(float)) 127 else if (value.type() == typeid(float))
125 stream << boost::any_cast<float>(value) << separator; 128 stream << boost::any_cast<float>(value) << separator;
126 else if (value.type() == typeid(string)) 129 else if (value.type() == typeid(string))
127 stream << boost::any_cast<string>(value) << separator; 130 stream << boost::any_cast<string>(value) << separator;
128 else 131 else if (value.type() == typeid(vector<float>)) {
132 for (unsigned int j=0; j<boost::any_cast<vector<float> >(value).size(); j++)
133 stream << boost::any_cast<vector<float> >(value)[j] << separator;
134 } else
129 cerr << "the type of the option " << optionsVec[i]->long_name() << " (" << i << ") is not int, float or string." << endl; 135 cerr << "the type of the option " << optionsVec[i]->long_name() << " (" << i << ") is not int, float or string." << endl;
130 } 136 }
131 137
132 return stream.str(); 138 return stream.str();
133 } 139 }