CN116977207A - Image noise reduction method based on selective smoothing filtering - Google Patents

Image noise reduction method based on selective smoothing filtering Download PDF

Info

Publication number
CN116977207A
CN116977207A CN202310809660.3A CN202310809660A CN116977207A CN 116977207 A CN116977207 A CN 116977207A CN 202310809660 A CN202310809660 A CN 202310809660A CN 116977207 A CN116977207 A CN 116977207A
Authority
CN
China
Prior art keywords
rectangular frame
image
pixel
value
noise reduction
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.)
Pending
Application number
CN202310809660.3A
Other languages
Chinese (zh)
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.)
Guangxi University of Science and Technology
Original Assignee
Guangxi University of Science and Technology
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 Guangxi University of Science and Technology filed Critical Guangxi University of Science and Technology
Publication of CN116977207A publication Critical patent/CN116977207A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Landscapes

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

Abstract

The invention aims to provide an image noise reduction method based on selective smoothing filtering, which comprises the following steps of: A. inputting a gray image of an image to be denoised, establishing a 3*3 rectangular frame, sweeping the whole image to be denoised by using the rectangular frame, and calculating the gradient t of a pixel point in the center of the rectangular frame and each pixel point on the edge of the rectangular frame after each movement; b, setting a noise threshold value x, and inputting the rectangular frame into the step B if the noise threshold value x is not more than the t; otherwise, inputting the rectangular frame into the step C; B. set edge detectionA threshold value n, wherein a threshold value K is calculated based on each rectangular frame input in the step A; if K is larger than or equal to n, the square frame is used for obtaining the root mean square value h of the gray value E Replacing the gray value of the center point E of the rectangular frame; if K<n, inputting each pixel point of the rectangular frame into the step C; C. carrying out Gaussian smoothing processing on each input rectangular frame; D. and B, after the calculation of the steps B and C is finished, obtaining a final noise reduction image. The invention can improve the noise reduction effect and ensure the image quality.

Description

