Design of face detection system based on FPGA

Publisher:qazwsx007Latest update time:2011-12-26 Source: 电子产品世界Keywords:FPGA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In recent years, biometric recognition technology, which uses biological features such as face, iris, retina, fingerprint, voice, and gene as identification methods, has gradually played a very good role. This type of recognition belongs to the category of pattern recognition and is safer, more stable, and more convenient than traditional recognition methods [1]. Among them, face recognition has become a hot research field because of its advantages such as friendliness, convenience, and directness.

In view of the parallel high-speed processing characteristics of FPGA and the flexibility of design and expansion, this paper uses FPGA to implement the design of face detection system.

1 Face Detection System Design

At present, face detection algorithms are divided into two categories according to whether the color features of the face area are used: algorithms based on skin color detection for color images and algorithms based on grayscale information for grayscale images.

This paper comprehensively adopts the skin color detection method based on color images and the grayscale detection method based on geometric features to perform real-time tracking and detection of face areas.

1.1 Design of face detection solution based on FPGA

This design adopts a method from coarse to fine, which comprehensively adopts the skin color detection method based on color image and the grayscale detection method based on geometric features. First, based on skin color detection, the face area is captured within a large camera range, and the face candidate area is located within an optimal range to achieve coarse positioning of the face. This module greatly reduces the search range of the subsequent part and reduces the amount of calculation of the system. On this basis, in the area circled by skin color detection, the geometric features of the prior face are used to achieve the purpose of face detection.

The algorithm part of this design adds image preprocessing module, color balance module, adaptive threshold binarization module, morphological filtering module and other modules on the basis of traditional skin color detection algorithm to realize the rough positioning of human face; on this basis, median filtering, edge detection and other processing are performed on the located face area, as shown in Figure 1.

69.jpg

Based on the above basic algorithm, the system ultimately needs to build a complete face image processing and detection and positioning system consisting of a CMOS camera, an FPGA core image processing unit, and an LCM display face area. The overall system architecture is shown in Figure 2.

The left part of Figure 2 is the CMOS camera device and its control circuit, which outputs the main digital video data to the CMOS Sensor Data Capture module and obtains the MCLK signal from the module. In addition, the camera circuit needs to be configured through I2C, and the signals transmitted between them are mainly SDAT and SCLK.

The FPGA module in the middle mainly completes the configuration and control of input and output devices, and completes the data transmission from input to output. It is the core unit of the design. Among them, it mainly includes modules such as data acquisition, image type conversion, LCM display device controller, SDRAM controller, and I2C configuration controller of the CMOS camera circuit. The SDRAM controller is mainly used for frame buffer and image acquisition (photographing function); the LCM controller mainly outputs HS (horizontal synchronization signal), VS (field synchronization signal), display data and display clock to the LCM; the image format conversion module mainly realizes the conversion of data format to RGB format to facilitate subsequent display and processing.

This design uses Altera's FPGA (EP2C35F672C6) as the core processing chip, and all module functions are implemented by pure hardware. Using Verilog programming language, the system has good portability, real-time performance, scalability and transplantability.

2 Image preprocessing algorithm and implementation

In this design, image preprocessing techniques are used to eliminate the impact of environmental factors on face detection, mainly including fast median filtering, morphological filtering and edge detection.

2.1 Fast Median Filter

Median filtering is a nonlinear signal processing technique based on statistical sorting theory that can effectively suppress noise [2]. Its basic principle is to replace the value of a point in a digital image or digital sequence with the median of the values ​​of all points in a neighborhood of the point, so that the surrounding pixel values ​​are close to the true value, thereby eliminating isolated noise points.

In this design, fast median filtering [3] is used for image preprocessing. It can quickly realize the filtering output while saving the number of comparison logic units and reducing resource usage.

2.2 Morphological filtering

Morphological filters are widely used in the fields of image processing and target recognition. Its basic idea is to use structural elements with a certain shape as "probes" [4], which are constantly moved in the image to measure the structural information of the image, examine the relationship between the various parts of the image, and then extract the structural features of the image.

The purpose of the morphological filtering described in this paper is to detect small targets in an 8-bit grayscale image of size 256×256 pixels. In this paper, erosion, dilation, opening and closing operations are mainly implemented, and on this basis, the image is preprocessed by cascading opening and closing operations.

After morphological filtering, the binarized image becomes "black and white", which is more in line with the actual binary result and removes the interference of noise points or background areas.

2.3 Edge Detection

Image edge detection can simplify image processing and is widely used in image segmentation, image recognition, texture analysis and other fields. Mathematically, the first-order and second-order derivatives of the brightness change curve can be used to describe two different edges [5].

This paper uses the Sobel edge detection operator for hardware implementation and uses it in a real-time face detection system. The Sobel edge detection operator is a weighted sum of the up, down, left, and right brightness of each pixel in the image, with the weights being larger for pixels closer to the center of the template [6].

70.jpg

As can be seen from Figures 3 and 4, the Sobel operator's filtering in the x-direction and y-direction respectively highlights the horizontal and vertical edges of the image, and weakens the grayscale continuous part. After Sobel edge detection, the edge information of the lena image is extracted, and the detection effect is ideal.

3 Face Detection System Design and Implementation

3.1 Image acquisition and display system design

71.jpg

