Abstract – Real time edge detection is implement on the platform that consist of the TMS320DM6437 DSP, camera and canny edge detection algorithm. Edge detection is an important task in computer vision for extracting meaningful information from images. The main goal of our technique is to obtain thin edges. The edge detection is useful in image segmentation, object identification and boundary detection. Edge detection is useful for extracting information about the image like location of object in the image their shape and size. Image edge detection reduces the amount of data and filters out useless information and preserves important structural properties in an image. The edge image contains information about the original image. For the edge detection we consider two different ways of implementation, the one using intensity and the other using color information. In this paper we use a camera that takes multiple images under different lighting conditions. This method is use for real-time edge detection of the objects in short distance. The system is working on real time. This system does not require any sensor input except an image.
KEYWORDS – Real time edge detection; canny edge detection; DSP.
Image processing has been widely used in a range of industrial, commercial, civilian and military applications. Edge detection is an ongoing research topic in image analysis and computer vision. Edge detection refers to the process of identifying and locating sharp discontinuities in an image. Edge detection is always the first step in many image processing algorithms, because it significantly reduces the amount of data and filters out useless information. Most of the information in a scene is contain in the edge information. The edge detection is use to reduce the amount of data in an image and preserves the structural properties. The edge is the set of pixels. The texture, gray or color of each pixel is different with the nearer pixels in the image. It is a necessary step for information and feature extraction. Edge detection is the important task in image processing. Edges carry critical information about the scene. An edge is defined as pixel intensity discontinuity or irregularities. The edge is a boundary of different homogenous regions. Most of the information in a scene is contained in the edge information. The real time image edge detection is one of the main objectives in image analysis and it has very broad application prospects. The goal of this project is to implement an image processing algorithm applicable to edge detection system in DSP, with a focus on achieving overall high performance, low cost and short development time. The aim of edge detection is to develop an algorithm which satisfies following criteria:
1. Detection: It should be detect real edge point while the falsely detecting non-edge points should be less.
2. Localization: The detected edges should be nearer to the real edges.
3. Number of responses: Real edge should not give more than one response.
There are many algorithms for edge detection such as Sobel, Roberts Cross, Prewitt, and Canny but Canny is superior over many of the available algorithm and thus is chosen for real time implementation. They can show where shadows fall in an image or any other distinct change in the intensity of an image. The quality of edge detection is highly dependent on the condition of light, the objects of similar intensities, density of edges in the image, and noise. While each of these problems can be handled by adjusting certain values in the edge detector and changing the threshold value for what is considered an edge. There are two ways for implementation of edge detection, one using intensity and the other using color information. Canny algorithm based real time edge detection method is use to improve the processing speed and to reduce the hardware consumption. In this project we use a camera which takes multiple images under different lighting conditions.
The method is based on DSP (digital signal processor) and the canny edge detection. The image restoration can be implementing in the real time system. This system is useful for the dust, smoke, and rainy conditions. This method will be reduced the transmission delay for large sustained bandwidth in the DSP data communications real-time system. In presently global market for video processing systems requires high-performance digital signal processing as well as low device costs appropriate for a volume application. DSP device provide a platform with which to meet these two contrasting requirements. The paper proposes a new method for implementing the edge real time detection rapidly based on the platform of TMS320DM6437 DSP. The application of this system is industrial assembly lines and surveillance systems for finding the intruder.
The program of canny edge detection is in the CCS (Code Compose Studio) language programming environment. In section II related work is discuss. In section III Hardware implementation are described. In section IV Edge detection is describe. In section V Canny edge detector is described. In section VI Experimental result is present. The conclusion is presented in section VII.
II. RELATED WORK
In recent year many algorithms has been developed for edge detection techniques. Zhiwei TANG et al have proposed architecture for Edge Detection using canny edge detection. and implementation of canny edge detection using DSP. The goal of this project is to implement an image processing algorithm applicable to Edge Detection system using DSP. In this paper author define the canny edge detection method which gives sharp edge image. High performance, low cost, low error rate and short development time is achieve using this method. The memory required for the output image is smaller than the input image .
Tomasz Marciniak et al have proposed a concept for fast prototyping of real-time hardware/software video processing systems for urban surveillance monitoring equipment. The evaluation module with the TMS320DM6437 signal processor linked with the Code Composer Studio through Matlab/Simulink has been used. The processed video signals have been acquired using BOSCH NBC-255-P network camera with the CMOS ‘?? sensor. The author analyzed efficiency of implementation of the algorithms using two examples: detection of painting theft and signaling of crossing a pedestrian pass at the red light. In this paper motion detection, edge detection, color segmentation, people tracking abandoned object detection models are used. The real-time implementations of both models have been done using the TMS320DM6437 EVM. Concluding, the use of the Matlab/Simulink environment provides a very convenient opportunity for creating, modifying, and testing software based on the C6000 processor family. The module architecture allows the optimal implementation of the algorithms such as tracking, classification, and detection of objects in real time. Results of multiple tests allow to conclude that the use of the Matlab/Simulink environment and the CCS require the continuous code optimization to implement the system with the highest possible processing rate. Currently, the image processing within our system runs at 4 fps, which is adequate to the speed of the image registration in contemporary surveillance systems, but it may be too slow in advanced systems working with larger values of fps .
Jinqing Liu et al have proposed a system for human face detection This system firstly summarizes the basic methods of edge detection and the basis of Sobel operator and Canny operator, then, from a practical perspective, puts forward an novel method that is based on the integration of improved Sobel operator and Canny operator, moreover its results are thinned lastly via the method of Improved OPTA. All of that above is implemented on TMS320 DM642EVM. The results testify that this approach is not only good at eliminating noise, but also can detect the edge quickly and completely, so it has well practical significance. All of that is a foregoing preparation for the achievement of the system of human face detection in application. The integrity and real-time of detection have made some improvement in this paper, however, in real-time image processing system, how to achieve the ingenious combination between traditional measures and morphology etc, how to detect edges of human face exactly and real-time in the realistic environment containing such as noise, uneven illumination and so on, which needs continuous exploration in the application field .
JIANG Xingfang et al have proposed a method of real-time edge detection. In this paper XC2S300E FPGA, TMS320C6713 DSP, an emulator with the program edited by the wavelet transform are use. The image restoration is implementing with 25 frames per second. The program is the improved wavelet transform in the CCS (Code Compose Studio) language programming environment. The method reduces the transmission delay for large sustained bandwidth in the DSP data communications real-time system. The efficiency of edge detection would be improved using the high-speed real-time performance of the DSP. The effect of edge detection for distant objects was also reached the effect of the edge detection. The speed of the refresh rate is fast. The method is effective for real time edge extraction of the object in an image for short distance .
From the above edge detection technique we can conclude that the canny edge detection gives sharp edges and better performance than the other edge detection algorithm. The propose system uses DSP processor which gives better performance and increases the speed. The DSP reduces the transmission delay for large sustained bandwidth
III. HARDWARE SET-UP
The real time edge detection system is base on the platform of DSP. The three ends of the DSP are link to the computer, display and camera. The one port of DSP is link to a computer, another one is image input port link to the camera and third port is connecting to the display. The ‘C6437 is a high-performance, 32 bit floating point DSP processor developed by Texas Instruments. The speed of this processor makes it well suited for image processing applications. It has 64 general-purpose registers which is 32-bit word length. The TMS320DM6437 has eight independent functional units which are divided into multipliers and ALUs, two multipliers and six arithmetic logic units. The DSP core have four 16-bit multiply-accumulates (MACs) per cycle. The TMS320DM6437 has on-chip memory, application specific hardware logic, and additional on-chip peripherals. Two level cache based architecture are use in DM6437. The Level 1 program memory (L1P) has 256 Kb memory spaces which are configured as mapped memory or direct mapped cache. The Level 1 data (L1D) memory has 640 Kb memory space. The Level 2 cache (L2) memory has 1M-bit memory space. This memory space is shared between program and data. L2 memory can be configured as cache, mapped memory or both mapped and cache. The hardware set-up is shown in Figure 1.
Figure 1: Hardware used in implementation
IV. EDGE DETECTION
Image processing has been widely use in commercial, industrial and military applications. Edges are the changes in the intensity of an image. Edges occur on the boundary between two different regions in an image. The edge image contains information of the original image. Now a day’s edge detection is important task in image processing for extracting meaningful information from the image. The quality of edge detection is depends on the presence of light, noise, similar intensity of an image. The edge detection preserves the content information of the original image. Edge detection is useful in tracking, object detection.
V. CANNY EDGE DETECTION
There are many algorithms for edge detection like Sobel, Privitts, Robert cross, Canny but we use canny edge detection algorithm. The edge detector should have:
1. Good Detection – The filter should responds to an edge not to the noise.
2. Good Localization ‘ The detected edge should be near to the true edge.
3. Minimal Response – Real edge should not give more than one response.
To satisfy these requirements canny edge detection is use. The canny edge detector is one of the most commonly used image processing tools, detecting edges in a very robust manner.
The algorithm consists of following steps:
1. Smoothing: To remove the noise.
2. Intensity gradients: Find the magnitude and direction.
3. Non-maximum suppression: Only maximum intensity should be marked as edges.
4. hysteresis thresholding: Potential edges are determined by thresholding. Low threshold and high threshold are use.
Each step is described in the following sections.
Step 1: Smoothing
Generally noise reduction is essential factor in image processing. An image is always affected by noise in its capture, acquisition and processing. First convolving the image with Gaussian filters to smooth the signal. Smooth the image with a two dimensional Gaussian. The input image is smoothed to eliminate noise by improved Gaussian filter. Smoothing the image is done using a Gaussian mask. The Gaussian mask is created using either equation one or two.
G(x) = 1/'(2?? ??) e^(-x^2/(2??^2 )) 
G(x, y) = 1/'(2’?^(2 ) ) e^(-(x^2+y^2)/(2??^2 )) 
The first creates a weighted 1-D mask based on the standard deviation and neighboring pixels in the horizontal direction. The second formula creates a 2-D mask similar to the first but is it also dependent upon the pixels in the vertical direction. Usually noise reduction implies some sort of blurring operation. Gaussian filter is use to do this.
Step 2: Compute Gradient Magnitude and Angle
The Canny algorithm basically finds edges where the grayscale intensity of the image changes the most. The edges are found by determining gradients of the image. First step is to find the gradient in the x- and y-direction by applying the kernel. The first order derivative is applied to the entire image in both horizontal and vertical directions. For any given pixel located at (x, y), We can be calculated using following equations.
Gx = Valx+1 ‘ Valx-1 
Gy = Valy+1 ‘ Valy-1 
The magnitude and direction of each pixel at (x, y) are computed using
|G| = ‘(‘Gx’^2+’Gy’^2 ) 
|G| = |Gx| + |Gy|
Here, Gx and Gy are the gradients in the x- and y-directions. An image of the gradient magnitudes may indicate the edges clearly. However, the edges are typically broad and thus do not indicate the correct result.
?? = arctan (Gy/Gx) 
This shows changes in intensity, which indicates the presence of edges. This actually gives two results, the gradient in the x direction and the gradient in the y direction. The canny edge detection algorithm uses four directions to detect horizontal, vertical and diagonal edges in the blurred image. that is 0, 45, 90 and 135 degrees .
Step 3: Non-Maximum Suppression
This step is to convert the blurred edges in the image to sharp edges. The non-maximal suppression step keeps only those pixels on an edge with the highest gradient magnitude. Edges will occur at points the where the gradient is at a maximum. Therefore, all points not at a maximum should be suppressed. In order to do this, the magnitude and direction of the gradient is computed at each pixel. Then for each pixel check if the magnitude of the gradient is greater at one pixel’s distance away in either the positive or the negative direction perpendicular to the gradient. If the pixel is not greater than both, suppress it.
Step 4: Hysteresis Thresholding
A simple threshold may actually remove valid parts of a connected edge, leaving a disconnected final edge image. This happens in regions where the edge’s gradient magnitude fluctuates between just above and just below the threshold. Hysteresis is one way of solving this problem. Instead of choosing a single threshold, two thresholds thigh and tlow are used. Pixels with a gradient magnitude D <tlow are discarded immediately. However, pixels with tlow D< thigh are only kept if they form a continuous edge line with pixels with high gradient magnitude (i.e., above thigh). you can implement a partially correct version:
- If pixel (x, y) has gradient magnitude less than tlow discard the edge
- If pixel (x, y) has gradient magnitude greater than thigh it is set as edge.
- If pixel (x, y) has gradient magnitude between tlow and thigh and a pixel has a value above the low threshold and is the neighbor of an edge pixel, it is set as an edge pixel.
- If pixel (x, y) has gradient magnitude between tlow and thigh and a pixel has a value above the low threshold but is not the neighbor of an edge pixel, it is not set as an edge pixel.
VI. EXPERIMENTAL RESULT
The preceding algorithm was written in Code Composer Studio for images on the TMS320DM6437 DSP. Several implementation issues need to be addressed. First, read the each pixel of image in horizontal and vertical direction. Second, edge pixels are assigned the exact same location they are detected at. Third, convert the color image into gray scale. Finally, display the image. Figures 2 through 5 are showing original images and observe images. Each pixel requires that the square root be taken for the magnitude and the inverse tangent to be taken for the direction.
Figure 2: Original Image Figure 3: Observe Image
Figure 4: Original Image Figure 5: Observe Image
The method of the real-time edge detection is good. The nearer objects real-time edge detection is satisfactory. Real time edge detection is use in applications such as assembly line inspection and surveillance system. The system will runs in real time. The observe image contain some noise. We will remove that noise by using Gaussian filter. We will expect that the canny edge detection method gives sharp edge image and the imaging developer board which is used for real time implementation of image processing algorithms will provide higher resolution and maximum speed.
 Zhiwei TANG, Dongqin SHEN,’ Canny Edge Detection Codec using VLib on davinci series DSP’ International Conference on Computer Science and Service System, Year: 2012.
 Tomasz Marciniak, Agata Chmielewska, Rados_aw Weychan, Adam D_browski, ‘Fast Prototyping of Automatic Real-time Event Detection Facilities for Video Monitoring Using DSP Module’ 20th International Conference on Mixed Design of Integrated Circuits and Systems, Year: June 20-22, 2013,
 Jinqing Liu, Yusheng Huang, ‘Study of Human Face Image Edge Detection based on DM642’, IEEE International Conference on Computer Science and Information Theory, volume 8, Year: 2010.
 JIANG Xingfang, BI Tianyu, TAO Chunkan, ‘ A Method of Real-time Edge detection’ International Conference on Electric Information and Control Engineering, Year: 2011.
 Raman Maini, Dr. HimanshuAggarwal ‘Study and Comparison of Various Image Edge Detection Techniques’ International Journal of Image Processing (IJIP),Volume (3) : Issue (1).
 Ikhlas Abdel Qader, Marie Maddix, ‘Real Time Edge Detection Using TMS320C6711 DSP’, IEEE Conference on Electro/Information Technology, Year: 2004
 Obili Ramesh, P. V. Krishna Mohan Gupta, B. Sreenivasu, ‘A Real Time Hardware and Software Co-Simulation of Edge Detection for Image Processing System’, International Journal of Engineering Research & Technology (IJERT) Vol. 2 Issue 8,Year : August 2013
 Clemen Arth, Florian Limberger, Horst Bisch of ‘Real-Time License Plate Recognition on an Embedded DSP-Platform’, IEEE Conference on Computer Vision and Pattern Recognition, Year: 2007.
 Kuang hang, ‘Real-Time Image Acquisition and Processing System Design based on DSP’, 2nd International Conference on Computer and Automation Engineering, Volume 4, Year: 2010.
 Swantje Johnsen, Ashley Tews, ‘Real-Time Object Tracking and Classification Using a Static Camera’ Proceedings of the IEEE ICRA 2009Workshop on People Detection and Tracking Kobe, Japan, May: 2009.
 Huili Zhao, Guofeng Qin, Xingjian Wang, ‘Improvement of Canny Algorithm Based on Pavement Edge Detection’ 3rd International Congress on Image and Signal Processing, Year: 2010.
 TMS320DM6437 Digital Media Processor, Texas Instruments, Year : JUNE 2008
 Dwayne Phillips, ‘Image processing in C’.