CN114742727A - Noise processing method and system based on image smoothing - Google Patents

Noise processing method and system based on image smoothing Download PDF

Info

Publication number
CN114742727A
CN114742727A CN202210346740.5A CN202210346740A CN114742727A CN 114742727 A CN114742727 A CN 114742727A CN 202210346740 A CN202210346740 A CN 202210346740A CN 114742727 A CN114742727 A CN 114742727A
Authority
CN
China
Prior art keywords
image
filtering
variance
pixel point
gray
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
CN202210346740.5A
Other languages
Chinese (zh)
Other versions
CN114742727B (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.)
Jiangsu Dianboshi Energy Equipment Co ltd
Original Assignee
Nantong Electric Doctor Automation Equipment 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 Nantong Electric Doctor Automation Equipment Co ltd filed Critical Nantong Electric Doctor Automation Equipment Co ltd
Priority to CN202211599503.6A priority Critical patent/CN115829874A/en
Priority to CN202210346740.5A priority patent/CN114742727B/en
Publication of CN114742727A publication Critical patent/CN114742727A/en
Application granted granted Critical
Publication of CN114742727B publication Critical patent/CN114742727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection

Abstract

The invention relates to the technical field of image processing, in particular to a noise processing method and a noise processing system based on image smoothing. The method comprises the steps of acquiring a noise image, graying the noise image to obtain a gray level image, and performing edge detection on the gray level image to obtain a gray level edge image; dividing the gray level image into a plurality of areas, acquiring the variance of pixel values in each area, filtering the areas with the variance larger than or equal to the preset area variance to obtain a filtered image, wherein the value range of the preset area variance is determined by the integral variance of the gray level filtered image obtained after filtering the gray level image; and continuously adjusting the variance of the preset area to obtain a plurality of filtering images, and screening the self-adaptive filtering image from the plurality of filtering images. The method achieves the purposes of carrying out partition filtering on the gray level image, selecting proper preset region variance to eliminate noise points in the region and reserving normal points in a normal region.

Description

