Search

CN-121981909-A - Image noise reduction method and device based on lmmse

CN121981909ACN 121981909 ACN121981909 ACN 121981909ACN-121981909-A

Abstract

The application relates to an image noise reduction method and device based on lmmse, wherein the method comprises the following steps of obtaining current pixel initial data of an original image and neighborhood pixel initial data of a two-dimensional neighborhood pre-examination range; the method comprises the steps of combining the two to perform vertical and horizontal smoothing calculation on the current pixel to obtain a horizontal and vertical smoothing value, calculating vertical and horizontal estimated value parameters and weights of the current pixel by using lmmse algorithm, and carrying out weighted average on the two to obtain a noise-reduced value of the current pixel. By adopting the technical design of adopting the three modules of smooth calculation, weight calculation and weighted average to cooperatively process and combining lmmse theory to adapt to FPGA hardware implementation, the image noise reduction method and device based on lmmse can effectively solve the problem of image noise caused by G channel mismatch of the color cmos photosensitive chip of the industrial camera.

Inventors

  • LI XI
  • LUAN GUOCHEN

Assignees

  • 北京睿智奥恒视觉科技有限公司

Dates

Publication Date
20260505
Application Date
20260121

Claims (10)

  1. 1. A lmmse-based image denoising method, comprising the steps of: acquiring initial data of a current pixel point in an original image and initial data of a neighborhood pixel point in a two-dimensional neighborhood pre-examination range corresponding to the current pixel point; Carrying out vertical and horizontal smoothing calculation on the current pixel point by combining the neighborhood pixel point initial data and the current pixel point initial data to obtain a horizontal smoothing value and a vertical smoothing value of the current pixel point; Calculating the initial data of the neighborhood pixel point, the horizontal smoothing value and the vertical smoothing value of the current pixel point by using lmmse algorithm to obtain estimated value parameters and estimated value weights of the current pixel point in the vertical and horizontal directions; and carrying out weighted average calculation on the estimated value parameter and the estimated value weight to obtain the denoised pixel value of the current pixel point after denoising.
  2. 2. The image denoising method based on lmmse as claimed in claim 1, wherein the obtaining the initial data of the current pixel point in the original image and the initial data of the neighboring pixel point in the two-dimensional neighboring pre-examination range corresponding to the current pixel point includes the following steps: receiving and transmitting original image data output by an industrial camera through an FPGA; Confirming the current pixel point coordinates in the original image data; Taking the current pixel point as the center, forming n pixel points in the horizontal direction and n pixel points in the vertical direction respectively, and forming a pixel array comprising (2n+1) A neighborhood region of (2n+1) pixels, wherein n is a positive integer; And extracting all pixel data in the neighborhood region to form neighborhood pixel point initial data corresponding to the current pixel point.
  3. 3. The image denoising method based on lmmse of claim 1, wherein the step of performing vertical and horizontal smoothing calculations on the current pixel point by combining the neighborhood pixel point initial data and the current pixel point initial data to obtain a horizontal smoothing value and a vertical smoothing value of the current pixel point includes the steps of: Converting original image data transmitted by an FPGA (field programmable gate array) into a yuv space, and extracting y components corresponding to neighborhood pixel points to serve as initial data of the neighborhood pixel points, wherein the y components corresponding to the current pixel points serve as y components of the current pixel points and serve as initial data of the current pixel points; calling preset (2n+1) (2N+1) filtering templates, respectively carrying out filtering operation in the horizontal direction and the vertical direction on the y component corresponding to the input neighborhood pixel point and the y component corresponding to the current pixel point; and respectively outputting a horizontal smooth value of the current pixel point in the horizontal direction and a vertical smooth value of the current pixel point in the vertical direction through filtering operation.
  4. 4. A lmmse-based image denoising method according to claim 3, wherein the call is preset (2n+1) The (2n+1) filtering template respectively carries out filtering operation in the horizontal direction and the vertical direction on the y component corresponding to the input neighborhood pixel point and the y component corresponding to the current pixel point, and comprises the following steps: For the vertical component data of the neighborhood pixel point corresponding to the current pixel point in the y component, according to 5 5, Carrying out weighted summation operation on the vertical weight matrix of the filtering template; For the horizontal component data of the neighborhood pixel point corresponding to the current pixel point in the y component, according to 5 5, Carrying out weighted summation operation on the horizontal weight matrix of the filtering template; And taking the vertical neighborhood weighted summation result as a vertical smooth value of the current pixel point, and taking the horizontal neighborhood weighted summation result as a horizontal smooth value of the current pixel point.
  5. 5. The lmmse-based image denoising method according to claim 1, wherein the calculating the initial data of the neighboring pixel point and the horizontal smoothing value and the vertical smoothing value of the current pixel point by using lmmse algorithm to obtain the estimated parameters and the estimated weights of the current pixel point in the vertical and horizontal directions comprises the following steps: establishing neighbor pixel arrays in the horizontal direction and the vertical direction of the current pixel point, wherein the size of each array is 9, extracting pixel data in the corresponding direction from initial data of the neighbor pixel point, and storing the pixel data in the array; Based on the two established arrays, respectively calculating airspace smooth values in the horizontal direction and the vertical direction, and simultaneously calculating the difference value between the smooth values in the horizontal direction and the vertical direction in each array and the original pixels at the corresponding positions and the deformation deduction result of the original pixel values; For the deformation deduction results of the original pixel values in the horizontal direction and the vertical direction, the standard deviation is not directly calculated any more, but the square of the average value of the difference value of the smoothed value of the central position and the original pixel at the corresponding position divided by the deformation deduction result of the original pixel value is adopted to represent the data noise condition, and the smaller the noise representation parameter value is, the higher the data smoothing degree is represented and the higher the follow-up estimation reliability is; taking the horizontal airspace smooth value and the vertical airspace smooth value as the basis, calculating a horizontal direction noise characterization parameter and a vertical direction noise characterization parameter, and determining estimated value parameters of the horizontal direction and the vertical direction; and according to the characteristic that the estimated value reliability and the noise representation parameter value are inversely related, carrying out exchange processing on the horizontal direction noise representation parameter and the vertical direction noise representation parameter to obtain estimated value weights in the horizontal direction and the vertical direction.
  6. 6. The lmmse-based image denoising method according to claim 1, wherein the calculating the initial data of the neighboring pixel point and the horizontal smoothing value and the vertical smoothing value of the current pixel point by using lmmse algorithm to obtain the estimated parameters and the estimated weights of the current pixel point in the vertical and horizontal directions further comprises the following steps: in the calculation process, an int type data format is adopted for operation, and for all division operations, the divisor of the division operation is shifted left by 3 bits; After division operation is carried out, the operation result is shifted to the right by 3 bits, the original data magnitude is restored, and the estimated value parameter and the estimated value weight of the current pixel point in the corrected effective range are output.
  7. 7. The image denoising method based on lmmse as claimed in claim 1, wherein the weighted average calculation of the estimation parameter and the estimation weight is performed to obtain the denoised pixel value after denoising the current pixel point, comprising the following steps: the int type data is adopted to multiply the horizontal direction estimated value parameter with the horizontal direction estimated value weight to obtain the horizontal A direction weighting result; Multiplying the vertical estimation parameter by the vertical estimation weight to obtain a vertical weighting result; the int type data is adopted, and the weighting result in the horizontal direction and the weighting result in the vertical direction are added to obtain a weighted sum; Adding the horizontal direction estimated value weight and the vertical direction estimated value weight to obtain a weight sum; and taking the weighted sum as a dividend, shifting left by 3 bits, dividing by the weighted sum, and shifting right by 3 bits after division operation is completed to obtain the pixel value of the current pixel after noise reduction.
  8. 8. An image denoising apparatus based on lmmse for implementing the image denoising method based on lmmse according to any one of claims 1 to 7, comprising: the neighborhood data acquisition module is used for acquiring neighborhood pixel point initial data corresponding to the current pixel point in the original image data; The smoothing calculation module is used for carrying out smoothing calculation on the current pixel point in the vertical and horizontal directions through the neighborhood pixel point initial data and the current pixel point initial data to obtain a horizontal smoothing value and a vertical smoothing value of the current pixel point; The weight calculation module is used for calculating the initial data of the neighborhood pixel point, the horizontal smooth value and the vertical smooth value of the current pixel point by using lmmse algorithm to obtain estimated value parameters and estimated value weights of the current pixel point in the vertical and horizontal directions; the weighted average module is used for carrying out weighted average calculation on the estimated value parameter and the estimated value weight to obtain a denoised pixel value of the current pixel point after denoising; the FPGA processing module is respectively connected with the neighborhood data acquisition module, the smoothing calculation module, the weight calculation module and the weighted average module and is used for realizing the transmission and the pipeline parallel processing of the data of each module.
  9. 9. The lmmse-based image denoising apparatus of claim 8, wherein the neighborhood data acquisition module comprises: The data receiving unit is used for receiving and transmitting the original image data output by the industrial camera through the neighbor FPGA; A coordinate and range determining unit for determining the coordinates of the current pixel point in the original image data, and defining n pixel points around the current pixel point in the horizontal direction and n pixel points around the vertical direction, including (2n+1) lines A neighborhood region of (2n+1) columns of pixels, wherein n is a positive integer; the data extraction unit is used for extracting all pixel data in the neighborhood region from the original image data transmitted by the FPGA to form neighborhood pixel point initial data corresponding to the current pixel point.
  10. 10. The lmmse-based image denoising apparatus of claim 8, wherein the smoothing calculation module comprises: The color space conversion unit is used for converting the original image data transmitted by the FPGA into a yuv space, extracting a y component in the y component and taking the y component as input data for smooth calculation; The filtering template calling and operation unit is used for calling a preset (2n+1) (2N+1) Filter template, when n takes on a value of 2, the size of the Filter template is 5 5, Respectively carrying out filtering operation on a vertical component and a horizontal component of the current pixel point in the input y component; And the smooth value output unit is used for taking the vertical component filtering operation result as a vertical smooth value of the current pixel point, taking the horizontal component filtering operation result as a horizontal smooth value of the current pixel point and outputting the horizontal smooth value and the vertical smooth value.