Image noise reduction method based on selective smoothing filtering
Technical Field
The invention relates to the field of image processing, in particular to application in images with different visual angles, and in particular relates to an image noise reduction method based on selective smoothing filtering.
Background
The image of the digital signal is subject to noise interference from the imaging device and the external environment during the digital processing and transmission. The size of noise is a very important factor in measuring image quality, so measuring noise and quickly and accurately filtering noise without affecting the overall performance of the system is an important method to improve image quality. The noise of an image can be classified from a source into system noise, which is noise from the system itself, and environmental noise, which is noise from the external environment. In order to obtain a good quality image, it is often necessary to process and optimize the image by means of an algorithm for image denoising.
One important difficulty in image noise reduction is in the control of smoothness; too low a smoothness can lead to insufficient noise reduction, too high a smoothness can lead to loss of image details, and the smoothness is also unnatural in vision; because the balance between insufficient noise reduction and excessive smoothing is not well mastered, and the judgment of the noise reduction quality varies from person to person, most noise reduction filtering often selectively corrects the noise reduction result by allowing a user to adjust parameters. Therefore, how to control the smoothness is an important issue for selective image noise reduction.
In the related art, when noise reduction processing is performed on an image, the same filtering is generally used for all the images, that is, a portion of the image where there is no noise is processed, so that the image where there is no noise is also disturbed by the filtering, and image quality is affected.
Therefore, how to selectively process noise contained in an image, select corresponding fast and accurate smooth filtering for different noises, and improve the efficiency of noise reduction processing of the image is a technical problem to be solved.
Disclosure of Invention
The invention aims to provide an image noise reduction method based on selective smooth filtering, which can pointedly select the optimal area to process image noise and avoid the phenomenon of image blurring caused by comprehensively filtering the whole image by using a filtering algorithm; meanwhile, the smooth filtering degree can be accurately controlled by selecting the smooth filtering, the noise reduction effect is effectively improved, and the quality of the image is ensured.
The technical scheme of the invention is as follows:
an image denoising method based on selective smoothing filtering, comprising the steps of:
A. inputting an image to be noise reduced, converting the image to be noise reduced into a gray image, and establishing a 3*3 rectangular frame as follows:
A B C
D E F
G H I
starting from any position of an image to be denoised, moving and sweeping the whole image to be denoised by a rectangular frame, wherein the moving distance is one pixel position each time, recording the gray value of each pixel in the rectangular frame after each moving, and respectively making differences between the gray value of the pixel in the center of the rectangular frame and the gray value of each pixel on the edge of the rectangular frame to obtain the gradient t of each edge pixel of the rectangular frame at the position; b, setting a noise threshold value x, and for each rectangular frame, if |t| is not more than x, representing that the pixel points in the rectangular frame range are all normal points, and inputting the pixel points in the rectangular frame into the step B; otherwise, representing that the pixel points in the rectangular frame range have noise points, and inputting the pixel points in the rectangular frame into the step C;
B. setting an edge detection threshold n, and inputting gray values of all pixel points of all rectangular frames input in the step A into the following formula to calculate a threshold K;
if K is larger than or equal to n, the gray value of each edge pixel point of the rectangular frame is brought into the following formula (2) to obtain a root mean square value h E The root mean square value h E Replacing the gray value of the center point E of the rectangular frame; if K<n, inputting each pixel point of the rectangular frame into the step C;
C. carrying out Gaussian smoothing treatment on each rectangular frame input in the step A or the step B;
D. and B, after the calculation of the steps B and C is finished, obtaining a final noise reduction image.
The setting of the threshold value x comprises the following steps:
based on the rectangular frame established in the step A, starting from any position of the image to be denoised, moving the rectangular frame to sweep the whole image to be denoised, wherein each moving distance is a pixel position, recording the gray value of each pixel in the rectangular frame after each moving, performing Gaussian smoothing on each rectangular frame, and respectively making difference between the gray value of each pixel in the center of each rectangular frame after Gaussian smoothing and the gray value of each pixel on the edge of the rectangular frame to obtain the gradient t of each edge pixel in each rectangular frame 0 Selecting |t 0 Maximum value of #, and the maximum value is set as a threshold value x.
The formula of Gaussian smoothing is as follows:
wherein σ represents the weight per unit distance; x and y represent template coordinates of the center pixel point E.
The setting of the threshold value n comprises the following steps:
averaging gray values of all pixels of an original imageThen bringing the value and the threshold value x into the following formula (4) together for solving, wherein the calculated result is the threshold value n;
according to the invention, through carrying out rectangular frame sweeping segmentation on the image to be noise-reduced, carrying out specific selection on the segmented pixel point areas and carrying out specific filtering treatment, the filtering treatment is carried out on different types of noise in a targeted manner, the image blurring caused by filtering all the images is avoided, the edge is highlighted by the root mean square noise reduction smoothness of the edge contour, and the quality of the image is ensured while the noise reduction effect is ensured.
Drawings
FIG. 1 is an original picture of a plastic part before noise reduction;
fig. 2 is a photograph of a plastic part after noise reduction.
Detailed Description
The invention is described in detail below with reference to the drawings and examples.
Example 1
An image denoising method based on selective smoothing filtering, comprising the steps of:
A. inputting an image to be noise reduced, converting the image to be noise reduced into a gray image, and establishing a 3*3 rectangular frame as follows:
A B C
D E F
G H I
starting from any position of an image to be denoised, moving and sweeping the whole image to be denoised by a rectangular frame, wherein the moving distance is one pixel position each time, recording the gray value of each pixel in the rectangular frame after each moving, and respectively making differences between the gray value of the pixel in the center of the rectangular frame and the gray value of each pixel on the edge of the rectangular frame to obtain the gradient t of each edge pixel of the rectangular frame at the position;
the noise threshold value x is set, and the specific process is as follows: based on the rectangular frame established in the step A, starting from any position of the image to be denoised, moving the rectangular frame to sweep the whole image to be denoised, wherein each moving distance is a pixel position, recording the gray value of each pixel in the rectangular frame after each moving, performing Gaussian smoothing on each rectangular frame, and respectively making difference between the gray value of each pixel in the center of each rectangular frame after Gaussian smoothing and the gray value of each pixel on the edge of the rectangular frame to obtain the gradient t of each edge pixel in each rectangular frame 0 Selecting |t 0 Maximum value of #, and the maximum value is set as a threshold value x.
B, if the t is less than or equal to x, representing that the pixel points in the rectangular frame range are normal points, and inputting the pixel points in the rectangular frame into the step B; otherwise, representing that the pixel points in the rectangular frame range have noise points, and inputting the pixel points in the rectangular frame into the step D;
B. setting an edge detection threshold n, and inputting gray values of all pixel points of all rectangular frames input in the step A into the following formula to calculate a threshold K;
the setting of the threshold value n comprises the following steps:
averaging gray values of all pixels of an original imageThen bringing the value and the threshold value x into the following formula (4) together for solving, wherein the calculated result is the threshold value n;
if K is more than or equal to n,the gray value of each edge pixel point of the rectangular frame is brought into the following formula (2) to obtain a root mean square value h E The root mean square value h E Replacing the gray value of the center point E of the rectangular frame; if K<n, inputting each pixel point of the rectangular frame into the step C;
C. carrying out Gaussian smoothing treatment on each rectangular frame input in the step A or the step B;
the formula of gaussian smoothing is:
wherein σ represents the weight per unit distance; x and y represent template coordinates of the center pixel point E.
D. And B, after the calculation of the steps B and C is finished, obtaining a final noise reduction image.
The setting of the threshold value n comprises the following steps:
averaging gray values of all pixels of an original imageAnd then bringing the value and the threshold value x into the following formula (4) to solve, wherein the calculated result is the threshold value n.
Example 2
The method of example 1 was used to make noise reduction on a plastic part picture, and specific results are shown in fig. 1 and 2, where fig. 1 is an original picture before noise reduction of the part, and fig. 2 is a picture after noise reduction.
As can be seen from comparison between fig. 1 and fig. 2, after the noise reduction treatment in fig. 1, the noise point is basically disappeared, and the image is clearer.

