CN112053295A - Image noise reduction method and device, computer equipment and storage medium - Google Patents

Image noise reduction method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112053295A
CN112053295A CN202010847831.8A CN202010847831A CN112053295A CN 112053295 A CN112053295 A CN 112053295A CN 202010847831 A CN202010847831 A CN 202010847831A CN 112053295 A CN112053295 A CN 112053295A
Authority
CN
China
Prior art keywords
dimensional
image
threshold
block
coefficient
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.)
Granted
Application number
CN202010847831.8A
Other languages
Chinese (zh)
Other versions
CN112053295B (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.)
Zhuhai Jieli Technology Co Ltd
Original Assignee
Zhuhai Jieli 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 Zhuhai Jieli Technology Co Ltd filed Critical Zhuhai Jieli Technology Co Ltd
Priority to CN202010847831.8A priority Critical patent/CN112053295B/en
Publication of CN112053295A publication Critical patent/CN112053295A/en
Application granted granted Critical
Publication of CN112053295B publication Critical patent/CN112053295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

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

Abstract

The application relates to an image noise reduction method, an image noise reduction device, computer equipment and a storage medium. The method comprises the steps of obtaining a plurality of fixed image blocks from an image to be denoised, carrying out 2D conversion to obtain two-dimensional coefficients corresponding to the image blocks, carrying out 1D conversion on three-dimensional coefficients formed by the two-dimensional coefficients of the image blocks to obtain corresponding first one-dimensional coefficients, carrying out reduction processing on the first one-dimensional coefficients smaller than a one-dimensional threshold to obtain second one-dimensional coefficients corresponding to the image blocks, carrying out 1D inverse conversion on the second one-dimensional coefficients to obtain new two-dimensional coefficients corresponding to the image blocks, carrying out 2D inverse conversion on the new two-dimensional coefficients to obtain corresponding denoised image blocks, and restoring the denoised image blocks to the positions of the fixed image block position parameters in the image to obtain the denoised image. Compared with the traditional noise reduction method, the method has the advantages that the fixed image blocks and the transformation of the multiple dimensional coefficients are utilized to reduce the noise of the image, and the noise reduction effect of the image is improved.

Description

