Professional Documents
Culture Documents
-Adam Taylor
Arbitrary Precision Data Types Integer and fixed-point (ap_cint.h, ap_int.h and systemc.h)
HLS Stream Models for streaming data structures. Designed to obtain best performance and area (hls_stream.h)
Extensive support for the synthesis of the standard C (math.h) and C++ (cmath.h) math libraries. The support includes
floating point and fixed-point functions: abs, atan, atanf, atan2, atan2, ceil, ceilf, copysign, copysignf, cos, cosf, coshf,
HLS Math
expf, fabs, fabsf, floorf, fmax, fmin, logf, fpclassify, isfinite, isinf, isnan, isnormal, log, log10, modf, modff, recip, recipf,
round, rsqrt, rsqrtf, 1/sqrt, signbit, sin, sincos, sincosf, sinf, sinhf, sqrt, tan, tanf, trunc
Video library to implement several aspects of modeling video design in C++ with video Functions, specific data types,
memory line buffer and memory window (hls_video.h). Through a data type hls::Mat, Vivado HLS is also compatible with
existing OpenCV functions: AXIvideo2cvMat, AXIvideo2CvMat, AXIvideo2IplImage, cvMat2AXIvideo, CvMat2AXIvideo,
cvMat2hlsMat, CvMat2hlsMat, CvMat2hlsWindow, hlsMat2cvMat, hlsMat2CvMat, hlsMat2IplImage,
HLS Video hlsWindow2CvMat, IplImage2AXIvideo, IplImage2hlsMat, AbsDiff, AddS, AddWeighted, And, Avg, AvgSdv, Cmp, CmpS,
CornerHarris, CvtColor, Dilate, Duplicate, EqualizeHist, Erode, FASTX, Filter2D, GaussianBlur, Harris, HoughLines2,
Integral, InitUndistortRectifyMap, Max, MaxS, Mean, Merge, Min, MinMaxLoc, MinS, Mul, Not, PaintMask, PyrDown,
PyrUp, Range, Remap, Reduce, Resize, Set, Scale, Sobel , Split, SubRS, SubS, Sum, Threshold, Zero
HLS IP Integrate the LogiCORE IP FFT and FIR Compiler (hls_fft.h, hls_fir.h, ap_shift_reg.h)
HLS Linear Algebra Support for the following functions: cholesky, cholesky_inverse, matrix_multiply, qrf, qr_inverse, svd
(hls_linear_algebra.h)
Support for the following functions: atan2, awgn, cmpy, convolution_encoder, nco, qam_demod, qam_mod, sqrt,
HLS DSP
viterbi_decoder (hls_dsp.h)
Figure: HLS Functions of Video Library (UG902 & Saha Souvik, 2017)
Lecture 2 : Sobel Edge Detection Introduction
Sobel Introduction: From XAPP890
➢ 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 [Ref 4].
➢ 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 1.
How Sobel Works?
• The Sobel algorithm functions by identifying
edges in a image and emphasizing them
such that they can be easily identified.
• Typically this will create a grey scale image,
where the edges are identified as shades of grey
/ white.
• Sobel edge detection works by detecting a
change in the gradient of the image in both
the horizontal and vertical directions.
• To do this two convolution filters are applied to
the original image, the results of these
convolution filters are then combined to
determine the magnitude of the gradient.
https://www.hackster.io/adam-taylor/fpga-
Sobel convolution filters, Source: Adam Taylor
based-edge-detection-using-hls-192ad2
Lecture 2 : Sobel Edge Detection Introduction
Sobel Introduction: From XAPP890
Lecture 2 : Sobel Edge Detection Introduction
Sobel Function in OpenCV:
hls::Sobel<1,0,3>(img1, img2);
Sobel Edge Detection Algorithm Testbench
C Programming Testbench
For VIVADO HLS
• So, Here is the output of the
sobel Edge Detection
algorithm.
• We can observe from the
image that this algorithm
identifies edges and most of
the false edges generated
from the noise are removed
Figure : HLS Output of Sobel Edge Detection Algorithm
from the image.
Papers:
1. High Level Synthesis of Canny Edge Detection Algorithm on Zynq Platform, Hanaa M. Abdelgawad,
Name Description