Noise processing method and system based on image smoothing
Technical Field
The invention relates to the technical field of image processing, in particular to a noise processing method and a noise processing system based on image smoothing.
Background
Today's society is an information age, and the form of information is no longer a simple voice, but is developed into a multimedia form including data, text, images, video, and the like. Image processing technology plays an increasingly important role in aspects of human production and life, such as people downloading or browsing multimedia information such as images and videos on the internet, however, digital images are often affected by interference of imaging equipment and external environment noise in the digitization and transmission processes, and are called noisy images or noisy images.
At present, a common method for processing image noise is to perform adaptive filtering on an image, but when the image is subjected to adaptive filtering at present, it is difficult to accurately judge the value of an adaptive threshold, the selection of the adaptive threshold is cumbersome, and when the value of the adaptive threshold is inaccurate, a normal point is removed as a noise point or a large number of noise points are not removed, so that a complete normal image is difficult to keep.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a noise processing method and system based on image smoothing, wherein the adopted technical solution is as follows:
in a first aspect, an embodiment of the present invention provides a noise processing method based on image smoothing, including the following steps:
acquiring a noise image, graying the noise image to obtain a gray image, and performing edge detection on the gray image to obtain a gray edge image;
dividing the gray level image into a plurality of regions, acquiring the variance of pixel values in each region, filtering the regions with the variance larger than or equal to the preset region variance to obtain a filtered image, wherein the value range of the preset region variance is determined by the integral variance of the gray level filtered image obtained after filtering the gray level image; continuously adjusting the variance of the preset area to obtain a plurality of filtering images, and screening a self-adaptive filtering image from the plurality of filtering images;
the method for screening the self-adaptive filtering image comprises the following steps:
carrying out edge detection on each filtered image to obtain a filtered edge image; the ratio of the number of pixels in the filtering edge image to the number of pixels in the gray edge image is taken as the degree of pixel reservation; obtaining the density degree according to a first distance average value between each pixel point in the filtering edge image and a second distance average value between each pixel point in the gray edge image; weighting and summing the density degree and the pixel point retention degree to obtain a normal point retention degree; calculating the signal-to-noise ratio of the filtering image, and performing weighted summation on the signal-to-noise ratio and the normal point retention degree to obtain a self-adaptive denoising degree; and selecting the filtering image corresponding to the maximum self-adaptive denoising degree as a self-adaptive filtering image.
Preferably, the filtering the region with the variance larger than the preset region variance to obtain a filtered image includes:
and filtering the region with the variance larger than or equal to the preset region variance, and keeping the region with the variance smaller than the preset region variance unchanged to obtain a filtered image.
Preferably, the value range of the preset region variance is as follows:
Figure BDA0003576767530000021
wherein the content of the first and second substances,
Figure BDA0003576767530000022
the variance of the region corresponding to the filtering kernel is obtained when half of the pixels in the filtering kernel are pure black and half of the pixels are pure white.
Preferably, the value range of the preset region variance is determined by the integral variance of a gray-scale filter image obtained after filtering the gray-scale image, and the method further includes:
calculating the signal-to-noise ratio of the filtered image after filtering; and zooming the value range of the preset region variance according to the signal-to-noise ratio by utilizing a bisection method.
Preferably, the scaling the value range of the preset region variance according to the signal-to-noise ratio by using the dichotomy includes:
when the signal-to-noise ratio is larger than or equal to a preset scaling signal-to-noise ratio, selecting the right half part of the value range of the preset area variance as the updated value range of the preset area variance;
and when the signal-to-noise ratio is smaller than the preset scaling signal-to-noise ratio, selecting the left half part of the value range of the preset area variance as the updated value range of the preset area variance.
Preferably, the first mean distance between each pixel point in the filtering edge image is:
selecting any pixel point from the filtering edge image as a first filtering pixel point, acquiring a point closest to the first filtering pixel point as a second filtering pixel point, and calculating the distance between the first filtering pixel point and the second filtering pixel point; acquiring a pixel point which is closest to the second filtering pixel point as a third filtering pixel point, and calculating the distance between the second filtering pixel point and the third filtering pixel point; acquiring a pixel point closest to the third filtering pixel point as a fourth filtering pixel point, and calculating the distance between the fourth filtering pixel point and the third filtering pixel point until all pixel points in the filtering edge image are traversed;
and calculating a first distance mean value of distances corresponding to all pixel points in the filtering edge image.
Preferably, the mean value of the second distance between each pixel point in the gray edge image is:
selecting any pixel point from the gray edge image as a first gray pixel point, acquiring a point closest to the first gray pixel point as a second gray pixel point, and calculating the distance between the first gray pixel point and the second gray pixel point; acquiring a pixel point closest to the second gray pixel point as a third gray pixel point, and calculating the distance between the second gray pixel point and the third gray pixel point; acquiring a pixel point closest to the third gray pixel point as a fourth gray pixel point, and calculating the distance between the fourth gray pixel point and the third gray pixel point until all pixel points in the gray edge image are traversed;
and calculating a second distance average value of distances corresponding to all pixel points in the gray edge image.
Preferably, the obtaining the density according to the average distance between each pixel in the filtering edge image and the average distance between each pixel in the gray edge image includes:
and the ratio of the first distance mean value between all the pixel points in the filtering edge image to the second distance mean value between all the pixel points in the gray edge image is the density degree.
In a second aspect, an embodiment of the present invention provides an image smoothing-based noise processing system, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements an image smoothing-based noise processing method when executing the computer program.
The embodiment of the invention at least has the following beneficial effects:
the embodiment of the invention utilizes an image processing technology to firstly acquire a noise image, graying the noise image to obtain a gray level image, and performing edge detection on the gray level image to obtain a gray level edge image. The method comprises the steps of dividing a gray level image into a plurality of regions, obtaining the variance of pixel values in each region, filtering the region with the variance larger than or equal to the preset region variance to obtain a filtered image, wherein the value range of the preset region variance is determined by the integral variance of the gray level filtered image obtained after filtering the gray level image, and the noise point of the region with the noise point generates gray level jump, so that the gray level span of the local region of the noise point is larger, and whether the region needs filtering or not can be judged by comparing the variance with the preset region variance. And continuously adjusting the variance of the preset area to obtain a plurality of filtering images, and screening the self-adaptive filtering image from the plurality of filtering images. And obtaining the normal point retention degree and the self-adaptive denoising degree of the filtered image according to the gray edge image before and after filtering, the number of pixel points in the filtered edge image and the distance between the pixel points, obtaining a proper preset region variance according to the signal-to-noise ratio of the filtered image, and obtaining a proper self-adaptive filtering image. The method achieves the purposes of carrying out partition filtering on the gray level image, selecting proper preset region variance to eliminate noise points in the region and reserving normal points in a normal region.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method of noise processing based on image smoothing according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for filtering an adaptive filtered image from a plurality of filtered images according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the noise processing method and system based on image smoothing according to the present invention with reference to the accompanying drawings and preferred embodiments, its specific implementation, structure, features and effects are described below. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The embodiment of the invention provides a noise processing method and a specific implementation method of a system based on image smoothing, and the method is suitable for an image denoising scene. In order to solve the problem that the trend of the adaptive threshold value is difficult to accurately judge, the embodiment of the invention obtains the normal point retention degree and the adaptive denoising degree of the filtered image according to the gray edge image before and after filtering, the number of pixel points in the filtered edge image and the distance between the pixel points, obtains the proper preset region variance according to the signal-to-noise ratio of the filtered image, and obtains the proper adaptive filtering image. The method achieves the purposes of carrying out partition filtering on the gray level image, selecting proper preset region variance to eliminate noise points in the region and reserving normal points in a normal region.
The following describes a specific scheme of the noise processing method based on image smoothing in detail with reference to the accompanying drawings.
Referring to fig. 1, a flowchart illustrating steps of a noise processing method based on image smoothing according to an embodiment of the present invention is shown, where the method includes the following steps:
and step S100, acquiring a noise image, graying the noise image to obtain a gray level image, and performing edge detection on the gray level image to obtain a gray level edge image.
The method includes acquiring a noise image, where the noise image is an RGB image, and it should be noted that the noise image may be a real-time image directly acquired by an RGB camera or an RGB image originally stored in an image database. Graying the acquired noise image to obtain a grayscale image, specifically: the gray-scale image of the noise image is obtained by graying by using a weighted average method, the subsequent processing by using the gray-scale image is simple and convenient, and the image is subjected to binarization in the subsequent steps, so that the subsequent processing is simpler and more convenient by converting the image into the gray-scale image.
Because gaussian filtering may blur an image when removing noise, it can be known from a spectrogram that noise and edge portions of the image are both at the outermost periphery of the spectrogram, and smooth noise shrinks a spectrum inward, so that edges of the image may be removed together, and the image may be blurred, so that an edge detection method is adopted to screen a suitable threshold.
In the embodiment of the invention, the Sobel operator is used for edge detection, is a discrete differential operator and combines Gaussian smoothing and differential derivation to calculate the approximate gradient of the image gray function and is influenced by less noise.
Step S200, dividing the gray level image into a plurality of areas, obtaining the variance of pixel values in each area, filtering the areas with the variance being more than or equal to the preset area variance to obtain a filtered image, wherein the value range of the preset area variance is determined by the integral variance of the gray level filtered image obtained after filtering the gray level image; and continuously adjusting the variance of the preset area to obtain a plurality of filtering images, and screening the self-adaptive filtering image from the plurality of filtering images.
The grayscale image is divided into a plurality of regions, and the size of the region is set to 51 × 51 in the embodiment of the present invention.
The variance d (i) of the pixel values in the i-th region is calculated. And filtering the region with the variance larger than or equal to the preset region variance, and keeping the region with the variance smaller than the preset region variance unchanged to obtain a filtered image. When the variance d (i) of the pixel value corresponding to the ith area is greater than or equal to the preset area variance, the area can be regarded as an area with noise points, and the area is filtered to obtain a filtered image; and when the variance D (i) of the pixel value corresponding to the ith area is smaller than the preset area variance, the area is not filtered. And repeatedly judging each block area in the gray level image to obtain a filtering image.
In the embodiment of the invention, the image is subjected to smooth filtering by Gaussian smooth filtering, and the Gaussian filtering is global filtering, namely filtering is carried out on the whole image.
In the embodiment of the present invention, the gray image is divided into 51 × 51 regions, so the size of the gaussian template is also set to (51,51), that is, the value of k is 25.
The self-adaptive Gaussian filtering adds a threshold value selection on the basis of the Gaussian filtering, and the smoothing operation is hopefully carried out in a noise area and is not carried out in a noise-free area, so that the influence of blurring can be reduced to the minimum.
The selection of the adaptive threshold is determined by using the variance of the local region because the existence of noise causes the noise point to generate a gray jump, which results in a large gray span of the local region of the noise point, so that the comparison between the variance and the variance of the preset region can be used to determine whether the region needs to be filtered.
The preset region variance is adjusted continuously, and the embodiment of the invention intends to find the most suitable preset region variance by adjusting the preset region variance. Firstly, the given initial preset region variance is 0, when the preset region variance is 0, each region of the gray level image is subjected to smoothing treatment, the smoothing treatment is the same as common Gaussian smoothing filtering, and then the preset region variance is continuously adjusted. And when half of the filter kernels are pure black, namely, half of the pixel values are 255, and half of the filter kernels are pure white, namely, half of the pixel values are 0, the upper value limit of the variance in the preset area is obtained. It should be noted that, since the maximum variance is the maximum half of the data and the minimum half of the data, the upper limit of the variance in the preset region is reached when half of the pixels in the filtering kernel are black and white. Because the number of the filter kernels is fixed to be an odd number, the pure black pixel value is one more than the pure white pixel value in the embodiment of the invention, the size of the filter kernels is (2k +1), and the number of the pure black pixel points and the number of the pure white pixel points in the filter kernels are calculated by the following formulas.
Number q of pure black pixels0The calculation formula of (c) is:
Figure BDA0003576767530000061
wherein 2k +1 is the side length of the filter kernel. It should be noted that the filter kernel is square.
Number q of pure white pixel points1The calculation formula of (2) is as follows:
Figure BDA0003576767530000062
wherein 2k +1 is the side length of the filter kernel.
According to the number q of the pure black pixel points0And calculating the gray average value in the filtering kernel area.
Mean value of gray level mu0The calculation formula of (2) is as follows:
Figure BDA0003576767530000063
wherein q is0The number of pure black pixel points in the filtering kernel is; 2k +1 is the side length of the filter kernel.
And calculating the maximum area variance corresponding to the filtering kernel when half of the filtering kernel is pure black and half of the filtering kernel is pure white.
The maximum regional variance
Figure BDA0003576767530000064
The calculation formula of (2) is as follows:
Figure BDA0003576767530000065
wherein, mu0Is the mean value of the gray levels in the filter kernel; q. q.s0The number of pure black pixel points in the filtering kernel is; q. q.s1The number of pure white pixel points in the filtering kernel; 2k +1 is the side length of the filter kernel.
Then the maximum value of the value range of the preset area variance is the maximum area variance, so the value range of the preset area variance is:
Figure BDA0003576767530000066
however, traversing all the values of the preset regional variance within the value range of the preset regional variance results in a relatively large calculation amount, so that the subsequent embodiment of the invention adopts the dichotomy to traverse the preset regional variance within the value range of the preset regional variance, thereby reducing the calculation amount.
And continuously adjusting the preset region variance, and continuously zooming the value range of the preset region variance to obtain a plurality of filtering images, and screening out the self-adaptive filtering image from the plurality of filtering images.
Referring to fig. 2, the step of screening out an adaptive filtering image from a plurality of filtering images includes:
step S201, performing edge detection on each filtered image to obtain a filtered edge image.
Filtering the gray image by using different preset area variances, wherein the specific filtering step is described in detail in the step, namely filtering the area of which the variance corresponding to the area in the gray image is greater than or equal to the preset area variance, and directly reserving the original image without filtering the area of which the variance corresponding to the area in the gray image is less than the preset area variance, so that the filtered image can be obtained.
And carrying out edge detection on each filtered image to obtain a filtered edge image.
In step S202, the ratio of the number of pixels in the filtered edge image to the number of pixels in the gray edge image is used as the degree of pixel preservation.
The edge points and the noise points belong to a high-frequency part in a frequency domain, and when filtering is carried out, high-frequency edge information can be removed as noise, so that the change degree of the image before and after smooth filtering or the retention degree of the image can be judged by comparing the number of edge pixel points before and after filtering.
And acquiring the number of first pixel points of the edge pixel points in the filtering edge image and the number of second pixel points of the edge pixel points in the gray edge image.
The ratio of the number of the first pixel points to the number of the second pixel points is the pixel point retention degree of the filtered edge image after filtering, and the range of the pixel point retention degree is [0,1 ]. The larger the pixel point retention degree is, the better the retention degree of the normal points in the edge of the filtered edge image after filtering is reflected, and the more the normal points are retained.
Step S203, obtaining the density degree according to the first distance average between each pixel in the filtering edge image and the second distance average between each pixel in the gray edge image.
In the filtered edge image and the gray edge image before and after filtering, the relationship between edge points in the edge image and the edge points is very close, and a large distance exists between one edge point and the other edge point rarely, because the embodiment of the invention also utilizes the average distance between edge pixel points to reflect whether the edge contour in the edge image before and after filtering is reserved.
Selecting any pixel point from the filtering edge image as a first filtering pixel point, acquiring a point closest to the first filtering pixel point as a second filtering pixel point, and calculating the distance between the first filtering pixel point and the second filtering pixel point; acquiring a pixel point closest to the second filtering pixel point as a third filtering pixel point, and calculating the distance between the second filtering pixel point and the third filtering pixel point; and acquiring a pixel point closest to the third filtering pixel point as a fourth filtering pixel point, and calculating the distance between the fourth filtering pixel point and the third filtering pixel point until all pixel points in the filtering edge image are traversed.
And calculating a first distance mean value of distances corresponding to all pixel points in the filtered edge image.
Mean value of first distance
Figure BDA0003576767530000071
The calculation formula of (2) is as follows:
Figure BDA0003576767530000072
wherein m is the number of pixel points in the filtering edge image; di,i+1And the distance between the ith filtering pixel point and the (i +1) th filtering pixel point is obtained.
Selecting any pixel point from the gray edge image as a first gray pixel point, acquiring a point closest to the first gray pixel point as a second gray pixel point, and calculating the distance between the first gray pixel point and the second gray pixel point; acquiring a pixel point closest to the second gray pixel point as a third gray pixel point, and calculating the distance between the second gray pixel point and the third gray pixel point; acquiring a pixel point closest to the third gray pixel point as a fourth gray pixel point, and calculating the distance between the fourth gray pixel point and the third gray pixel point until all pixel points in the gray edge image are traversed;
and calculating a second distance average value of the distances corresponding to the pixel points in the gray scale edge image.
Mean value of second distance
Figure BDA0003576767530000081
The calculation formula of (2) is as follows:
Figure BDA0003576767530000082
wherein n is the number of pixel points in the gray edge image; dj,j+1The distance between the jth gray pixel and the jth +1 gray pixel is obtained.
The ratio of the first distance mean value between each pixel point in the filtering edge image to the second distance mean value between each pixel point in the gray edge image is the density degree, and the value range of the density degree is [0,1 ]. The degree of density reflects the overall degree of retention of the edge profile, and the greater the degree of density, the greater the overall degree of retention of the edge profile.
And step S204, weighting and summing the density degree and the pixel point retention degree to obtain the normal point retention degree.
It can be known that the density obtained in step S203 and the pixel point retention degree obtained in step S202 both can reflect the image retention degree or the normal point retention degree of the filtered edge image to a certain degree, so that the density and the pixel point retention degrees are used for performing weighted summation to obtain the normal point retention degree. The greater the density degree is, the greater the corresponding normal point retention degree is, and the density degree is in direct proportion to the normal point retention degree. Similarly, the larger the pixel retention degree is, the larger the corresponding normal point retention degree is, and the pixel retention degree and the normal point retention degree are also in direct proportion.
The normal point retention degree σ is calculated by the formula:
Figure BDA0003576767530000083
wherein alpha is the retention degree of the pixel points; beta is the degree of denseness; theta is a pixel point retention degree adjusting coefficient;
Figure BDA0003576767530000084
the coefficients are adjusted for the degree of density. In the embodiment of the inventionThe value of the prime point retention degree adjustment coefficient is 0.2; the value of the density degree adjustment coefficient is 0.8. The larger the degree σ of normal point retention is, the higher the retention of normal points in the smooth-filtered image is.
The pixel retention degree adjusting coefficient and the density degree adjusting coefficient in the normal point retention degree calculation formula respectively reflect the expected degrees of the pixel retention degree and the density degree. When the number of the edge points is calculated for the gray scale edge image before filtering, the noise points may be counted into the number of the edge points, and the density reflects the edge profile, which reflects the shape of the edge more, so that the embodiment of the present invention provides an expected value with a greater density.
And S205, calculating the signal-to-noise ratio of the filtered image, weighting and summing the signal-to-noise ratio and the normal point retention degree to obtain the self-adaptive denoising degree.
With the increasing of the value of the variance in the preset area, the area with the variance larger than the variance in the preset area gradually becomes less until the variance in all the areas is no longer larger than the variance in the preset area, and at the moment, the whole image is considered to have no noise, and the image is no longer processed. For the filtered image after smooth filtering, the noise reduction effect of the filtered image can be judged by calculating the signal-to-noise ratio of the filtered image.
The signal-to-noise ratio of an image should be equal to the ratio of the power spectra of the signal and noise, but in general the power spectra are difficult to calculate and the signal-to-noise ratio of the image, i.e. the ratio of the signal to the noise variance, can be estimated in an approximate way.
The local variance of all pixels in the filtered image is calculated firstly, the maximum value of the local variance is regarded as the signal variance, the minimum value is regarded as the noise variance, the ratio of the signal variance and the noise variance is calculated, and then the signal variance and the noise variance are converted into decibel (dB) numbers.
The SNR is calculated as:
Figure BDA0003576767530000091
wherein S is a signal variance; n is the noise variance; the unit of SNR is dB.
And obtaining a signal-to-noise ratio limit according to the relation between the signal-to-noise ratio and the quality of the filtering image. When the signal-to-noise ratio is 50dB, the filtered image has little noise, but the filtered image quality is good. When the signal-to-noise ratio is greater than 50dB, the noise reduction effect of the filtered image is excellent. When the signal to noise ratio in the filtered image is 60dB, the filtered image may have no noise present. Therefore, the embodiment of the present invention gives the snr in the range of 0,60 and normalizes the snr.
The normalized signal-to-noise ratio ε is:
Figure BDA0003576767530000092
where SNR is the signal-to-noise ratio before normalization. The normalized signal-to-noise ratio epsilon is in the range of 0,1, and the normalized signal-to-noise ratio reflects the degree of removal of noise points in the filtered image.
The self-adaptive denoising degree of the smoothed image can be obtained through the normal point retention degree of the normal points and the signal-to-noise ratio of the filtering image, the larger the self-adaptive denoising degree is, the better the image effect is, and the smaller the self-adaptive denoising degree is, the worse the image effect is.
And weighting and summing the normalized signal-to-noise ratio and the normal point retention degree to obtain the self-adaptive denoising degree.
The calculation formula of the self-adaptive denoising degree omega is as follows:
ω=a*σ+b*ε
wherein σ is the normal point retention degree; epsilon is the normalized signal-to-noise ratio; a is a normal point retention degree adjustment coefficient; and b is the signal-to-noise ratio adjustment coefficient. In the embodiment of the invention, the values of the normal point retention degree adjustment coefficient and the signal-to-noise ratio adjustment coefficient are both 0.5.
And S206, selecting the filtering image corresponding to the maximum self-adaptive denoising degree as a self-adaptive filtering image.
Value range of variance in preset area
Figure BDA0003576767530000093
All preset zones inThe values of the domain variances are traversed, and relatively, the calculated amount is large, so that the embodiment of the invention adopts the dichotomy to traverse the preset domain variance within the value range of the preset domain variance, so as to reduce the calculated amount.
And scaling the value range by using a dichotomy. Specifically, the method comprises the following steps:
firstly, taking the middle value of the value range of the variance in the preset area, and recording the middle value as t1
Figure BDA0003576767530000101
Wherein the content of the first and second substances,
Figure BDA0003576767530000102
the variance of the region corresponding to the filtering kernel is obtained when half of the pixels in the filtering kernel are pure black and half of the pixels are pure white.
For the filtered image, the noise removing degree of the filtered image should be considered preferentially, that is, the signal-to-noise ratio SNR is ensured to be greater than 50 when the gray image is smoothed by using the preset region variance. Since the SNR is solved by using a logarithmic function, the SNR is hardly changed when the SNR is greater than 50, and at this time, the adaptive denoising degree ω of the filtered image is increased mainly by the normal point preserving degree σ. Along with the increase of the variance of the preset area, the better the retention degree of the normal points in the filtering image is, the worse the self-adaptive denoising degree of the noise points is, and therefore the value range of the variance of the preset area is continuously zoomed by utilizing the dichotomy according to the signal-to-noise ratio.
And when the signal-to-noise ratio is larger than or equal to the preset scaling signal-to-noise ratio, selecting the right half part of the value range of the preset area variance as the updated value range of the preset area variance.
And when the signal-to-noise ratio is smaller than the preset scaling signal-to-noise ratio, selecting the left half part of the value range of the preset area variance as the updated value range of the preset area variance. In the embodiment of the present invention, the preset scaling snr is 50.
Boundary value t of value range after the r-th scalingrComprises the following steps:
Figure BDA0003576767530000103
wherein, tr-1Taking values for the boundary of the value range after the r-1 time of zooming;
Figure BDA0003576767530000104
the maximum regional variance corresponding to the filtering kernel is obtained when half of the pixel points in the filtering kernel are pure black and half of the pixel points are pure white; SNR is the signal-to-noise ratio.
I.e. the boundary value trThe scaled value range of the preset region variance is [0, t ] as the boundary of the noise self-adaptive denoising degreer]. For a value range [0, tr]Taking t from the boundaryrInitially, the variance of the preset area is continuously changed to tr-1,tr-2And … …, calculating the adaptive denoising degree corresponding to the filter image obtained when the preset region variance is changed to construct an adaptive denoising degree sequence. And until the adaptive denoising degrees corresponding to the continuous 10 preset regional variances are continuously reduced, the increase of the signal-to-noise ratio is considered to be unable to keep up with the reduction speed of the adaptive denoising degrees, at the moment, the maximum adaptive denoising degree is selected from the adaptive denoising degree sequence, and the filtering image corresponding to the maximum adaptive denoising degree is the adaptive filtering image.
In summary, in the embodiments of the present invention, the image processing technology is used to first obtain the noise image, perform graying on the noise image to obtain the grayscale image, and perform edge detection on the grayscale image to obtain the grayscale edge image. The gray level image is divided into a plurality of areas, the variance of pixel values in each area is obtained, the areas with the variance larger than or equal to the preset area variance are filtered to obtain a filtered image, and the value range of the preset area variance is determined by the integral variance of the gray level filtered image obtained after the gray level image is filtered. And continuously adjusting the variance of the preset area to obtain a plurality of filtering images, and screening the self-adaptive filtering image from the plurality of filtering images. And obtaining the normal point retention degree of the filtered image according to the gray edge image before and after filtering, the number of pixel points in the filtered edge image and the distance between the pixel points, obtaining a proper preset region variance according to the signal-to-noise ratio of the filtered image, and obtaining a proper self-adaptive filtering image. The purpose of carrying out partition filtering on the gray level image to eliminate noise points in the area and keep normal points in the normal area is achieved.
An image smoothing based noise processing system comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program. Since a noise processing method based on image smoothing is described in detail above, it is not described again.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A noise processing method based on image smoothing, the method comprising the steps of:
acquiring a noise image, graying the noise image to obtain a gray level image, and performing edge detection on the gray level image to obtain a gray level edge image;
dividing the gray level image into a plurality of regions, acquiring the variance of pixel values in each region, filtering the regions with the variance larger than or equal to the preset region variance to obtain a filtered image, wherein the value range of the preset region variance is determined by the integral variance of the gray level filtered image obtained after filtering the gray level image; continuously adjusting the variance of the preset area to obtain a plurality of filtering images, and screening a self-adaptive filtering image from the plurality of filtering images;
the method for screening the self-adaptive filtering image comprises the following steps:
carrying out edge detection on each filtered image to obtain a filtered edge image; the ratio of the number of pixels in the filtering edge image to the number of pixels in the gray edge image is taken as the degree of pixel reservation; obtaining the density degree according to a first distance mean value between each pixel point in the filtering edge image and a second distance mean value between each pixel point in the gray edge image; weighting and summing the density degree and the pixel point retention degree to obtain a normal point retention degree; calculating the signal-to-noise ratio of the filtering image, and performing weighted summation on the signal-to-noise ratio and the normal point retention degree to obtain a self-adaptive denoising degree; and selecting the filtering image corresponding to the maximum self-adaptive denoising degree as a self-adaptive filtering image.
2. The method according to claim 1, wherein the filtering the region with variance greater than the preset region variance to obtain a filtered image comprises:
and filtering the region with the variance larger than or equal to the preset region variance, and keeping the region with the variance smaller than the preset region variance unchanged to obtain a filtered image.
3. The noise processing method based on image smoothing as claimed in claim 1, wherein the range of the preset region variance is:
Figure FDA0003576767520000011
wherein the content of the first and second substances,
Figure FDA0003576767520000012
the variance of the region corresponding to the filtering kernel is obtained when half of the pixels in the filtering kernel are pure black and half of the pixels are pure white.
4. The noise processing method based on image smoothing as claimed in claim 1, wherein the value range of the preset region variance is determined by the overall variance of a gray level filtering image obtained by filtering a gray level image, further comprising:
calculating the signal-to-noise ratio of the filtered image after filtering; and zooming the value range of the preset region variance according to the signal-to-noise ratio by utilizing a bisection method.
5. The method according to claim 4, wherein the scaling the value range of the preset region variance according to the signal-to-noise ratio by using a bisection method comprises:
when the signal-to-noise ratio is larger than or equal to a preset zooming signal-to-noise ratio, selecting the right half part of the value range of the preset area variance as the updated value range of the preset area variance;
and when the signal-to-noise ratio is smaller than the preset scaling signal-to-noise ratio, selecting the left half part of the value range of the preset area variance as the updated value range of the preset area variance.
6. The method according to claim 1, wherein the first mean distance between the pixels in the filtered edge image is:
selecting any pixel point from the filtering edge image as a first filtering pixel point, acquiring a point closest to the first filtering pixel point as a second filtering pixel point, and calculating the distance between the first filtering pixel point and the second filtering pixel point; acquiring a pixel point closest to the second filtering pixel point as a third filtering pixel point, and calculating the distance between the second filtering pixel point and the third filtering pixel point; acquiring a pixel point which is closest to the third filtering pixel point as a fourth filtering pixel point, and calculating the distance between the fourth filtering pixel point and the third filtering pixel point until all pixel points in the filtering edge image are traversed;
and calculating a first distance mean value of distances corresponding to all pixel points in the filtering edge image.
7. The noise processing method based on image smoothing as claimed in claim 1, wherein the mean value of the second distance between each pixel in the gray edge image is:
selecting any pixel point from the gray edge image as a first gray pixel point, acquiring a point closest to the first gray pixel point as a second gray pixel point, and calculating the distance between the first gray pixel point and the second gray pixel point; acquiring a pixel point closest to the second gray pixel point as a third gray pixel point, and calculating the distance between the second gray pixel point and the third gray pixel point; acquiring a pixel point closest to the third gray pixel point as a fourth gray pixel point, and calculating the distance between the fourth gray pixel point and the third gray pixel point until all pixel points in the gray edge image are traversed;
and calculating a second distance average value of distances corresponding to all pixel points in the gray edge image.
8. The method of claim 1, wherein obtaining the degree of density according to the mean value of the distances between the pixels in the filtered edge image and the mean value of the distances between the pixels in the gray edge image comprises:
and the ratio of the first distance mean value between all the pixel points in the filtering edge image to the second distance mean value between all the pixel points in the gray edge image is the density degree.
9. An adaptive gaussian smoothed image denoising processing system comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 8 when executing the computer program.
CN202210346740.5A 2022-03-31 2022-03-31 Noise processing method and system based on image smoothing Active CN114742727B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211599503.6A CN115829874A (en) 2022-03-31 2022-03-31 Noise processing method based on image smoothing
CN202210346740.5A CN114742727B (en) 2022-03-31 2022-03-31 Noise processing method and system based on image smoothing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210346740.5A CN114742727B (en) 2022-03-31 2022-03-31 Noise processing method and system based on image smoothing

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202211599503.6A Division CN115829874A (en) 2022-03-31 2022-03-31 Noise processing method based on image smoothing

