CN105678718B - Image de-noising method and device - Google Patents

Image de-noising method and device Download PDF

Info

Publication number
CN105678718B
CN105678718B CN201610186820.3A CN201610186820A CN105678718B CN 105678718 B CN105678718 B CN 105678718B CN 201610186820 A CN201610186820 A CN 201610186820A CN 105678718 B CN105678718 B CN 105678718B
Authority
CN
China
Prior art keywords
pixel
block
weight
image
reference block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610186820.3A
Other languages
Chinese (zh)
Other versions
CN105678718A (en
Inventor
朱德志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610186820.3A priority Critical patent/CN105678718B/en
Publication of CN105678718A publication Critical patent/CN105678718A/en
Application granted granted Critical
Publication of CN105678718B publication Critical patent/CN105678718B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of image denoising device and method, described device includes: selection module, for choosing a pixel in image as object pixel, pixel identical with the Color Channel of object pixel is chosen in the setting range around object pixel as reference pixel;Definition module is object block for defining the block being sized centered on object pixel, and the block being sized defined centered on reference pixel is reference block, the corresponding reference block of each reference pixel;First computing module, for carrying out Diversity measure to two blocks according to all pixels in reference block and object block, the diversity factor based on two blocks calculates the weight of the reference pixel at reference block center;Second computing module, for seeking weighted average to object pixel and all reference pixels according to the weight of object pixel and reference pixel, using weighted average as the denoising result of object pixel.Denoising result maintains the structural information of original image, improves the denoising effect of image.

Description

Image de-noising method and device
Technical field
The present invention relates to technical field of image processing, more particularly, to a kind of image de-noising method and device.
Background technique
In the prior art, most of imaging sensor such as complementary metal oxide semiconductor (CMOS, Complementary Metal Oxide Semiconductor) when obtaining image, bayer data (i.e. the image of bayer format) first is obtained, so The data (carrying out demosaicing processing to image) for recycling the method for interpolation to be lacked afterwards, finally obtain complete RGB Image.But if not carrying out denoising to image before interpolation, finally obtained RGB image certainly will be had largely Chromatic noise, and the removal one of chromatic noise is relatively difficult, two to carry out calculation amount larger, it is therefore desirable to first to figure before interpolation As data carry out denoising.
The substantially process of traditional image de-noising method are as follows: first by the pixel of R, G, B triple channel in the image of bayer format It extracts respectively, respectively the secondary independent image of composition one, denoises independent image;Then by denoising result by original Picture format arrange, the image data after being denoised.This denoising mode is denoised due to opening R, G, B points Processing, has ignored the relationship between R, G, B triple channel, be easy to cause the denoising degree of adjacent R, G, B different, influences denoising effect Fruit.If as shown in Figure 1, having a very thin straight line in the image of original bayer format, using existing image denoising side When method is denoised, due to having ignored the relationship between R, G, cause the denoising degree of R and G different, the result images after denoising It is impure may to show as color after straight line is unsmooth or interpolation.
In conclusion existing image de-noising method, image restoring degree is lower, and denoising effect is poor, to affect most Whole picture quality.
Summary of the invention
The main purpose of the embodiment of the present invention is to provide a kind of image de-noising method and device, it is intended to image denoising mistake Image restoring degree is improved in journey, promotes the denoising effect of image.
To achieve these objectives, a kind of image denoising device is on the one hand proposed, described device traverses each of image picture Element carries out denoising to each pixel respectively, comprising:
Module is chosen, for choosing a pixel in described image as object pixel, around the object pixel Setting range in choose identical with the Color Channel of object pixel pixel as reference pixel;
Definition module is object block for defining the block being sized centered on the object pixel, is defined with institute Stating the block being sized centered on reference pixel is reference block, the corresponding reference block of each reference pixel;
First computing module, for according to all pixels in the reference block and the object block to the reference block and The object block carries out Diversity measure, and the diversity factor based on the reference block and the object block calculates the reference block center The reference pixel weight, obtain the weight of each reference pixel accordingly, and to the weight of the object pixel Assignment 1, wherein the diversity factor and the weight are negatively correlated;
Second computing module, for according to the weight of the object pixel and the reference pixel to the object pixel and All reference pixels seek weighted average, using the weighted average as the denoising result of the object pixel.
Further, first computing module includes Diversity measure unit, and the Diversity measure unit is used for: will The sum of absolute value of difference that the pixel of corresponding position is subtracted each other in the reference block and the object block as the reference block with The diversity factor of the object block.
Further, first computing module includes weight calculation unit, and the weight calculation unit is used for:
According to formula w=exp (- r2/sig2) calculate the reference block center the reference pixel weight, wherein r For the diversity factor of the reference block and the object block, sig is empirical, and w is the reference image at the reference block center The weight of element.
Further, first computing module further includes that weight adjusts unit, and the weight adjusts unit and is used for:
The difference that the reference pixel and the object pixel at the reference block and the object block center are subtracted each other Diversity factor regulated value of the absolute value as the reference block and the object block, the difference based on the reference block Yu the object block Different degree regulated value calculates the weight regulated value of the reference pixel at the reference block center, by the weight of the reference pixel with The product of the weight regulated value of the reference pixel weight final as the reference pixel.
Further, the weight adjusts unit and is used for:
According to formula ww=exp (- rr2/sig_p2) weight of the reference pixel that calculates the reference block center adjusts Value, wherein rr is the diversity factor regulated value of the reference block and the object block, and sig_p is empirical, and ww is the reference The weight regulated value of the reference pixel at block center.
On the other hand a kind of image de-noising method is proposed, comprising steps of
Choose image in a pixel be used as object pixel, in the setting range around the object pixel choose and The identical pixel of the Color Channel of the object pixel is as reference pixel;
Defining the block being sized centered on the object pixel is object block, during definition with the reference pixel is The block being sized of the heart is reference block, the corresponding reference block of each reference pixel;
It is poor to be carried out according to all pixels in the reference block and the object block to the reference block and the object block Opposite sex measurement, the diversity factor based on the reference block and the object block calculate the reference pixel at the reference block center Weight obtains the weight of each reference pixel accordingly, and to the weight assignment of the object pixel 1, wherein the difference Different degree and the weight are negatively correlated;
According to the weight of the object pixel and the reference pixel to the object pixel and all reference pixels Weighted average is sought, using the weighted average as the denoising result of the object pixel;
Each of traversal described image pixel repeats above-mentioned steps.
Further, it is described according to the reference block and all pixels in the object block to the reference block and described Object block carries out Diversity measure
The sum of absolute value of difference that the pixel of corresponding position in the reference block and the object block is subtracted each other is as institute State the diversity factor of reference block Yu the object block.
Further, the diversity factor based on the reference block and the object block calculates the institute at the reference block center The weight for stating reference pixel includes:
According to formula w=exp (- r2/sig2) calculate the reference block center the reference pixel weight, wherein r For the diversity factor of the reference block and the object block, sig is empirical, and w is the reference image at the reference block center The weight of element.
Further, the diversity factor according to the reference block and the object block calculates the institute at the reference block center After the step of stating the weight of reference pixel further include:
The difference that the reference pixel and the object pixel at the reference block and the object block center are subtracted each other Diversity factor regulated value of the absolute value as the reference block and the object block, the difference based on the reference block Yu the object block Different degree regulated value calculates the weight regulated value of the reference pixel at the reference block center, by the weight of the reference pixel with The product of the weight regulated value of the reference pixel weight final as the reference pixel.
Further, the diversity factor regulated value based on the reference block and the object block calculates in the reference block The weight regulated value of the reference pixel of the heart includes:
According to formula ww=exp (- rr2/sig_p2) weight of the reference pixel that calculates the reference block center adjusts Value, wherein rr is the diversity factor regulated value of the reference block and the object block, and sig_p is empirical, and ww is the reference The weight regulated value of the reference pixel at block center.
A kind of image de-noising method provided by the embodiment of the present invention, it is poor by being carried out in blocks during denoising Opposite sex measurement, due to containing the pixel of tri- Color Channels of R, G, B in each piece, is filled to denoise to object pixel The relation information that R, G, B triple channel is utilized is divided to be denoised, denoising result maintains the structural information of original image, so that going Image after making an uproar be capable of it is more true it is fine and smooth show image detail, improve the reduction degree of image, improve going for image It makes an uproar effect, so that final image has higher quality and better visual effect.
Detailed description of the invention
Fig. 1 is the dot structure schematic diagram of the image of original bayer format;
Fig. 2 is the flow chart of image de-noising method first embodiment of the invention;
Fig. 3 is the schematic diagram for choosing object pixel and reference pixel in the embodiment of the present invention on the image;
Fig. 4 is the schematic diagram for defining object block and reference block in the embodiment of the present invention on the image;
Fig. 5 is the flow chart of image de-noising method second embodiment of the invention;
Fig. 6 is the image de-noising method of the image sensor application embodiment of the present invention to obtain the stream of the application example of image Cheng Tu;
Fig. 7 is the effect picture of the image for the original bayer format that imaging sensor obtains in the application example of Fig. 6;
Fig. 8 is the effect picture for the complete RGB image that imaging sensor finally obtains in the application example of Fig. 6;
Fig. 9 is the module diagram of image denoising device first embodiment of the invention;
Figure 10 is the module diagram of image denoising device second embodiment of the invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to fig. 2, propose that image de-noising method first embodiment of the invention, described image denoising method include following step It is rapid:
S11, choose image in a pixel be used as object pixel, in the setting range around object pixel choose and The identical pixel of the Color Channel of object pixel is as reference pixel.
In the embodiment of the present invention, denoising successively is carried out to each of image pixel, until in traversal image All pixels.A pixel is chosen first as object pixel, which is the pixel that will carry out denoising;So Pixel identical with the Color Channel of object pixel is chosen in the setting range around object pixel afterwards as reference pixel, example Such as: when object pixel is the pixel in the channel R, then the pixel for choosing the channel R is reference pixel;When object pixel is the channel G When pixel, then the pixel for choosing the channel G is reference pixel;When object pixel is the pixel of channel B, then the picture of channel B is chosen Element is reference pixel.
As shown in figure 3, the R pixel in the big box in center is the object pixel chosen, the R around object pixel in small box Pixel is the reference pixel chosen.
The size of setting range can according to need determination, and theoretically, range is the bigger the better.Optionally, it finally determines Range is a region centered on object pixel, and it is identical will to fall the Color Channel of all and object pixel in the area Pixel be chosen for reference pixel, be illustrated in figure 3 the region of 9x9 size.
The block being sized of S12, definition centered on object pixel is object block, is defined centered on reference pixel The block being sized is reference block.
Object block is identical as the size of reference block, and the size of the two can be set as needed, and is theoretically the bigger the better.Such as Shown in Fig. 4, object block 10 and reference block 20 are schematically marked, object block 10 and reference block 20 are 5x5 size.Fig. 4 In a reference block 20 is only schematically marked, in fact, each reference pixel correspond to a reference block, the number of reference block It measures equal with the quantity of reference pixel.
S13, Diversity measures are carried out to two blocks according to all pixels in reference block and object block, based on two blocks Diversity factor calculates the weight of the reference pixel at reference block center, and to the weight assignment of object pixel 1.
In this step S13, the weight of each reference pixel need to be calculated, the embodiment of the present invention is corresponding according to reference pixel Reference block and the diversity factor of object block calculate the weight of the reference pixel.As seen from the figure, in reference block and object block Not only include the pixel in the channel R, further includes the pixel of the channel G and channel B, therefore the embodiment of the present invention takes full advantage of R, G, B The relation information of triple channel is denoised.Since the weight of reference pixel is and the object pixel for object pixel Weight relative to itself is 1, therefore to the weight assignment of object pixel 1.
Optionally, when carrying out Diversity measure (or similarity measurement), position will can be corresponded in reference block and object block The sum of absolute value of difference that the pixel of (upper left corner of such as reference block and the upper left corner of object block are corresponding) is subtracted each other is set as two The diversity factor of a block, that is to say, that taken after two pixels of reference block and each position in object block are executed subtraction Absolute value, then the operation result of all positions is executed into add operation, using add operation result as diversity factor, calculation formula It is as follows:
R=∑ | M (i, j)-N (i, j) |,
Wherein, M (i, j) and N (i, j) is respectively two pixels that coordinate position is (i, j) in reference block and object block, r For the diversity factor of reference block and object block.By taking the block of 5x5 size as an example, 25 positions are shared, two blocks are corresponding to be subtracted each other and take absolutely To after value obtain 25 numerical value, 25 numerical value are added up be exactly two blocks diversity factor.
Optionally, when carrying out Diversity measure, the pixel of reference block and corresponding position in object block can also be subtracted each other Difference diversity factor of the sum of square as two blocks, that is to say, that by two of each position in reference block and object block A pixel executes after subtraction again square, then the operation result of all positions is executed add operation, by add operation result As diversity factor, calculation formula is as follows:
R=∑ (M (i, j)-N (i, j))2
Further, it is also possible to carry out Diversity measure (or similarity measurement) using other way in the prior art, herein It repeats no more.
After obtaining diversity factor, then weight can be calculated according to the negative correlativing relation of diversity factor and weight.
It is alternatively possible to calculate the weight of reference pixel according to the following formula:
W=exp (- r2/sig2),
Wherein, r is the diversity factor of reference block and object block, and sig is empirical, and w is the reference pixel at reference block center Weight.Sig is equivalent to the dispersion degree or otherness of the weight of each reference pixel, the more big then dispersion degree of sig or otherness Smaller, i.e., then the weight of each reference pixel is closer.The size and reference block of sig and the size of object block are positively correlated, that is, are referred to Block and object block are bigger, then sig is bigger, and when reference block and object block are the block of 5x5 size, the size of sig is about 200 or so (such as 180-220).
Optionally, the weight of reference pixel, such as linear function, letter reciprocal can also be calculated according to other functional relations Number etc..
In certain embodiments, reference block and object block can also be calculated by Diversity measure (or similarity measurement) Similarity, calculate weight further according to the positive correlation of similarity and weight.
S14, weighted average is asked to object pixel and all reference pixels according to the weight of object pixel and reference pixel, Using weighted average as the denoising result of object pixel.
Specifically, assuming that the Color Channel of object pixel is R, then object pixel and all reference pixels, that is, object pixel week R pixel all in setting range is enclosed, the denoising result of object pixel is R picture all in setting range around object pixel The weighted average of element, its calculation formula is:
Wherein, T_out is the denoising result of object pixel, and molecular moiety is all in setting range around object pixel The sum of products of R pixel R (i, j) and its weight w (i, j), denominator part are R picture all in setting range around object pixel The sum of the weight w (i, j) of element.
After the completion of a processes pixel, judge whether to have traversed all pixels in image.When do not have traverse image in All pixels when, return step S11 continues to handle next pixel, circulation step S11-S14, until handled figure All pixels as in;When having traversed all pixels in image, the denoising result of all pixels in image is exported, terminates stream Journey.
The image de-noising method of the embodiment of the present invention, by carried out in blocks during denoising Diversity measure come Object pixel is denoised, due to containing the pixel of tri- Color Channels of R, G, B in each piece, take full advantage of R, G, the relation information of B triple channel is denoised, and denoising result maintains the structural information of original image, so that the image after denoising Be capable of more true exquisiteness shows image detail, improves the reduction degree of image, improves the denoising effect of image, so that Final image has higher quality and better visual effect.
Referring to Fig. 5, proposes image de-noising method second embodiment of the invention, the described method comprises the following steps:
S21, choose image in a pixel be used as object pixel, in the setting range around object pixel choose and The identical pixel of the Color Channel of object pixel is as reference pixel.
The block being sized of S22, definition centered on object pixel is object block, is defined centered on reference pixel The block being sized is reference block.
S23, Diversity measures are carried out to two blocks according to all pixels in reference block and object block, based on two blocks Diversity factor calculates the weight of the reference pixel at reference block center, and to the weight assignment of object pixel 1.
In the present embodiment, step S21-S23 is identical as the step S11-S13 in first embodiment respectively, no longer superfluous herein It states.
The weight of reference pixel is adjusted in S24, the difference based on reference pixel and object pixel, by the power after adjusting Recast is the final weight of reference pixel.
When two block similarities are larger (or diversity factor is smaller), and the difference (target at i.e. two block centers of pixel itself The difference of pixel and reference pixel) it is also larger when, edge blurry effect can be generated, in order to avoid generate the above problem, this implementation Difference of the example based on reference pixel and object pixel adjusts the weight of reference pixel.
Optionally, the absolute value for the difference first subtracted each other the reference pixel and object pixel at reference block and object block center As the diversity factor regulated value of two blocks, the diversity factor regulated value for being then based on two blocks calculates the reference pixel at reference block center Weight regulated value, it is finally that the product of the weight of reference pixel and the weight regulated value of reference pixel is final as reference pixel Weight, in which:
The calculation formula of diversity factor regulated value are as follows: rr=| M-N |, wherein M is the reference pixel at reference block center, and N is mesh The object pixel in block is marked, rr is the diversity factor regulated value of reference block and object block;
The calculation formula of weight regulated value are as follows: ww=exp (- rr2/sig_p2), wherein rr is reference block and object block Diversity factor regulated value, sig_p are empirical, and value size is about 10 or so (such as 8-12), and ww is the reference at reference block center The weight regulated value of pixel;
The calculation formula of the final weight of reference pixel are as follows: w=w0* ww, wherein w0For the calculated ginseng of previous step S23 The weight of pixel is examined, ww is weight regulated value, and w is the final weight of reference pixel.
Alternatively it is also possible to square for the difference that the reference pixel and object pixel at reference block and object block center are subtracted each other As the diversity factor regulated value of two blocks, i.e. rr=(M-N)2
The calculating of the denoising result of next step S25 is carried out using the weight after adjusting, would not generate edge blurry Effect.
S25, weighted average is asked to object pixel and all reference pixels according to the weight of object pixel and reference pixel, Using weighted average as the denoising result of object pixel.
This step S25 is identical as the step S14 in first embodiment, and details are not described herein.
After the completion of a processes pixel, judge whether to have traversed all pixels in image.When in not yet traversal image All pixels when, return step S21 continues to handle next pixel, circulation step S21-S24, until handled figure All pixels as in;When having traversed all pixels in image, the denoising result of all pixels in image is exported, terminates stream Journey.
The weight of reference pixel is adjusted in difference of the present embodiment based on reference pixel and object pixel, avoid because Two block similarities are larger while the difference of pixel itself is also larger and lead to the problem of edge blurry effect, further improve The denoising effect of image.
As shown in fig. 6, the application for being the image de-noising method of the image sensor application embodiment of the present invention to obtain image Example, comprising the following steps:
S100, the image that a frame bayer format is obtained from internal storage data stream.
The image of the bayer format of acquisition is original image data, and image effect is as shown in Figure 7.
S200, denoising is carried out to image.
It is alternatively possible to according to the step S11-S14 in aforementioned first embodiment, each of traversal image pixel into Row denoising.
Alternatively it is also possible to according to the step S21-S25 in aforementioned second embodiment, each of traversal image pixel Carry out denoising.
Denoising is carried out to image using the above scheme, due to take full advantage of the relation information of R, G, B triple channel into Row denoising, enable the image after denoising it is more true fine and smooth show image detail, improve the reduction degree of image, mention The denoising effect of image is risen, so that final image has higher quality and better visual effect.
S300, the image after denoising is subjected to demosaicing processing, obtains complete RGB image.
It, can be using at existing Demosaic algorithm when carrying out demosaicing (Demosaic) processing to image Reason.
Alternatively it is also possible to come to carry out demosaicing processing to image in the following ways:
Obtain the channel R/channel B corresponding pixel first level interpolation result and the first vertical interpolation result in image; Obtain the channel R/channel B corresponding pixel horizontal gradient and vertical gradient in image;Judge the horizontal gradient obtained and hangs down The absolute value of difference between vertical ladder degree is greater than 0 and less than the first preset threshold, according to the first level interpolation result of acquisition and The pixel value in the channel R/channel B corresponding pixel channel G in the weighted average reconstruction image of first differential vertical result;It rebuilds The pixel value in the channel R of the corresponding pixel in the channel G and channel B in image;According to the channel R in image and the corresponding pixel of channel B Reconstruction the channel G pixel value reconstruction image in the corresponding pixel in the channel R channel B pixel value and image in channel B The pixel value in the channel R of corresponding pixel.
Using above-mentioned demosaicing processing scheme, the absolute value of the difference between the horizontal gradient and vertical gradient of acquisition When greater than 0 and less than the first preset threshold, according to the weighting of the first level interpolation result of acquisition and the first differential vertical result The pixel value in the channel R or the channel G of the corresponding pixel of channel B in average reconstruction image, reduces pseudo-colours and moire fringes, thus Improve the visual quality of image.
As shown in figure 8, to be complete using finally being obtained after the progress denoising of the image de-noising method of the embodiment of the present invention The details performance of whole RGB image, the image is true and enriches, lines smooth, and color is pure and full, is a panel height quality RGB image.
Referring to Fig. 9, propose that image denoising device first embodiment of the invention, described device traverse each of image Pixel, carries out denoising to each pixel respectively, and described device includes choosing module, definition module, the first computing module With the second computing module, in which:
Choose module: for choosing setting model of the pixel as object pixel, around object pixel in image Interior selection pixel identical with the Color Channel of object pixel is enclosed as reference pixel.
Selection module successively chooses the pixel in image and usually carries out denoising as target picture, when a processes pixel After the completion, the next pixel of reselection, until all pixels in traversal image, until all pixels complete denoising.
When choosing reference pixel, the size of setting range be can be set as needed, and theoretically, range is the bigger the better. Optionally, choosing the range that module finally determines is a region centered on object pixel, will fall institute in the area There is pixel identical with the Color Channel of object pixel to be chosen for reference pixel.
Definition module: being object block for defining the block being sized centered on object pixel, defines with reference image The block being sized centered on element is reference block.
Each reference pixel corresponds to a reference block, therefore finally defines an object block and multiple reference blocks.Mesh Mark block is identical as the size of reference block, and the size of the two can be set as needed, and theoretically be the bigger the better.For example, can incite somebody to action Object block and reference block are defined as the block of 5x5 size.
First computing module: for carrying out otherness degree to two blocks according to all pixels in reference block and object block Amount, the diversity factor based on two blocks calculate the weight of the reference pixel at reference block center, obtain each reference pixel accordingly Weight, and to the weight assignment of object pixel 1.Then by the weight of calculated object pixel and the power of all reference pixels It is resent to the second computing module.
First computing module need to calculate the weight of each reference pixel, and the embodiment of the present invention is corresponding according to reference pixel Reference block and the diversity factor of object block calculate the weight of the reference pixel.Due to contained in reference block and object block R, G, Relationship between triple channel is sufficiently associated, is made by carrying out Diversity measure to two blocks by the pixel in tri- channels B The denoising result obtained finally contains the relation information of triple channel.Since the weight of reference pixel is for object pixel , and object pixel is 1 relative to the weight of itself, therefore to the weight assignment of object pixel 1.
As shown in figure 9, the first computing module includes Diversity measure unit and weight calculation unit, Diversity measure unit For carrying out Diversity measure to two blocks according to all pixels in reference block and object block, weight unit is used to be based on two The diversity factor (or similarity) of block calculates the weight of the reference pixel at reference block center, and to the weight assignment of object pixel 1.
Optionally, Diversity measure unit is when carrying out Diversity measure (or similarity measurement), can by reference block with Diversity factor of the sum of the absolute value of difference that the pixel of corresponding position is subtracted each other in object block as two blocks, that is to say, that will join Examine each position in block and object block two pixels execute subtraction after take absolute value, then by the operation knot of all positions Fruit executes add operation, and using add operation result as diversity factor, calculation formula is as follows:
R=∑ | M (i, j)-N (i, j) |,
Wherein, M (i, j) and N (i, j) is respectively two pixels that coordinate position is (i, j) in reference block and object block, r For the diversity factor of reference block and object block.By taking the block of 5x5 size as an example, 25 positions are shared, two blocks are corresponding to be subtracted each other and take absolutely To after value obtain 25 numerical value, 25 numerical value are added up be exactly two blocks diversity factor.
Optionally, when carrying out Diversity measure, Diversity measure unit can also be corresponding in object block by reference block Diversity factor of the sum of square for the difference that the pixel of position is subtracted each other as two blocks, that is to say, that will be in reference block and object block Two pixels of each position execute after subtraction again square, then the operation result of all positions is executed add operation, Using add operation result as diversity factor, calculation formula is as follows:
R=∑ (M (i, j)-N (i, j))2
Further, it is also possible to carry out Diversity measure (or similarity measurement) using other way in the prior art, herein It repeats no more.
After obtaining diversity factor, weight calculation unit can then calculate power according to the negative correlativing relation of diversity factor and weight Weight.
Optionally, weight calculation unit can calculate the weight of reference pixel according to the following formula:
W=exp (- r2/sig2),
Wherein, r is the diversity factor of reference block and object block, and sig is empirical, and w is the reference pixel at reference block center Weight.Sig is equivalent to the dispersion degree or otherness of the weight of each reference pixel, the more big then dispersion degree of sig or otherness Smaller, i.e., then the weight of each reference pixel is closer.The size and reference block of sig and the size of object block are positively correlated, that is, are referred to Block and object block are bigger, then sig is bigger, and when reference block and object block are the block of 5x5 size, the size of sig is about 200 or so (such as 180-220).
Optionally, the weight of reference pixel, such as linear function, letter reciprocal can also be calculated according to other functional relations Number etc..
In certain embodiments, Diversity measure unit can also be calculated by Diversity measure (or similarity measurement) The similarity of reference block and object block, weight calculation unit calculate weight further according to the positive correlation of similarity and weight.
Second computing module: for the weight according to object pixel and reference pixel to object pixel and all reference pixels Weighted average is sought, using weighted average as the denoising result of object pixel.
Specifically, assuming that the Color Channel of object pixel is R, then object pixel and all reference pixels, that is, object pixel week R pixel all in setting range is enclosed, the denoising result of object pixel is R picture all in setting range around object pixel The weighted average of element, its calculation formula is:
Wherein, T_out is the denoising result of object pixel, and molecular moiety is all in setting range around object pixel The sum of products of R pixel R (i, j) and its weight w (i, j), denominator part are R picture all in setting range around object pixel The sum of the weight w (i, j) of element.
After traversing all pixels in image, image denoising device exports the denoising result of all pixels.
The image denoising device of the embodiment of the present invention, by carried out in blocks during denoising Diversity measure come Object pixel is denoised, due to containing the pixel of tri- Color Channels of R, G, B in each piece, take full advantage of R, G, the relation information of B triple channel is denoised, and denoising result maintains the structural information of original image, so that the image after denoising Be capable of more true exquisiteness shows image detail, improves the reduction degree of image, improves the denoising effect of image, so that Final image has higher quality and better visual effect.
Referring to Figure 10, image denoising device second embodiment of the invention, base of the present embodiment in first embodiment are proposed Weight regulatory function is increased on plinth for the first computing module.
As shown in Figure 10, the first computing module includes that Diversity measure unit, weight calculation unit and weight adjust unit, Diversity measure unit and weight calculation unit are identical with the first embodiment.Weight calculation unit calculates the weight of reference pixel Afterwards, weight adjusting unit is sent to be adjusted;Weight adjusts difference of the unit based on reference pixel and object pixel to reference The weight of pixel is adjusted, and the weight final as reference pixel of the weight after adjusting is sent to the second computing module.
Optionally, weight adjusts what unit first subtracted each other the reference pixel and object pixel at reference block and object block center Diversity factor regulated value of the absolute value of difference as two blocks, the diversity factor regulated value for being then based on two blocks calculate in reference block The weight regulated value of the reference pixel of the heart, finally using the weight of reference pixel and the product of the weight regulated value of reference pixel as The final weight of reference pixel, in which:
The calculation formula of diversity factor regulated value are as follows: rr=| M-N |, wherein M is the reference pixel at reference block center, and N is mesh The object pixel in block is marked, rr is the diversity factor regulated value of reference block and object block;
The calculation formula of weight regulated value are as follows: ww=exp (- rr2/sig_p2), wherein rr is reference block and object block Diversity factor regulated value, sig_p are empirical, and value size is about 10 or so (such as 8-12), and ww is the reference at reference block center The weight regulated value of pixel;
The calculation formula of the final weight of reference pixel are as follows: w=w0* ww, wherein w0It is calculated for weight calculation unit The weight of reference pixel, ww are weight regulated value, and w is the final weight of reference pixel.
Optionally, weight adjusts unit and can also subtract each other reference block and the reference pixel at object block center with object pixel Difference the diversity factor regulated value square as two blocks, i.e. rr=(M-N)2
The weight of reference pixel is adjusted in difference of the present embodiment based on reference pixel and object pixel, avoid because Two block similarities are larger while the difference of pixel itself is also larger and lead to the problem of edge blurry effect, further improve The denoising effect of image.
It should be understood that image denoising device provided by the above embodiment belong to image de-noising method embodiment it is same Design, specific implementation process is detailed in embodiment of the method, and the technical characteristic in embodiment of the method is right in Installation practice It should be applicable in, which is not described herein again.
The image de-noising method and device of the embodiment of the present invention are particularly suitable for the image of bayer format or similar Denoising is carried out in the image of bayer format.
The image de-noising method and device of the embodiment of the present invention can be applied to the computers such as PC, terminating machine and set It is standby, it also can be applied to the camera installations such as camera, video camera, the mobile terminals such as mobile phone, plate can also be applied to.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device or the network equipment etc.) execute method described in each embodiment of the present invention.
It should be understood that the above is only a preferred embodiment of the present invention, the scope of the patents of the invention cannot be therefore limited, It is all to utilize equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, it is applied directly or indirectly in Other related technical areas are included within the scope of the present invention.

