rossi_lhf
rossi_lhf

Reputation: 103

Opencl can't find gpu on ARM

I'm trying to run image processing app on android/ARM, using opencv's ocl module. In some case(android4.2.2/Qualcomm snapdragon msm8930/Adreno TM305), it runs well.

But in other cases(android4.4.2/rockchip RK3288/mali-T764; android4.4/sumsung exynos5410/powerVR SGX 544mp),there are problems. CV::ocl::getOpenCLDevice() shows there is no opencl platform or device.

I'm sure all three tested systems support opencl. Could anyone tell me what's the problem here? Thanks!

Upvotes: 3

Views: 849

Answers (1)

rossi_lhf
rossi_lhf

Reputation: 103

Well,I fixed the problem already. The problem is some android devices don't have opencl lib file libopencl.so in file system, or the file has a different name(for example, libgles_Mali.so). To use opencl, we should set environment first.

Specifically, add

setenv("OPENCV_OPENCL_BINARY", "libGLES_Mali.so", 0);

Before

cv::ocl::getOpenCLDevices()

Upvotes: 2

Related Questions