Publications (2)

Publication Number Publication Date
CN114742727A true CN114742727A (en) 2022-07-12
CN114742727B CN114742727B (en) 2023-05-05

Family

ID=82279805

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202211599503.6A Pending CN115829874A (en) 2022-03-31 2022-03-31 Noise processing method based on image smoothing
CN202210346740.5A Active CN114742727B (en) 2022-03-31 2022-03-31 Noise processing method and system based on image smoothing

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202211599503.6A Pending CN115829874A (en) 2022-03-31 2022-03-31 Noise processing method based on image smoothing

Country Status (1)

Country Link
CN (2) CN115829874A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115049835A (en) * 2022-08-16 2022-09-13 众烁精密模架(南通)有限公司 Data preprocessing method based on die-casting die defect identification
CN115082507A (en) * 2022-07-22 2022-09-20 聊城扬帆田一机械有限公司 Intelligent regulation and control system of pavement cutting machine
CN115249326A (en) * 2022-09-21 2022-10-28 南通长石科技有限公司 Logistics transfer robot running state detection method based on data processing
CN115984148A (en) * 2023-03-21 2023-04-18 吉林华瑞基因科技有限公司 Denoising enhancement method for high-throughput gene sequencing data
CN116309570A (en) * 2023-05-18 2023-06-23 山东亮马新材料科技有限公司 Titanium alloy bar quality detection method and system

Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339613A (en) * 2008-08-12 2009-01-07 中国地质科学院矿产资源研究所 Remote sensing image background noise reduction method
CN101883280A (en) * 2009-05-07 2010-11-10 香港科技大学 A kind of video coding-decoding method and system of recovering noise
CN102801928A (en) * 2012-09-10 2012-11-28 上海国茂数字技术有限公司 Image processing method and image processing equipment
CN103810702A (en) * 2014-01-17 2014-05-21 浙江大学 Blocking noise variance estimation based image accumulation signal to noise ratio calculation method
CN104103041A (en) * 2013-12-24 2014-10-15 北京华科创智健康科技股份有限公司 Ultrasonic image mixed noise self-adaptive suppression method
CN104217416A (en) * 2013-05-31 2014-12-17 富士通株式会社 Grayscale image processing method and device
CN104408745A (en) * 2014-11-18 2015-03-11 北京航空航天大学 Real-time smog scene detection method based on video image
WO2015128302A1 (en) * 2014-02-25 2015-09-03 Thomson Licensing Method and apparatus for filtering and analyzing a noise in an image
US20160132995A1 (en) * 2014-11-12 2016-05-12 Adobe Systems Incorporated Structure Aware Image Denoising and Noise Variance Estimation
CN105913396A (en) * 2016-04-11 2016-08-31 湖南源信光电科技有限公司 Noise estimation-based image edge preservation mixed de-noising method
CN106663315A (en) * 2014-09-03 2017-05-10 三菱电机株式会社 Method for denoising noisy image
CN107993211A (en) * 2017-12-04 2018-05-04 中国科学院遥感与数字地球研究所 A kind of image de-noising method
CN108109123A (en) * 2017-12-21 2018-06-01 成都微光集电科技有限公司 A kind of image de-noising method
CN108765312A (en) * 2018-04-27 2018-11-06 西安科技大学 A kind of image de-noising method based on covariance information
CN108805891A (en) * 2018-05-23 2018-11-13 北京工业大学 A kind of lane detection and vehicle positioning method based on carinate figure Yu improvement sequence RANSAC
CN109410134A (en) * 2018-09-30 2019-03-01 南京信息工程大学 A kind of self-adaptive solution method based on image block classification
CN111079772A (en) * 2019-12-18 2020-04-28 深圳科瑞技术股份有限公司 Image edge extraction processing method, device and storage medium
CN111242137A (en) * 2020-01-13 2020-06-05 江西理工大学 Salt and pepper noise filtering method and device based on morphological component analysis
TWI698124B (en) * 2019-06-13 2020-07-01 瑞昱半導體股份有限公司 Image adjustment method and associated image processing circuit
CN112200742A (en) * 2020-10-10 2021-01-08 北京享云智汇科技有限公司 Filtering and denoising method applied to edge detection
CN112311962A (en) * 2019-07-29 2021-02-02 深圳市中兴微电子技术有限公司 Video denoising method and device and computer readable storage medium
CN113379640A (en) * 2021-06-25 2021-09-10 哈尔滨工业大学 Multistage filtering image denoising method fusing edge information