Claims (8)

1. a kind of image denoising device, which is characterized in that described device traverses each of image pixel, respectively to each Pixel carries out denoising, comprising:
Module is chosen, for choosing a pixel in described image as object pixel, setting around the object pixel Determine to choose pixel identical with the Color Channel of the object pixel in range as reference pixel;
Definition module is object block for defining the block being sized centered on the object pixel, is defined with the ginseng Examining the block being sized centered on pixel is reference block, the corresponding reference block of each reference pixel;
First computing module, for according to the reference block and all pixels in the object block to the reference block and described Object block carry out Diversity measure, obtain the diversity factor of the reference block Yu the object block, be based on the reference block with it is described The diversity factor of object block calculates the weight of the reference pixel at the reference block center, obtains each described reference image accordingly The weight of element, and to the weight assignment of the object pixel 1, wherein the diversity factor and the weight are negatively correlated;Wherein, described First computing module further includes that weight adjusts unit, and the weight adjusts unit and is used for the reference at the reference block center The absolute value for the difference that the object pixel in pixel and the object block subtracts each other is as the reference block and the object block Diversity factor regulated value, the diversity factor regulated value based on the reference block and the object block calculates the institute at the reference block center The weight regulated value for stating reference pixel makees the weight of the reference pixel and the product of the weight regulated value of the reference pixel For the weight that the reference pixel is final;
Second computing module, for the object pixel and being owned according to the weight of the object pixel and the reference pixel The reference pixel seeks weighted average, using the weighted average as the denoising result of the object pixel.
2. image denoising device according to claim 1, which is characterized in that first computing module includes otherness degree Unit is measured, the Diversity measure unit is used for: the pixel of corresponding position in the reference block and the object block is subtracted each other Diversity factor of the sum of the absolute value of difference as the reference block and the object block.
3. image denoising device according to claim 1, which is characterized in that first computing module includes weight calculation Unit, the weight calculation unit are used for:
According to formula w=exp (- r2/sig2) calculate the reference block center the reference pixel weight, wherein r is institute The diversity factor of reference block Yu the object block is stated, sig is empirical, and w is the reference pixel at the reference block center Weight.
4. image denoising device according to claim 1-3, which is characterized in that the weight adjusts unit and uses In:
According to formula ww=exp (- rr2/sig_p2) calculate the reference block center the reference pixel weight regulated value, Wherein, rr is the diversity factor regulated value of the reference block and the object block, and sig_p is empirical, and ww is the reference block The weight regulated value of the reference pixel at center.
5. a kind of image de-noising method, which is characterized in that comprising steps of
Choose image in a pixel be used as object pixel, in the setting range around the object pixel selection with it is described The identical pixel of the Color Channel of object pixel is as reference pixel;
The block being sized defined centered on the object pixel is object block, is defined centered on the reference pixel The block being sized is reference block, the corresponding reference block of each reference pixel;
Otherness is carried out to the reference block and the object block according to all pixels in the reference block and the object block Measurement, obtains the diversity factor of the reference block Yu the object block, based on the diversity factor of the reference block and the object block The weight for calculating the reference pixel at the reference block center obtains the weight of each reference pixel accordingly, and to institute The weight assignment 1 of object pixel is stated, wherein the diversity factor and the weight are negatively correlated;By the ginseng at the reference block center The absolute value for the difference that the object pixel in pixel and the object block subtracts each other is examined as the reference block and the target The diversity factor regulated value of block, the diversity factor regulated value based on the reference block and the object block calculate the reference block center The weight regulated value of the reference pixel, by the product of the weight of the reference pixel and the weight regulated value of the reference pixel The weight final as the reference pixel;
The object pixel and all reference pixels are asked according to the weight of the object pixel and the reference pixel and added Weight average value, using the weighted average as the denoising result of the object pixel;
Each of traversal described image pixel repeats above-mentioned steps.
6. image de-noising method according to claim 5, which is characterized in that described according to the reference block and the target All pixels in block carry out Diversity measure to the reference block and the object block and include:
The sum of the absolute value of difference that the pixel of corresponding position in the reference block and the object block is subtracted each other is used as the ginseng Examine the diversity factor of block Yu the object block.
7. image de-noising method according to claim 5, which is characterized in that described to be based on the reference block and the target The weight that the diversity factor of block calculates the reference pixel at the reference block center includes:
According to formula w=exp (- r2/sig2) calculate the reference block center the reference pixel weight, wherein r is institute The diversity factor of reference block Yu the object block is stated, sig is empirical, and w is the reference pixel at the reference block center Weight.
8. according to the described in any item image de-noising methods of claim 5-7, which is characterized in that it is described based on the reference block with The weight regulated value that the diversity factor regulated value of the object block calculates the reference pixel at the reference block center includes:
According to formula ww=exp (- rr2/sig_p2) calculate the reference block center the reference pixel weight regulated value, Wherein, rr is the diversity factor regulated value of the reference block and the object block, and sig_p is empirical, and ww is the reference block The weight regulated value of the reference pixel at center.
CN201610186820.3A 2016-03-29 2016-03-29 Image de-noising method and device Active CN105678718B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610186820.3A CN105678718B (en) 2016-03-29 2016-03-29 Image de-noising method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610186820.3A CN105678718B (en) 2016-03-29 2016-03-29 Image de-noising method and device

