I was learning hog.cpp implemented in OpenCV, when encountered the macro CV_OCL_RUN
and confused with it.
In hog.cpp where detectMultiScale()
locates, you can find CV_OCL_RUN
and a method called ocl_detectMultiScale()
in it. Compared between detectMultiScale()
and ocl_detectMultiScale()
, not only their names but their implement are quite similar.
Here are my questions:
CV_OCL_RUN
used for? Does it for test or other purpose?detectMultiScale()
and ocl_detectMultiScale()
are so similar in functionality, why the later is embedded in the former ? What ways are they called in?Thanks in advance!
CV_OCL_RUN
is for OpenCL code. setUseOptimized()
or setUseOpenCL()
is set to false, regular code will be used.You can find in the opencl directory the kernel code which will be run on the GPU device.
PS: OpenCL
is not only for GPU.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With