Patent Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339613A (en) * 2008-08-12 2009-01-07 中国地质科学院矿产资源研究所 Remote sensing image background noise reduction method
CN101883280A (en) * 2009-05-07 2010-11-10 香港科技大学 A kind of video coding-decoding method and system of recovering noise
CN102801928A (en) * 2012-09-10 2012-11-28 上海国茂数字技术有限公司 Image processing method and image processing equipment
CN104217416A (en) * 2013-05-31 2014-12-17 富士通株式会社 Grayscale image processing method and device
CN104103041A (en) * 2013-12-24 2014-10-15 北京华科创智健康科技股份有限公司 Ultrasonic image mixed noise self-adaptive suppression method
CN103810702A (en) * 2014-01-17 2014-05-21 浙江大学 Blocking noise variance estimation based image accumulation signal to noise ratio calculation method
WO2015128302A1 (en) * 2014-02-25 2015-09-03 Thomson Licensing Method and apparatus for filtering and analyzing a noise in an image
CN106663315A (en) * 2014-09-03 2017-05-10 三菱电机株式会社 Method for denoising noisy image
US20160132995A1 (en) * 2014-11-12 2016-05-12 Adobe Systems Incorporated Structure Aware Image Denoising and Noise Variance Estimation
CN104408745A (en) * 2014-11-18 2015-03-11 北京航空航天大学 Real-time smog scene detection method based on video image
CN105913396A (en) * 2016-04-11 2016-08-31 湖南源信光电科技有限公司 Noise estimation-based image edge preservation mixed de-noising method
CN107993211A (en) * 2017-12-04 2018-05-04 中国科学院遥感与数字地球研究所 A kind of image de-noising method
CN108109123A (en) * 2017-12-21 2018-06-01 成都微光集电科技有限公司 A kind of image de-noising method
CN108765312A (en) * 2018-04-27 2018-11-06 西安科技大学 A kind of image de-noising method based on covariance information
CN108805891A (en) * 2018-05-23 2018-11-13 北京工业大学 A kind of lane detection and vehicle positioning method based on carinate figure Yu improvement sequence RANSAC
CN109410134A (en) * 2018-09-30 2019-03-01 南京信息工程大学 A kind of self-adaptive solution method based on image block classification
TWI698124B (en) * 2019-06-13 2020-07-01 瑞昱半導體股份有限公司 Image adjustment method and associated image processing circuit
US20200394760A1 (en) * 2019-06-13 2020-12-17 Realtek Semiconductor Corp. Image adjustment method and associated image processing circuit
CN112311962A (en) * 2019-07-29 2021-02-02 深圳市中兴微电子技术有限公司 Video denoising method and device and computer readable storage medium
WO2021017809A1 (en) * 2019-07-29 2021-02-04 深圳市中兴微电子技术有限公司 Video denoising method and apparatus, and computer-readable storage medium
CN111079772A (en) * 2019-12-18 2020-04-28 深圳科瑞技术股份有限公司 Image edge extraction processing method, device and storage medium
CN111242137A (en) * 2020-01-13 2020-06-05 江西理工大学 Salt and pepper noise filtering method and device based on morphological component analysis
CN112200742A (en) * 2020-10-10 2021-01-08 北京享云智汇科技有限公司 Filtering and denoising method applied to edge detection
CN113379640A (en) * 2021-06-25 2021-09-10 哈尔滨工业大学 Multistage filtering image denoising method fusing edge information

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
A. DEĞİRMENCİ 等: "Local Variance Switching Gaussian Filter", 《ICATCES’18》 *
CUONG CAO PHAM 等: "A Local Variance-Based Bilateral Filtering for Artifact-Free Detail- and Edge-Preserving Smoothing", 《PSIVT 2011》 *
JIANGTAO XU 等: "An improved anisotropic diffusion filter with semi-adaptive threshold for edge preservation", 《SIGNAL PROCESSING》 *
SIMON REICH 等: "A Real-Time Edge-Preserving Denoising Filter", 《VISIGRAPP 2018》 *
周永潇: "基于图像处理的高速铁路轨道检测", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
张玉叶 等: "一种平稳小波方向能量阈值滤波的SAR图像去噪方法", 《海军航空工程学院学报》 *
王海菊 等: "自适应高斯滤波图像去噪算法", 《福建电脑》 *
赵萍 等: "一种适用于高精度视觉测量的边缘检测方法", 《制造业自动化》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115082507A (en) * 2022-07-22 2022-09-20 聊城扬帆田一机械有限公司 Intelligent regulation and control system of pavement cutting machine
CN115049835A (en) * 2022-08-16 2022-09-13 众烁精密模架(南通)有限公司 Data preprocessing method based on die-casting die defect identification
CN115249326A (en) * 2022-09-21 2022-10-28 南通长石科技有限公司 Logistics transfer robot running state detection method based on data processing
CN115984148A (en) * 2023-03-21 2023-04-18 吉林华瑞基因科技有限公司 Denoising enhancement method for high-throughput gene sequencing data
CN116309570A (en) * 2023-05-18 2023-06-23 山东亮马新材料科技有限公司 Titanium alloy bar quality detection method and system
CN116309570B (en) * 2023-05-18 2023-08-04 山东亮马新材料科技有限公司 Titanium alloy bar quality detection method and system