Publications (2)

Publication Number Publication Date
CN105678718A CN105678718A (en) 2016-06-15
CN105678718B true CN105678718B (en) 2019-11-15

Family

ID=56224531

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610186820.3A Active CN105678718B (en) 2016-03-29 2016-03-29 Image de-noising method and device

Country Status (1)

Country Link
CN (1) CN105678718B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110517206B (en) * 2019-09-05 2021-10-15 锐芯微电子股份有限公司 Method and device for eliminating color moire
CN113240607A (en) * 2021-05-26 2021-08-10 Oppo广东移动通信有限公司 Image denoising method and device, electronic equipment and storage medium
CN113596401A (en) * 2021-07-29 2021-11-02 上海应用技术大学 Image de-similarity transmission and restoration method based on ORB similarity judgment
CN117911405B (en) * 2024-03-19 2024-05-24 济南科汛智能科技有限公司 X-ray image processing method for dental pulp and dental body detection

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464997B (en) * 2009-01-21 2013-02-13 北京中星微电子有限公司 Method and device for removing noise
KR101674078B1 (en) * 2009-12-16 2016-11-08 삼성전자 주식회사 Method and apparatus for block-based image denoising
CN102509269B (en) * 2011-11-10 2014-04-02 重庆工业职业技术学院 Image denoising method combined with curvelet and based on image sub-block similarity
CN103679639B (en) * 2012-09-05 2017-05-24 北京大学 Image denoising method and device based on non-local mean value
CN104376540B (en) * 2014-12-01 2017-02-22 北京思比科微电子技术股份有限公司 Bayer image denoising method
CN104978715B (en) * 2015-05-11 2017-08-11 中国科学院光电技术研究所 Non-local mean image denoising method based on filtering window and parameter self-adaption

