Humam Helfawi Humam Helfawi - 1 month ago 15
C++ Question

Container type with OpenCV and OpenCL

I want to call

cv::findCountours
on some
cv::UMat
(OpenCL activated) and get the results into
std::vector<std::vector<cv::Point>>
.

std::vector<std::vector<cv::Point>> contours;
cv::findContours(frame_umat, contours, cv::RETR_LIST, cv::ContourApproximationModes::CHAIN_APPROX_SIMPLE);


Will OpenCV still able to optimise it using OpenCL even if I am using
std::vector
? Is there any advantage of using a special container like for example
cv::UMat
as a container(not an image)?

Answer

By tracing OpenCV cv::findContours function, I realized that it is not optimised using OpenCL at all (not CUDA also). The only implementation it has is SSE2 as far as I found in OpenCV 3.1