how to use OpenCL in OpenCV?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to use OpenCL in OpenCV?

3,681 Views
1019599657
Contributor III

hi

I am a green hand. i want to use OPENCL with opencv .I know that OpenCV support Intel's GPU default, And how I can use Imx8's GPU with OpenCV? If I need to compile with OpenCV source with OpenCL ? And I look for Information for Internet that when compile OpenCV with openCL, it need some .so ,like:

static const char *default_so_paths[] = {                                             "/system/lib64/libOpenCL.so",                                             "/system/vendor/lib64/libOpenCL.so",                                             "/system/vendor/lib64/egl/libGLES_mali.so"                                          };
However,I find libOpenCl.so and libGELSV1_CM_VIVANTE.so and libGLESv2_VIVANTE.so ,and others like libCLC.so libLLVM_vivo.so
libVSC.so libGAL.so ,whta i can need to used in the code above?
0 Kudos
Reply
3 Replies

3,133 Views
bernhardfink
NXP Employee
NXP Employee

Something to consider: 

  • if you write native OpenCL code, then the GPU from the i.MX devices gets involved.
  • if you write OpenCV code, then the i.MX BSP uses the ARM NEON accelerators from the Cortex-A cores

This means that OpenCV based jobs may be executed much slower on i.MX, compared to platforms where OpenCV is supported by a GPU core.

Regards,
Bernhard.

3,263 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Li,

OpenCL and OpenCV are enable and comes by default in your yocto BSP for iMX8

Regards

3,137 Views
joanxie
NXP TechSupport
NXP TechSupport

you should find libOpenCL.so from <ROOTFS>/usr/lib, for more detailed information, pls refer to the Chapter 5 Graphics of enclosed file

0 Kudos
Reply