Ask Your Question

Revision history [back]

Basic FileStorage operation problem - failed to open:

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?

click to hide/show revision 2
retagged

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

berak gravatar image

Basic FileStorage operation problem - failed to open:

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?