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.
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].
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
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.
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].
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
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- MATLAB and FPGA implementation of wireless communication
- Intelligent computing systems (Chen Yunji, Li Ling, Li Wei, Guo Qi, Du Zidong)
- Summary of non-synthesizable statements in FPGA
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- The highest increase is 30%, 10 IC manufacturers including ST, MediaTek, and ON Semiconductor have increased prices!
- Inductor Current Measurement in Switching Power Supplies
- [HC32F460 Development Board Review] 07. Hardware I2C to implement EEPROM read and write operations
- Xunwei i.MX6ULL terminator process basic exec function family
- LLAKG: Arduino automatic watering system (Episode 1: System concept and function introduction)
- Error of PMSM sliding mode observer?
- Please recommend a good digital circuit simulation software
- Ice and Fire Mini Fireplace Made by Seeeduino XIAO
- The MSP430 serial port receives data sent by the computer
- Design solutions to maintain high efficiency and reliability in power systems