An Improved Image Processing Algorithms of Sobel Edge Detection [PDF]

Abstract. Sobel operator of image edge detection algorithm is preferred which is most trustworthy and gives an efficient

1 downloads 7 Views 521KB Size

Recommend Stories


A Descriptive Algorithm for Sobel Image Edge Detection Abstract [PDF]
Abstract. Image edge detection is a process of locating the edge of an image which is important in finding the approximate absolute gradient magnitude at each point I of an input grayscale image. The problem of getting an appropriate absolute gradien

Improved Entropic Edge-Detection
I cannot do all the good that the world needs, but the world needs all the good that I can do. Jana

Gradient Based Image Edge Detection
Learning never exhausts the mind. Leonardo da Vinci

Simulation of SOBEL Edge Detection Using Fuzzy Logic in MATLAB
We must be willing to let go of the life we have planned, so as to have the life that is waiting for

An improved method of automatic exudates detection in retinal image
How wonderful it is that nobody need wait a single moment before starting to improve the world. Anne

effective simulink model of sobel edge detection algorithm for image segmentation
Happiness doesn't result from what we get, but from what we give. Ben Carson

[PDF] Digital Image Processing
Almost everything will work again if you unplug it for a few minutes, including you. Anne Lamott

Image Processing & Video Algorithms with CUDA
You can never cross the ocean unless you have the courage to lose sight of the shore. Andrè Gide

Image Processing Technique for Hard Exudates Detection
You have survived, EVERY SINGLE bad day so far. Anonymous

Idea Transcript


Boletín Técnico, Vol.55, Issue 8, 2017, pp.359-366

An Improved Image Processing Algorithms of Sobel Edge Detection and Functional Verification Linlin Li Zibo Vocational Institute,Shandong,China Abstract Sobel operator of image edge detection algorithm is preferred which is most trustworthy and gives an efficient output in the field of image and video processing. In this paper, the author makes an improved image processing algorithms of sobel edge detection and then makes functional verification. After designed and verified the function of Sobel edge detection algorithm, the described methodology allows accelerating the design process of image processing systems. Simulation results show that the optimization algorithm can get better results, and the detection accuracy is improved compared with the previous algorithm, and this improved image processing algorithms has certain promotion value. Key words:Image processing algorithms, Sobel edge detection, System development 1. INTRODUCTION Image is the main source for human accessing and exchanging information. Therefore, the application field of image processing must relate to all aspects of human life and work. At present, Image processing has applications in intelligent transport system, autonomous system and self guided armaments etc. With the continuous expansion of the scope of human activities, the application field of image processing will be expanded. In order to verify the correctness and applicability of image processing algorithms, FPGA is an ideal choice for real time image processing applications. However, with the continuous increasing scale and complexity of the image processing system, the number of codes in image algorithm by FPGA is showing a trend of explosive increasing (Wang, 2006). Traditional Image processing system development involves paper designs and hand coding, followed by verification activities such as code inspections and an unit/integration test. Many of these activities lack tool automation, and so involve manual interaction. Thus they are error prone and time consuming. Lack of tool chain integration provides another opportunity for errors to be injected into the software that is often detected late and at high costs to the development process. To overcome these challenges, a new development flow named Model-Based Design (MBD) was put forward. In MBD workflow, a system model is at the center of the development process, from requirements development, through design, implementation, and testing(Liu, 2012). MBD has become a widely used and accepted approach. Using models at the core of the development process provides engineers with insight into the dynamics and algorithmic aspects of the system through simulation. In addition, the models are commonly used: executable specifications, Communicating component requirements and interface definitions between customer and supplier, automatic code generation of the software algorithms for production systems. Therefore, This workflow(Solano, 2013) is elaborated to create hardware and software partitioning, automatically create hardware and software implementation code, and verify the hardware and software implementations in the context of the complete system. It is not only overcoming the defects of low efficiency and difficulty of meeting the requirements in traditional methods of development, but also to meet time-to-market and cost objectives. The rest of the paper is organized as follows: In Section 2, we introduce the concepts of MBD and its workflow. Section 3 discusses Sobel operator of image edge detection algorithm is preferred which is most trustworthy and gives an efficient output in the field of image and video processing for the extraction of object edges. The main contribution of this paper is presented in Section 4, where Sobel edge detection algorithm is designed and verified using MBD. Finally, Section 5 summarizes the main conclusions of this work.

2.MODEL-BASED DESIGN 2.1.Traditional system development process The traditional system development process is characterized by using of paper specification generated from requirements gathered from various sources building physical prototypes for design. Writing code manually to implement control algorithms and complex logic. Dependence on a test system for verification and validation. Traditional system development process is shown in figure 1, where design, implementation, and test is done by individual team each suffering from the barrier of communication with its supplier and customer. A significant problem with this process is that errors in the specification are often not discovered until the final validation, which leads to specification change, redesign, re-implementation, and re-validation. Consequently, cost of fixing errors is high. Because of the many system configurations in a commercial system, 359

Boletín Técnico, Vol.55, Issue 8, 2017, pp.359-366

complete test coverage of the design is practically impossible using a test system. As a result, errors may be leaked into products, leading to field repairs.

