Wednesday, 30 December 2015

XML : XML Error in opencv camera calibratiom sample using images

I use opencv sample (samples\cpp\tutorial_code\calib3d\camera_calibration) for camera calibration.

I change one line in camera_calibration file.

  int main(int argc, char* argv[])  {      help();      Settings s;      const string inputSettingsFile = "default.xml"; // this line !!!!    

My project has below file structure :

  • main.cpp (consists a copy of camera_calibration.cpp code)
  • default.xml
  • calibrationImages
    • images
      • 1.jpg
      • 2.jpg
      • ........
    • list.xml

I change some lines in default.xml file :

  <Calibrate_Pattern>"CHESSBOARD"</Calibrate_Pattern>      <!-- The input to use for calibration.                To use an input camera -> give the ID of the camera, like "1"               To use an input video -> give the path of the input video, like "/tmp/x.avi"               To use an image list  -> give the path to the XML or YAML file containing the list of the images, like "/tmp/circles_list.xml"               -->      <Input>"calibrationImages/list.xml"</Input>     

My list.xml is :

  <?xml version="1.0"?>  <opencv_storage>  <images>  images/1.jpg  images/2.jpg  .......  </images>  </opencv_storage>    

When I run this code, compiler says that :

enter image description here

No comments:

Post a Comment