In this system, the camera is used to collect images for face detection. At the same time, the results of video detection need to be displayed through the display system, so video acquisition circuit and display circuit are required [7].

3.2 Binarization and system implementation

3.2.1 Determining the face rectangle position

In this design, the geometric shape features of the face are used to accurately locate the face area. The face area here refers to a rectangular area that includes the main features of the face (such as eyes, nose, and mouth).

Figure 5 shows a model diagram of the geometric shape of the human face. Based on people's prior knowledge, it can be assumed that the length of a human face is about 1 to 1.5 times the width, that is, iFaceHeight<1.5iFaceWidth.

Using the above picture as a model and based on people's prior experience, we can find the left and right edges, upper and lower edges, and the center point of the face area after binarization. In this way, we can draw a rectangular frame in the face area and determine the positions of the upper, lower, left, and right edges of the face.

3.2.2 Analysis of system test results

Figures 6 and 7 are the result of an image captured by a camera, after which skin color detection and binarization are performed and morphological filtering is added to remove the influence of the surrounding skin color area. The detection effect of the skin color area of ​​the face is better.

72.jpg

This paper adopts a combination of color image-based skin color detection method and geometric feature-based grayscale detection method. The designed face detection system can detect faces well. In the next step, the system needs to be improved in the following aspects:

(1) When performing skin color binarization, an adaptive threshold method can be used instead of a fixed statistical empirical threshold, so that different images can be binarized, and the effect of skin color detection is better.

(2) Accurately locate the facial features of a person to improve the accuracy of face detection.

(3) The wavelet transform method is used to implement the illumination balance module. The method adopted is to use the wavelet transform [8] to perform three-level decomposition, and then perform grayscale averaging on the low-pass filter component LL3 after level 3, and assign each pixel in LL3 to the average value, which is equivalent to normalizing the brightness of the image, thereby removing the illumination component in the image, and finally performing wavelet reconstruction. This method has been verified to be feasible in this paper.

(4) Implement face region detection, positioning and segmentation technology under complex backgrounds[9].

Keywords:FPGA Reference address:Design of face detection system based on FPGA

Previous article:Implementation of LBS Controller Based on FPGA PEX8311
Next article:FPGA Design and Simulation of Quadrature Amplitude Modem

Recommended ReadingLatest update time:2024-11-17 00:23

Research and Application of FPGA Parallel Digital Serial Transmission and Interface Technology
1 Introduction After more than ten years of rapid development at home and abroad with hardware, system and application design as the main content, the development of FPGA technology in modern information processing and control technology has begun to rise. Obviously, a series of modern info
[Embedded]
Research and Application of FPGA Parallel Digital Serial Transmission and Interface Technology
Design and implementation of a solar tracker based on FPGA
0 Introduction Solar energy is a clean, pollution-free energy source that is inexhaustible and has broad development prospects. However, solar energy is intermittent and has uncertain intensity and direction, which makes it difficult to collect solar energy. The use of a solar tracking device can keep the s
[Embedded]
Design and implementation of a solar tracker based on FPGA
Application of Embedded Logic Analyzer in FPGA Timing Matching Design
introduction As FPGA devices continue to grow in size and packaging density, the use of traditional logic analyzers in FPGA board-level debugging is becoming increasingly difficult. To this end, mainstream FPGA manufacturers have added embedded logic analyzer (ELA) IP soft cores t
[Test Measurement]
Design of a simple digital storage oscilloscope based on single chip microcomputer and FPGA
1 Introduction   Compared with traditional analog oscilloscopes, digital storage oscilloscopes not only have the advantages of waveform storage, small size, low power consumption, and easy use, but also have powerful real-time signal processing and analysis functions. In the field of electronic measurement, digital st
[Test Measurement]
Design of a simple digital storage oscilloscope based on single chip microcomputer and FPGA
Design and implementation of remote monitoring system based on FPGA+DSP
  The purpose and main research content of the project   Research purposes   In order to remotely manage equipment and monitor the environment on site, simplify on-site monitoring equipment, and effectively improve the stability and security of the entire system, a remote controller is planned to be developed, referre
[Embedded]
Design and implementation of remote monitoring system based on FPGA+DSP
Design and verification of logic chip function test system using FPGA chip
In the most primitive testing process, the testing of integrated circuits (ICs) relied on experienced testers using instruments such as signal generators, multimeters, and oscilloscopes. This testing method has low testing efficiency and cannot achieve large-scale and large-volume testing. With the continuous increase
[Test Measurement]
Design and verification of logic chip function test system using FPGA chip
Design of a Simple Digital Storage Oscilloscope Based on FPGA
0 Introduction The development of high-speed digital acquisition technology and FPGA technology has had a profound impact on traditional test instruments. Digital storage oscilloscope (DSO) is a comprehensive product of analog oscilloscope technology, digital measurement technology, and computer technology. It is ma
[Test Measurement]
Design of a Simple Digital Storage Oscilloscope Based on FPGA
Strengthening the collaborative ecosystem: SoC FPGA becomes a powerful weapon
Altera intends to gradually strengthen FPGA co-processors through more advanced process technology and closer industry cooperation, significantly improve the overall performance of SoC FPGA, and create greater differentiation advantages for seizing the embedded system market. As the penetration rate of SoC FPGA in the
[Analog Electronics]
Strengthening the collaborative ecosystem: SoC FPGA becomes a powerful weapon
Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号