Hi,
I flash the debian with prebuild tensorflow to my Hikey 970 board and try to use GPU acceleration for my OpenCV (3.4.3) project.
When build cmake WITH_OPENCL=ON, OpenCV build with default OpenCL 1.2 not the Mali 2.0, so I changed the cmake to:
-D WITH_OPENCL=OFF
-D HAVE_OPENCL_STATIC=ON
-D OPENCL_LIBRARIES=/usr/lib/aarch64-linux-gnu/libmali.so
-D OPENCL_INCLUDE_DIRS=/usr/include/CL
The compilation is ok, but when i use a small example to test GPU performance,
#include “opencv2/opencv.hpp”
using namespace cv;
int main(int argc, char** argv)
{
UMat img, gray;
imread(“image.jpg”, IMREAD_COLOR).copyTo(img);
cvtColor(img, gray, COLOR_BGR2GRAY);
GaussianBlur(gray, gray,Size(7, 7), 1.5);
Canny(gray, gray, 0, 50);
imshow(“edges”, gray);
waitKey();
return 0;
}
the excution time is 4 times slower than the cpu version and it should be 5 times faster.
Does somebody already use OpenCV and OpenCL for GPU acceleration with hikey970 and can give me some advices?
Thanks!