Claims (4)

1. An image noise reduction method based on selective smoothing filtering, which is characterized by comprising the following steps:
A. inputting an image to be noise reduced, converting the image to be noise reduced into a gray image, and establishing a 3*3 rectangular frame as follows:
A B C D E F G H I
starting from any position of an image to be denoised, moving and sweeping the whole image to be denoised by a rectangular frame, wherein the moving distance is one pixel position each time, recording the gray value of each pixel in the rectangular frame after each moving, and respectively making differences between the gray value of the pixel in the center of the rectangular frame and the gray value of each pixel on the edge of the rectangular frame to obtain the gradient t of each edge pixel of the rectangular frame at the position; b, setting a noise threshold value x, and for each rectangular frame, if |t| is not more than x, representing that the pixel points in the rectangular frame range are all normal points, and inputting the pixel points in the rectangular frame into the step B; otherwise, representing that the pixel points in the rectangular frame range have noise points, and inputting the pixel points in the rectangular frame into the step C;
B. setting an edge detection threshold n, and inputting gray values of all pixel points of all rectangular frames input in the step A into the following formula to calculate a threshold K;
if K is larger than or equal to n, the gray value of each edge pixel point of the rectangular frame is brought into the following formula (2) to obtain a root mean square value h E The root mean square value h E Replacing the gray value of the center point E of the rectangular frame; if K<n, inputting each pixel point of the rectangular frame into the step C;
C. carrying out Gaussian smoothing treatment on each rectangular frame input in the step A or the step B;
D. and B, after the calculation of the steps B and C is finished, obtaining a final noise reduction image.
2. The method for noise reduction of an image based on selective smoothing filtering as claimed in claim 1, wherein said setting of the threshold x comprises the steps of:
based on the rectangular frame established in the step A, starting from any position of the image to be denoised, moving the rectangular frame to sweep the whole image to be denoised, wherein each moving distance is a pixel position, recording the gray value of each pixel in the rectangular frame after each moving, performing Gaussian smoothing on each rectangular frame, and respectively making difference between the gray value of each pixel in the center of each rectangular frame after Gaussian smoothing and the gray value of each pixel on the edge of the rectangular frame to obtain the gradient t of each edge pixel in each rectangular frame 0 Selecting |t 0 Maximum value of #, and the maximum value is set as a threshold value x.
3. The selective smoothing filter-based image noise reduction method according to claim 1 or 2, characterized in that:
the formula of Gaussian smoothing is as follows:
wherein σ represents the weight per unit distance; x and y represent template coordinates of the center pixel point E.
4. The method for noise reduction of an image based on selective smoothing filtering as claimed in claim 2, wherein the setting of the threshold n comprises the steps of:
averaging gray values of all pixels of an original imageThen bringing the value and the threshold value x into the following formula (4) together for solving, wherein the calculated result is the threshold value n;
CN202310809660.3A 2023-03-07 2023-07-04 Image noise reduction method based on selective smoothing filtering Pending CN116977207A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310210618.XA CN116402705A (en) 2023-03-07 2023-03-07 Image noise reduction method based on selective smoothing filtering
CN202310210618X 2023-03-07