Image noise reduction method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image denoising method and apparatus, a computer device, and a storage medium.
Background
In real life, due to the environment or the sensor, noise is introduced into a shot image, and noise is introduced into a digital image in the transmission process, so that the quality of the obtained image is not high, the visual effect of a user is affected, the subsequent processing of the image is affected, and the noise reduction processing needs to be performed on the image.
The current method for denoising images usually utilizes spatial domain processing or transform domain processing, such as gaussian filtering, mean filtering, wavelet denoising, CNN image denoising, etc. However, none of these methods can remove noise well.
Therefore, the existing image noise reduction method has the defect of poor noise reduction effect.
Disclosure of Invention
In view of the above, it is necessary to provide an image denoising method, an apparatus, a computer device, and a storage medium capable of improving a denoising effect.
A method of image noise reduction, the method comprising:
acquiring an image to be denoised and image denoising parameters; the image noise reduction parameters comprise one-dimensional threshold values and fixed image block position parameters;
acquiring a plurality of image blocks from the image according to the position parameters of the fixed image blocks;
respectively carrying out 2D conversion on the plurality of image blocks to obtain two-dimensional coefficients corresponding to the image blocks; performing 1D conversion on a three-dimensional coefficient formed by the two-dimensional coefficients of the image blocks to obtain a first one-dimensional coefficient corresponding to each image block; carrying out reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain a second one-dimensional coefficient corresponding to each image block;
carrying out 1D inverse transformation on a plurality of second one-dimensional coefficients corresponding to the plurality of image blocks, and obtaining new two-dimensional coefficients corresponding to the plurality of image blocks according to the coefficients subjected to the 1D inverse transformation; carrying out 2D inverse transformation on the new two-dimensional coefficients corresponding to the image blocks to obtain noise reduction image blocks corresponding to the image blocks;
and restoring each noise-reduced image block to the position corresponding to the position parameter of the fixed image block in the image to obtain the noise-reduced image.
In one embodiment, the obtaining a plurality of image blocks from the image according to the fixed image block location parameter includes:
traversing the image to be denoised by moving a search window; the size of the search window is not larger than that of the image to be denoised;
extracting a plurality of corresponding image blocks from the current traversal position of the search window according to the fixed image block position parameters; the image blocks are the same size and comprise overlapping pixels; the size of the image block is not larger than the size of the search window.
In one embodiment, the reducing the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain the second one-dimensional coefficient corresponding to each image block includes:
and setting the first one-dimensional coefficient smaller than the one-dimensional threshold value to be 0 to obtain a second one-dimensional coefficient corresponding to each image block.
In one embodiment, the reducing the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain a second one-dimensional coefficient corresponding to each image block includes:
according to the transition distance corresponding to the one-dimensional threshold, carrying out reduction processing on a first one-dimensional coefficient which is smaller than the one-dimensional threshold and has a distance with the one-dimensional threshold smaller than or equal to the transition distance, and setting a first one-dimensional coefficient which is smaller than the one-dimensional threshold and has a distance with the one-dimensional threshold larger than the transition distance to 0 to obtain a second one-dimensional coefficient of each image block; the transition distance is an interval which is smaller than the one-dimensional threshold and is a preset length.
In one embodiment, the reducing, according to the transition distance corresponding to the one-dimensional threshold, a first one-dimensional coefficient that is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is smaller than or equal to the transition distance, and setting a first one-dimensional coefficient that is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is greater than the transition distance to 0, to obtain a second one-dimensional coefficient corresponding to each image block includes:
if the first one-dimensional coefficient is larger than or equal to the one-dimensional threshold, taking the first one-dimensional coefficient as a corresponding second one-dimensional coefficient;
if the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance between the first one-dimensional coefficient and the one-dimensional threshold is smaller than or equal to the transition distance, acquiring a quotient of the one-dimensional threshold and the transition distance and a difference between the first one-dimensional coefficient and the minimum value in the transition distance, and acquiring a product of the quotient and the difference to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient;
and if the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance between the first one-dimensional coefficient and the one-dimensional threshold is larger than the transition distance, setting the first one-dimensional coefficient to be 0 to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient.
In one embodiment, the image denoising parameters further include: a two-dimensional threshold, a texture threshold, and a second weight; the second weight has a value in the range of 0 to 1;
the reducing each noise-reduced image block to a position corresponding to the position parameter of the fixed image block in the image to obtain a noise-reduced image includes:
acquiring a texture block in each fixed image block; the texture block is obtained based on the two-dimensional coefficient corresponding to each image block, the two-dimensional threshold and the texture threshold;
and compensating the pixel values to the position parameters of the fixed image blocks according to the pixel values in the texture blocks, the pixel values corresponding to the noise-reduced image blocks and the second weight to obtain the noise-reduced image.
In one embodiment, the obtaining the texture block in each of the fixed image blocks includes:
counting the number of two-dimensional coefficients which are larger than the two-dimensional threshold in the two-dimensional coefficients corresponding to each image block;
and if the number is larger than the texture threshold, taking the image block as a texture block.
In one embodiment, the image denoising parameters further include: a texture window threshold and a first weight; the first weight has a value in the range of 0 to 1;
if the total number of the two-dimensional coefficients in each texture block is larger than a texture window threshold value, determining an area formed by each texture block as a texture window; if it is determined that the area formed by each texture block is a texture window, the method further includes, according to the transition distance corresponding to the one-dimensional threshold, performing reduction processing on a first one-dimensional coefficient which is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is smaller than or equal to the transition distance, setting a first one-dimensional coefficient which is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is greater than the transition distance to 0, and before obtaining a second one-dimensional coefficient corresponding to each image block:
acquiring the product of the one-dimensional threshold and the first weight as a new one-dimensional threshold;
and acquiring the product of the transition distance and the first weight as a new transition distance.
In one embodiment, the compensating the pixel values to the fixed image block position parameters according to the pixel values in the texture block, the pixel values corresponding to the noise-reduced image block, and the second weight to obtain the noise-reduced image includes:
acquiring a product of a pixel value corresponding to the noise-reduced image block and the second weight, and taking the product as a first compensation pixel value;
obtaining the product of the pixel value in the texture block and the third weight as a second compensation pixel value; the sum of the third weight and the second weight is 1;
and compensating the sum of the first compensation pixel value and the second compensation pixel value to the position parameter of the fixed image block to obtain the noise-reduced image.
An image noise reduction apparatus, the apparatus comprising:
the first acquisition module is used for acquiring an image to be denoised and image denoising parameters; the image noise reduction parameters comprise one-dimensional threshold values and fixed image block position parameters;
the second obtaining module is used for obtaining a plurality of image blocks from the image according to the position parameters of the fixed image blocks;
the first transformation module is used for respectively carrying out 2D transformation on the plurality of image blocks to obtain two-dimensional coefficients corresponding to the image blocks; performing 1D conversion on a three-dimensional coefficient formed by the two-dimensional coefficients of the image blocks to obtain a first one-dimensional coefficient corresponding to each image block; carrying out reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain a second one-dimensional coefficient corresponding to each image block;
the second transformation module is used for performing 1D inverse transformation on a plurality of second one-dimensional coefficients corresponding to the plurality of image blocks, and obtaining new two-dimensional coefficients corresponding to the plurality of image blocks according to the coefficients subjected to the 1D inverse transformation; carrying out 2D inverse transformation on the new two-dimensional coefficients corresponding to the image blocks to obtain noise reduction image blocks corresponding to the image blocks;
and the restoring module is used for restoring each denoising image block to the position corresponding to the fixed image block position parameter in the image to obtain a denoised image.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The image denoising method, the device, the computer equipment and the storage medium acquire a plurality of image blocks from an image to be denoised by utilizing fixed image block position parameters, perform 2D conversion on the plurality of image blocks to obtain two-dimensional coefficients corresponding to the image blocks, perform 1D conversion on three-dimensional coefficients formed by the two-dimensional coefficients of the plurality of image blocks to obtain first one-dimensional coefficients corresponding to the image blocks, perform reduction processing on first one-dimensional coefficients smaller than a one-dimensional threshold to obtain second one-dimensional coefficients corresponding to the image blocks, perform 1D inverse conversion on the second one-dimensional coefficients corresponding to the image blocks to obtain new two-dimensional coefficients corresponding to the image blocks, perform 2D inverse conversion on the new two-dimensional coefficients to obtain denoised image blocks corresponding to the image blocks, and restore the denoised image blocks to positions corresponding to the fixed image block position parameters in the image, and obtaining the noise-reduced image. Compared with the traditional noise reduction method, the method has the advantages that the fixed image blocks and the transformation of the plurality of dimensional coefficients are utilized to reduce noise of the image, and the noise reduction effect of the image is improved.
Drawings
FIG. 1 is a diagram illustrating an exemplary embodiment of an application environment of an image denoising method;
FIG. 2 is a flow diagram illustrating a method for image denoising in one embodiment;
FIG. 3 is a diagram illustrating the structure of a search window and an image block in one embodiment;
FIG. 4 is a schematic illustration of a transition distance in one embodiment;
FIG. 5 is a flowchart illustrating an image denoising method according to another embodiment;
FIG. 6 is a flowchart illustrating an image denoising method according to another embodiment;
FIG. 7 is a block diagram showing the structure of an image noise reducing apparatus according to an embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The image denoising method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may obtain an image to be denoised and image denoising parameters from the server 104, the terminal 102 may further obtain a plurality of image blocks from the image according to fixed image block position parameters in the image denoising parameters, perform 2D transformation, 1D inverse transformation and 2D inverse transformation based on the plurality of image blocks to obtain denoising image blocks corresponding to the image blocks, and restore the denoising image blocks to positions corresponding to the fixed image block position parameters in the image to achieve denoising of the image. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, an image denoising method is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
step S202, obtaining an image to be denoised and image denoising parameters; the image noise reduction parameters comprise one-dimensional threshold values and fixed image block position parameters.
The image to be denoised may be obtained from the server 104, or may be obtained locally from the terminal 102; the image to be denoised can be an image with noise data or noise points, the image to be denoised can be any size, and the terminal 102 can also acquire image denoising parameters, including a one-dimensional threshold and fixed image block position parameters. The one-dimensional threshold may be a threshold used for performing threshold processing on a one-dimensional coefficient, the threshold processing may be processing for dividing an interested foreground and an uninteresting background of an image, and the one-dimensional coefficient may be a coefficient obtained by performing 1D transform on the image and may be used for performing noise reduction processing on the image; the fixed image block location parameter may be a fixed image block divided based on the image to be denoised, each image block may be a block not greater than the image to be denoised, and there may also be a corresponding location parameter. The position parameters of the fixed image blocks can be determined through preset parameter configuration of the upper computer, and can be adjusted according to actual conditions, such as the upper left corner, the upper right corner, the lower left corner, the lower right corner and the middle in the search window. It should be noted that the number of the fixed image blocks in the search window may be set according to actual situations. In some embodiments, the image to be denoised may be an image subjected to certain pre-processing, specifically, the terminal 102 may first acquire a captured image, perform graying processing on the image to obtain a grayscale image, and perform image denoising based on the grayscale image.
In addition, the terminal 102 may also denoise the R, G, B components and the Y, U, V components. Generally, many image pickup apparatuses store YUV component data.
And step S204, acquiring a plurality of image blocks from the image according to the fixed image block position parameters.
The fixed image block location parameter may be location parameters of a plurality of fixed image blocks determined from the image to be denoised, and the terminal 102 may obtain a plurality of image blocks from the image according to the location parameters, where the image blocks may be blocks not greater than the image.
Specifically, the terminal 102 may traverse the image to be denoised by moving the search window; wherein the size of the search window is not larger than the size of the image to be denoised; extracting a plurality of corresponding image blocks from the current traversal position of the search window according to the fixed image block position parameters; wherein the plurality of image blocks are the same size and comprise overlapping pixels; the size of the image block is not larger than the size of the search window. The image block may be a block determined from a search window with a preset size, as shown in fig. 3, where fig. 3 is a schematic structural diagram of the search window and the image block in an embodiment. The search window may be an area not larger than a preset size of the image, and the terminal 102 may determine a plurality of image blocks from the search window, and positions of the image blocks may be fixed with respect to the search window, as shown in fig. 3, a size of each image block in the search window may be 8x8, each image block may be composed of a plurality of small blocks, a size of each small block may be 4x4, 4 small blocks may constitute one image block, and 16 small blocks may constitute the search window. The image blocks within a search window may be in the upper left corner, the upper right corner, the lower left corner, the lower right corner, and the middle, respectively. The positions of the image blocks can be set according to actual conditions, and each block and the middle block are overlapped by only one small block, such as a dark shaded part in fig. 3. The terminal 102 may traverse the image by using the search window, and the step length of the search window moving in the image may be 4 each time, so that the number of times of sliding the search window is reduced. Moreover, as can be seen from fig. 3, the image blocks corresponding to the upper left corner and the lower left corner in the third search window are actually the image blocks of the upper right corner and the lower right corner in the first search window, so that the frequency of dimension transformation in the window can be further reduced.
Step S206, respectively carrying out 2D conversion on the plurality of image blocks to obtain two-dimensional coefficients corresponding to the image blocks; performing 1D conversion on a three-dimensional coefficient formed by two-dimensional coefficients of a plurality of image blocks to obtain a first one-dimensional coefficient corresponding to each image block; and performing reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain a second one-dimensional coefficient corresponding to each image block.
The 2D transform may be a transform method for image processing, and the 2D transform may be a transform using a DCT method, that is, a 2D DCT transform, and may also be referred to as a two-dimensional discrete cosine transform. The terminal 102 may perform 2D transformation on the plurality of image blocks in the search window to obtain two-dimensional coefficients corresponding to the image blocks.
The terminal 102 may further perform 1D transformation on a three-dimensional coefficient formed by two-dimensional coefficients of the plurality of image blocks to obtain a first one-dimensional coefficient corresponding to each image block, and specifically, the terminal 102 may establish a 3D matrix with a size of 5x8x8 for the 5 fixed image blocks through the two-dimensional coefficients, and perform 1D transformation, for example, 1D DCT transformation on a third dimension of the 3D matrix, that is, a Z-axis direction of XYZ, to obtain a first one-dimensional coefficient.
The terminal 102 may perform threshold processing on the first one-dimensional coefficient, for example, perform reduction processing according to the one-dimensional threshold, and the reduction processing may be reduction processing of a hard threshold based on the one-dimensional threshold, or reduction processing of a weight threshold based on the one-dimensional threshold. The hard threshold reduction processing may be to set a first one-dimensional coefficient smaller than the one-dimensional threshold to 0 to obtain a second one-dimensional coefficient corresponding to each image block, and specifically, the processing formula may be as follows:
Figure BDA0002643683860000081
where C (u, v) is the first one-dimensional coefficient C (in) after 1D transformation, T2 is the one-dimensional threshold, and C' (u, v) is the second one-dimensional coefficient after threshold processing.
Step S208, carrying out 1D inverse transformation on a plurality of second one-dimensional coefficients corresponding to the plurality of image blocks, and obtaining new two-dimensional coefficients corresponding to the plurality of image blocks according to the coefficients subjected to the 1D inverse transformation; and carrying out 2D inverse transformation on the new two-dimensional coefficients corresponding to the image blocks to obtain the noise reduction image blocks corresponding to the image blocks.
The second one-dimensional coefficients may be the one-dimensional coefficients obtained after the 1D transform and the threshold processing, the terminal 102 may perform a 1D inverse transform, for example, a 1D DCT inverse transform, on the plurality of second one-dimensional coefficients corresponding to the plurality of image blocks to obtain new two-dimensional coefficients corresponding to the plurality of image blocks after the 1D inverse transform, and the terminal 102 may further perform a 2D inverse transform, for example, a 2DDCT inverse transform, on the new two-dimensional coefficients corresponding to the respective image blocks to obtain noise-reduced image blocks corresponding to the respective image blocks. Specifically, the number of the obtained noise reduction image blocks may be 5.
And S210, restoring each noise-reduced image block to a position corresponding to the position parameter of the fixed image block in the image to obtain a noise-reduced image.
The noise-reduced image blocks may be noise-reduced image blocks corresponding to the image blocks in the search window obtained through the 1D inverse transformation and the 2D inverse transformation, for example, 5 noise-reduced image blocks may be obtained, the terminal 102 may reduce each noise-reduced image block to a position corresponding to the fixed image block position parameter in the image, obtain a noise-reduced image, for example, may determine a texture region in the image block based on a plurality of thresholds and weights, and reduce the noise-reduced image blocks to the texture region. The image blocks in one search window may be overlapped or different image block keys may also be overlapped with pixels, the terminal 102 may restore the noise-reduced image blocks to the initial positions, that is, the positions corresponding to the above-mentioned fixed image block position parameters, according to the preset weights, the terminal 102 may traverse the entire image by moving the search window, and after moving each time, perform noise reduction and restoration on the image blocks in the search window until the noise reduction of the entire image is completed.
In the image denoising method, a plurality of image blocks are obtained from an image to be denoised by using the fixed image block position parameters, 2D transforming the image blocks to obtain two-dimensional coefficients corresponding to the image blocks, 1D transforming three-dimensional coefficients composed of the two-dimensional coefficients of the image blocks to obtain first one-dimensional coefficients corresponding to the image blocks, and performing reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain a second one-dimensional coefficient corresponding to each image block, performing 1D inverse transformation on the second one-dimensional coefficients corresponding to the image blocks to obtain new two-dimensional coefficients corresponding to each image block, carrying out 2D inverse transformation on the new two-dimensional coefficients to obtain noise-reduced image blocks corresponding to the image blocks, and restoring each noise-reduced image block to a position corresponding to the position parameter of the fixed image block in the image to obtain the noise-reduced image. Compared with the traditional noise reduction method, the method has the advantages that the fixed image blocks and the transformation of the plurality of dimensional coefficients are utilized to reduce noise of the image, and the noise reduction effect of the image is improved.
In one embodiment, the reducing the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain the second one-dimensional coefficient corresponding to each image block includes: according to the transition distance corresponding to the one-dimensional threshold, carrying out reduction processing on a first one-dimensional coefficient which is smaller than the one-dimensional threshold and has a distance with the one-dimensional threshold smaller than or equal to the transition distance, and setting a first one-dimensional coefficient which is smaller than the one-dimensional threshold and has a distance with the one-dimensional threshold larger than the transition distance to 0 to obtain a second one-dimensional coefficient of each image block; the transition distance is an interval which is smaller than a one-dimensional threshold value and is a preset length.
In the present embodiment, the reduction process for the first one-dimensional coefficient may be a reduction process based on a weight threshold. The terminal 102 may perform reduction processing on the first one-dimensional coefficient that is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is smaller than or equal to the transition distance according to the transition distance corresponding to the one-dimensional threshold, and may set the first one-dimensional coefficient that is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is greater than the transition distance to 0. The transition distance may be an interval which is smaller than the one-dimensional threshold and has a length equal to a preset length. As shown in fig. 4, fig. 4 is a schematic diagram of a transition distance in one embodiment. Fig. 4 is a schematic diagram showing the one-dimensional coefficients after the reduction processing based on the weight threshold, where the horizontal axis c (in) is the input first one-dimensional coefficient, the vertical axis c (out) is the output second one-dimensional coefficient, and the hard threshold function is shown as the solid line above the right of T2, where the second one-dimensional coefficient is unchanged when the first one-dimensional coefficient is greater than or equal to T2, and the second one-dimensional coefficient is 0 when the first one-dimensional coefficient is less than T2; in the reduction processing based on the weight threshold, the improved threshold function adds a transition zone with the left value r of T2, namely the transition distance, on the basis of the hard threshold, so that the continuity of the threshold processing is maintained, and the image details of the transition zone are maintained.
Through the embodiment, the terminal 102 may perform reduction processing on the first one-dimensional coefficient based on the transition distance, so that more image details may be retained in the transition zone region, and the noise reduction effect of image noise reduction is improved.
In one embodiment, according to the transition distance corresponding to the one-dimensional threshold, performing reduction processing on the first one-dimensional coefficient which is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is smaller than or equal to the transition distance, and setting the first one-dimensional coefficient which is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is greater than the transition distance to 0, to obtain the second one-dimensional coefficient corresponding to each image block, includes: if the first one-dimensional coefficient is larger than or equal to the one-dimensional threshold, taking the first one-dimensional coefficient as a corresponding second one-dimensional coefficient; if the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance between the first one-dimensional coefficient and the one-dimensional threshold is smaller than or equal to the transition distance, acquiring a quotient of the one-dimensional threshold and the transition distance and a difference between the first one-dimensional coefficient and the minimum value in the transition distance, and acquiring a product of the quotient and the difference to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient; and if the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance between the first one-dimensional coefficient and the one-dimensional threshold is larger than the transition distance, setting the first one-dimensional coefficient to be 0 to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient.
In this embodiment, the terminal 102 may perform reduction processing on the first one-dimensional coefficient based on the transition distance and the one-dimensional threshold.
Specifically, the formula of the reduction process may be as follows:
Figure BDA0002643683860000101
wherein C (u, v) is the first one-dimensional coefficient C (in) after 1D conversion, T2 is a one-dimensional threshold, and r is the distance of the transition zone, i.e. the transition distance, C'(u, v) is the second one-dimensional coefficient c (out) after the thresholding. The terminal 102 may keep the original first one-dimensional coefficient when the first one-dimensional coefficient is greater than or equal to the one-dimensional threshold, that is, the original first one-dimensional coefficient is used as the corresponding second one-dimensional coefficient; the terminal 102 may further obtain a quotient of the one-dimensional threshold and the transition distance and obtain a difference between a minimum value of the first one-dimensional coefficient and the transition distance when the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance from the one-dimensional threshold is smaller than or equal to the transition distance, where the minimum value in the transition distance may be the value corresponding to the above (T2-r), and obtain a product of the obtained quotient and the obtained difference to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient; the terminal 102 may also set the first one-dimensional coefficient to 0 when the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance from the one-dimensional threshold is greater than the transition distance, so as to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient.
Through the embodiment, the terminal 102 may perform reduction processing on the first one-dimensional coefficient by using the transition distance and the one-dimensional threshold, so that the coefficient is continuous at the one-dimensional threshold, more image details are maintained to a certain extent, and the noise reduction effect of image noise reduction is improved.
In one embodiment, the reducing each noise-reduced image block to a position corresponding to the fixed image block position parameter in the image to obtain a noise-reduced image includes: acquiring texture blocks in each fixed image block; the texture block is obtained based on the two-dimensional coefficient, the two-dimensional threshold and the texture threshold corresponding to each image block; and compensating the pixel value to the position parameter of the fixed image block according to the pixel value in the texture block, the pixel value corresponding to the noise-reduced image block and the second weight to obtain the noise-reduced image.
In this embodiment, the image denoising parameters may further include: a two-dimensional threshold, a texture threshold, and a second weight, wherein the second weight has a value in the range of 0 to 1. The texture threshold may be a threshold used to determine a texture block, the second weight may be a weight used in image restoration, and the texture block may be a region where a texture in the image to be denoised is located. The terminal 102 may determine and acquire a texture block in each image block based on the two-dimensional coefficient, the two-dimensional threshold, and the texture threshold corresponding to each image block.
Specifically, the step of obtaining the texture block includes: counting the number of two-dimensional coefficients larger than a two-dimensional threshold in the two-dimensional coefficients corresponding to each image block; and if the number is larger than the texture threshold value, taking the image block as a texture block. The terminal 102 may calculate that an absolute value of the two-dimensional coefficients is greater than a first threshold N1, that is, the number of two-dimensional thresholds, and traverse 5 fixed blocks in the search window, where the number of two-dimensional coefficients satisfying the condition may be denoted as count1, count2, count3, count4, and count5, where the 5 values are added and denoted as count, and the count is a total number of coefficients counted by the current search window, and determine whether the count is greater than the texture window threshold, if the count is greater than the texture window threshold, the current search window may be determined as the texture window, and the terminal 102 may determine whether the image block belongs to the texture block according to count1, count2, count3, count4, and count5 in the search window belonging to the texture window. Specifically, taking count1 as an example, it is determined whether count1 is greater than the texture threshold, and if so, the image block corresponding to count1 may be determined to be a texture block.
After the terminal 102 obtains the texture block, the terminal may compensate the pixel value in the fixed image block position parameter according to the pixel value in the texture block, the pixel value corresponding to the noise-reduced image block, and the second weight, so as to obtain the noise-reduced image. Specifically, the terminal 102 may compensate the pixel value in the noise-reduced image block to the pixel value corresponding to the fixed image block position parameter by using a preset pixel compensation formula, so as to restore the pixel value of the texture block, thereby implementing the noise reduction processing on the image.
With the present embodiment, the terminal 102 may determine a texture region from the image block, and may perform pixel value compensation on the texture region by using the second weight, so as to implement noise reduction processing on the image, thereby improving the noise reduction effect of the image.
In one embodiment, if the total number of the two-dimensional coefficients in each texture block is greater than a texture window threshold, determining an area formed by each texture block as a texture window; if the area formed by each texture block is determined to be a texture window, according to the transition distance corresponding to the one-dimensional threshold, performing reduction processing on the first one-dimensional coefficient which is smaller than the one-dimensional threshold and has the distance with the one-dimensional threshold smaller than or equal to the transition distance, setting the first one-dimensional coefficient which is smaller than the one-dimensional threshold and has the distance with the one-dimensional threshold larger than the transition distance to 0, and before obtaining the second one-dimensional coefficient corresponding to each image block, the method further comprises the following steps: acquiring a product of the one-dimensional threshold and the first weight as a new one-dimensional threshold; and acquiring the product of the transition distance and the first weight as a new transition distance.
In this embodiment, the image denoising parameter further includes: a texture window threshold and a first weight; the first weight has a value in the range of 0 to 1. The texture window threshold may be a threshold used to determine whether a search window corresponding to the image block is a texture window, where the texture window threshold may be a threshold used to compare with the Scount, and when the value of the Scount is greater than the texture window threshold, the terminal 102 may determine that the search window where the texture block is located is a texture window, and the first weight may be a weight used to threshold the texture window. The terminal 102 may perform corresponding threshold processing on a texture window corresponding to the texture block, and if the terminal 102 determines that the image block is the texture window, the terminal 102 may obtain a product of the one-dimensional threshold and the first weight as a new one-dimensional threshold, and may also obtain a product of the transition distance and the first weight as a new transition threshold, so that the terminal 102 may perform corresponding reduction processing on the first one-dimensional coefficient according to the new one-dimensional threshold and the new transition threshold. Specifically, the new transition threshold and the new one-dimensional threshold may be obtained as follows:
Figure BDA0002643683860000131
where T2 may be the one-dimensional threshold, r may be a transition distance, and W1 may be the first weight.
Through the embodiment, the terminal 102 may reduce the one-dimensional threshold and the transition distance by using the first weight, so as to reduce noise of the image by using the reduced one-dimensional threshold and the transition distance, and may retain more image details, thereby improving the noise reduction effect of image noise reduction.
In one embodiment, the compensating the pixel value to the fixed image block position parameter according to the pixel value in the texture block, the pixel value corresponding to the noise-reduced image block, and the second weight to obtain the noise-reduced image includes: acquiring a product of a pixel value corresponding to the noise-reduced image block and the second weight, and taking the product as a first compensation pixel value; obtaining the product of the pixel value in the texture block and the third weight as a second compensation pixel value; the sum of the third weight and the second weight is 1; and compensating the sum of the first compensation pixel value and the second compensation pixel value to the position parameter of the fixed image block to obtain the noise-reduced image.
In this embodiment, the pixel value in the texture block may be a pixel value corresponding to an image block belonging to the texture block in the search window, the noise-reduced image block may be an image block subjected to noise reduction and having a corresponding relationship with the position information of the image block in the search window, the second weight may be a weight for performing pixel compensation, and a value of the second weight may be between 0 and 1.
The terminal 102 may obtain a product of a pixel value corresponding to the noise-reduced image block and the second weight as a first compensated pixel value, may further obtain a product of a pixel value in the texture block and a third weight as a second compensated pixel value, where a sum of the third weight and the second weight may be 1, and the terminal 102 may further compensate the sum of the first compensated pixel value and the second compensated pixel value into the fixed image block position parameter, thereby obtaining the noise-reduced image. The texture block may be determined according to the texture threshold, and both the pixel value of the noise-reduced image block and the pixel value of the texture block may include position information of the pixel value, for example, coordinate information of the pixel value.
Specifically, the formula of the above pixel value compensation may be as follows: i is3(x,y)=I1(x,y)W2+I2(x,y)(1-W2) (ii) a Wherein, I1 may be the denoised pixel value at the (x, y) position in the denoised image block, I2 may beIs the pixel value at the (x, y) position in the texture block, I3 may be the compensated total pixel value of the texture block at the (x, y) position, W2 may be the second weight, ranging from 0 to 1, and the third weight may be 1 to W2. After the pixel value compensation of the current search window is completed, the terminal 102 may also perform pixel value compensation on the image in the new position by moving the search window to the new position in the image to be denoised until the whole image is traversed, thereby completing denoising of the whole image.
Through the embodiment, the terminal 102 may perform pixel value compensation on the texture block in the image by using the second weight, so that the image may be denoised, and the denoising effect of image denoising is improved.
In one embodiment, as shown in fig. 5, fig. 5 is a flow chart of an image denoising method in another embodiment. In this embodiment, the terminal 102 may obtain the image to be denoised by using the image acquisition unit, for example, the image to be denoised is obtained by shooting through the terminal 102; the terminal 102 may further utilize an image denoising unit to perform denoising and denoising on the image to be denoised, where the image denoising unit may at least include a fixed image block determining unit and a threshold processing unit, the fixed image block determining unit may be a unit for determining a plurality of fixed image blocks in a search window in the image to be denoised, the terminal 102 may denoise the image to be denoised based on the fixed image blocks, for example, the threshold processing unit may perform threshold processing on the image in the fixed image blocks to obtain an image after denoising, and the terminal 102 may further display the image after denoising through a display unit, for example, a screen of the terminal 102.
Specifically, a specific denoising and denoising process of the image denoising unit may be as shown in fig. 6, where fig. 6 is a schematic flow chart of an image denoising method in another embodiment. The terminal 102 may set a search window with a preset size, where the search window may be an area smaller than the size of the image, and obtain a preset number of fixed image blocks in the search window, where the set positions of the fixed image blocks may be as shown in fig. 3; the terminal 102 may sequentially perform 2D transform processing on the fixed image blocks to obtain two-dimensional coefficients, and may calculate the number of the two-dimensional coefficients that is greater than a first threshold, that is, the two-dimensional thresholds; the terminal 102 may further perform 1D conversion on the two-dimensional coefficients in sequence to obtain a first one-dimensional coefficient, perform threshold processing on the first one-dimensional coefficient to obtain a second one-dimensional coefficient, for example, perform reduction processing on the first one-dimensional coefficient smaller than the threshold to obtain a second one-dimensional coefficient; the terminal 102 may further perform 1D inverse transformation on the second one-dimensional coefficient, and then perform 2D inverse transformation to obtain a target pixel block, that is, a denoised image block, and then restore the denoised image block to a position corresponding to the fixed image block in the original image by using a weight rule, and after denoising is performed in the search window at the current position by the terminal 102, the search window may be moved to traverse the entire image until denoising is completed on the entire image, so as to obtain the denoised image.
Through the embodiment, the terminal 102 can utilize the fixed image blocks in the search window to perform noise reduction on the image through multiple dimensional transformations, so that the noise reduction effect of image noise reduction is improved.
It should be understood that although the steps in the flowcharts of fig. 2, 5-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 5-6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or at least partially with other steps or with at least some of the other steps.
In one embodiment, as shown in fig. 7, there is provided an image noise reduction apparatus including: a first obtaining module 500, a second obtaining module 502, a first transforming module 504, a second transforming module 506, and a restoring module 508, wherein:
a first obtaining module 500, configured to obtain an image to be denoised and an image denoising parameter; the image noise reduction parameters comprise one-dimensional threshold values and fixed image block position parameters.
The second obtaining module 502 is configured to obtain a plurality of image blocks from an image according to the fixed image block location parameter.
A first transform module 504, configured to perform 2D transform on the multiple image blocks respectively to obtain two-dimensional coefficients corresponding to the image blocks; performing 1D conversion on a three-dimensional coefficient formed by two-dimensional coefficients of a plurality of image blocks to obtain a first one-dimensional coefficient corresponding to each image block; and performing reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain a second one-dimensional coefficient corresponding to each image block.
A second transform module 506, configured to perform 1D inverse transform on a plurality of second one-dimensional coefficients corresponding to the plurality of image blocks, and obtain new two-dimensional coefficients corresponding to the plurality of image blocks according to the coefficients after the 1D inverse transform; and carrying out 2D inverse transformation on the new two-dimensional coefficients corresponding to the image blocks to obtain the noise reduction image blocks corresponding to the image blocks.
And the restoring module 508 is configured to restore each noise-reduced image block to a position corresponding to the position parameter of the fixed image block in the image, so as to obtain a noise-reduced image.
In an embodiment, the second obtaining module 502 is specifically configured to traverse the image to be denoised by moving the search window; the size of the search window is not larger than the size of the image to be denoised; extracting a plurality of corresponding image blocks from the current traversal position of the search window according to the fixed image block position parameters; the image blocks are the same in size and comprise overlapping pixels; the size of the image block is not larger than the size of the search window.
In an embodiment, the first transforming module 504 is specifically configured to set the first one-dimensional coefficient smaller than the one-dimensional threshold to 0, so as to obtain the second one-dimensional coefficient corresponding to each image block.
In an embodiment, the first transforming module 504 is specifically configured to perform reduction processing on a first one-dimensional coefficient that is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is smaller than or equal to the transition distance according to the transition distance corresponding to the one-dimensional threshold, and set a first one-dimensional coefficient that is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is greater than the transition distance to 0, so as to obtain a second one-dimensional coefficient of each image block; the transition distance is an interval which is smaller than a one-dimensional threshold value and is a preset length.
In one embodiment, the first transform module 504 is specifically configured to use the first one-dimensional coefficient as a corresponding second one-dimensional coefficient if the first one-dimensional coefficient is greater than or equal to a one-dimensional threshold; if the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance between the first one-dimensional coefficient and the one-dimensional threshold is smaller than or equal to the transition distance, acquiring a quotient of the one-dimensional threshold and the transition distance and a difference between the first one-dimensional coefficient and the minimum value in the transition distance, and acquiring a product of the quotient and the difference to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient; and if the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance between the first one-dimensional coefficient and the one-dimensional threshold is larger than the transition distance, setting the first one-dimensional coefficient to be 0 to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient.
In an embodiment, the restoring module 508 is specifically configured to obtain texture blocks in each fixed image block; the texture block is obtained based on the two-dimensional coefficient, the two-dimensional threshold and the texture threshold corresponding to each image block; and compensating the pixel value to the position parameter of the fixed image block according to the pixel value in the texture block, the pixel value corresponding to the noise-reduced image block and the second weight to obtain the noise-reduced image.
In an embodiment, the restoring module 508 is specifically configured to count the number of two-dimensional coefficients greater than a two-dimensional threshold in the two-dimensional coefficients corresponding to each image block; and if the number is larger than the texture threshold value, taking the image block as a texture block.
In an embodiment, the first transforming module 504 is specifically configured to determine an area formed by each texture block as a texture window if the total number of two-dimensional coefficients in each texture block is greater than a texture window threshold; if the area formed by each texture block is determined to be a texture window, acquiring the product of the one-dimensional threshold and the first weight as a new one-dimensional threshold; and acquiring the product of the transition distance and the first weight as a new transition distance.
In an embodiment, the restoring module 508 is specifically configured to obtain a product of a pixel value corresponding to the noise-reduced image block and the second weight, as a first compensation pixel value; obtaining the product of the pixel value in the texture block and the third weight as a second compensation pixel value; the sum of the third weight and the second weight is 1; and compensating the sum of the first compensation pixel value and the second compensation pixel value to the position parameter of the fixed image block to obtain the noise-reduced image.
For specific limitations of the image noise reduction apparatus, reference may be made to the above limitations of the image noise reduction method, which is not described herein again. The modules in the image noise reduction device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an image noise reduction method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory in which a computer program is stored and a processor which, when executing the computer program, implements the image noise reduction method described above.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the above-mentioned image noise reduction method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A method for image noise reduction, the method comprising:
acquiring an image to be denoised and image denoising parameters; the image noise reduction parameters comprise one-dimensional threshold values and fixed image block position parameters;
acquiring a plurality of image blocks from the image according to the position parameters of the fixed image blocks;
respectively carrying out 2D conversion on the plurality of image blocks to obtain two-dimensional coefficients corresponding to the image blocks; performing 1D conversion on a three-dimensional coefficient formed by the two-dimensional coefficients of the image blocks to obtain a first one-dimensional coefficient corresponding to each image block; carrying out reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain a second one-dimensional coefficient corresponding to each image block;
carrying out 1D inverse transformation on a plurality of second one-dimensional coefficients corresponding to the plurality of image blocks, and obtaining new two-dimensional coefficients corresponding to the plurality of image blocks according to the coefficients subjected to the 1D inverse transformation; carrying out 2D inverse transformation on the new two-dimensional coefficients corresponding to the image blocks to obtain noise reduction image blocks corresponding to the image blocks;
and restoring each noise-reduced image block to the position corresponding to the position parameter of the fixed image block in the image to obtain the noise-reduced image.
2. The method as claimed in claim 1, wherein the obtaining a plurality of image blocks from the image according to the fixed image block location parameter comprises:
traversing the image to be denoised by moving a search window; the size of the search window is not larger than that of the image to be denoised;
extracting a plurality of corresponding image blocks from the current traversal position of the search window according to the fixed image block position parameters; the image blocks are the same size and comprise overlapping pixels; the size of the image block is not larger than the size of the search window.
3. The method according to claim 1, wherein the performing the reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain the second one-dimensional coefficient corresponding to each image block comprises:
and setting the first one-dimensional coefficient smaller than the one-dimensional threshold value to be 0 to obtain a second one-dimensional coefficient corresponding to each image block.
4. The method according to claim 1, wherein the performing reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain the second one-dimensional coefficient corresponding to each image block comprises:
according to the transition distance corresponding to the one-dimensional threshold, carrying out reduction processing on a first one-dimensional coefficient which is smaller than the one-dimensional threshold and has a distance with the one-dimensional threshold smaller than or equal to the transition distance, and setting a first one-dimensional coefficient which is smaller than the one-dimensional threshold and has a distance with the one-dimensional threshold larger than the transition distance to 0 to obtain a second one-dimensional coefficient of each image block; the transition distance is an interval which is smaller than the one-dimensional threshold and is a preset length.
5. The method according to claim 4, wherein the reducing, according to the transition distance corresponding to the one-dimensional threshold, the first one-dimensional coefficient that is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is smaller than or equal to the transition distance, and setting the first one-dimensional coefficient that is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is greater than the transition distance to 0, to obtain the second one-dimensional coefficient corresponding to each image block, includes:
if the first one-dimensional coefficient is larger than or equal to the one-dimensional threshold, taking the first one-dimensional coefficient as a corresponding second one-dimensional coefficient;
if the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance between the first one-dimensional coefficient and the one-dimensional threshold is smaller than or equal to the transition distance, acquiring a quotient of the one-dimensional threshold and the transition distance and a difference between the first one-dimensional coefficient and the minimum value in the transition distance, and acquiring a product of the quotient and the difference to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient;
and if the first one-dimensional coefficient is smaller than the one-dimensional threshold and the distance between the first one-dimensional coefficient and the one-dimensional threshold is larger than the transition distance, setting the first one-dimensional coefficient to be 0 to obtain a second one-dimensional coefficient corresponding to the first one-dimensional coefficient.
6. The method of claim 4, wherein the image noise reduction parameters further comprise: a two-dimensional threshold, a texture threshold, and a second weight; the second weight has a value in the range of 0 to 1;
the reducing each noise-reduced image block to a position corresponding to the position parameter of the fixed image block in the image to obtain a noise-reduced image includes:
acquiring a texture block in each fixed image block; the texture block is obtained based on the two-dimensional coefficient corresponding to each image block, the two-dimensional threshold and the texture threshold;
and compensating the pixel values to the position parameters of the fixed image blocks according to the pixel values in the texture blocks, the pixel values corresponding to the noise-reduced image blocks and the second weight to obtain the noise-reduced image.
7. The method according to claim 6, wherein said obtaining the texture block in each of the fixed image blocks comprises:
counting the number of two-dimensional coefficients which are larger than the two-dimensional threshold in the two-dimensional coefficients corresponding to each image block;
and if the number is larger than the texture threshold, taking the image block as a texture block.
8. The method of claim 6, wherein the image noise reduction parameters further comprise: a texture window threshold and a first weight; the first weight has a value in the range of 0 to 1;
if the total number of the two-dimensional coefficients in each texture block is larger than a texture window threshold value, determining an area formed by each texture block as a texture window; if it is determined that the area formed by each texture block is a texture window, the method further includes, according to the transition distance corresponding to the one-dimensional threshold, performing reduction processing on a first one-dimensional coefficient which is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is smaller than or equal to the transition distance, setting a first one-dimensional coefficient which is smaller than the one-dimensional threshold and whose distance from the one-dimensional threshold is greater than the transition distance to 0, and before obtaining a second one-dimensional coefficient corresponding to each image block:
acquiring the product of the one-dimensional threshold and the first weight as a new one-dimensional threshold;
and acquiring the product of the transition distance and the first weight as a new transition distance.
9. The method according to claim 6, wherein the compensating the pixel values to the fixed image block position parameters according to the pixel values in the texture block, the pixel values corresponding to the noise-reduced image block, and the second weight to obtain the noise-reduced image comprises:
acquiring a product of a pixel value corresponding to the noise-reduced image block and the second weight, and taking the product as a first compensation pixel value;
obtaining the product of the pixel value in the texture block and the third weight as a second compensation pixel value; the sum of the third weight and the second weight is 1;
and compensating the sum of the first compensation pixel value and the second compensation pixel value to the position parameter of the fixed image block to obtain the noise-reduced image.
10. An image noise reduction apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring an image to be denoised and image denoising parameters; the image noise reduction parameters comprise one-dimensional threshold values and fixed image block position parameters;
the second obtaining module is used for obtaining a plurality of image blocks from the image according to the position parameters of the fixed image blocks;
the first transformation module is used for respectively carrying out 2D transformation on the plurality of image blocks to obtain two-dimensional coefficients corresponding to the image blocks; performing 1D conversion on a three-dimensional coefficient formed by the two-dimensional coefficients of the image blocks to obtain a first one-dimensional coefficient corresponding to each image block; carrying out reduction processing on the first one-dimensional coefficient smaller than the one-dimensional threshold to obtain a second one-dimensional coefficient corresponding to each image block;
the second transformation module is used for performing 1D inverse transformation on a plurality of second one-dimensional coefficients corresponding to the plurality of image blocks, and obtaining new two-dimensional coefficients corresponding to the plurality of image blocks according to the coefficients subjected to the 1D inverse transformation; carrying out 2D inverse transformation on the new two-dimensional coefficients corresponding to the image blocks to obtain noise reduction image blocks corresponding to the image blocks;
and the restoring module is used for restoring each denoising image block to the position corresponding to the fixed image block position parameter in the image to obtain a denoised image.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 9.
CN202010847831.8A 2020-08-21 2020-08-21 Image noise reduction method, device, computer equipment and storage medium Active CN112053295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010847831.8A CN112053295B (en) 2020-08-21 2020-08-21 Image noise reduction method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010847831.8A CN112053295B (en) 2020-08-21 2020-08-21 Image noise reduction method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112053295A true CN112053295A (en) 2020-12-08
CN112053295B CN112053295B (en) 2024-04-05

