Implementation of Electronic Image Stabilization Based on TMS320C642

Publisher:advancement3Latest update time:2013-12-30 Keywords:TMS320C642 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

 Electronic image stabilization is a new generation of comprehensive technology that integrates computer, digital image processing and digital signal processing technologies to achieve image sequence stabilization. Real-time performance and accuracy are two important indicators for measuring electronic image stabilization systems. Therefore, in order for electronic image stabilization algorithms to demonstrate their superiority, they must meet real-time and accuracy requirements.

  1 Electronic image stabilization algorithm based on grayscale projection

  1.1 Basic Principles of Electronic Image Stabilization

  Electronic Image Stabilization (EIS) is a technology that integrates electronic technology, computers, digital signal processing, video image processing, etc. to achieve the stabilization of digital image sequences. The most basic electronic image stabilization technology is the image motion compensation technology, which is a technology that directly detects the motion vectors of the reference image and the compared image from the image plane, and then uses an algorithm to compensate. The basic principle of image stabilization: (1) Perform local motion estimation based on various information of the image sequence or video. (2) Perform global motion estimation. (3) After motion estimation, motion parameters are obtained, and then a comprehensive evaluation is performed. (4) Motion compensation is performed based on the results of the comprehensive evaluation, and finally a stable output sequence is obtained. It can be seen that obtaining the global motion vector of the image is a prerequisite for electronic image stabilization. The basic process is shown in Figure 1. The global motion vector can be obtained through the grayscale projection algorithm.

  

a.jpg

 

  1.2 Grayscale Projection Algorithm

  Grayscale projection algorithm (PA) uses the characteristics of image grayscale distribution changes to obtain the inter-frame motion vector of the image. It is difficult to identify the feature quantity for images with rich grayscale details, no obvious features in the histogram, and poor contrast. Finding the feature quantity not only cannot guarantee the required image stabilization accuracy, but also cannot meet the real-time requirements of image stabilization. For this kind of image sequence, the grayscale projection method is used to accurately obtain the image motion vector, so as to achieve the purpose of stabilizing the image sequence. Video image sequence is an image sequence in which the grayscale of the image changes, and various motion vector estimation algorithms are based on grayscale changes. The projection algorithm can make full use of the grayscale change of the image and estimate the motion vector of the image more accurately. The advantages of this algorithm are: the grayscale curve matching speed is fast, thereby improving the image stabilization speed, and it is suitable for the situation where the grayscale changes caused by the image illumination change. The grayscale projection algorithm is an ideal algorithm for realizing electronic image stabilization of image sequences containing only translational motion or small rotational motion.

  (1) Grayscale mapping.

  Grayscale mapping is to map the initial two-dimensional image information of each frame input into two independent one-dimensional waveforms. The following is the mapping method of column projection

  

b.jpg

 

  In equations (1) to (3), Colk(j) is the grayscale value of the jth column of the kth frame image; Curk(i, j) is the pixel value at the (i, j) position on the kth frame image; NC is the number of columns, and ColProjk(j) is the corrected projection value of the jth column of the kth frame image. The algorithm for row-wise grayscale projection mapping can be derived in the same way.

  (2) Projection filtering.

  Projection filtering is to reduce the amplitude of the boundary information and retain the amplitude of the middle area, and use a filter to filter. Since edge information will have an adverse effect on the peak value of the cross-correlation during cross-correlation calculation, the projection value at the boundary should be removed. Since the edge information is unique in each image when the image moves a lot, the accuracy of the algorithm can be improved by filtering the projection value.

  (3) Cross-correlation operation.

  The cross-correlation operation is to perform cross-correlation calculation on the row and column projection curves of the current frame image and the row and column projection curves of the reference frame image. The only peak in the correlation value curve obtained after the operation is the displacement value required by the compensation motion vector. After obtaining the displacement vectors in the horizontal and vertical directions, the current image is translated in the opposite direction of the displacement vector by a corresponding pixel distance, thereby achieving the stability of the image sequence. The calculation of row and column correlation operation is shown in formula (4):

  

c.jpg

 

  In formula (4), Colk(j) is the grayscale projection value of the jth column of the kth frame image; NC is the length of the column; m is the search width of the displacement vector on one side relative to the reference frame. Let wmin be the value of w when C(w) is minimum, then the displacement vector of the kth frame image relative to the reference frame image in the vertical direction is shown in formula (5).

  

d.jpg

 

  After obtaining the horizontal and vertical displacement vectors, the current image can be moved in the opposite direction of the displacement vector, responding to the pixel distance of the size, thereby achieving the stability of the image sequence.

2 Design based on TMS320DM642 system

  2.1 Introduction to TMS320DM642

  TMS320DM642 is a DSP chip launched by TI. This chip is a 32-bit fixed-point DSP chip designed and developed specifically for multimedia applications. It is currently recognized by the industry as a video processor with good performance. Good processing performance and rich on-chip peripherals can meet the requirements of real-time video processing. DM642 adopts a two-level cache structure. The first level includes independent L1P (16 kB) and L1D (16 kB), which can only be used as a high-speed cache. The second level, L2 (256 kB) is a unified program and data space, which can be mapped to the storage space as SRAM as a whole, or as a second-level cache as a whole, or a combination of the two in proportion. DM642 has an enhanced direct memory access controller with 64 independent channels, which is responsible for high-speed data transmission between the on-chip L2 and peripherals. It has a wealth of peripheral device interfaces: 3 configurable dual-channel video ports; 64-bit external memory interface EMIF; 10/100 Mbit Ethernet MAC; 66 MHz32-bit PCI interface.

  2.2 System Design

  The hardware block diagram of this system is shown in Figure 2. The simulated image is obtained through the CCD camera device. The obtained image information is processed by the digital video decoder to convert the analog image into a digital image, and then the digital information is stored in the DM642 chip. After being processed by the DM642 chip, the motion vector between adjacent frames is obtained, and then the motion vector is compensated in real time and accurately to obtain the output video sequence, and finally the processed video image is displayed on the monitor.

  

e.jpg

 

  3 Analysis of algorithm simulation results

  As shown in Figures 3 and 4, they respectively reflect the column projection curves of the image before and after stabilization. The shape and position of the column projection curves after stabilization are basically the same, indicating that the similarity of the compensated image has improved and its stability has also improved. At the same time, the peak signal-to-noise ratio (PSNR) can be used to evaluate the quality factor of accuracy. The test results show that the accuracy has reached the requirements, but the real-time performance is slightly poor and program optimization is required to achieve better results.

  

f.jpg

 

  

g.jpg

 

  4 Conclusion

  This paper uses grayscale projection algorithm to realize electronic image stabilization based on TI's TMS320DM642 embedded system. The experimental results show that the algorithm used in this paper not only has good image stabilization effect, but also meets the accuracy requirements. It has certain use value for different application scenarios.

Keywords:TMS320C642 Reference address:Implementation of Electronic Image Stabilization Based on TMS320C642

Previous article:Virtualized storage tiering technology
Next article:Design of QPSK modulator based on modern DSP technology

Latest Analog Electronics 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号