Part Number: AM5728
Tool/software: Linux
Hi,
We want to acclerate our algorithm on DSP.
1.We tried to use Opencv to acclerate such as erdoe() and dilate() ,
"cv::ocl::setUseOpenCL(true);" , "export OPENCV_OPENCL_DEVICE='TI AM57:ACCELERATOR:TI Multicore C66 DSP'" and the UMat is done.
But there is no different between use opencl to acclerate or not .
2.We tried to create our own opencl kernel which link with C66x_IMG_LIB.
We made it. But We don't know how to use the function in LIB.
Such as erode():
Host side:
kernel.setArg(0, bufA);
kernel.setArg(1, bufDst);
kernel.setArg(2, 256*256);
DSP side:
void IMG_erode_bin (const unsigned char *restrict in_data, unsigned char *restrict out_data, const char *restrict mask, int cols);
kernel void maskVector(global const uchar* src, global uchar* dst,const int cols )
{
const char arry[9]={
1 , 1 , 1 ,
1 , 1 , 1 ,
1 , 1 , 1
};
IMG_erode_bin((const unsigned char *)src,(unsigned char *)dst,arry,cols);
}
We don't know why the output img is all black.
Please help us.
Best regards.