GPU-accelerated edge detection with i.MX6D

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPU-accelerated edge detection with i.MX6D

1,082 Views
matteobattaggia
Contributor I

Hello,

 

we are using a dual-core i.MX6 in an application based on computer vision. We

receive a stream of images from a camera, with a frame rate of about 14 fps.

Each frame is 2592 x 1944 (5 megapixels), with 8 bits per pixel.

 

We need to process those images to detect the edges.

 

Please notice that our application is not concerned with the visualization of

those images (actually we do not even have any display connected to our custom

board). We have the frames loaded into main memory by the IPU, and we have to

process them to obtain the edge points represented in main memory too (as a list

of points, or as a binary image).

 

Performances are important: using a standard Canny edge detector with the OpenCV

libraries, processing a 5Mpx-8bpp-frame takes about 500 ms, which is far too

long. We have to use the GPU horse-power to boost the edge detection.

 

This should be a typical "GPGPU" application, so OpenCL seems to be the right

way. Unfortunately, our first tries with it were not so good: a simple 3x3

gaussian-blur filter --which is the first step for the canny algorithm-- appears

to take about 240 ms.

 

So our question is: how can we optimize the OpenCL in order to achieve better

performances? Those should be possible, given that Vivante GC2000 is assigned a

bandwidth of 16 Gflops, and a 3x3 gaussian filter on 5 MB should take more or

less 50 millions operations.

 

I attach some OpenCL code we are using.

 

Being this issue crucial for our application, any help or hint on it would be

greatly appreciated :-)

 

Regards,

Matteo

Original Attachment has been moved to: conv05.c.zip

Original Attachment has been moved to: conv05.cl.zip

Original Attachment has been moved to: Makefile.zip

Labels (4)
0 Kudos
3 Replies

459 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Matteo

You are rigth, there are some issues in Vivante gpu driver 5.0.11p5 and previous version, some test case has no expected processing effect such as gaussian filter, median filter, erode and dilate. As workaround the issue was resolved by disabling shader I-cache, however we strongly recommend to upgrade to GPU driver upgraded to Vivante v5.0.11p6 o later drivers version that also include some OpenCL performance related tests such as hevc test, kmens and so on. If you are running yocto official Freescale release, please wait to the next gpu driver and next bsp release that will include OpenCL 1.2 support.

Regards

0 Kudos

459 Views
matteobattaggia
Contributor I

Hi and thanks for the answer.

> If you are running yocto official Freescale release

Yes , I am working with Freescale's Yocto, with kernel version 3.10.17-1.0.1.

> please wait to the next gpu driver and next bsp release that will include OpenCL 1.2 support.

Could you tell me when are these releases expected to happen?

Thanks again,

Matteo

0 Kudos

459 Views
umashankergupta
Contributor I

Hello,

In kernel version 3.14.52_1.1.0-ga GPU driver (Vivante v5.0.11p7.4.) is updated. After this how much time it will take for  processing.

Regards

0 Kudos