shadow_umat.hpp 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #error This is a shadow header file, which is not intended for processing by any compiler. \
  2. Only bindings parser should handle this file.
  3. namespace cv
  4. {
  5. class CV_EXPORTS_W UMat
  6. {
  7. public:
  8. //! default constructor
  9. CV_WRAP UMat(UMatUsageFlags usageFlags = USAGE_DEFAULT);
  10. //! constructs 2D matrix of the specified size and type
  11. // (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.)
  12. CV_WRAP UMat(int rows, int cols, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT);
  13. CV_WRAP UMat(Size size, int type, UMatUsageFlags usageFlags = USAGE_DEFAULT);
  14. //! constructs 2D matrix and fills it with the specified value _s.
  15. CV_WRAP UMat(int rows, int cols, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT);
  16. CV_WRAP UMat(Size size, int type, const Scalar& s, UMatUsageFlags usageFlags = USAGE_DEFAULT);
  17. //! Mat is mappable to UMat
  18. CV_WRAP_MAPPABLE(Ptr<Mat>);
  19. //! returns the OpenCL queue used by OpenCV UMat
  20. CV_WRAP_PHANTOM(static void* queue());
  21. //! returns the OpenCL context used by OpenCV UMat
  22. CV_WRAP_PHANTOM(static void* context());
  23. //! copy constructor
  24. CV_WRAP UMat(const UMat& m);
  25. //! creates a matrix header for a part of the bigger matrix
  26. CV_WRAP UMat(const UMat& m, const Range& rowRange, const Range& colRange = Range::all());
  27. CV_WRAP UMat(const UMat& m, const Rect& roi);
  28. CV_WRAP UMat(const UMat& m, const std::vector<Range>& ranges);
  29. //CV_WRAP_AS(get) Mat getMat(int flags CV_WRAP_DEFAULT(ACCESS_RW)) const;
  30. //! returns a numpy matrix
  31. CV_WRAP_PHANTOM(Mat get() const);
  32. //! returns true iff the matrix data is continuous
  33. // (i.e. when there are no gaps between successive rows).
  34. // similar to CV_IS_MAT_CONT(cvmat->type)
  35. CV_WRAP bool isContinuous() const;
  36. //! returns true if the matrix is a submatrix of another matrix
  37. CV_WRAP bool isSubmatrix() const;
  38. /*! Returns the OpenCL buffer handle on which UMat operates on.
  39. The UMat instance should be kept alive during the use of the handle to prevent the buffer to be
  40. returned to the OpenCV buffer pool.
  41. */
  42. CV_WRAP void* handle(AccessFlag accessFlags) const;
  43. // offset of the submatrix (or 0)
  44. CV_PROP_RW size_t offset;
  45. };
  46. } // namespace cv