Hi Gusarambula,
I still used Yocto 4.9.88(rock 2.4) BSP and updated the OpenCV to v4.0.1(from imx-yocto-L4.14.98_2.3.0), then I enabled python3, OpenCL, dnn and text.
Finally, I built it successfully.
But I tested the source code as below
import cv2
img = cv2.UMat(cv2.imread("image.jpg", cv2.IMREAD_COLOR))
imgUMat = cv2.UMat(img)
gray = cv2.cvtColor(imgUMat, cv2.COLOR_BGR2GRAY)
gray = cv2.GaussianBlur(gray, (7, 7), 1.5)
gray = cv2.Canny(gray, 0, 50)
cv2.imwrite('test.jpg',img)
cv2.imwrite('test_UMat.jpg' , imgUMat)
it reported an error from OpenCL
[ WARN:0] Using world accessible cache directory. This may be not secure: /var/tmp/
OpenCL error CL_INVALID_WORK_GROUP_SIZE (-54) during call: clEnqueueNDRangeKernel('row_filter_C1_D0', dims=2, globalsize=128x528x1, localsize=16x16x1) sync=false
[ 1] 25: FMA_MUL temp(322).dp.x, 2.000000, temp(319).dp.x
I also tested the code in OpenCV v3.4, it worked and no error.
Could you tell me what happened and how to fix it?