Embodiment
Remove the limitation of Noise Method in order to overcome prior art based on the correlativity of a pixel, the invention provides a kind of noise remove method and device thereof.Next will specify the method and device thereof.
Fig. 1 illustrates structural pixel schematic diagram of the present invention.As shown in Figure 1, adopting 3*3 rice font is example description architecture pixel, and nine pixels form a structural pixel, that is: str_pixel={pixel (x altogether, y), pixel (x, y-1), pixel (x, y+1), pixel (x-1, y), pixel (x+1, y) pixel (x-1, y-1), pixel (x+1, y+1), pixel (x-1, y+1), pixel (x+1, y-1) } (1)
The central pixel point of this structural pixel is pixel (x, y).
Being treated to of removal noise of the prior art: establishing that a width of cloth Given Graph looks like is v, and image is str_v after the denoising, and the denoising formula can be expressed as so:
Wherein l represents and the set of pixels of i pixel correlation, and w () is the weighted value of respective pixel, and existing algorithm all is to be defined as a pixel with the j pixel.
In the present invention, the principle of setting structure pixel is:
The pixel region of a m*n of definition is structural pixel, because be to be image detail with local image structure information in zone, then the bar structure pixel is as a some pixel, the computing that substitution formula (2) is removed noise.
Fig. 2 illustrates structural pixel diversity factor schematic diagram of the present invention.As shown in Figure 2, two structural pixel str_pixel (x, y) and str_pixel (x, y-1), span difference 9 points as shown in the figure of two pixels, the diversity factor of these two structural pixel is calculated as follows:
For two structural pixel str_pixel_i arbitrarily, the diversity factor of str_pixel_j is calculated, and available following general formula represents:
What need supplementary notes is that structural pixel is considered as the boxed area of the structured message of certain pixel.The diversity factor of two structural pixel has embodied the difference of the structured message of two structural pixel corresponding to certain two pixel just, this species diversity can the imbody variance, average, absolute value and gradient etc., and above formula (3) or (4) are a kind of situation wherein just.
Fig. 3 illustrates the present invention and removes structural pixel neighborhood schematic diagram in the noise processed.As shown in Figure 3, Fig. 3 (a)-Fig. 3 (i) is the square formation that 3*3 structural pixel consists of, structural pixel centered by Fig. 3 (e), and its neighborhood is to comprise the division center pixel in interior 9 structural pixel as shown in FIG..As can be seen from the figure, structural pixel with and the structural pixel of neighborhood the overlapping phenomenon of pixel is arranged when dividing.This division is just removed association relative in the noise operation and is divided, and does not relate to the structure that changes image and the numerical value of pixel.
The neighborhood of structural pixel of the present invention is not less than 3*3 structural pixel.
Fig. 4 illustrates specific embodiment structuring of the present invention and removes the noise processed process flow diagram.As shown in Figure 4, step 400 beginning, in step 402, input picture, the definition structure pixel is carried out the division of structural pixel and is determined neighborhood corresponding to each structural pixel, as above shown in the formula (1).
Further, in step 404, determine the right structural pixel diversity factor of structural pixel of division center pixel and its neighborhood, this diversity factor refers to the difference of two structural pixel, as above shown in the formula (4).
Then, in step 406, the right weighted value function of structural pixel of division center pixel and its neighborhood is set.
Weighted value function w () can be set as follows:
Wherein, the σ noise variance, for this method, can be by being set to artificially reconcile parameter.Diversity factor definition in the following formula is calculated according to (4) formula, the weighted value function is to determine it to the contribution margin of center pixel according to the difference between adjacent structure pixel and the division center pixel, and diversity factor is larger, contributes less, diversity factor is less, contributes larger.
For each pixel, the neighborhood of its structural pixel is take 3*3 as example, and the weighted value function that the structural pixel of its division center pixel and its neighborhood is right has 9.
In step 408, image boundary is processed, the boundary treatment in this step be in image boundary when dividing the structural pixel of pixel, lack the pixel that makes up structural pixel, need to the pixel that lack be made up by mirror image processing.
Then follow, enter in the step 410, judge whether that also needing to carry out the cycle repeats, the purpose of carrying out repetition is after some pixel makes up structural pixel, still there is the situation that lacks pixel when further making up its neighborhood, need to carries out the mirror image processing of repetition to realize the complete structure of structural pixel in the neighborhood.
Judgement in step 410 if, then return in the step 408, continue image boundary is processed.
Repeat to process according to the cycle for image boundary, i.e. a kind of mirror image processing, its corresponding relation is as follows:
v(i,N+1)=v(i,N)
v(i,0)=v(i,1)
v(0,j)=v(1,j) (6)
v(M+1,j)=v(M,j)
In the following formula, M, N are respectively height and the width of image, i, and the span of j is respectively [1, M] and [1, N].
What need to replenish is that step 408 and step 410 not necessarily mainly comprise two kinds of situations: 1. image removal noise is not processed the pixel on border; 2. though image is removed noise the pixel on border is processed, to the pixel at image middle part, the structural pixel of the pixel that it will calculate with and the needed pixel of structural pixel of neighborhood all possess.
Judgement in step 410 then enters in the step 412 if not, the weighted value function is processed the output weighted value.
In conjunction with shown in Figure 3, the neighborhood of the structural pixel that each pixel is corresponding is take 3*3 as example, and 9 weighted value functions of its correspondence can obtain 9 weighted values through processing, and are respectively w
Ae, w
Be, w
Ce, w
De, w
Ee, w
Fe, w
Ge, w
HeAnd w
IeW wherein
AeRepresent the as shown in Figure 3 right weighted value of Fig. 3 (a) and 3 (e) this a pair of structural pixel, other weights refer to other structural pixel pair.
In step 414, the weighted value that the structural pixel of division center pixel and its neighborhood is right is carried out normalized, its processing is as follows:
Because the pixel value value of image within the specific limits, so weighted value need to be carried out normalization and could do not changed the span of removing the pixel value behind the noise.
And then, enter in the step 416, remove the calculation process of noise, with the corresponding product of pixel value of each weighted value of the structural pixel of neighborhood and division center pixel and each pixel of division center pixel and sue for peace, remove the impact of noise, obtain the pixel value of structural pixel central pixel point.
For example in Fig. 3, the denoising result of locating in pixel (x, y) can be expressed as:
str_v(x,y)=w′
aev(x-1,y-1)+w′
bev(x-1,y)+w′
ce(x-1,y+1)
w′
dev(x,y-1)+w′
eev(x,y)+w′
fev(x,y+1) (8)
w′
gev(x+1,y-1)+w′
hev(x+1,y)+w′
iev(x+1,y+1)
In the formula, v (x, y) expression pixel is in the value at (x, y) coordinate place, w ' expression weights, and its subscript represents structural pixel pair, particularly, w '
AeRepresent the as shown in Figure 3 right treated normalization weighted value of Fig. 3 (a) and this a pair of structural pixel of 3 (e), other weights refer to other structural pixel pair.
In step 418, then the pixel information of output image enter in the step 420 and finish.
In one embodiment, because the structure in the image is not all similar, can be necessary to carry out some aftertreatments at some fuzzyyer image details in zone, namely utilize pixel value and its mean variance of the pixel behind the noise remove to carry out detail recovery.One of formula of its specific implementation can as:
Fig. 5 illustrates the structuring of a concrete practical work example of the present invention and removes the noise mode block structural diagram.As shown in Figure 5, this structuring is removed the noise device and is comprised dot structure module 500, structural pixel diversity factor module 502, and weighted value function module 504 is removed noise operation module 508.
Dot structure module 500, the partition structure pixel is carried out structuring to the pixel of input picture and is processed the structural pixel of output image and the structural pixel of neighborhood thereof.
Structural pixel diversity factor module 502 is determined the diversity factor of structural pixel, the structural pixel of dot structure module 500 outputs and the structural pixel of neighborhood thereof is processed the diversity factor of output each structural pixel of neighborhood and division center pixel.
Weighted value function module 504 arranges the weighted value function, each structural pixel of neighborhood of structural pixel diversity factor module 502 outputs and the diversity factor of division center pixel is processed the weighted value of output each structural pixel of neighborhood and division center pixel.
Remove noise operation module 508, with the corresponding product of pixel value of each normalization weighted value of neighbour structure pixel and division center pixel and each pixel of division center pixel and sue for peace, obtain the pixel value of structural pixel central pixel point.
In one embodiment, also comprise normalized module 506, each structural pixel of neighborhood of weighted value function module output and the weighted value of division center pixel are carried out normalized, and the normalization weighted value of output each structural pixel of neighborhood and division center pixel is given and is removed the noise operation module.
In one embodiment, comprise that also image detail recovers module 510, to the image detail through fuzzy region in the image of removing 508 outputs of noise operation module, pixel value and its mean variance that the pixel behind the noise remove is carried out in utilization carry out detail recovery.
The above implementation that specific descriptions of the present invention is intended to illustrate specific embodiments can not be interpreted as it is limitation of the present invention.Those of ordinary skills can make various variants on the basis of the embodiment that describes in detail under instruction of the present invention, these variants all should be included within the design of the present invention.The present invention's scope required for protection is only limited by described claims.