Can not open the config file for camera calibration when run the code

asked 2017-06-06 02:14:40 -0500

astronaut gravatar image

Hi

Im using the camera calibration source code from OpenCV in this link http://docs.opencv.org/2.4/doc/tutori...)

In the configuration file may choose to use camera as an input, a video file or an image list.I would like to use the last option . So I tried to create a configuration file where I enumerate the images to use.

Here’s my configuration file .

  <?xml version="1.0"?>   
    -<opencv_storage>    
    <images> C:\Users\admin\Desktop\Images\img1.png C:\Users\admin\Desktop\Images\img2.png  C:\Users\admin\Desktop\Images\im3.png  C:\Users\admin\Desktop\Images\img4.png  C:\Users\admin\Desktop\Images\img5.png C:\Users\admin\Desktop\Images\img6.png  C:\Users\admin\Desktop\Images\img7.png C:\Users\admin\Desktop\Images\img8.png  </images>
    </opencv_storage>

So far I understand the config file in Visual Studio 2012 need to be specified with Right click on Project-> Properties-> Configuration->Configuration Properties, Debugging then Command Argument where I put the name of the config file. Then I placed the the config.xml file the project source file in Visual Studio 2012. But when run the code I code this error come in command window:

Could not open the configuration file:config.xml

Any help?

edit retag flag offensive close merge delete

Comments

you also have to fill the startup path in the debugging properties, pointing it to the folder, where you put that file.

berak gravatar imageberak ( 2017-06-06 02:37:31 -0500 )edit

yes done it

    Settings s;
            const string inputSettingsFile = argc > 1 ? argv[1] : 
"C:/Calibration/Clibration/CameraCalibration1/config.xml";
        FileStorage fs(inputSettingsFile, FileStorage::READ); // Read the settings

Then I got this error : Invalid input detected. Whats wrong now?

astronaut gravatar imageastronaut ( 2017-06-06 03:11:06 -0500 )edit

one of those tests failed

try using forward slashes in your image path

berak gravatar imageberak ( 2017-06-06 03:29:47 -0500 )edit

done still same error

astronaut gravatar imageastronaut ( 2017-06-06 04:00:05 -0500 )edit

I dont know what is wrong with config file. any help?

astronaut gravatar imageastronaut ( 2017-06-06 04:46:43 -0500 )edit