pyopencv_cuda.hpp 963 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifdef HAVE_OPENCV_CORE
  2. #include "opencv2/core/cuda.hpp"
  3. typedef std::vector<cuda::GpuMat> vector_GpuMat;
  4. typedef cuda::GpuMat::Allocator GpuMat_Allocator;
  5. typedef cuda::HostMem::AllocType HostMem_AllocType;
  6. typedef cuda::Event::CreateFlags Event_CreateFlags;
  7. template<> struct pyopencvVecConverter<cuda::GpuMat>
  8. {
  9. static bool to(PyObject* obj, std::vector<cuda::GpuMat>& value, const ArgInfo& info)
  10. {
  11. return pyopencv_to_generic_vec(obj, value, info);
  12. }
  13. static PyObject* from(const std::vector<cuda::GpuMat>& value)
  14. {
  15. return pyopencv_from_generic_vec(value);
  16. }
  17. };
  18. CV_PY_TO_CLASS(cuda::GpuMat);
  19. CV_PY_TO_CLASS(cuda::Stream);
  20. CV_PY_TO_CLASS(cuda::Event);
  21. CV_PY_TO_CLASS(cuda::HostMem);
  22. CV_PY_TO_CLASS_PTR(cuda::GpuMat);
  23. CV_PY_TO_CLASS_PTR(cuda::GpuMat::Allocator);
  24. CV_PY_FROM_CLASS(cuda::GpuMat);
  25. CV_PY_FROM_CLASS(cuda::Stream);
  26. CV_PY_FROM_CLASS(cuda::HostMem);
  27. CV_PY_FROM_CLASS_PTR(cuda::GpuMat::Allocator);
  28. #endif