A kind of method, device and image processing system removing color noise
Technical field
The present invention relates to image processing field, particularly relate to a kind of method, device and the image processing system of removing color noise.
Background technology
Image denoising is a kind of Application comparison technology widely in image procossing, and the object of image denoising is the signal to noise ratio (S/N ratio) in order to improve image, the desired character of outstanding image.
Typical imageing sensor comprises the types such as CCD and CMOS at present, when gathering image based on imageing sensor, image is easily subject to the impact of various factors in the process obtained and transmit, and makes the image collected by imageing sensor comprise noisy image often.
Mix containing noisy noise in image signal and picture signal due to described, make the problems such as image existing characteristics is not obvious, sharpness is not high, so usually to need imageing sensor collect image and carry out denoising to improve the signal to noise ratio (S/N ratio) of image, improve the display effect of image.
The noise of image can be simply divided into brightness noise and color noise usually, under low-light level environment, color noise is particularly evident, and from frequency, brightness noise is the noise that frequency is higher, and the color noise noise that to be frequency lower, color noise is often present in the flat site or low brightness area etc. of image, and compared to brightness noise, human eye is more responsive for color noise.
In prior art, the existing multiple method removed picture noise, such as, have the method for special removal brightness noise, have reference brightness information realization carry out the method for denoising to the color noise of image and remove the method etc. of brightness noise and color noise simultaneously.
But in the existing method removing the color noise of image, there are some problems, such as, exist while removing color noise, monochrome information can be affected, the fuzzy of monochrome information can be caused, and degradation problem under easily causing the color aliasing of image and the saturation degree of image, existing method complexity is higher.
Correlation technique can be US2012328193A1 U.S. Patent application with reference to publication number.
Summary of the invention
The problem that the present invention solves is when removing color noise to image, the monochrome information of easy effect diagram picture, can cause that image luminance information is fuzzy, the decline of the saturation degree of color aliasing and image, and the problem that complexity is higher.
For solving the problem, technical solution of the present invention provides a kind of method removing color noise, and described method comprises:
Based on each pixel in moving window and the codomain coefficient treated corresponding to each pixel that Y, U and V component value of pixel of denoising is determined in described moving window, described in treat that the pixel of denoising is the pixel of the center of moving window;
Based on each pixel in moving window and the spatial domain coefficient treated corresponding to each pixel that the space length of pixel of denoising is determined in described moving window;
The weighting coefficient corresponding to each pixel in described moving window is obtained based on the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient;
Based on each pixel in described moving window each pixel corresponding to weighting coefficient, the U component treating the pixel of denoising to described and V component carry out removing the process of color noise.
Optionally, the codomain coefficient corresponding to each pixel in described moving window along with each pixel in moving window with treat denoising pixel Y, U and V component value difference increase and reduce.
Optionally, the codomain coefficient corresponding to each pixel in described moving window comprises Y-component coefficient, U component coefficient and V component coefficient, describedly comprises based on each pixel in moving window and the codomain coefficient treated corresponding to each pixel that Y, U and V component value of pixel of denoising is determined in described moving window:
Based on each component value and the difference of respective components value of pixel treating denoising of each pixel in moving window, determine each component coefficient in the codomain coefficient corresponding to each pixel in moving window.
Optionally, the codomain coefficient corresponding to each pixel in described moving window comprises Y-component coefficient, U component coefficient and V component coefficient, describedly comprises based on each pixel in moving window and the codomain coefficient treated corresponding to each pixel that Y, U and V component value of pixel of denoising is determined in described moving window:
Based on formula
determine the Y-component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cy;
Based on formula
determine the U component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cu;
Based on formula
determine the V component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cv;
Wherein, Y1, U1 and V1 are respectively the Y-component value of the pixel treating denoising, U component value and V component value, and Y2, U2 and V2 are respectively the Y-component value of each pixel in described moving window, U component value and V component value, σ
y, σ
uand σ
vbe respectively the filter factor of corresponding Y, U and V passage.
Optionally, the filter factor σ of described Y, U and V passage
y, σ
uand σ
vvalue be 10.
Optionally, the codomain coefficient corresponding to each pixel in described moving window comprises Y-component coefficient, U component coefficient and V component coefficient, describedly comprises based on each pixel in moving window and the codomain coefficient treated corresponding to each pixel that Y, U and V component value of pixel of denoising is determined in described moving window:
Based on formula
Determine the Y-component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cy;
Based on formula
Determine the U component coefficient W in the first coefficient corresponding to each pixel in moving window
cu;
Based on formula
Determine the V component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cv;
Wherein, Y1, U1 and V1 are respectively the Y-component value of the pixel treating denoising, U component value and V component value, and Y2, U2 and V2 are respectively the Y-component value of each pixel in described moving window, U component value and V component value, σ
y, σ
uand σ
vbe respectively the filter factor of corresponding Y, U and V passage.
Optionally, the filter factor σ of described Y passage
yvalue be 20, the filter factor σ of described U and V passage
uand σ
vvalue be 10.
Optionally, the spatial domain coefficient corresponding to each pixel in described moving window along with each pixel in moving window with treat denoising pixel space length increase and reduce.
Optionally, describedly to comprise based on each pixel in moving window and the spatial domain coefficient treated corresponding to each pixel that the space length of pixel of denoising is determined in described moving window:
Based on formula
determine the spatial domain coefficient W corresponding to each pixel in moving window
g, wherein, σ
gfor spatial filtering coefficient, i, j are respectively each pixel in described moving window and described horizontal range and the vertical range treating the pixel of denoising, and the unit of distance is pixel.
Optionally, described spatial filtering factor sigma
gvalue be 10.
Optionally, the described weighting coefficient corresponding to each pixel obtained based on the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient in described moving window comprises:
The weighting coefficient corresponding to each pixel in described moving window is determined based on the product of the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient.
Optionally, the codomain coefficient corresponding to each pixel in described moving window comprises Y-component coefficient W
cy, U component coefficient W
cuwith V component coefficient W
cv, the described weighting coefficient corresponding to each pixel obtained based on the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient in described moving window comprises:
Based on formula W 2=W
cy× W
cu× W
cv× W
gobtain the weighting coefficient W2 corresponding to each pixel in described moving window.
Optionally, described based on the weighting coefficient corresponding to each pixel in described moving window, the process that the U component treating the pixel of denoising to described and V component carry out removing color noise comprises:
Based on formula
obtain the result U treating the removal color noise of the U component of the pixel of denoising
re;
Based on formula
obtain the result V treating the removal color noise of the V component of the pixel of denoising
re;
Wherein, U2 is the U component value of each pixel in moving window, ∑ U2 × W2 represents and asks for the product of the weighting coefficient W2 corresponding to the U component value of all pixels in moving window and this pixel and be worth, ∑ V2 × W2 represents and asks for the product of the weighting coefficient W2 corresponding to the V component value of all pixels in moving window and this pixel and be worth, and ∑ W2 represents and asks for the weighting coefficient W2 corresponding to pixels all in moving window and be worth.
Technical solution of the present invention also provides a kind of device removing color noise, and described device comprises:
First determining unit, be suitable for based on each pixel in moving window and the codomain coefficient treated corresponding to each pixel that Y, U and V component value of pixel of denoising is determined in described moving window, described in treat that the pixel of denoising is the pixel of the center of moving window;
Second determining unit, is suitable for based on each pixel in moving window and the spatial domain coefficient treated corresponding to each pixel that the space length of pixel of denoising is determined in described moving window;
Obtain unit, be suitable for the weighting coefficient corresponding to each pixel obtained based on the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient in described moving window;
Denoising unit, is suitable for based on the weighting coefficient corresponding to each pixel in described moving window, treats that the U component of the pixel of denoising and V component carry out denoising to described.
Optionally, the codomain coefficient corresponding to each pixel in described moving window comprises Y-component coefficient, U component coefficient and V component coefficient, and described first determining unit comprises:
Difference subelement, is suitable for each component value based on each pixel in moving window and the difference of respective components value of pixel treating denoising, determines each component coefficient in the codomain coefficient corresponding to each pixel in moving window.
Optionally, the codomain coefficient corresponding to each pixel in described moving window comprises Y-component coefficient, U component coefficient and V component coefficient, and described first determining unit comprises:
Y-component coefficient determination subelement, is suitable for based on formula
determine the Y-component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cy;
U component coefficient determination subelement, is suitable for based on formula
determine the U component coefficient W in the first coefficient corresponding to each pixel in moving window
cu;
V component coefficient determination subelement, is suitable for based on formula
determine the V component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cv;
Wherein, Y1, U1 and V1 are respectively the Y-component value of the pixel treating denoising, U component value and V component value, and Y2, U2 and V2 are respectively the Y-component value of each pixel in described moving window, U component value and V component value, σ
y, σ
uand σ
vbe respectively the filter factor of corresponding Y, U and V passage.
Optionally, the codomain coefficient corresponding to each pixel in described moving window comprises Y-component coefficient, U component coefficient and V component coefficient, and described first determining unit comprises:
Y-component coefficient determination subelement, is suitable for based on formula
Determine the Y-component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cy;
U component coefficient determination subelement, is suitable for based on formula
Determine the U component coefficient W in the first coefficient corresponding to each pixel in moving window
cu;
V component coefficient determination subelement, is suitable for based on formula
Determine the V component coefficient W in the codomain coefficient corresponding to each pixel in moving window
cv;
Wherein, Y1, U1 and V1 are respectively the Y-component value of the pixel treating denoising, U component value and V component value, and Y2, U2 and V2 are respectively the Y-component value of each pixel in described moving window, U component value and V component value, σ
y, σ
uand σ
vbe respectively the filter factor of corresponding Y, U and V passage.
Optionally, described acquisition unit comprises: product subelement, is suitable for the weighting coefficient corresponding to each pixel determined based on the product of the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient in described moving window.
Optionally, described denoising unit comprises:
First denoising subelement, is suitable for based on formula
obtain the denoising result U treating the U component of the pixel of denoising
re;
Second denoising subelement, is suitable for based on formula
obtain the denoising result V treating the V component of the pixel of denoising
re;
Wherein, U2 is the U component value of each pixel in moving window, ∑ U2 × W2 represents and asks for the product of the weighting coefficient W2 corresponding to the U component value of all pixels in moving window and this pixel and be worth, ∑ V2 × W2 represents and asks for the product of the weighting coefficient W2 corresponding to the V component value of all pixels in moving window and this pixel and be worth, and ∑ W2 represents and asks for the weighting coefficient W2 corresponding to pixels all in moving window and be worth.
Technical solution of the present invention also provides a kind of image processing system, comprising: the device removing color noise as above.
Optionally, described image processing system also comprises:
Down-sampled unit, is suitable for down-sampled operation view data being carried out to U, V passage;
Saturation degree control module, the view data being suitable for U, V passage after to down-sampled unit operations carries out saturation degree control operation;
The device of described removal color noise is suitable for the view data of U, V passage after based on the operation of saturation degree control module and the view data of Y passage carries out denoising to the U component of the pixel in U, V passage and V component.
Optionally, described image processing system also comprises: subsequent processing units, is suitable for carrying out subsequent treatment to the view data of U, V passage after the device process of removal color noise and the view data of Y passage.
Optionally, described subsequent processing units also comprises saturation degree adjustment unit, is suitable for carrying out saturation degree adjustment to the view data of U, V passage after the device process of removal color noise and the view data of Y passage.
Compared with prior art, technical scheme of the present invention has the following advantages:
For the pixel (treating the pixel of denoising) of the center of moving window, based on Y, U and V component of each pixel in this pixel and moving window, the codomain coefficient corresponding to each pixel in described moving window can be determined, the spatial domain coefficient corresponding to each pixel in described moving window is determined based on the space length of each pixel in this pixel and moving window, and then the weighting coefficient corresponding to each pixel obtained based on the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient in described moving window, last based on the weighting coefficient corresponding to all pixels in moving window, can treat that the U component of the pixel of denoising and V component carry out denoising to described, because the method is in the U component of pixel treating denoising and V component denoising process, utilize the Y of each pixel treated in the pixel of denoising and moving window, the information of U and V component effectively can solve the problem of color aliasing and the saturation degree decline produced when removing color noise, the U component of the pixel of denoising can be treated separately and V component carries out denoising due to the method, the Y-component can not treating the pixel of denoising has an impact, namely can not have an impact to the monochrome information of image, image luminance information can not be caused fuzzy, the method complexity is low, be easy to realize.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the method for the removal color noise that technical solution of the present invention provides;
Fig. 2 is the position view treating the pixel of denoising in the moving window that provides of the embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the method for the removal color noise that the embodiment of the present invention provides;
Fig. 4 is the structural representation of the image processing system that the embodiment of the present invention provides.
Embodiment
In prior art, exist when color noise is removed to image, the monochrome information of easy effect diagram picture, can cause that image luminance information is fuzzy, the decline of the saturation degree of color aliasing and image, and the problem that complexity is higher.
For solving the problem, technical solution of the present invention provides a kind of method removing color noise.
Described method can realize the removal to the color noise in the view data of U, V passage of image, described image needs for yuv format, if image is other color format, such as, is rgb format etc., the conversion method of the color space of prior art can be adopted, image is converted to yuv format.
For the image of yuv format, for each pixel in image, what each pixel was corresponding has three components, be respectively Y-component, U component and V component, for the corresponding important value of each component for indicating the size of this component, particularly, the Y-component for pixel can represent the size of this component by the Y-component value of this pixel, with the U component value of this pixel, the U component of pixel can represent that the size of this component and the V component of pixel can represent the size of this component with the V component value of this pixel.
Fig. 1 is the method schematic diagram of the removal color noise that technical solution of the present invention provides, as shown in Figure 1, first step S101 is performed, based on each pixel in moving window and the codomain coefficient treated corresponding to each pixel that Y, U and V component value of pixel of denoising is determined in described moving window.
When removing color noise to image, first a moving window can be determined, realize the removal for the U component of the pixel of the center of moving window and the color noise of V component, and then pass through the mobile traversing operation realized for image of described moving window, moving window often moves once, the removal result of the U component of the pixel of its center and the color noise of V component can be obtained accordingly, in order to the removal of the U component of other pixels and the color noise of V component except minority edge pixel point in image, described moving window can according to from left to right, order from top to bottom moves the distance of a pixel at every turn, based on the denoising result of the U component of the pixel of the center of moving window each position in the picture and the color noise of V component, the removal to the U component of whole image and the color noise of V component can be realized.
The size of described moving window can adjust accordingly according to the denoising effect of the color noise of reality, and the shape of described moving window is rectangle.
Due in removal color noise process, usually need the center position obtaining moving window, so the length of described moving window and width are generally odd number, the unit of length and width is pixel.Such as, described moving window can be set to 5 × 5 sizes, 9 × 9 sizes or 5 × 15 sizes etc.
In present specification, the pixel of the center being in moving window is called the pixel treating denoising, as shown in Figure 2, for the moving window of 5 × 5 sizes, the pixel that center position represents with R for described in treat the pixel of denoising, each pixel in described moving window comprise in the pixel treating denoising of the center of moving window and window except described treat the pixel of denoising except other pixel, as shown in Figure 2, all pixels in described moving window, comprise the pixel represented by Fig. 2 P and the pixel R treating denoising.As can be seen from Figure 2, in a moving window, include the pixel that is treated denoising, include simultaneously except described in treat denoising pixel except other pixels multiple.
For any one pixel in moving window, can based on Y, U and V component value of this pixel and described sliding window intra-orally treat that Y, U and V component value of the pixel of denoising determines the codomain coefficient corresponding to this cunning pixel, in codomain coefficient corresponding to pixel in this moving window, the codomain coefficient treating the pixel of denoising of the center position of described moving window is maximum.
Such as, can based on the codomain coefficient corresponding to each pixel that the relation that reduces is determined in described moving window along with each pixel in moving window and the increase of difference of Y, U and V component value of pixel treating denoising of the codomain coefficient corresponding to each pixel in described moving window
When the pixel in moving window and the difference of Y, U and V component value of the pixel treating denoising are larger time, then the value of corresponding codomain coefficient corresponding to this pixel is less.
Further, the codomain coefficient corresponding to each pixel in described moving window can comprise Y-component coefficient, U component coefficient and V component coefficient, wherein, Y-component coefficient in the codomain coefficient corresponding to each pixel in described moving window can be determined based on the difference of Y-component value of the Y-component value of each pixel in described moving window with the pixel treating denoising, U component coefficient in the codomain coefficient corresponding to each pixel in described moving window can be determined based on the difference of U component value of the U component value of each pixel in described moving window with the pixel treating denoising, V component coefficient in the codomain coefficient corresponding to each pixel in described moving window can be determined based on the difference of V component value of the V component value of each pixel in described moving window with the pixel treating denoising.
For each pixel in moving window, the codomain coefficient corresponding to this pixel can be obtained by this step.
Perform step S102, based on each pixel in moving window and the spatial domain coefficient treated corresponding to each pixel that the space length of pixel of denoising is determined in described moving window.
Can based on the spatial domain coefficient corresponding to each pixel that the relation that reduces is determined in described moving window along with each pixel in moving window and the increase of space length of pixel treating denoising of the spatial domain coefficient corresponding to each pixel in described moving window, when each the pixel distance in moving window treats that the space length of the pixel of denoising is far away time, the value of the spatial domain coefficient corresponding to each pixel then in this moving window corresponding is less, in spatial domain coefficient corresponding to pixel in this moving window, the spatial domain coefficient treating the pixel of denoising of the center position of moving window is maximum.
Such as, please refer to Fig. 2, for the pixel of moving window the first row first row and the tertial pixel of the second row, the former with treat the distance of pixel of denoising be greater than the latter with from the distance of pixel treating denoising, so the spatial domain coefficient corresponding to the former should be less than the spatial domain coefficient corresponding to the latter accordingly.
For each pixel in moving window, the spatial domain coefficient corresponding to each pixel in this moving window can be obtained by this step.
Perform step S103, obtain the weighting coefficient corresponding to each pixel in described moving window based on the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient.
The weighting coefficient corresponding to each pixel in this moving window can be determined based on the product of the codomain coefficient corresponding to each pixel in moving window and spatial domain coefficient.
For each pixel in moving window, the spatial domain coefficient of this pixel that the codomain coefficient of this pixel obtained based on step S101 and step S102 obtain, can obtain the weighting coefficient corresponding to this pixel by this step.
Perform step S104, based on the weighting coefficient corresponding to each pixel in described moving window, the U component treating the pixel of denoising to described and V component carry out removing the process of color noise.
When the U component of the pixel treating denoising carries out the process of removing color noise, can based on the weighting coefficient corresponding to the U component value of each pixel in moving window and this pixel, obtain the result treating the removal color noise of the U component of the pixel of denoising in this moving window, based on the V component value of each pixel in moving window and the weighting coefficient described in this corresponding to each pixel, the result treating the removal color noise of the V component of the pixel of denoising in this moving window can be obtained.
It should be noted that, in present specification, emphatically to U in view data, the denoising of V component is set forth, in above-mentioned steps S101, when the codomain coefficient corresponding to each pixel determined in moving window, need the Y of each pixel of using in moving window and the pixel for the treatment of denoising, U and V component value, that is to U, V passage is removed in the process of color noise, there is the information using Y passage, in present specification, the information of described Y passage can be the view data after the denoising of Y passage, also can be the original Y channel data without brightness noise denoising.If the information of described Y passage is the view data after the denoising of Y passage, then each pixel in the moving window in step S101 and the Y-component value until the pixel of denoising are the Y-component value after brightness noise denoising.
Below in conjunction with embodiment and accompanying drawing, technical solution of the present invention is described in detail
Fig. 3 is the schematic flow sheet of the method for the removal color noise that the embodiment of the present invention provides.In the present embodiment, carry out describing emphatically with the process pixel of the center position in a moving window being removed to color noise, for whole image, then can by mobile described moving window, for the moving window of each position, the method that the present embodiment can be adopted to provide realizes the removal for the color noise of the pixel of its center position, and then realizes removing color noise to whole image.
As shown in Figure 3, first step S301 is performed, mobile moving window.
When carrying out removal color noise to image, first sliding window can be moved to the upper left position of image, namely with the initial position that this position is moving window.
Moving window is from initial position, can according to the mobile pixel at every turn of order from left to right, from top to bottom, moving window is in the process of movement, if previous moment moving window is positioned at the right margin of view data, then when mobile, moving window turned back to the left margin place of view data and move down the distance of a pixel, after each mobile described moving window, performing step S302.
In other embodiments, also can pre-set the distance threshold of moving window movement, then moving window can move a distance threshold at every turn, and the span of described distance threshold can set accordingly according to the denoising demand of view data.
Step S302, to determine the codomain coefficient corresponding to each pixel in described moving window with the difference of Y, U and V component value of the pixel treating denoising based on each pixel Y, U and V component value in moving window.
In the present embodiment, the codomain coefficient corresponding to each pixel in described moving window comprises Y-component coefficient W
cy, U component coefficient W
cuwith V component coefficient W
cv.
After determining the position of moving window, determine that the pixel of the center position of described moving window is the pixel treating denoising.
The Y-component coefficient W in the codomain coefficient corresponding to each pixel in described moving window is determined by formula (1)
cy.
The U component coefficient W in the codomain coefficient corresponding to each pixel in described moving window is determined by formula (2)
cu.
The V component coefficient W in the codomain coefficient corresponding to each pixel in described moving window is determined by formula (3)
cv.
Wherein, Y1, U1 and V1 are respectively the Y-component value of the pixel treating denoising, U component value and V component value, and Y2, U2 and V2 are respectively the Y-component value of each pixel in described moving window, U component value and V component value, σ
y, σ
uand σ
vbe respectively the filter factor of corresponding Y, U and V passage.Described σ
y, σ
uand σ
vvalue can set accordingly based on the denoising effect of the color noise of view data and actual demand etc., σ
y, σ
uand σ
vvalue can be the same or different, in the present embodiment, described σ
y, σ
uand σ
vvalue is 10, described σ
y, σ
uand σ
vvalue larger, then denoising effect can be better.
In other embodiments, the codomain coefficient also can determining corresponding to pixel based on formula (4) to formula (6).
The Y-component coefficient W in the codomain coefficient corresponding to each pixel in described moving window is determined by formula (4)
cy.
Being meant to represented by formula (4), when the absolute value of the difference of Y2 and Y1 is greater than σ
ytime, W
cyvalue be 0, when the absolute value of difference as Y2 and Y1 is less than or equal to σ
ytime, W
cyvalue be 1.
The U component coefficient W in the codomain coefficient corresponding to each pixel in described moving window is determined by formula (5)
cu.
The V component coefficient W in the codomain coefficient corresponding to each pixel in described moving window is determined by formula (6)
cv.
The concrete meaning of formula (5) and formula (6) please refer to the explanation of formula (4), does not repeat them here.
Wherein, Y1, U1 and V1 are respectively the Y-component value of the pixel treating denoising, U component value and V component value, and Y2, U2 and V2 are respectively the Y-component value of each pixel in described moving window, U component value and V component value, σ
y, σ
uand σ
vbe respectively the filter factor of corresponding Y, U and V passage.When determining the codomain coefficient corresponding to pixel by formula (4) to formula (6), the filter factor σ of described Y passage
yvalue can be 20, the filter factor σ of described U and V passage
uand σ
vvalue can be 10.
Perform step S303, based on each pixel in moving window and the spatial domain coefficient treated corresponding to each pixel that the space length of pixel of denoising is determined in described moving window.
The spatial domain coefficient W corresponding to each pixel in described moving window is determined by formula (7)
g.
Wherein, σ
gfor spatial filtering coefficient, i, j are respectively each pixel in described moving window and described horizontal range and the vertical range treating the pixel of denoising, and the unit of distance is pixel.
Described σ
gvalue can set accordingly based on the denoising effect of the color noise of view data and actual demand etc., in the present embodiment, described σ
gvalue is 10, described σ
gvalue larger, then denoising effect can be better.
For example, please also refer to Fig. 2, for being positioned at the pixel of moving window the first row secondary series, this pixel is 1 with the horizontal range treating the pixel of denoising at the center being positioned at moving window, and vertical range is 2.
Perform step S304, obtain the weighting coefficient corresponding to each pixel in moving window based on the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient.
For each pixel in moving window, after the codomain coefficient obtained corresponding to this pixel and spatial domain coefficient, formula (8) can be passed through and obtain weighting coefficient corresponding to this pixel, pixel in moving window comprises the pixel treating denoising being in center position, also comprise in moving window except described in treat denoising pixel except other pixel, each pixel in moving window has the weighting coefficient corresponding to this pixel.
W2=W
cy×W
cu×W
cv×W
g(8)
Wherein, W
cyy-component coefficient in codomain coefficient corresponding to this pixel of obtaining in step S302, W
cuu component coefficient in codomain coefficient corresponding to this pixel of obtaining in step S302, W
cvv component coefficient in codomain coefficient corresponding to this pixel of obtaining in step S302, W
gspatial domain coefficient corresponding to this pixel of obtaining in step S303.
Perform step S305, based on the weighting coefficient corresponding to each pixel in described moving window, treat that the U component of the pixel of denoising removes color noise to described.
By step S302 to step S304, for each pixel in moving window, the weighting coefficient of its correspondence can be obtained, after obtaining the weighting coefficient corresponding to each pixel in described moving window, obtained the result U treating the removal color noise of the U component of the pixel of denoising at the center of this moving window by formula (9)
re.
Wherein, U2 is the U component value of each pixel in moving window, ∑ U2 × W2 represents and asks for the product of the weighting coefficient W2 corresponding to the U component value of all pixels in described moving window and this pixel and be worth, and ∑ W2 represents and asks for the weighting coefficient W2 in moving window corresponding to each pixel and be worth.
For example, please also refer to Fig. 2, for the search window of 5 × 5 sizes, then the computation process of formula (9) is: weighting coefficient corresponding with it for the U component value of each pixel of (totally 25 pixels) in the search window of 5 × 5 sizes carried out product, then get 25 product values are added, as the molecule of formula (9), using weighting coefficient corresponding for each pixel and as the denominator of formula (9), obtain the result U of the removal color noise of the U component of the pixel of the center position of moving window based on formula (9)
re.
Perform step S306, based on the weighting coefficient corresponding to each pixel in described moving window, treat that the V component of the pixel of denoising removes color noise to described.
The result V treating the removal color noise of the V component of the pixel of denoising at the center of this moving window is obtained by formula (10)
re.
V2 is the V component value of each pixel in moving window, ∑ V2 × W2 represents and asks for the product of the weighting coefficient W2 corresponding to the V component value of all pixels in moving window and this pixel and be worth, and ∑ W2 represents and asks for the weighting coefficient W2 in moving window corresponding to each pixel and be worth.
By step S305 and step S306, the color noise treating U, V component of the pixel of denoising that can obtain the center of current position moving window removes result, has so far completed and has treated the removal process of the color noise of the pixel of denoising to this.
Perform step S307, judge whether moving window has completed the traversal to whole image.
After the color noise treating U, V component of the pixel of denoising in the moving window obtaining current position removes result, perform this step, judge whether moving window has completed the traversal to whole image, namely judge whether moving window is positioned at the lower right position of whole image.If, the removal treating the color noise of U, V component of the pixel of denoising completed in the moving window of last position is then described, namely achieve the removal of the color noise of U, V component for whole image, now can terminate the process that this removes color noise.If the judged result of this step is no, then the pixel needing denoising in key diagram picture does not remove color noise, then return and perform step S301, until the judged result of this step is yes.
In the method, at the U to pixel, when V component removes color noise, consider this pixel (treating the pixel of denoising) and the relation in the codomain of neighboring pixel point and the relation on spatial domain simultaneously, when the pixel in moving window is with when the component value gap of the pixel of denoising is smaller, illustrate on described, this pixel treats that the impact of the pixel of denoising is larger, corresponding codomain coefficient corresponding to this pixel is larger, and only consider that codomain coefficient is inaccurate, because spatially away from treat denoising pixel moving window in pixel be not produce too much influence to the described pixel treating denoising, so in the present embodiment, consider the spatial domain coefficient corresponding to this pixel simultaneously, then better can determine that this pixel treats the impact of the pixel of denoising based on the codomain coefficient corresponding to this pixel and spatial domain coefficient.
Because the method is in the U component of pixel treating denoising and V component denoising process, consider the information of Y-component simultaneously, utilize the Y of each pixel in moving window, the information of U and V component effectively can reduce the problem of color aliasing and the saturation degree decline produced when removing color noise, and the U component of the pixel of denoising can be treated separately due to the method and V component carries out denoising, can not have an impact to the Y-component of this pixel, namely can not have an impact to the monochrome information of image, image luminance information can not be caused fuzzy, and the method complexity is low, be easy to realize.
The method of corresponding above-mentioned removal color noise, the embodiment of the present invention also provides a kind of device removing color noise, and as shown in Figure 4, the device 10 of described removal color noise comprises: the first determining unit U11,
Second determining unit U12, acquisition unit U13 and denoising unit U14.
Described first determining unit U11 is suitable for based on each pixel in moving window and the codomain coefficient treated corresponding to each pixel that Y, U and V component value of pixel of denoising is determined in described moving window, described in treat that the pixel of denoising is the pixel of the center of moving window; Described second determining unit U12 is suitable for based on each pixel in moving window and the spatial domain coefficient treated corresponding to each pixel that the space length of pixel of denoising is determined in described moving window; Described acquisition unit U13 is suitable for the weighting coefficient corresponding to each pixel obtained based on the codomain coefficient corresponding to each pixel in described moving window and spatial domain coefficient in described moving window; Described denoising unit U14 is suitable for based on the weighting coefficient corresponding to each pixel in described moving window, treats that the U component of the pixel of denoising and V component carry out denoising to described.
Based on the device of above-mentioned removal color noise, the embodiment of the present invention also provides a kind of image processing system.As shown in Figure 4, described image processing system comprises the device 10 removing color noise as above, and described image processing system also comprises color space converting unit U15, brightness noise removal unit U16, enhancement unit U17, down-sampled unit U18, saturation degree control module U19, subsequent processing units U20.
Described image processing system also comprises pretreatment unit (not shown), and described pretreatment unit is suitable for carrying out black-level correction to view data, goes bad point, the rectification of white balance, camera lens, demosaicing, gamma correct and the operation such as color matrix rectification.
Described color space converting unit U15 is suitable for the conversion that the view data after to pretreatment unit process carries out color space, such as, when image is rgb format, image can be converted to yuv format by this element.
Y passage (luminance channel) data that described brightness noise removal unit U16 is suitable in the view data of the yuv format after to color space converting unit U15 process carry out denoising, method for the denoising of luminance channel can adopt the multiple method of prior art to carry out denoising, does not repeat them here.
The view data that described enhancement unit U17 is suitable for the Y passage after to brightness noise removal unit U16 process carries out enhancing process, and the method for image enhaucament can adopt correlation technique of the prior art.
Described down-sampled unit U18 is suitable for the down-sampled operation that the view data after to color space converting unit U15 process carries out U, V passage.
Described saturation degree control module U19, is suitable for the view data after to down-sampled unit U18 operation and carries out saturation degree control operation.
The device 10 of described removal color noise based on the view data after brightness noise removal unit U16 process, can carry out the denoising of U component and V component to the view data after saturation degree control module U19 operation.
Described subsequent processing units U20 is suitable for the U after processing the device 10 through removing color noise, the view data of the view data of V passage and the Y passage after enhancement unit U17 process carries out subsequent treatment, described subsequent treatment comprises camera lens shadow correction, white balance, demosaicing, gamma corrects, color matrix correction, image space is changed, the process such as JPEG coding, described subsequent processing units U20 can also comprise saturation degree adjustment unit U21, described saturation degree adjustment unit U21 is suitable for the U after processing the device 10 through removing color noise, the view data of V passage and the view data of Y passage carry out saturation degree adjustment.
In the present embodiment, because color noise is low frequency Speckle noise, so can carry out down-sampled to the view data of U, V passage by down-sampled unit U18, for example, if YUV422 form during the image of input, then can first carry out down-sampled to it, the frequency of color noise can be improved by down-sampled operation, color noise is more easily removed.
Before the view data of device 10 pairs of U, V passages by removing color noise removes color noise, to the view data after down-sampled unit U18 process, saturation degree control operation is carried out by saturation degree control module U19, like this before removal color noise, the inapparent color noise in some view data can be removed, and then the denoising efficiency of device 10 of color noise can be improved.
The view data of U, V passage after processing the device 10 through removing color noise and the view data of Y passage carry out saturation degree adjustment by saturation degree adjustment unit U21, if can avoid removing before color noise in the view data of device 10 pairs of U, V passages by removing color noise carries out saturation degree adjustment, the aggravation color noise that may cause and make the device 10 removing color noise effectively can not remove the problem of display noise.
Although the present invention discloses as above, the present invention is not defined in this.Any those skilled in the art, without departing from the spirit and scope of the present invention, all can make various changes or modifications, and therefore protection scope of the present invention should be as the criterion with claim limited range.