Hardware Implementation of Real-Time Image Segmentation Algorithms Using TMS320C6713 DSP and VM3224K2 Daughter Kit
Hardware Implementation of Real-Time Image Segmentation Algorithms Using TMS320C6713 DSP and VM3224K2 Daughter Kit
Abstract— Digital image processing continues to enable the Digital signal processors such as the TMS320C6x family of
multimedia technology revolution that we are experiencing Texas Instruments are like fast special purpose
today. The main purpose of this project is to create a code for microprocessors with a specialized type of architecture and an
implementing license plate segmentation from vehicle image in instruction set appropriate for signal processing. All DSP
various luminance conditions. The basic process involves is to
techniques have been very successful because of the
take image as input from CCD camera which is to be segmented
in DSP board using a very efficient segmentation algorithm development of low-cost software and hardware support.
based on the analysis of vertical and horizontal histogram with TMS320C6x DSP is considered to be TI’s most powerful
the edge processing methods. In this paper we have also used processor for applications requiring intensive computations.
DSP Simulink Blocksets in MATLAB for simulation purposes
and C6713 DSK, Code Composer Studio v3.1 for code developing II. DIGITAL IMAGE PROCESSING
and implementation. The segmentation technique and proposed An image defined as a two-dimensional function f(x, y); x
algorithm were well implemented practically in real-time by and y are spatial coordinates. The amplitude of the 2D
using the floating-point processor TMS320C6713 DSP chip
function f at any pair of coordinates (x, y) is called intensity or
manufactured by Texas Instruments. VM3224K2 Daughter Kit
(LCD) is embedded with DSK6713 Kit to display the output
gray level of the image at that point. When f, x and y are all
image also L2 cache memory and the compiler optimization finite and discrete quantities, these elements are referred to as
techniques were tuned for best performance improvement. pixels. These amplitudes composed as a vector of data where
the Color image has three components RGB at each point.
License plate recognition is a type of technology, mainly
Keywords— TMS320C6713, VM3224K2 Kit, Code Composer
software that enables computer systems to read automatically
Studio, Segmentation, Edge Detection, Thresholding Techniques
the registration number of vehicles from digital RGB images.
I. INTRODUCTION
Image processing is a method to perform some operations
on a digital image in order to get an enhanced image or to
extract hidden information that can be interpreted and used to
several purposes. Image segmentation has a promising future
as the universal segmentation algorithm and has become the
focus of contemporary research; it’s an integral step in any
image processing that some applications requires a simple
division of image into homogeneous regions while others
require more accurate detection, so for this reason we need a
special unit like a DSP processor that we use for digital signal
and image processing in real time and high-speed data transfer.
Fig. 1 Automatic Number Plate Recognition System (ANPR)
Digital signal processor is one of the core technologies in
rapidly growing application that become a key component in RGB image is a 3 dimensional combination of RED, BLUE
many domains. A C6x processor can be used as a standard and GREEN colors. In our work we have represented the
general-purpose digital signal processor programmed for a input image using Y-Cb-Cr format then we displayed by
specific application. DSP is generally more expensive since it converting into RGB format using the mathematical equations:
has more real estate. Several factors, such as cost, power
consumption, and speed, come into play when choosing a R = Y + 1.402 (Cr-128) (1)
DSP. The Specific-purpose digital signal processors are G = Y - 0.34414 (Cb-128) - 0.71414 (Cr-128) (2)
available with different feature, such as faster execution speed. B = Y + 1.772 (Cb-128) (3)
Copyright IPCO-2017
ISSN 2356-5608
A. RGB to Grayscale Image Conversion 1) Histogram Thresholding Methods: The Thresholding is
The grayscale image is obtained from the RGB image by one of the first low-level image processing techniques that he
γE
C. Image Segmentation Methods
CD(E,F) D(EHBE,F)ID(E,F)
CE BE
Segmentation is the division of an image into regions or
(12)
γF
CD(E,F) D(E,FHBF)ID(E,F)
categories which correspond to different objects or parts of
CF BF
objects. Every pixel in an image is allocated to one of a (13)
number of these categories. It is an essential step in image
processing and also it is a critical stage of image analysis. To Where dx and dy measure distance along the x and y
γE f(i J 1, j) K f(i, j)
following conditions: coordinates are (i, j ):
γF f(i, j J 1) K f(i, j)
(14)
(15)
The magnitude Mn of the vector ∆f is denoted as:
γ Mn(∆f) =γNE J γNF ? /N
i, j and i j, there exits R ∩ R ∅
(16)
ϑ tanI R V
ST
Many methods have been proposed most of which are the gradient direction ϑ is given by:
SU
based on histogram analysis, clustering and thresholding steps. (18)
The following method are used in the new proposed algorithm:
Copyright IPCO-2017
ISSN 2356-5608
III. HARDWARE AND SOFTWARE TOOLS V. IMPLEMENTATION
Now, we will present the hardware & software tools that Once proposed algorithm was developed, it was completely
are used in our research that are: TMS320C6713DSK toolkit verified in Matlab with multiple input images. Then the in-
for the processing, Code Composer Studio incorporates a C built functions of MATLAB were replaced by user-defined
compiler, an assembler, and a linker to generate C6x functions in Matlab Simulink Model that we uses different
executable files, VM3224K2 daughter card is also compatible Blocksets of "Video and Image Processing Blockset" library,
with Image processing algorithms, as we are able to display here we present different blocks used for this implementation.
only input and output. Rest of the processing is done in C6713. TABLE I
DIFFERENTS SIMULINK BLOCKSET USED
IV. PROPOSED METHODOLOGY
Matlab Simulink Blocksets
This paper mainly focuses on the development of a new N°
algorithm for extraction the number plate from live vehicle Blocks Library Quantity
image. Proposed method has composed of the following steps: 1 From Video Device L1 01
4 Video Viewer L4 03
Preprocessing
5 Embedded MATLAB Function L5 01
i. e. , Tr1
W X(;YZ)HW X([Y\)
Model to the CCS, MATLAB has developed a tool ''Link for
N
(19) code composer studio'' which allowed him to communicate
i. e. , Tr2
W]E(;YZ)HW]E([Y\) with the Code Composer Studio for compilation, real time
N
(20) debugging, and linking program in Integrated Development
Copyright IPCO-2017
ISSN 2356-5608
Environment (IDE). So with using this tool, the proposed VII. OPTIMIZATION
Simulink model is translated into CCS project written in C In order to improve the total execution time on the chip,
language that could be compiled and run on C6713. Fig 11 various optimization techniques were used to check the
shown the different steps of the passage from simulink to CCS. performance: C code, CCS compiler and L2 cache memory.
The number of clock cycles required for each function is
calculated and compared by a method called profiling for
benchmark. The improved performance after adding these
optimization techniques is shown in the table II:
TABLE III
PERFORMANCE IMPROVEMENT ACHIEVED
This section presents the results obtained after successful 5 Sobel Edge Detection 46642594 34720815
execution in CCS v3.1 and implementation in C6713 DSK. 6 Convert Image to uint8 3635678 2721520
ACKNOWLEDGMENT
I take this opportunity to express our sincere gratitude to all
my staff members of LTC for their help and constant support.
Fig. 6 Input Image Converted to Grayscale
REFERENCES
[1] G. Sudhakar Babu, K. Chandra Sekhara Reddy, “Automatic License
Plate Recognition System,” IJERA. Image Process, Vol. 3, pp.870-876,
Jul-Aug 2013.
[2] N. Shobha Rani, O. P. Neethu, N. Ponnath, “Automatic Vehicle
Tracking System Based on Fixed Thresholding and Histogram Based
Edge Processing,” IJECE. Vol. 5, pp. 869-878, August 2015.
[3] B. Sharmila, N. Karalan, “Image Processing on DSP Environment
Using OpenCV,” IJARCSSE, Vol 5, pp. 489~493, February 2015.
[4] U. Nemade, K.Shah, “Real Time Speech Recognition Using DSK
TMS320C6713”, IJARCSSE, Vol 4, pp. 461-469, January 2014.
[5] D. Nagpal, L. bhambhu, “Implementation of Simulink Based Model
Using Sobel Edge Detector for Dental Problems,” IJECSE. Image
Process, Vol. 3, pp. 254-262, October 2013.
[6] P.Daniel Ratna Raju, G.Neelima, “Image Segmentation by using
Histogram Thresholding,” IJCSET, Vol 2, pp. 776-779, January 2012.
[7] O. R. Vincent, O. Folorunso, “A Descriptive Algorithm for Sobel
Image Edge Detection,” InSITE, Vol. 10, pp. 097-107, May 2009.
[8] J. M. Elham, J. M. Ahmed, "Design Study Sobel Edge Detection",
Fig. 7 Output Image Converted to RGB565 IJAIEM, Vol. 2, Issue 12, pp. 248-253, December 2013.
Copyright IPCO-2017
ISSN 2356-5608