This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OpenCV/OpenCL Sobel filter fails to compile

Other Parts Discussed in Thread: AM5728

Hi

Tried to use cv::Sobel OpenCV filter with OpenCL on AM5728 board and filter call fails with:

/tmp/openclOqBrki.cl:2:10: fatal error: 'edmamgr.h' file not found

OpenCL program build log: -D T1=short -D cn=1 -DX_OUTPUT -DSOBELCOEF
/tmp/openclOqBrki.cl:2:10: fatal error: 'edmamgr.h' file not found

Did check sobel.cl under modules/imgproc/src/opencl and see where it is coming from:

#include <dsp_c.h>
#include <edmamgr.h>

Tried to feed edmamgr.h from /usr/share/ti/examples/openmpacc/edmamgr/edmamgr.h but got even more issues.

Any ideas how to fix that?

Thanks

Update: It seems that problem is not just with my code but as well with Barcode detect demo application. 

By default that demo application is launched by Matrix browser, which runs /usr/bin/runBarcodeRoi.sh.

But Matrix and run script do set OpenCL device to use as it is done in:

cat /usr/share/OpenCV/titestsuite/setupEnv.sh
export OPENCV_BUILDDIR=/usr/share/OpenCV/samples
export OPENCV_TEST_DATA_PATH=/usr/share/OpenCV/testdata
export OPENCV_OPENCL_DEVICE='TI AM57:ACCELERATOR:TI Multicore C66 DSP'

So if that setup script is sourced, as required by TI OpenCV http://processors.wiki.ti.com/index.php/OpenCV#Single_channel.2C_1920x1080._barcode_ROI_detection_use_case ,  it starts failing the same way.

/usr/bin/runBarcodeRoi.sh

Starting barcode detection...

init done
Using Wayland-EGL
wlpvr: PVR Services Initialised
[ 786.538627] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
[ 786.544526] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
[ 786.550611] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
[ 786.565147] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
[ 786.571037] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
[ 786.577047] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
/tmp/openclWe8clK.cl:2:10: fatal error: 'edmamgr.h' file not found

OpenCL program build log: -D T1=short -D cn=1 -DX_OUTPUT
/tmp/openclWe8clK.cl:2:10: fatal error: 'edmamgr.h' file not found

Even tried to rebuild entire SDK to get latest sources from TI (seems bitbake recipe for opencv fetches latest code from Result the same.https://git.ti.com/opencv/tiopencv/commits/tiopencvrelease_3.1 ).