export_param_file.cpp 485 B

12345678910111213141516171819202122
  1. #include <opencv2/core.hpp>
  2. #include <opencv2/stereo.hpp>
  3. using namespace cv;
  4. using namespace std;
  5. int main(int argc, char* argv[])
  6. {
  7. //! [create]
  8. Ptr<stereo::QuasiDenseStereo> stereo = stereo::QuasiDenseStereo::create(cv::Size(5,5));
  9. //! [create]
  10. //! [write]
  11. std::string parameterFileLocation = "./parameters.yaml";
  12. if (argc > 1)
  13. parameterFileLocation = argv[1];
  14. stereo->saveParameters(parameterFileLocation);
  15. //! [write]
  16. return 0;
  17. }