Publications (1)

Publication Number Publication Date
CN116977207A true CN116977207A (en) 2023-10-31

Family

ID=87016894

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310210618.XA Withdrawn CN116402705A (en) 2023-03-07 2023-03-07 Image noise reduction method based on selective smoothing filtering
CN202310809660.3A Pending CN116977207A (en) 2023-03-07 2023-07-04 Image noise reduction method based on selective smoothing filtering

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202310210618.XA Withdrawn CN116402705A (en) 2023-03-07 2023-03-07 Image noise reduction method based on selective smoothing filtering

Country Status (1)

Country Link
CN (2) CN116402705A (en)

Also Published As

Publication number Publication date
CN116402705A (en) 2023-07-07

Similar Documents

Publication Publication Date Title
CN108921800B (en) Non-local mean denoising method based on shape self-adaptive search window
CN112819772B (en) High-precision rapid pattern detection and recognition method
CN109507192B (en) Magnetic core surface defect detection method based on machine vision
CN109785245B (en) Light spot image trimming method
CN109377450B (en) Edge protection denoising method
CN105913396A (en) Noise estimation-based image edge preservation mixed de-noising method
KR20050041886A (en) Global and local statistics controlled noise reduction apparatus and method
CN109003233B (en) Image denoising method based on self-adaptive weight total variation model
CN108470343A (en) A kind of improved method for detecting image edge
CN107067375A (en) A kind of image defogging method based on dark channel prior and marginal information
CN116468641A (en) Infrared blood vessel image enhancement processing method
CN111340717A (en) Image preprocessing device for uncooled thermal infrared imager
CN108280836B (en) Image processing method and device
CN114418904A (en) Infrared image enhancement method based on improved histogram equalization and enhanced high-pass filtering
WO2021128498A1 (en) Image adaptive noise reduction method and apparatus
CN109767407B (en) Secondary estimation method for atmospheric transmissivity image in defogging process
CN113432723B (en) Image processing method, system and computer system for weakening stray radiation
WO2020107308A1 (en) Low-light-level image rapid enhancement method and apparatus based on retinex
CN113450272A (en) Image enhancement method based on sinusoidal curve change and application thereof
CN113011433B (en) Filtering parameter adjusting method and device
CN111080563B (en) Histogram equalization method based on traversal optimization
CN116977207A (en) Image noise reduction method based on selective smoothing filtering
CN107945196B (en) Image edge detection method for aerial photography correction image splicing
CN113610734B (en) Image edge processing method based on guided filtering and application
CN114519675A (en) Image processing method and device, electronic equipment and 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