Background technology
What the noise of digital picture was mainly derived from image obtains (digitized process) and transmission course.The working condition of imageing sensor (Image Sensor) is subjected to the influence of various factors, as the quality of environmental condition in the image acquisition and sensing components and parts self.For example, use ccd video camera to obtain image, illumination degree and sensor temperature are to generate the principal element that produces much noise in the image.Image searches out The noise mainly due to the interference of used transmission channel in transmission course.Such as, may be contaminated by the image of wireless network transmissions because of the interference of light or other atmospheric factor.
Filtering Processing is exactly under the situation that guarantees the image useful signal, removes noise signal as much as possible, to guarantee the quality of image and edge details thereof.
Most of process of image restoration is an objective process, and the recovery of image utilizes certain priori of degradation phenomena to rebuild or restores the phenomenon of being degenerated.Therefore recovery technique is exactly degradation modelization, and adopts opposite process to handle, so that restore original image.
Filtering technique is exactly to utilize a kind of technology of the principle of this image restoration.In Fourier (Fourier) conversion of image, the demonstration of low frequency major decision image overall gray level in smooth region, and high frequency decision image detail part are as edge and noise.Adopt low pass filter that image is carried out Filtering Processing, the also corresponding edge details of having removed when removing noise.
The existing filtering method that overcomes the above problems, adopt following steps usually:
(1), in image, selects a center pixel successively;
(2), choose this pixel interior pixels in 5 * 5 zones on every side;
(3), the weighted average of the calculating pixel data corresponding with selected pixel, and weight coefficient relevant with the interior pixel of each institute's favored area when calculating is inversely proportional to this pixel distance or its square to corresponding center pixel, and is inversely proportional to the pixel data of this pixel with to difference, squared difference or its relative ratio of the data of deserved center pixel;
(4), according to the weighted average that calculates, adjust the pixel data of center pixel.
Entire image is carried out iterative computation by above-mentioned steps.In the method, a pixel decentre pixel is far away more, and its influence to the adjustment of center pixel is more little; Big more with the difference of center pixel, more little to the influence of center pixel.Yet adopt the said method calculation of complex, amount of calculation is bigger, is unfavorable for that image handles in real time.And can only be effective to certain specific noise, such as salt-pepper noise, white noise etc.
Therefore, be necessary to provide a kind of new rapid image filtering method, can cross and come adaptive-filtering, and can apply in the real-time system according to Noise Estimation.
Summary of the invention
The object of the present invention is to provide a kind ofly, can keep carrying out Filtering Processing to various types of noises under sharp-edged prerequisite fast based on the partial image filtering method of Noise Estimation.
For achieving the above object, the present invention can realize by following technical measures, may further comprise the steps:
(1), in image, chooses a pixel as center pixel;
(2), be the center with selected center pixel, get the pixel region of deciding M * N size;
(3), obtain the red component (R) of all pixels in institute's favored area, green component (G), the mean value R of blue component (B), G, B;
(4), obtain the quadratic sum of difference of the green component of pixels all in G and the institute's favored area, and obtain the mean square deviation SE of correspondence;
(5), according to the mean value R of step (3), G, the mean square deviation SE of B and step (4) adjusts corresponding pixel color value, obtains corresponding color component after the selected center pixel filtering;
(6), entire image is carried out iterative processing in (1)-(5) set by step, obtain filtered image;
(7), store filtered view data.
Adopt green channel, red channel or blue channel to calculate mean square deviation in the present invention, can avoid traditional heavy weight coefficient to calculate like this, adopt the mean square deviation account form of single color component, when guaranteeing picture quality, also reduced operand, improved treatment effeciency.Therefore the present invention can effectively estimate the noise signal in the image, keeps the sharpen effect of image border details, and has reduced computation complexity greatly by having reduced amount of calculation, can effectively use in real-time system.
Embodiment
As shown in Figure 1, the system applies block diagram of handling for pictorial data.Imageing sensor is sent to the view data that collects on the data/address bus, and image processing module carries out various processing to the data on the data bus, and the data after the processing are transferred to display module demonstration or data memory module preservation through data/address bus.
As shown in Figure 2, be partial image filtering processing mode schematic diagram based on Noise Estimation.Image capture module is sent to the Filtering Processing module with the view data that collects and carries out Filtering Processing.Because a filtration module processing digital signal if therefore the image of image capture module output is an analog signal, needs analog signal is changed through the analog/digital signal conversion module, makes to be output as digital signal; If the image of image capture module output is a digital signal, then directly carry out Filtering Processing.Filtered view data is carried out the data preservation or data show.
As shown in Figure 3, be the flow chart of the partial image filtering method that the present invention is based on Noise Estimation.Its idiographic flow is:
(1), in image, chooses a pixel as center pixel;
(2), be the center with selected center pixel, get the pixel region of deciding M * N size;
(3), obtain the red component (R) of all pixels in institute's favored area, green component (G), the mean value R of blue component (B), G, B:
(4), obtain the quadratic sum of difference of the G component of pixels all in G and the institute's favored area, and obtain the mean square deviation SE of correspondence:
(5), according to the mean value R of step (3), G, the mean square deviation SE of B and step (4) adjusts corresponding pixel color value, obtains corresponding color component after the selected center pixel filtering:
Wherein, R, G, B are the color component of center pixel, and R ', G ', B ' are color component corresponding after the filtering, and Thre is a pre-set threshold;
(6), entire image carries out iterative processing in (1)-(5) set by step, obtains filtered image;
(7), store filtered view data.
Wherein, image can be static image, also can be dynamic image.During concrete calculating, can select all pixels in the whole rectangle, also can select to be positioned at the pixel of image XY change in coordinate axis direction.Adopt green channel to calculate mean square deviation in the present invention, can avoid traditional heavy weight coefficient to calculate like this, adopt the mean square deviation account form of single color component, when guaranteeing picture quality, also reduced operand, improved treatment effeciency.
Also can adopt red channel or blue channel to calculate mean square deviation in the present invention.The quadratic sum of the difference by obtaining red, the blue component in redness in institute's favored area and blue component mean value and interior all pixels of institute's favored area respectively obtains the mean square deviation of both correspondences then.
As shown in Figure 4, be the model schematic diagram of image degradation/recuperation.Degenerative process can be modeled as a degenrate function and an additive noise term, a given width of cloth input picture F (x, y), degenrate function H (x, y) and additive noise item N (x, y), then degraded image can be expressed as:
G(x,y)=H(x,y)*F(x,y)+N(x,y)
" * " representation space convolution.
Recovery function to degraded image G (x y) carries out Filtering Processing, obtain restored image F ' (x, y).
As shown in Figure 5, the schematic diagram of degraded image being handled for the present invention.Number in the figure is the center pixel of pixel for selecting 1., and filter will be adjusted the data of center pixel by the relation between computer center's pixel and the selected pixel on every side.Adopt the rectangular window zone of M * N in the present invention, comprise also that with the black sign label is a central point pixel 1. in the drawings, generally claim this window to be " convolution window ".
At first, calculate the mean value of the RGB color component of all pixels in the selected window:
Then, calculate the G color component of all pixels in the selected convolution window and the mean square deviation of G mean value:
At last, calculate corresponding color component by mean square deviation:
In above-mentioned formula, M, N are the size of selected window, can adjust the size of window as the case may be; Thre comes preset threshold for the noise according to image, and noise is big more, and corresponding Thre value is big more, also can make corresponding adjustment according to actual conditions, and typical value is M=7, N=7, Thre=1; R, G, B are the RGB component of central pixel point, and R ', G ', B ' are corresponding filtered value.
Entire image is carried out iterative processing as stated above, then can obtain filtered image.