Xilinx Zynq-7000 User Manual page 30

Hide thumbs Also See for Zynq-7000:
Table of Contents

Advertisement

Sobel Edge Detection
Sobel edge detection is a classical algorithm in the field of image and video processing for
the extraction of object edges. Edge detection using Sobel operators works on the premise
of computing an estimate of the first derivative of an image to extract edge information. By
computing the x and y direction derivatives of a specific pixel against a neighborhood of
surrounding pixels, it is possible to extract the boundary between two distinct elements in
an image. Due to the computational load of calculating derivatives using squaring and
square root operators, fixed coefficient masks have been adopted as a suitable
approximation in computing the derivative at a specific point. In the case of Sobel, the
masks used are shown in
Table 2-8: Sobel Operator Masks
-1
-2
0
0
1
2
The visual effect of applying a Sobel operation on a frame of video or an image is shown in
Figure
2-3.
X-Ref Target - Figure 2-3
There are different ways of implementing the C code for Sobel edge detection depending
on the target execution platform and performance requirements. The sobel implementation
is in /hardware/vivado_hls/src/sobel.cpp.
The C code shows that applying the masks of
two-dimensional traversal in memory along a 3 x 3 window. Because this window accesses
different rows in the image, the benefits of memory locality to reduce memory bandwidth
requirements are limited.
To achieve the target performance of 60 frames per second at 1080p, the inner for-loops
computing x_weight and y_weight must be fully unrolled.
Complete unrolling of the inner for-loop structure in the context of the HLS tool has the
effect of exposing the entire datapath for the computation of the gradient at a pixel to the
compiler. It also exposes all the memory accesses required to complete the computation as
fast as possible. In this case, achieving maximum performance requires nine read
operations to the memory storing the input image to construct the 3 x 3 window on which
Zynq-7000 AP SoC ZC702 Base TRD
UG925 (v6.0) February 21, 2014
Table 2-8
-1
-1
0
-2
1
-1
Figure 2-3: Sobel Edge Detection
www.xilinx.com
0
1
0
2
0
1
Sobel
HW Core
Figure 2-3
to an image creates a
Hardware Architecture
X890_01_092412
30
Send Feedback

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents