Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV Featuredetection with OpenCL

Hello,

I recently start experimenting with OpenCV, especially with the featuredetectors (eg. SIFT, SURF ...) Now i´m starting to look into OpenCL and I wanted to ask if there is OpenCL "support" for these featuredetectors, because i would like to run these algorithm on a parallel device (Altera Cyclone V SoC)

While browsing through the OpenCV doc I found following a link saying:

"All specialized ocl implemetations has been hidden behind general C++ algorithm interface. Now the function execution path can be selected dynamically at runtime: CPU or OpenCL; this mechanism is also called Transparent API. New class cv::UMat is intended to hide data exchange with OpenCL device in a convinient way."

So if I use UMat instead of Mat with OpenCL enabled the code, which can be run via OpenCL is excecutet on the parallel device? For OpenCV 3.2 I´m not able to find a list which lists the OpenCV functions with are usable with OpenCL (or are the functions the same as in 2.4). So when i declare things with UMat it could be run on the GPU or maybe the CPU but i don´t know exactly what is run on which component?

What would happen if I use this codeexample? 1. Not working 2. Run on CPU because detect isn´t supportet in OpenCL 3. parts from the sift algorithm which are supportet in OpenCL run on cpu and other parts run on gpu?

UMat img =imread("..");     
cv::Ptr<cv::xfeatures2d::SiftFeatureDetector> siftDetector = 
      cv::xfeatures2d::SiftFeatureDetector::create();
std::vector<cv::KeyPoint> siftKeypoints;
siftDetector->detect(img, siftKeypoints);

Already asked a quite similar question on stackoverflow a few days ago, but thought this might be a better place for asking this question.

Thanks for reading :)

OpenCV Featuredetection with OpenCL

Hello,

I recently start experimenting with OpenCV, especially with the featuredetectors (eg. SIFT, SURF ...) Now i´m starting to look into OpenCL and I wanted to ask if there is OpenCL "support" for these featuredetectors, because i would like to run these algorithm on a parallel device (Altera Cyclone V SoC)

While browsing through the OpenCV doc I found following a link saying:

"All specialized ocl implemetations has been hidden behind general C++ algorithm interface. Now the function execution path can be selected dynamically at runtime: CPU or OpenCL; this mechanism is also called Transparent API. New class cv::UMat is intended to hide data exchange with OpenCL device in a convinient way."

So if I use UMat instead of Mat with OpenCL enabled the code, which can be run via OpenCL is excecutet on the parallel device? For OpenCV 3.2 I´m not able to find a list which lists the OpenCV functions with are usable with OpenCL (or are the functions the same as in 2.4). So when i declare things with UMat it could be run on the GPU or maybe the CPU but i don´t know exactly what is run on which component?

What would happen if I use this codeexample? 1. Not working 2. Run on CPU because detect isn´t supportet in OpenCL 3. parts from the sift algorithm which are supportet supported in OpenCL run on cpu gpu and other parts run on gpu?cpu?

UMat img =imread("..");     
cv::Ptr<cv::xfeatures2d::SiftFeatureDetector> siftDetector = 
      cv::xfeatures2d::SiftFeatureDetector::create();
std::vector<cv::KeyPoint> siftKeypoints;
siftDetector->detect(img, siftKeypoints);

Already asked a quite similar question on stackoverflow a few days ago, but thought this might be a better place for asking this question.

Thanks for reading :)