Also Published As

Publication number Publication date
CN105678718A (en) 2016-06-15

Similar Documents

Publication Publication Date Title
CN107945125B (en) Fuzzy image processing method integrating frequency spectrum estimation method and convolutional neural network
CN103606132B (en) Based on the multiframe Digital Image Noise method of spatial domain and time domain combined filtering
CN107578392B (en) Convolution neural network demosaicing method based on residual interpolation
CN105678718B (en) Image de-noising method and device
US9842382B2 (en) Method and device for removing haze in single image
CN104867159B (en) A kind of digital camera sensor dust detection and stage division and device
US10521885B2 (en) Image processing device and image processing method
CN109064418B (en) Non-local mean value-based non-uniform noise image denoising method
KR101634562B1 (en) Method for producing high definition video from low definition video
JP4858609B2 (en) Noise reduction device, noise reduction method, and noise reduction program
US9123102B2 (en) Image processing apparatus, imaging apparatus, image processing method, and computer readable medium storing instructions for performing image correction
WO2009005497A1 (en) Apparatus and method for reducing artifacts in images
KR101225056B1 (en) Apparatus and method for reducing noise from image sensor
CN103595981B (en) Based on the color filter array image demosaicing method of non-local low rank
CN110944176B (en) Image frame noise reduction method and computer storage medium
CN110796615A (en) Image denoising method and device and storage medium
CN113822830B (en) Multi-exposure image fusion method based on depth perception enhancement
CN102103751A (en) Foreground image extraction method and device
CN111784605A (en) Image denoising method based on region guidance, computer device and computer readable storage medium
CN108734668B (en) Image color recovery method and device, computer readable storage medium and terminal
CN111179195B (en) Depth image cavity filling method and device, electronic equipment and storage medium thereof
Sandić-Stanković et al. Fast blind quality assessment of DIBR-synthesized video based on high-high wavelet subband
CN110866882A (en) Layered joint bilateral filtering depth map restoration algorithm based on depth confidence
CN105357517B (en) The image detecting method and device of screen
CN114519676A (en) Bayer format-based raw image denoising device and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant