convert.cpp
Go to the documentation of this file.
00001 #include "camera_calibration_parsers/parse.h"
00002 #include <ros/console.h>
00003 #include <cstdio>
00004 
00005 using namespace camera_calibration_parsers;
00006 
00007 int main(int argc, char** argv)
00008 {
00009   if (argc < 3) {
00010     printf("Usage: %s input.yml output.ini\n"
00011            "       %s input.ini output.yml\n", argv[0], argv[0]);
00012     return 0;
00013   }
00014 
00015   std::string name;
00016   sensor_msgs::CameraInfo cam_info;
00017   if (!readCalibration(argv[1], name, cam_info)) {
00018     ROS_ERROR("Failed to load camera model from file %s", argv[1]);
00019     return -1;
00020   }
00021   if (!writeCalibration(argv[2], name, cam_info)) {
00022     ROS_ERROR("Failed to save camera model to file %s", argv[2]);
00023     return -1;
00024   }
00025   
00026   ROS_INFO("Saved %s", argv[2]);
00027   return 0;
00028 }


camera_calibration_parsers
Author(s): Patrick Mihelich
autogenerated on Fri Jan 3 2014 11:24:03