Ask Your Question
1

Basic FileStorage operation problem - failed to open:

asked 2014-01-09 08:36:55 -0600

CloudVision gravatar image

updated 2014-01-09 09:03:34 -0600

berak gravatar image

I have been struggling for a while by the failure to open file using FileStorage: It is part of the code from: \opencv\sources\samples\cpp\tutorial_code\calib3d\camera_calibration\camera_calibration.cpp:

FileStorage fs(inputSettingsFile, FileStorage::READ); // Read the settings
if (!fs.isOpened())
{
    cout << "Could not open the configuration file: \"" << inputSettingsFile << "\"" << endl;
    return -1;
}

It always failed. Tried absolute path also, still fails. Environment: Opencv version: 2.4.8, windows 7 (32-bit) and Visual Studio 2010. (Actually, tried 2.4.2 and VS2008, same problem) Anything I am missing?

edit retag flag offensive close merge delete

Comments

Same problem. Does anyone has any solution?

Larakott gravatar imageLarakott ( 2014-08-19 23:32:14 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-01-17 15:25:27 -0600

mannyglover gravatar image

Maybe the place where the binary is running is not the place where the configuration file is. Try giving in absolute path to the configuration file as the command-line argument.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-01-09 08:36:55 -0600

Seen: 891 times

Last updated: Jan 17 '17