Skip to content

Commit

Permalink
Added option to set camera resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
jokla committed Feb 20, 2017
1 parent 458f264 commit 92c3c7d
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions tools/calibration/camera_calibration.cpp
Expand Up @@ -148,24 +148,24 @@ int main(int argc, const char ** argv)
try {
std::string outputFileName = "camera.xml";

// std::cout << std::endl << "*********************************** " << std::endl;
// std::cout << std::endl << "*********************************** " << std::endl;

// std::cout << std::endl << "Loading config file: " << std::endl;
// Settings s;
// const std::string inputSettingsFile = argc > 1 ? argv[1] : "default.cfg";
// if (! s.read(inputSettingsFile) ) {
// std::cout << "Could not open the configuration file: \"" << inputSettingsFile << "\"" << std::endl;
// std::cout << std::endl << "Usage: " << argv[0] << " <configuration file>.cfg" << std::endl;
// return -1;
// }
// std::cout << std::endl << "Loading config file: " << std::endl;
// Settings s;
// const std::string inputSettingsFile = argc > 1 ? argv[1] : "default.cfg";
// if (! s.read(inputSettingsFile) ) {
// std::cout << "Could not open the configuration file: \"" << inputSettingsFile << "\"" << std::endl;
// std::cout << std::endl << "Usage: " << argv[0] << " <configuration file>.cfg" << std::endl;
// return -1;
// }

// std::cout << std::endl << "*********************************** " << std::endl;
// std::cout << std::endl << "*********************************** " << std::endl;

// if (! s.goodInput)
// {
// std::cout << "Invalid config file input detected. Application stopping. " << std::endl;
// return -1;
// }
// if (! s.goodInput)
// {
// std::cout << "Invalid config file input detected. Application stopping. " << std::endl;
// return -1;
// }

std::string opt_inputSettingsFile;
std::string opt_ip;
Expand Down Expand Up @@ -219,6 +219,11 @@ int main(int argc, const char ** argv)
vpNaoqiGrabber g;
g.setCamera(opt_cam);

if (opt_VGA)
g.setCameraResolution(AL::kVGA);
else
g.setCameraResolution(AL::kQVGA);

if (! opt_ip.empty()) {
std::cout << "Connect to robot with ip address: " << opt_ip << std::endl;
g.setRobotIp(opt_ip);
Expand Down

0 comments on commit 92c3c7d

Please sign in to comment.