Ask Your Question

Revision history [back]

Yes there is a problem with this code

{
    cv::Mat A(2, 3, CV_32FC(181), Scalar(0));
    FileStorage fs1("tau.yml", FileStorage::WRITE);
    fs1 << "A" << A;
    fs1.release();

}
FileStorage fs2("tau.yml", FileStorage::READ);
Mat AA;
if (!fs2["A"].empty())
fs2["A"] >> AA;
cout << AA;
fs2.release();

now problem is at these lines

if( fmt_pair_count != 1 || fmt_pairs[0] > 4 )
    CV_Error( CV_StsError, "Too complex format for the matrix" );

If you have build opencv using cmake you can change fmt_pairs[0] > 4 in fmt_pairs[0] > 256 and it should work. Something better : make an issue and give this post in reference

Yes I agree whith you (vs 2015 opencv 3.2-dev). there is a problem with this code

{
    cv::Mat A(2, 3, CV_32FC(181), Scalar(0));
    FileStorage fs1("tau.yml", FileStorage::WRITE);
    fs1 << "A" << A;
    fs1.release();

}
FileStorage fs2("tau.yml", FileStorage::READ);
Mat AA;
if (!fs2["A"].empty())
fs2["A"] >> AA;
cout << AA;
fs2.release();

now problem is at these lines

if( fmt_pair_count != 1 || fmt_pairs[0] > 4 )
    CV_Error( CV_StsError, "Too complex format for the matrix" );

If you have build opencv using cmake you can change fmt_pairs[0] > 4 in fmt_pairs[0] > 256 and it should work. Something better : make an issue and give this post in reference