Figure 1.Traditional system development process 2.2. Development process with Model-BasedDesign In Model-Based Design, the development process centers around a system model from requirements capture and design to implementation and test.This system model is the heart of an executable specification which is used and elaborated throughout the design flow (Penner,2002; Sharma,2009). The executable specification can also include inputs and expected outputs or acceptance criteria, and the application environment, as well as links or references to the requirements.The goal of the executable specification is to unambiguously communicate the design goals, as well as to allow feasibility and compatibility analysis of the requirements via simulations.

Figure 2.Development process with Model-Based Design In the MBD, a system model is at the center of the development process, fromrequirements development, through design, implementation, and testing. MBD workflow is shown in figure 2. MBD emerged from the need to reducedevelopment cost and improve product quality at thesame time, while the complexity of the system. A model of thesystem being developed serves as the common threadthroughout the development processfrom requirementscapture to final validation. As an executablespecification, this system model is refined throughout thedevelopment process. Simulation is used at eachprocess step to verify whether the design meets therequirements. Code generation is used for implementingcontrol algorithm and complex logic, thus eliminatingerrors introduced by writing source code by hand.

360

Boletín Técnico, Vol.55, Issue 8, 2017, pp.359-366

3.THE SOBEL OPERATOR An edge can be defined as a sudden change of intensity in an image. Inbinary images, an edge corresponds to a sudden change in intensity levelto 1 from 0, and vice versa. This, essentially, represents highfrequencycomponents of the image and would involve someprocedure to extract high frequencies from the image. Hence, edge detectionis fundamentally a high-pass operation with thresholding added to it.This implies that once high-frequency components are found. They are threshold to logic 1 in the image while all other pixels are set tozero. Too many edges represent a rough image, while too few would correspondto a relatively smoother image. The Sobel operator(Kanopoulos, 1988) performs a 2D spatial gradient measurement on animage and emphasizes regions of high spatial frequency that corresponds to edges. Typically, it is used to find the approximate absolute gradientmagnitude at each point in an input grayscale image. The operator consistsof a pair of 3 × 3 convolution kernels, as showed in figure 3.

Figure 3.Sobel convolution kernels Onekernel is simply the other rotated by 90°. Assuming an image segment ofthe same dimensions as that of the Sobel kernel, the result of convolution are as follows:

G   f1  2 f 2  f3    f7  2 f8  f9    f1  2 f 4  f7    f3  2 f6  f9 

(1) These kernels are designed to respond maximally to edges running verticallyand horizontally relative to the pixel grid, one kernel for each of thetwo perpendicular orientations. The kernels can be applied separatelyto the input image to produce separate measurements of the gradientcomponent in each orientation. |G| is often approximated as just the sum of themagnitudes of the x-derivative and y-derivative, Gx and Gy.These can thenbe combined together to find the absolute magnitude of the gradient ateach point and the orientation of that gradient. The gradient magnitudeis given by

G  Gx2  G y2

(2) In general, an approximate magnitude(Jin, 2008) is computed for faster calculations (2) using

G  Gx  G y

(3) The angle of orientation of the edge giving riseto the spatial gradient is given by

  tan 1 (

Gy Gx

)

(4) In this case, orientation 0 is taken to mean that the direction of maximumcontrast from black to white runs from left to right on the image, andother angles are measured counterclockwise from this. Figure 4 shows images are used to implement the Sobel operators. Thecomponents Gx and Gy are also displayed separately, as well as the results for equations (2) and (3).

361

Boletín Técnico, Vol.55, Issue 8, 2017, pp.359-366

(a) Original image

(c) Gx

(b) Grayscale image

(d) Gy

(e) Image using equation (2) (f) Image using equation (3) Figure 4.Sobel convolution kernels and image segment 4.SOBEL EDGE DETECTION ALGORITHM USING MBD 4.1. The executable specification of algorithm As system design becomes larger and more complex, it has become necessary to describe a design at a high level. This highlevel descriptionnot only to enable designers to run faster modeling, it can also be used throughout the development process for verification. This process allows developers to find bugs early and avoid costly bug at the end of the design. This high level design is usually done by the system engineer. In order to realize the hardware implementation of DSP algorithm with ASIC or FPGA, system level engineer design algorithm and verify algorithm to meet the project requirements.This design later becomes the golden reference for the engineers responsible for taking the algorithm to the hardware. The executable specification of Sobel edge detection algorithm is implemented using equation (2) in Simulink. The executable specification is comprised of two 2D filters, one to calculate the gradient in the column direction (top filter) and one to calculate the gradient in the row direction (bottom filter), which is shown in figure 5. Both filters use a 3×3 kernel. A satellite image as the input to the edge detection algorithm. This image serves as an input test vector and is used throughout the example.The simulation results of the original image and the executable specification are shown in figure 6.

362

Boletín Técnico, Vol.55, Issue 8, 2017, pp.359-366

Figure 5.The executable specification of Sobel edge detection algorithm

(a) Original image (b) The executable specification Figure 6.The simulation results of the original image and the executable specification 4.2. Design of algorithm When the design of the executable model, the system engineers do not care about the implementation detailsbut rather implements the algorithm tomeet the behavioral requirements. Once the system engineer submits the executable specification to the development team, according to the design requirements, the development team to modify the executable specifications to meet a real-time system that may have limited resources. For the hardware realization of the Sobel edge detection algorithm(Lee, 1983), equation (2) is a very cost of resources due to the square operations. We decide to eliminate the square operations and replace them with the absolute value operationfor more efficient hardware implementation.An algorithm design model is shownin figure 7, which includes a simplified algorithm model and an executable specification.

Figure 7.A simplified algorithm model and an executable specification 363

Boletín Técnico, Vol.55, Issue 8, 2017, pp.359-366

This will cause a difference between the co-simulation result and the golden reference but for the sake of this design.We assume that the difference is acceptable and the simulation results are shown in figure 8. We can see the same test vectors as the previous model is still being used. The result can be easily verified against the golden reference. A numerical display shows the mean difference between the golden reference and the new design.

(a) executable specification

(b) simplified algorithm model

(c) The difference between the simulation result Figure 8.Results of simplified algorithm model and executable specification 4.3. Fixed point design ofalgorithm Since our ultimate goal is to implement the algorithm in an FPGA or an ASIC, we must convert our double precision design to a fixed-point design. This can be done easily using MBD. We use the double precision model we developed in the previous section to directly develop a fixed-point model without introducing any new blocks. Simulink allows us to determine the number of bits and scaling for data as well as mathematical operations, and provides a great environment for analyzing the fixed-point operation of a system. The fixed-point design model of the algorithm is shown in figure 9. In this fixed-point design, the input to the filters is a signed 9-bit integer and the outputs of the filters are signed 11-bit integers. This gives huge leverage to the designer to compromise between matching the output of the golden reference while using the least number of bits necessary to save area on the device. The simulation results of the fixed-point algorithm are shown in figure 10.

364

Boletín Técnico, Vol.55, Issue 8, 2017, pp.359-366

Figure 9.The fixed-point design model of the algorithm

Figure 10.The simulation result of the fixed-point algorithm 4.4. Verification and implementation of algorithm The model of the previous section can be passed to the HDL designer who can use the 2D filter designed in the last section to write the corresponding HDL code. Once the code is written, the HDL designer can use HDL Verifier to simulate the HDL design in the Simulink environment using ModelSim, and compare the output of the HDL design to the output of the executable specification. Note that in this process, there is no need for generating a HDL test-bench. The Simulink model feeds the input test vector to ModelSim through HDL Verifier and extracts the data from ModelSim back to the Simulink environment. The HDL designer can readily verify whether the HDL code runs in accordance with the specifications. The figure 11 shows a snap shot of the 2D filter displayed in ModelSim.

Figure 11.The simulation result of 2D Filter in ModelSim 5.CONCLUSION Sobel operator of image edge detection algorithm is preferred which is most trustworthy and gives an efficient output in the field of image and video processing for the extraction of object edges. However, Sobel edge detection algorithm is a very complex process, and the hardware implementation is very difficult. In order to meet the fast hardware implementation of image processing algorithms, this paper proposed an optimized approach of the Sobel operator of image processing algorithm using MBD optimization workflow. Through the 365

Boletín Técnico, Vol.55, Issue 8, 2017, pp.359-366

design method of MBD, the complex image algorithm can automatically generate HDL code, quickly complete the functional validation of FPGA design. The described methodology allows accelerating the design process of image processing systems. This reduction of development time can be used to optimize a particular solution, as well as to compare different solutions in order to obtain the best tradeoff between cost and performance. REFERENCES Wang, S. (2006). Task Construction for Model-Based Design of Embedded Control Software. IEEE Trans. Software Eng, 32(4), 254-265. Liu, J. (2012). Model based design workflow for FPGA compliance with DO-254 standard. International Symposium on Information Technology in Medicine and Education, (2), 1026-1030. Sánchez-Solano, S., delToro, E. (2013). Model-Based Design Methodology for Rapid Development of Fuzzy Controllers on FPGAs. IEEE Transactions on Industrial Informatics, 9(3), 1361-1370. Penner, R. R., Steinmetz, E. S. (2002). Model-based automation of the design of user interfaces to digital control systems. IEEE Transactions on Systems, Man, and Cybernetics - Part A: Systems and Humans, 32(1), 41-39. Sharma, S., Wang, C. (2009). Using Model-Based Design to Accelerate FPGA Development for Automotive Applications. SAE International Journal of Passenger Cars - Electronic and Electrical Systems, 2(1), 150-158. Kanopoulos, N., Vasanthavada, N., Baker, R. (1988). Design of an edge detection filter using the Sobel operator. IEEE J. Solid-State Circuits, 23 (2), 358-367. Jin, S., Kim, W., Jeong, J. (2008). Fine directional de-interlacing algorithm using modified sobel operation. IEEE Trans. Consumer Electron, 54(2), 857-862. Lee, C. (1983). Elimination of redundant operations for a fast Sobel operator. IEEE Transactions on Systems Man & Cybernetics, 13(1), 242- 245.

366

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.