Newsletter

Automotive vision system recognizes road signs: Part 3 - Implementation of a Sobel filter in C and assembler

Here are ways of implementing the filter, comparison of results, and how to optimally use available processing capacity

Page 1 of 4

Automotive DesignLine

Part 1 of this series encompasses the basic functions of traffic sign recognition.

Part 2 discusses software architecture and vision system design tips.

The demand for camera-based driver assistance systems in the automobile industry continues to grow. Traffic sign recognition is an application that is receiving much attention because of its potential for improving the safety of drivers and passengers. It is an example of the image recognition technology that can be applied to many areas of vehicular and industrial design.

Traffic sign recognition is based on pattern recognition algorithms that are well understood by machine vision specialists. The first two parts of this series detailed a camera-based traffic-sign recognition system implemented on the Blackfin® processor, a low-power and low-cost embedded DSP from Analog Devices. Those installments showed the design of an efficient software architecture and how a filter block algorithm can be used to implement the sign recognition application.

This part discusses how the Sobel edge-detection filter can be implemented in various ways by the use of a camera-aided traffic sign recognition system residing on a Blackfin processor. The results are then compared, and the steps that one can undertake in order to optimally use the available processing capacity are shown.

The Sobel filter
Usually the Sobel filter is located at the beginning of a processing chain. The computation results show the magnitude of the edges and their direction (vectors). This is done via a two-dimensional convolution. Figure 1 shows the operation of a classic convolution. In order to compute the value G22, for example, a 3 x 3 filter matrix H is placed over the input image F and each point of the matrix H is multiplied respectively with an image value and then accumulated. The 3 x 3 filter matrix H now roams over the entire image in order to also calculate value G from all the other image values. Equation 1 shows the operation of a convolution.

Figure 1: 2-D Convolution
View a full-size image

Equation 1: 2-D convolution

A two dimensional convolution consists of the sum of nine multiplications. For the Sobel filter, two convolutions per image value must be executed—one for the edges in the horizontal direction Gx and one for the edges in the vertical direction Gy. The actual magnitude of the edge Gxy and the actual angle Theta can be derived from the results. In Figure 2 the Sobel operators are shown. Equation 2 and Equation 3 show the calculations from the implementation of the matrix values:

Figure 2: Sobel operators

Equation 2: Convolution Gx

Equation 3: Convolution Gy

Since the Sobel operators have multiple zeros in the matrix, the number of multiplications can be reduced. Equation 2 and Equation 3 above show that only six accumulations are needed. Because the matrices of Sobel operators occupy some positions with the value 1, no multiplications need be done there. Only those positions having the value 2 must be considered. Alternatively, this can be realized with a very efficient shift by 1 to the left. The magnitude of each edge is calculated via the geometric addition of the values Gx and Gy. The result vector indicates this by its length as follows:

Equation 4: Geometric amount

The angle of the vector can be calculated as well:

Equation 5: Direction of the edges


Page 2: Implementation examples of convolution variants  

Page 1 | 2 | 3 | 4

Related Links:
  • Automotive vision system recognizes road signs: Part 1 - Basic functions
  • Automotive vision system recognizes road signs: Part 2 - Architecture and design tips






  • Related Content

    TECH PAPER
    1. Xilinx DSP Design Platforms: Simplifying the Adoption of FPGAs for DSP

    TECH PAPER
    2. ChromotionHD 2.0 for Chrome 5000E Series GPUs

    TECH PAPER
    3. DirectX 10.1 Architecture for Chrome 5000E Series GPUs

    TECH PAPER
    4. DirectX 10 Architecture for Chrome 5000E Series GPUs

     


     Featured Jobs
    Ascension Health seeking Solutions Development Analyst in St. Louis, MO

    National Semiconductor seeking Principal IC Design Engineer in Santa Clara, CA

    Taylor Guitars seeking Sr. Web Designer in El Cajon, CA

    Covidien seeking Hardware Manager in Boulder, CO

    Sierra Nevada seeking Software Engineer in Hagerstown, MD

    More jobs on EETimesCareers
     Sponsor
     CAREER CENTER
    Ready to take that job and shove it?
    SEARCH JOBS:

     SPONSOR

     RECENT JOB POSTINGS
    For more great jobs, career related news, features and services, please visit EETimes' Career Center.