Also Published As

Publication number Publication date
CN115829874A (en) 2023-03-21
CN114742727B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
CN114742727A (en) Noise processing method and system based on image smoothing
JP4175461B2 (en) Increase the contrast of undistorted images
US6360021B1 (en) Apparatus and methods of image and signal processing
US6014468A (en) Apparatus and methods for image and signal processing
EP1059811A2 (en) Method and system for image processing, and recording medium
CN111681174B (en) Joint filtering method for inhibiting salt-pepper/Gaussian noise mixing target image
Zhuang et al. Image enhancement via subimage histogram equalization based on mean and variance
EP1909227B1 (en) Method of and apparatus for minimizing ringing artifacts in an input image
CN110796615B (en) Image denoising method, device and storage medium
US20110069904A1 (en) Image denoising method
US9443286B2 (en) Gray image processing method and apparatus based on wavelet transformation
US20110069902A1 (en) Image denoising method
CN116934755B (en) Pulmonary tuberculosis CT image enhancement system based on histogram equalization
CN114998112A (en) Image denoising method and system based on adaptive frequency domain filtering
JP2003509779A (en) Compressed edge adaptive video and image sharpening and scaling method and system
Pugazhenthi et al. Image contrast enhancement by automatic multi-histogram equalization for satellite images
van Zyl Marais et al. Robust defocus blur identification in the context of blind image quality assessment
CN113011433B (en) Filtering parameter adjusting method and device
CN116402816A (en) Physical examination CT image data management method and system
Chanu et al. A new algorithm for removing salt and pepper noise from color medical images
Santhi et al. Contrast enhancement by modified octagon histogram equalization
Ghazal et al. Structure-oriented multidirectional wiener filter for denoising of image and video signals
Rama Lakshmi et al. A Review on Image Denoising Algorithms for Various Applications
WO2022016326A1 (en) Image processing method, electronic device, and computer-readable medium
CN115689906A (en) Image processing method and device

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 226200 group 11, Chengbei Village, Huilong Town, Qidong City, Nantong City, Jiangsu Province

Patentee after: Jiangsu Dianboshi Energy Equipment Co.,Ltd.

Address before: 226299 group 11, Chengbei Village, Huilong Town, Qidong City, Nantong City, Jiangsu Province

Patentee before: Nantong Electric doctor automation equipment Co.,Ltd.