Family

ID=73599771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010847831.8A Active CN112053295B (en) 2020-08-21 2020-08-21 Image noise reduction method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112053295B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510305A (en) * 2008-12-15 2009-08-19 四川虹微技术有限公司 Improved self-adapting histogram equilibrium method
CN101582984A (en) * 2009-04-14 2009-11-18 公安部物证鉴定中心 Method and device for eliminating image noise
JP2010211552A (en) * 2009-03-11 2010-09-24 Rohm Co Ltd Image processing method and computer program
CN103093433A (en) * 2013-01-25 2013-05-08 西安电子科技大学 Natural image denoising method based on regionalism and dictionary learning
CN106934398A (en) * 2017-03-09 2017-07-07 西安电子科技大学 Image de-noising method based on super-pixel cluster and rarefaction representation
CN107292851A (en) * 2017-07-14 2017-10-24 重庆理工大学 A kind of BM3D image denoising methods converted based on pseudo- 3D
CN107451981A (en) * 2017-08-15 2017-12-08 四川长虹电器股份有限公司 Picture noise level estimation method based on DCT and gradient covariance matrix
CN108259774A (en) * 2018-01-31 2018-07-06 珠海市杰理科技股份有限公司 Image combining method, system and equipment
US20190045193A1 (en) * 2018-06-29 2019-02-07 Intel Corporation Region-based motion estimation and modeling for accurate region-based motion compensation for efficient video processing or coding
CN110458206A (en) * 2019-07-24 2019-11-15 东北师范大学 A kind of attention behavior model based on deep learning
CN111476735A (en) * 2020-04-13 2020-07-31 厦门美图之家科技有限公司 Face image processing method and device, computer equipment and readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510305A (en) * 2008-12-15 2009-08-19 四川虹微技术有限公司 Improved self-adapting histogram equilibrium method
JP2010211552A (en) * 2009-03-11 2010-09-24 Rohm Co Ltd Image processing method and computer program
CN101582984A (en) * 2009-04-14 2009-11-18 公安部物证鉴定中心 Method and device for eliminating image noise
CN103093433A (en) * 2013-01-25 2013-05-08 西安电子科技大学 Natural image denoising method based on regionalism and dictionary learning
CN106934398A (en) * 2017-03-09 2017-07-07 西安电子科技大学 Image de-noising method based on super-pixel cluster and rarefaction representation
CN107292851A (en) * 2017-07-14 2017-10-24 重庆理工大学 A kind of BM3D image denoising methods converted based on pseudo- 3D
CN107451981A (en) * 2017-08-15 2017-12-08 四川长虹电器股份有限公司 Picture noise level estimation method based on DCT and gradient covariance matrix
CN108259774A (en) * 2018-01-31 2018-07-06 珠海市杰理科技股份有限公司 Image combining method, system and equipment
US20190045193A1 (en) * 2018-06-29 2019-02-07 Intel Corporation Region-based motion estimation and modeling for accurate region-based motion compensation for efficient video processing or coding
CN110458206A (en) * 2019-07-24 2019-11-15 东北师范大学 A kind of attention behavior model based on deep learning
CN111476735A (en) * 2020-04-13 2020-07-31 厦门美图之家科技有限公司 Face image processing method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN112053295B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
Zhang et al. Low-rank decomposition-based restoration of compressed images via adaptive noise estimation
Li et al. An efficient deep convolutional neural networks model for compressed image deblocking
KR101643672B1 (en) Optical flow tracking method and apparatus
CN108337551B (en) Screen recording method, storage medium and terminal equipment
Rehman et al. SSIM-based non-local means image denoising
CN106127688B (en) A kind of super-resolution image reconstruction method and its system
WO2019084801A1 (en) Motion estimation method and device
US8823777B2 (en) Real-time depth extraction using stereo correspondence
US9449371B1 (en) True motion based temporal-spatial IIR filter for video
CN106952314B (en) Recursive prediction method for compressing image based on frequency domain direction filter
WO2014070273A1 (en) Recursive conditional means image denoising
CN113362338B (en) Rail segmentation method, device, computer equipment and rail segmentation processing system
Lee et al. Fast 3D video stabilization using ROI-based warping
Liu et al. One-dimensional image surface blur algorithm based on wavelet transform and bilateral filtering
CN111260590B (en) Image noise reduction method and related product
CN112053295B (en) Image noise reduction method, device, computer equipment and storage medium
CN115797194A (en) Image denoising method, image denoising device, electronic device, storage medium, and program product
CN112784828B (en) Image detection method and device based on direction gradient histogram and computer equipment
CN113497886B (en) Video processing method, terminal device and computer-readable storage medium
CN111754417B (en) Noise reduction method for video image, video matting method, device and electronic system
CN116052233A (en) Neural network optimization method, device, computing equipment and storage medium
Jiji et al. Enhancement of underwater deblurred images using gradient guided filter
WO2015128302A1 (en) Method and apparatus for filtering and analyzing a noise in an image
CN111784733A (en) Image processing method, device, terminal and computer readable storage medium
CN112862726B (en) Image processing method, device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519000 No. 333, Kexing Road, Xiangzhou District, Zhuhai City, Guangdong Province

Applicant after: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

Address before: Floor 1-107, building 904, ShiJiHua Road, Zhuhai City, Guangdong Province

Applicant before: ZHUHAI JIELI TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant