A kind of error concealment algorithm in image procossing
Technical field
The present invention relates to a kind of image processing method, particularly relate to the error concealment algorithm in a kind of image procossing.
Background technology
During being transmitted compressing video information, due to nonideal channel condition, especially at wireless letter
In road, it will usually having multi-path transmission time delay and fading effect and the existence of Doppler frequency shift, therefore, loading error occurring is can not
Avoid.These mistakes can be divided into following a few class: the 1) random bit that wired or wireless channel introduces in transmitted bit stream
Error code, 2) number introduced owing to " Best-Effort " (the Best Effort) in network congestion, wired IP networks transmits
Loss according to bag;3) in wireless channel transmits, the error burst caused due to multipath transmisstion.But, after compression
Video data is the most sensitive to symbol error, and the mistake of a small amount of code element just likely results in follow-up large quantities of code elements and cannot correctly solve
Code and must be dropped.This will greatly reduce the quality of decoding end reconstructing video.Then, error concealment techniques is just created.
Its principle is that the dependency between the block using loss information and the video pixel having correctly received is estimated and compensates lost blocks
In pixel value.
For error concealment techniques, have been proposed for a lot of specific based on spatial domain or the hiding calculation of time domain at present
Method.The general thoughts of these algorithms be the time in the video sequence utilizing place and spatially redundancy or dependency to estimate mistake
The block missed or lose.
For the error concealment techniques of spatial domain, it is generally directed to intraframe coding, and most common method is to utilize from damage
The nearest pixel value having correctly received of macro block carries out bilinear interpolation to estimate the pixel value of loss information.Z.Alkachouh
Etc. proposing a kind of interpolating method based on dct transform.The method utilizes 8 boundary pixels to calculate the pixel value of loss.
H.Sun etc. propose to use mapping to estimate, and the factor recovers the block of loss information.But, the computational complexity of the method is at a relatively high
's.
For the error concealment techniques of time domain, their basic thought is to use the phase in time between frame of video
Closing property carries out error concealment.When reference frame and present frame have the strongest dependency when, these methods can be compared
Good effect.But, these methods need to find or estimate to lose the movable information of macro block.Generally, due to employing
Being variable entropy coding, motion vector information is likely to lose simultaneously, now needs motion vector is re-started estimation.Some
Method is to utilize the motion vector in adjacent block to estimate the motion vector of current block.Haskell et al. uses adjacent macroblocks
The intermediate value of motion vector estimate the motion vector of lost blocks.Lam et al. proposes a kind of boundary matching algorithm.This algorithm
It is based on losing around macro block the pixel value that a wide pixel value correctly received of pixel mates in reference frame, to find
Blocks and optimal matching blocks in reference frame.The shortcoming of this method is that the information of these pixel values under normal circumstances is not enough to exactly
Estimate the motion vector lost.When there being the change of the pixel value at edge or bigger of inclination in lost blocks, this algorithm is the most not
A good estimated value to motion vector of performance can be obtained.At SunHui, Zhou Hongxia, " Study on Edge
Detection Technique in Image Processing, " (J.vol.15, no.10, pp.477-479, Jul.2002)
In this article, it is proposed that embed some prior informations based on decision tree to assist error concealment in decoding end at coding side.
This method can improve the performance of error concealment by embedding some bits.But, this method needs to add extra ratio
Spy is meanwhile, when transmission during these auxiliary information are in wireless or IP network, the same with original encoded information, it is impossible to ensure this
The correct acceptance of a little auxiliary information.It is thus impossible to ensure the robustness of this method.
In sum, in existing error concealment algorithm, they have a common defect: the image after error concealment
The most smooth.This is because in existing spatial domain error concealment algorithm, the interpolation in lost blocks have lost the figure in block
As marginal information, and in the error concealment algorithm of existing time domain, often cause the dislocation of image border with discontinuous.
Because human eye is especially sensitive for the mistake of image edge information, need to promote the performance of existing error concealment algorithm.
Summary of the invention
It is an object of the invention to provide the error concealment algorithm in a kind of image procossing, for the frame with lost blocks is entered
One step ground improves the quality of image.Whole process understands and efficient, and keeps in algorithmic procedure as far as possible and strengthen marginal information.
In order to reach described effect, the error concealment algorithm in a kind of image procossing of the present invention, it is used for processing transmitting procedure
In lost blocks, comprise the following steps,
1) to each lost blocks, first analyze the attribute of lost blocks, select the initial error optimized according to different lost blocks
The pattern hidden;The pattern of error concealment includes mistake stealth mode and interframe mistake stealth mode in frame;
2) to using the lost blocks of stealth mode in frame, by first determine from lost blocks distance within two pixels
Edge pixel;Then it is in the pixel in the lost blocks of same edge line with these edge pixels will first be interpolated, this
Time have two kinds of situations, one is that this edge edge passes straight through this lost blocks, then the pixel point value on straight line is correct by two
The one-line interpolation of pixel value that accepts and obtain;Another kind is that this edge edge straight line just stopped in lost blocks, this
Pixel value on straight line is obtained by the nearest correct pixel value accepted of, until this straight line and other straight line phase
Hand over;Finally, the interpolation of the value by two pixels having determined that pixel value is obtained by other pixel value in lost blocks, and
The pixel nearest with having determined that pixel value will be interpolated at first;
3) lost blocks to employing interframe error pattern, around lost blocks, the correct pixel accepted is used to find one
Good motion vector, now only and the edge picture that detects within two pixels and by Canny operator of lost blocks distance
Element is just used to the motion vector found, and so can obtain the reconstructed block with sharp edges, then move according to this
Vector, determines block relevant with loss in reference frame, and fills the pixel value in lost blocks with this block;
4) through step 2) or step 3) process after picture frame, whole picture frame is used Harr wavelet transformation to three
The wavelet field of level, in order to further strengthen the marginal information in image, uses Canny operator to carry out Harr wavelet coefficient
Detection, every wavelet coefficient equation below being detected as edge strengthens.
Here Wl(i, j) is original edge wavelet coefficient, and (i j) is the position coordinates of this coefficient, αl, βlIt it is l layer
The enhancer of wavelet coefficient,It it is the wavelet coefficient after this step error concealment;
5) through step 4) the error concealment of wavelet field carry out after, use inverse wavelet transform so that wavelet coefficient is mapped to
In image area;Then all wavelet coefficients are carried out to the inverse transformation of Harr small echo;
6) for step 5) carry out the post processing of the anisotropic diffusion of PM.
Preferably, described step 1) in have a criterion for analyzing the attribute of lost blocks, in this criterion,
The distance of two pixels of distance lost blocks and be the correct pixel value accepted and the diverse location in reference frame around lost blocks
Pixel corresponding to place calculates its mean square deviation, and selects minimum mean square deviation, if this mean square deviation preselects more than one
Threshold value, just select mistake stealth mode in frame;Otherwise, interframe mistake stealth mode is selected.
Preferably, described step 4) in, for high-level wavelet coefficient, enhancer takes relatively large value,
To low layer wavelet coefficient, enhancer takes relatively small value.
Preferably, described step 5) carry out the post processing of the anisotropic diffusion of PM, i.e. Perona-Malik diffusion technique,
Its expression formula is: Wherein I (x, y, 0)
It is original image, I (x, y, be t) image after t diffusion, and Δ represents Laplce (Laplacian) computing,It it is ladder
Degree computing, div (x) is divergence operator, c (x, y, t) be diffusion coefficient, c (x, y, t) control diffusion speed, c (x, y, t)
Value be the function of image gradient, to keep the edge in image.The diffusion changed with picture material in this technology
During, the direction of filtering substantially moves towards consistent with the edge of image, and does not carries out in the direction of vertical edge
Filtering, so could not lose the important informations such as edge while removing noise.
Owing to have employed described technical scheme, error concealment algorithm proposed by the invention can be edited into video information and pass
In defeated receiving terminal, when channel is bad cause lost blocks occurs in the case of, it is possible to improve to a great extent with lost blocks
Decoding image quality.
Accompanying drawing explanation
The invention will be further described below in conjunction with the accompanying drawings:
Fig. 1 is the treatment effect that the error concealment algorithm in a kind of image procossing of the present invention and raw image compare gained
Schematic diagram.
Fig. 2 is the error concealment algorithm in a kind of image procossing of the present invention and image processing method of the prior art compares
The treatment effect schematic diagram of gained.
Detailed description of the invention
Using during the present invention, relating to some known technologies of the prior art:
Harr small echo
Haar small echo is put forward by mathematician, and its set comprises orthogonal function.Its definition is given by.
Harr small echo has many advantages, they can enumerate as follows:
It is interval (0,1) that Haar small echo has compact schemes, i.e. its non-zero region in time domain.
Harr small echo is orthogonal wavelet.
3) Harr small echo is symmetrical, and it has the shock response of symmetry.When the shock response of system is symmetry when,
This system has linear phase place.This is good for removing phase distortion.Harr small echo is find now unique
There is symmetry and the small echo of compact schemes characteristic.
4) shock response in Harr small echo only takes+1 or-1 value, so utilizes this small echo to carry out converting having low
Computation complexity.
Canny operator in Image Edge-Detection
The edge of image refers to that those have the image-region of big brightness value change.Piece image has substantial amounts of figure
As marginal information.The rim detection of image is marginal position and its trend in order to determine and position image.
Canny operator
Canny operator reduces the noise in image initially with Gaussian filter and smooths image.Then, will make
A gradient image is obtained by a differential operator.For the edge in image, they typically have relatively large Grad.
Then, a thresholding will be utilized to detect edge.When Grad is more than this thresholding, current pixel is judged as edge picture
Element.The trend at edge can be drawn by the vector orthogonal with the direction of gradient.The performance of Canny operator is better than Prewitt and calculates
Son, Sobel operator, and Laplace operator.Canny operator can remove the noise in some images while detection edge.With
Time, Canny operator can be accomplished well to balance in removing both noise and rim detection.
In actual use, the realization of the present invention comprises the following steps,
1) to each lost blocks, first analyze the attribute of lost blocks, select the initial error optimized according to different lost blocks
The pattern hidden;The pattern of error concealment includes mistake stealth mode and interframe mistake stealth mode in frame;
2) to using the lost blocks of stealth mode in frame, by first determine from lost blocks distance within two pixels
Edge pixel;Then it is in the pixel in the lost blocks of same edge line with these edge pixels will first be interpolated, this
Time have two kinds of situations, one is that this edge edge passes straight through this lost blocks, then the pixel point value on straight line is correct by two
The one-line interpolation of pixel value that accepts and obtain;Another kind is that this edge edge straight line just stopped in lost blocks, this
Pixel value on straight line is obtained by the nearest correct pixel value accepted of, until this straight line and other straight line phase
Hand over;Finally, the interpolation of the value by two pixels having determined that pixel value is obtained by other pixel value in lost blocks, and
The pixel nearest with having determined that pixel value will be interpolated at first;
3) lost blocks to employing interframe error pattern, around lost blocks, the correct pixel accepted is used to find one
Good motion vector, now only and the edge picture that detects within two pixels and by Canny operator of lost blocks distance
Element is just used to the motion vector found, and so can obtain the reconstructed block with sharp edges, then move according to this
Vector, determines block relevant with loss in reference frame, and fills the pixel value in lost blocks with this block;
4) through step 2) or step 3) process after picture frame, whole picture frame is used Harr wavelet transformation to three
The wavelet field of level, in order to further strengthen the marginal information in image, uses Canny operator to carry out Harr wavelet coefficient
Detection, every wavelet coefficient equation below being detected as edge strengthens.
Here Wl(i, j) is original edge wavelet coefficient, and (i j) is the position coordinates of this coefficient, αl, βlIt it is l layer
The enhancer of wavelet coefficient,It it is the wavelet coefficient after this step error concealment;
5) through step 4) the error concealment of wavelet field carry out after, use inverse wavelet transform so that wavelet coefficient is mapped to
In image area;Then all wavelet coefficients are carried out to the inverse transformation of Harr small echo;
6) for step 5) carry out the post processing of the anisotropic diffusion of PM.
Described step 1) in have a criterion, in this criterion, at lost blocks for the attribute analyzing lost blocks
Around two pixels of distance lost blocks distance and be the correct pixel value accepted with the diverse location in reference frame at right
The pixel answered calculates its mean square deviation, and selects minimum mean square deviation, if this mean square deviation is more than a previously selected threshold value,
Just select mistake stealth mode in frame;Otherwise, interframe mistake stealth mode is selected.
Described step 4) in, for high-level wavelet coefficient, it is little to low layer that enhancer takes relatively large value
Wave system number, enhancer takes relatively small value.Described step 5) carry out the post processing of the anisotropic diffusion of PM.Described step
5) carrying out the post processing of the anisotropic diffusion of PM, i.e. Perona-Malik diffusion technique, its expression formula is: Wherein I (x, y, 0) is original image, I
(x, y, be t) image after t diffusion, and Δ represents Laplce (Laplacian) computing,It is gradient algorithm, div
X () is divergence operator, (x, y, t) be diffusion coefficient to c, and (x, y, t) control the speed of diffusion to c, and (x, y, value t) is figure to c
As the function of gradient, to keep the edge in image.In the diffusion process changed with picture material of this technology, filtering
Direction substantially move towards consistent with the edge of image, and be not filtered in the direction of vertical edge,
The important informations such as edge can not be lost while removing noise
The beneficial effect brought by the present invention as shown in Figure 1 and Figure 2.In Fig. 1, left side is pattern before treatment, and right side is
Pattern after using error concealment algorithm of the present invention to process.Pattern after processing for prior art processing mode on the left of Fig. 2 kind, right
Side is the pattern after using error concealment algorithm of the present invention to process.Shown in figure, being filled with of the present invention almost Perfect
The problem of bad lost blocks produced by channel problems.
In sum, the present invention proposes an error concealment algorithm.In this algorithm, first according to the standard proposed
The most optimally choose the pattern of initial error concealment.When the frame matching mean square deviation around lost blocks is more than a threshold value
Time, illustrate now to be not suitable for using interframe error concealment, and be suitable for using error concealment in frame.Then, at the beginning of the present invention proposes
Mistake hidden method in the interframe begun and frame.In this approach, the image edge information around lost blocks will be utilized well
To avoid the mistake in existing algorithm to smooth phenomenon as far as possible.It follows that image will be carried out Harr wavelet transformation, and in wavelet field
Strengthen the marginal information of image intelligently.Then, carry out the inverse transformation of small echo, and anisotropic diffusion post processing is with further
Ground strengthens the edge of image.Experimental result not only shows that proposed algorithm has good performance in terms of error concealment, real
Test result and show that lost blocks preferably can protected than existing algorithm while error concealment by proposed algorithm simultaneously
Holding and highlight image edge information, the algorithm therefore proposed has better performance than existing algorithm.
The hardware device that the present invention is supported is the receiving terminal of video information transmission, including TV set-top box, Web TV
Client, network hard disc player wirelessly or non-wirelessly, the client of video request program, the client etc. of video monitoring.Due to
In such systems, the condition of channel is not ideal, and receiving terminal can run into the image block of loss information.If do not located
If reason, the play quality of incorrect block is poor, and the algorithm utilizing the present invention to propose can to the pixel in incorrect block in addition
Estimate and compensate, to improve the play quality of incorrect block well, to improve broadcasting of the video information of entirety to a great extent
Put quality.