stereo.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. //
  5. // Copyright (C) 2021 Intel Corporation
  6. #ifndef OPENCV_GAPI_CPU_STEREO_API_HPP
  7. #define OPENCV_GAPI_CPU_STEREO_API_HPP
  8. #include <opencv2/gapi/gkernel.hpp> // GKernelPackage
  9. namespace cv {
  10. namespace gapi {
  11. namespace calib3d {
  12. namespace cpu {
  13. GAPI_EXPORTS GKernelPackage kernels();
  14. /** @brief Structure for the Stereo operation initialization parameters.*/
  15. struct GAPI_EXPORTS StereoInitParam {
  16. StereoInitParam(int nD, int bS, double bL, double f):
  17. numDisparities(nD), blockSize(bS), baseline(bL), focus(f) {}
  18. StereoInitParam() = default;
  19. int numDisparities = 0;
  20. int blockSize = 21;
  21. double baseline = 63.5;
  22. double focus = 3.6;
  23. };
  24. } // namespace cpu
  25. } // namespace calib3d
  26. } // namespace gapi
  27. namespace detail {
  28. template<> struct CompileArgTag<cv::gapi::calib3d::cpu::StereoInitParam> {
  29. static const char* tag() {
  30. return "org.opencv.stereoInit";
  31. }
  32. };
  33. } // namespace detail
  34. } // namespace cv
  35. #endif // OPENCV_GAPI_CPU_STEREO_API_HPP