We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't figure out how to duplicate this FileStorage example. Is there a way? https://docs.opencv.org/master/d6/d03/filestorage_8cpp-example.html
These are the specific sections that I'm interested in.
//write { FileStorage fs(filename, FileStorage::WRITE); cout << "writing images\n"; fs << "images" << "["; fs << "image1.jpg" << "myfi.png" << "../data/baboon.jpg"; cout << "image1.jpg" << " myfi.png" << " ../data/baboon.jpg" << endl; fs << "]"; cout << "writing mats\n"; Mat R =Mat_<double>::eye(3, 3),T = Mat_<double>::zeros(3, 1); cout << "R = " << R << "\n"; cout << "T = " << T << "\n"; fs << "R" << R; fs << "T" << T; cout << "writing MyData struct\n"; MyData m(1); fs << "mdata" << m; cout << m << endl; } //read { FileStorage fs(filename, FileStorage::READ); if (!fs.isOpened()) { cerr << "failed to open " << filename << endl; help(av); return 1; } FileNode n = fs["images"]; if (n.type() != FileNode::SEQ) { cerr << "images is not a sequence! FAIL" << endl; return 1; } cout << "reading images\n"; FileNodeIterator it = n.begin(), it_end = n.end(); for (; it != it_end; ++it) { cout << (string)*it << "\n"; } Mat R, T; cout << "reading R and T" << endl; fs["R"] >> R; fs["T"] >> T; cout << "R = " << R << "\n"; cout << "T = " << T << endl; MyData m; fs["mdata"] >> m; cout << "read mdata\n"; cout << m << endl; cout << "attempting to read mdata_b\n"; //Show default behavior for empty matrix fs["mdata_b"] >> m; cout << "read mdata_b\n"; cout << m << endl; }
The text was updated successfully, but these errors were encountered:
I am sorry for the late reply 🙇
This will be fixed by #484 except custom struct support. https://github.com/shimat/opencvsharp/blob/57e4b58230abd504fb0ca0913e9cb7643d5fc78b/test/OpenCvSharp.Tests/core/FileStorageTest.cs
Sorry, something went wrong.
No branches or pull requests
Summary of your issue
I can't figure out how to duplicate this FileStorage example. Is there a way?
https://docs.opencv.org/master/d6/d03/filestorage_8cpp-example.html
These are the specific sections that I'm interested in.
The text was updated successfully, but these errors were encountered: