cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

taban
Journeyman III

cvMat to oclMat

Hi all,

I have a problem at my image processing project with remapping. OpenCV remap function is working so slowly for me, Therefore i have decided to use OpenCL remap function, So i have to change my cv::Mat variables to ocl::oclMat.

How can i convert theese variables. Thank you !

Regards..

0 Likes
1 Solution
dipak
Big Boss

Hi,

I'm not an OpenCV expert. However, as per this page Data Structures — OpenCV 3.0.0-dev documentation, I guess you can use following APIs to assign cv::Mat to ocl::oclMat.


//! assignment operator. Perform blocking upload to device.


  oclMat &operator = (const Mat &m);



//! performs blocking upload data to oclMat.


  void upload(const cv::Mat &m);



Regards,

View solution in original post

0 Likes
2 Replies
dipak
Big Boss

Hi,

I'm not an OpenCV expert. However, as per this page Data Structures — OpenCV 3.0.0-dev documentation, I guess you can use following APIs to assign cv::Mat to ocl::oclMat.


//! assignment operator. Perform blocking upload to device.


  oclMat &operator = (const Mat &m);



//! performs blocking upload data to oclMat.


  void upload(const cv::Mat &m);



Regards,

0 Likes
taban
Journeyman III

Thank you Dipak

0 Likes