Description

Image noise reduction method and device based on lmmse Technical Field The present application relates to the field of channel estimation or signal recovery, and in particular, to a lmmse-based image noise reduction method and apparatus. Background In the practical application of an industrial camera, the imaging quality of a part of photosensitive chips is poor, and the imaging quality is particularly shown as that a G channel of a color cmos appears in a mismatch way, so that a patch-shaped texture with inconsistent brightness and darkness in a block distribution appears in a smooth area of an image, and the influence on the subsequent Bayer interpolation and image processing algorithm is large. Disclosure of Invention In view of this, the present application provides an image denoising method based on lmmse, which includes the following steps: acquiring initial data of a current pixel point in an original image and initial data of a neighborhood pixel point in a two-dimensional neighborhood pre-examination range corresponding to the current pixel point; Carrying out vertical and horizontal smoothing calculation on the current pixel point by combining the neighborhood pixel point initial data and the current pixel point initial data to obtain a horizontal smoothing value and a vertical smoothing value of the current pixel point; Calculating the initial data of the neighborhood pixel point, the horizontal smooth value and the vertical smooth value of the current pixel point by using lmmse algorithm to obtain estimated value parameters and estimated value weights of the current pixel point in the vertical and horizontal directions; And carrying out weighted average calculation on the estimated value parameter and the estimated value weight to obtain a denoised pixel value of the current pixel point after denoising. In one possible implementation manner, obtaining the initial data of the current pixel point in the original image and the initial data of the neighboring pixel point in the two-dimensional neighboring pre-examination range corresponding to the current pixel point includes the following steps: receiving and transmitting original image data output by an industrial camera through an FPGA; Confirming the current pixel point coordinates in the original image data; Taking the current pixel point as the center, forming n pixel points in the horizontal direction and n pixel points in the vertical direction respectively, and forming a pixel array comprising (2n+1) A neighborhood region of (2n+1) pixels, wherein n is a positive integer; and extracting all pixel data in the neighborhood region to form neighborhood pixel initial data corresponding to the current pixel. In one possible implementation manner, performing vertical and horizontal smoothing calculation on the current pixel point by combining the initial data of the neighboring pixel point and the initial data of the current pixel point to obtain a horizontal smoothing value and a vertical smoothing value of the current pixel point, including the following steps: converting the original image data transmitted by the FPGA into yuv space, extracting y components corresponding to the neighborhood pixel points to serve as initial data of the neighborhood pixel points, wherein the y components corresponding to the current pixel points serve as y components of the current pixel points and serve as initial data of the current pixel points; calling preset (2n+1) (2N+1) filtering templates, respectively carrying out filtering operation in the horizontal direction and the vertical direction on the y component corresponding to the input neighborhood pixel point and the y component corresponding to the current pixel point; and respectively outputting a horizontal smooth value of the current pixel point in the horizontal direction and a vertical smooth value of the current pixel point in the vertical direction through filtering operation. In one possible implementation, the preset (2n+1) is invokedThe (2n+1) filtering template respectively carries out filtering operation in the horizontal direction and the vertical direction on the y component corresponding to the input neighborhood pixel point and the y component corresponding to the current pixel point, and comprises the following steps: For the vertical component data of the neighborhood pixel point corresponding to the current pixel point in the y component, according to 5 5, Carrying out weighted summation operation on the vertical weight matrix of the filtering template; For the horizontal component data of the neighborhood pixel point corresponding to the current pixel point in the y component, according to 5 5, Carrying out weighted summation operation on the horizontal weight matrix of the filtering template; And taking the vertical neighborhood weighted summation result as a vertical smooth value of the current pixel point, and taking the horizontal neighborhood weighted summation result as a horizon