CN113450264A - Method for removing ringing effect and related device - Google Patents

Method for removing ringing effect and related device Download PDF

Info

Publication number
CN113450264A
CN113450264A CN202010229261.6A CN202010229261A CN113450264A CN 113450264 A CN113450264 A CN 113450264A CN 202010229261 A CN202010229261 A CN 202010229261A CN 113450264 A CN113450264 A CN 113450264A
Authority
CN
China
Prior art keywords
region
sub
pixel
inflection point
processed
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
CN202010229261.6A
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.)
Shanghai Tuqing Microelectronics Co ltd
AutoChips Inc
Original Assignee
Shanghai Tuqing Microelectronics 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 Shanghai Tuqing Microelectronics Co ltd filed Critical Shanghai Tuqing Microelectronics Co ltd
Priority to CN202010229261.6A priority Critical patent/CN113450264A/en
Publication of CN113450264A publication Critical patent/CN113450264A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • 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/20024Filtering details
    • 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/20172Image enhancement details
    • G06T2207/20192Edge enhancement; Edge preservation

Landscapes

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

Abstract

The application provides a method for removing ringing effect and a related device thereof. The method for removing ringing effect comprises the following steps: acquiring an image to be processed; confirming an inflection point in a transition region in an image to be processed; the transition region comprises a flat region on one side of the inflection point and a change region on the other side of the inflection point, the pixel values of the pixel points in the flat region are approximately equal to the pixel values of the inflection point, and the pixel values of the pixel points in the change region are all larger than or all smaller than the pixel values of the inflection point; taking a first sub flat area close to the inflection point and a second sub flat area far away from the inflection point from the flat area in the transition area to which the inflection point belongs; and carrying out sharpening enhancement processing on the region to be sharpened including the first sub-flat region, and carrying out smoothing filtering processing on the second sub-flat region to obtain a processed image. The method can remove the ringing effect in the image to be processed while retaining the edge information of the image.

Description

Method for removing ringing effect and related device
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method for removing ringing effect and a related apparatus.
Background
In digital image processing, ringing effects from a frequency domain perspective, due to the bandwidth limitation of the digital signal or the absence of high frequency components through a low pass filter, ring artifacts such as "ghosting" may exist near the edges of the image. This phenomenon is often more likely to occur during compression of digital images and resampling of images. The image has a more severe effect on the visual effect, and usually for a better visual effect, further processing is performed in the presence of ringing to remove such ringing artifacts and restore the original image. However, although the conventional ringing removal method can better avoid the occurrence of ringing effect, it also causes the loss of edge information.
Disclosure of Invention
The application provides a method for removing ringing effect and a related device thereof, which can remove the ringing effect in an image to be processed while keeping the edge information of the image.
To solve the technical problem, the present application provides a method for removing ringing effect, the method comprising: acquiring an image to be processed; confirming an inflection point in a transition region in an image to be processed; the transition region comprises a flat region on one side of the inflection point and a change region on the other side of the inflection point, the pixel values of the pixel points in the flat region are approximately equal to the pixel values of the inflection point, and the pixel values of the pixel points in the change region are all larger than or all smaller than the pixel values of the inflection point; taking a first sub flat area close to the inflection point and a second sub flat area far away from the inflection point from the flat area in the transition area to which the inflection point belongs; and performing sharpening enhancement processing on the first sub flat area, and performing smoothing filtering processing on the second sub flat area to obtain a processed image.
To solve the technical problem, the present application provides an apparatus for removing ringing, which includes a controller, a smoothing filter, and a sharpening enhancement filter:
the controller is used for judging and confirming inflection points in a transition region in the acquired image to be processed; the transition region comprises a flat region on one side of the inflection point and a change region on the other side of the inflection point, the pixel values of the pixel points in the flat region are approximately equal to the pixel values of the inflection point, and the pixel values of the pixel points in the change region are all larger than or all smaller than the pixel values of the inflection point; identifying a first sub-flat region close to the inflection point and a second sub-flat region far from the inflection point from the flat regions in the transition region to which the inflection point belongs; and controlling a sharpening enhancement filter to perform sharpening enhancement on the region to be sharpened including the first sub-flat region, and controlling a smoothing filter to perform smoothing filtering on the second sub-flat region to obtain a processed image.
To solve the technical problem, the present application provides a computer storage medium having a computer program stored therein, the computer program, when executed, implementing the steps in the method of removing ringing effects.
The method comprises the following steps: whether each pixel point on an image to be processed is an inflection point in a transition region is determined, then a first sub flat region close to the inflection point and a second sub flat region far away from the inflection point are taken from a flat region in the transition region to which the inflection point belongs, sharpening enhancement processing is carried out on the region to be sharpened including the first sub flat region close to the inflection point so as to retain edge information of the image, and smoothing filtering processing is carried out on the second sub flat region far away from the inflection point so as to remove chain waves of the second sub flat region, so that a ringing effect in the image is removed, and the ringing effect in the image to be processed can be removed while the edge information of the image is retained.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram of a first embodiment of a method for removing ringing effects according to the present application;
FIG. 2 is a schematic diagram of an image to be processed and a processing direction in the method for removing ringing effect of the present application;
FIG. 3 is a diagram illustrating a pixel point for determining whether a pixel point has a pixel value substantially equal to an inflection point in the method for removing a ringing effect of the present application;
FIG. 4 is a diagram illustrating another pixel point for determining whether a pixel point has a pixel value substantially equal to a knee point in the method for removing ringing effect of the present application;
FIG. 5 is a diagram illustrating a first sub-flat region and a second sub-flat region selected in the method for removing ringing effect of the present application;
FIG. 6 is a schematic diagram of the structure of the present application for removing ringing effects;
FIG. 7 is a schematic flow chart diagram illustrating a second embodiment of the method for removing ringing effects of the present application;
FIG. 8 is a schematic diagram of a second transition region of the present method of removing ringing effects;
FIG. 9 is a schematic diagram illustrating a sharpening enhancement process applied to a first sub-flat region in a first transition region in the method for removing ringing effect of the present application;
FIG. 10 is a diagram illustrating sharpening enhancement of a first sub-flat region in a second transition region according to the method for removing ringing;
FIG. 11 is a schematic diagram of a smoothing filter process in the method for removing ringing effect of the present application;
FIG. 12 is a schematic diagram of an embodiment of the apparatus for removing ringing effect of the present application;
FIG. 13 is a schematic structural diagram of an embodiment of a computer storage medium according to the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present application, the method for removing ringing effect and the related apparatus provided by the present application are described in further detail below with reference to the accompanying drawings and the detailed description.
Referring to fig. 1, fig. 1 is a flowchart illustrating a first embodiment of a method for removing ringing. The method for removing ringing effect in this embodiment includes the following steps.
S101: and acquiring an image to be processed.
S102: and confirming the inflection point in the transition region in the image to be processed.
In this embodiment, the inflection point in the transition region in the image to be processed may be determined in a manner of determining whether the pixel point in the image to be processed is the inflection point in the transition region one by one.
Optionally, the determining whether a pixel point in the image to be processed is an inflection point in the transition region may include: determining whether the pixel value distribution condition of a pixel point and a neighborhood pixel point in the image to be processed accords with the pixel value distribution condition of a transition region, namely judging whether the pixel point in the image to be processed is a pixel point in the transition region of the image to be processed; when the distribution conditions are in accordance, whether a pixel point in the image to be processed is an inflection point in the transition region to which the pixel point belongs can be continuously judged. For example, when determining whether E5 in fig. 2 is an inflection point in the transition region, it may be determined whether the pixel value distribution of neighboring pixel points — C5, D5, F5, and G5 in the horizontal direction of E5 and E5 is the same as or similar to the pixel value distribution of the transition region, if it is determined that E5 is a pixel point in the transition region in the image to be processed; and continuously judging whether the E5 is the inflection point in the transition region of the pixel point.
Wherein the transition region comprises a flat region on one side of the inflection point and a varying region on the other side of the inflection point. For example, as shown in fig. 3 and 4, the region from pixel point 1 to pixel point 9 is a transition region, where pixel point 5 is an inflection point in the transition region, the region from pixel point 1 to pixel point 4 is a variation region, and the region from pixel point 6 to pixel point 9 is a flat region.
And the pixel value of the pixel point in the flat area is approximately equal to the pixel value of the inflection point. And the flat region may include one or more pixel points.
When the absolute value of the difference between the pixel value of a pixel and the pixel value of the inflection point is smaller than the third threshold a, it indicates that the pixel value of the pixel is substantially equal to the pixel value of the inflection point, for example, the absolute values of the differences between the pixel values of all the pixels in the flat area shown in fig. 3 and 4 and the pixel value of the inflection point are smaller than the third threshold a.
In one implementation, the third threshold a may be fixed, for example, the third threshold a may be a numerical value of 0.1, 0.2, and so on.
In other implementation manners, the third threshold a may also be automatically adjusted according to an absolute value of a difference between a pixel value of the inflection point and a pixel value of a neighboring pixel point of the inflection point. Specifically, the third threshold a may be positively correlated with a maximum of an absolute value of a difference between a pixel value of the inflection point and a neighboring pixel point of the inflection point. More specifically, the third threshold a may be equal to 1/4 times, 1/5 times, 1/6 times, or the like of the maximum value of the absolute value of the pixel value of the inflection point and the difference value of the neighboring pixel points of the inflection point.
In addition, the pixel values of the pixel points in the change area are all larger or all smaller than the pixel value of the inflection point. The change region may also include one or more pixel points. It is understood that the absolute values of the differences between the pixel values of the pixels in the change area and the inflection point may be both greater than the third threshold a.
S103: taking a first sub flat area close to the inflection point and a second sub flat area far away from the inflection point from the flat area in the transition area to which the inflection point belongs;
as shown in fig. 5, after the inflection point of the transition region in the image to be processed is determined through step S102, a first sub flat region F close to the inflection point and a second sub flat region S far from the inflection point may be taken from the flat regions in the transition region to which the inflection point belongs.
It will be appreciated that the second sub-flat region is further away from the inflection point than the first sub-flat region, i.e. the second sub-flat region may be located on the side of the first sub-flat region away from the inflection point. Also, the first sub-flat region and the second sub-flat region may be adjacent.
The first sub-flat region may be a section of the flat region near the inflection point, and specifically, the first sub-flat region may be one or more pixel points adjacent to the inflection point in the flat region. The length of the first sub-flat region may be determined according to the specification of the filter for the sharpening enhancement process and the source of the pixel points input to the sharpening enhancement filter. For example, the sharpening enhancement filter is a 7-tap filter, and the pixels input to the sharpening enhancement filter are all from the first sub-flat region, which includes 7 pixels. For another example, the sharpening enhancement filter is a 7-tap filter, and the pixel points input to the sharpening enhancement filter are from the inflection point and the first sub-flat region, which may include 6 pixel points. For another example, the sharpening enhancement filter is a 7-tap filter, and the pixel points input to the sharpening enhancement filter are from the inflection point and the first sub-flat region, the change region, and that first sub-flat region may include 1, 2, or 3 equal pixel points.
The second sub-flat region may be a middle section of the flat region, or may be a section of the flat region away from the inflection point. The second sub-flat region may not overlap with the first sub-flat region, or may overlap with the first sub-flat region. In one implementation, the length of the second sub-flat region may also be determined according to the specification of the smoothing filter. In another implementation manner, the length of the second sub-flat region may also be adjusted according to the total length of the flat region, that is, the second sub-flat region may include a section of the flat region other than the first sub-flat region, so that the ringing effect at the flat region may be well removed, and the image processing efficiency is improved.
S104: and carrying out sharpening enhancement processing on the region to be sharpened including the first sub-smooth region, and carrying out smoothing filtering processing on the second sub-smooth region to obtain a processed image.
The region to be sharpened comprises a first sub-flat region.
Alternatively, the region to be sharpened may include only the first sub-flat region. Alternatively, the region to be sharpened may be composed of the first sub-flat region and the inflection point. Or, the region to be sharpened may include at least part of the pixel points of the first sub flat region, the inflection point, and the change region, where the number of the pixel points of the first sub flat region in the region to be sharpened may be equal to the number of the pixel points of the change region in the region to be sharpened.
For example, as shown in fig. 5, the first sub-flat region F selected in step S103 is subjected to sharpening enhancement processing to retain edge information. And performing smooth filtering processing on the second sub-flat area S to eliminate the ringing effect.
In the embodiment, an inflection point in a transition region in an image to be processed is determined, then a first sub flat region close to the inflection point and a second sub flat region far away from the inflection point are taken from a flat region in the transition region to which the inflection point belongs, sharpening enhancement processing is performed on the region to be sharpened including the first sub flat region to retain edge information of the image, and smoothing filter processing is performed on the second sub flat region far away from the inflection point to remove chain waves of the second sub flat region, so that a ringing effect in the image is removed, and the ringing effect in the image to be processed can be removed while the edge information of the image is retained.
The method and the device can process the image to be processed in one direction or a plurality of directions so as to remove the ringing noise of the image to be processed. The image to be processed may be processed in one direction or in multiple directions by the system for removing ringing effects shown in fig. 6. The system for removing ringing effect can comprise a Main controller (Main FSM) and sub-controllers and line buffers corresponding to all processing directions. When an image to be processed is processed, data in the ddr of the image to be processed is pre-fetched into a line buffer area, whether the ringing removal processing is carried out in each processing direction is controlled through a main controller (H: 0-degree direction V: 90-degree direction Diag-1: 45-degree direction Diag-2: 135-degree direction), and a sub-controller corresponding to the processing direction needing to be subjected to the ringing removal is started to process the image to be processed. As shown in fig. 7, the method for processing an image to be processed in one or more directions to remove ringing is described in detail in the second embodiment of the method for removing ringing. The method for removing ringing effect in this embodiment includes the following steps.
S201: and acquiring an image to be processed.
S202: and confirming the processing direction of the image to be processed.
As shown in fig. 7, the direction in which the image to be processed is processed may include one or more of a 0 ° direction, a 45 ° direction, a 90 ° direction, and a 135 ° direction. Of course, the direction of processing the image to be processed may include directions at other angles.
S203: the inflection points in the transition regions in the image to be processed are identified in at least one processing direction, respectively.
In an implementation, after determining the processing direction of the image to be processed, an inflection point in a transition region of the image to be processed in at least one processing direction may be identified.
The inflection points of the image to be processed in the transition region in each processing direction can be confirmed in a mode of judging whether each pixel point in the image to be processed is an inflection point in the transition region in each processing direction one by one.
Optionally, the step of determining whether each pixel point in the image to be processed is an inflection point in the transition region in each processing direction may include: and determining whether the pixel values of each pixel point and the neighborhood pixel points in each direction of each pixel point accord with the pixel value distribution condition of the transition region, when at least part of the pixel points accord with at least part of the processing directions, at least part of the pixel points are pixel points in the transition region in the image to be processed in at least part of the processing directions, and continuously judging whether at least part of the pixel points are inflection points of the transition region to which the pixel points belong.
For example, as shown in fig. 2, when it is determined whether E5 is an inflection point in the transition region in the 90 ° direction, it may be determined whether the pixel value distribution of neighboring pixel points in the 90 ° directions of E5 and E5, that is, E3, E4, E6, and E7, matches the pixel value distribution of the transition region, and when the pixel value distributions match, it may be determined that E5 is a pixel point in the transition region in the 90 ° direction in the image to be processed, and then it is determined whether E5 is the inflection point in the transition region in the 90 ° direction, that is, it is determined whether the pixel point is the inflection point in the 90 ° direction.
It is understood that a pixel point may be an inflection point in a transition region on the image to be processed in all processing directions. One pixel point can also be an inflection point in the transition region of the image to be processed in the partial processing direction. Of course, a pixel point may not be an inflection point in the transition region on the image to be processed in all processing directions.
In addition, the transition region can be divided into a first transition region and a second transition region according to the pixel values of the pixel points in the change region. Specifically, as shown in fig. 3 and 4, a transition region in which the pixel values of the pixel points in the change region are all greater than the pixel value of the inflection point is a first transition region. As shown in fig. 8, the transition region in which the pixel values of the pixel points in the change region are all smaller than the pixel value of the inflection point is the second transition region.
S204: a first sub flat region close to the inflection point and a second sub flat region far from the inflection point are taken from the flat regions in the transition regions identified in the respective processing directions.
When it is determined that at least one pixel point exists in the image to be processed as an inflection point in at least one transition region in the processing direction, a first sub-flat region close to the inflection point and a second sub-flat region far away from the inflection point are respectively selected from the flat regions in the transition regions determined in each processing direction.
For example, as shown in fig. 2, when it is confirmed that E5 in the image to be processed is an inflection point in the transition region in the 0 ° direction, and the region of E1 to E4 is a flat region in the transition region in the 0 ° direction to which E5 belongs, it is possible to take E4 as a first sub flat region in the transition region in the 0 ° direction to which E5 belongs, and take E1, E2, and E3 as a second sub flat region in the transition region in the 0 ° direction to which E5 belongs. For another example, when it is confirmed that E5 in the image to be processed is an inflection point in the transition region in the 135 ° direction, and the region of F4 to J1 is a flat region in the transition region in the 135 ° direction to which E5 belongs, F4 may be taken as the first sub-flat region in the transition region in the 135 ° direction to which E5 belongs; g3, H2, and J1 may be taken as the second sub-flat region in the transition region in the 135 ° direction to which E5 belongs.
S205: and carrying out sharpening enhancement processing on the region to be sharpened in each processing direction, and carrying out smooth filtering processing on the second sub-flat region in each direction to obtain pixel values after processing the pixel points in the image to be processed along each direction.
In one implementation, when the direction of processing the image to be processed is one, a sharpening enhancement processing threshold may be obtained before the sharpening enhancement processing is performed on the region to be sharpened, and then the sharpening enhancement processing is performed on the region to be sharpened according to the sharpening enhancement processing threshold.
In another implementation, when there are multiple processing directions of the image to be processed, the sharpening enhancement processing threshold in each processing direction may be the same or different. That is, before performing the sharpening enhancement on the region to be sharpened, the sharpening enhancement threshold for performing the sharpening enhancement on the region to be sharpened in each processing direction may be determined, and then the sharpening enhancement is performed on the region to be sharpened in the corresponding direction based on the sharpening enhancement threshold in each processing direction.
The sharpening enhancement processing threshold corresponding to the first transition region may be referred to as a first threshold, and the sharpening enhancement processing threshold corresponding to the second transition region may be referred to as a second threshold. The first threshold and the second threshold may be different or the same. And setting corresponding threshold values for sharpening enhancement processing of the regions to be sharpened in the first transition region and the second transition region respectively in consideration of the type of the transition region, and adjusting a processing mode according to the type of the transition region, so that the edge information of the image can be more accurately reserved in consideration of over-excitation and under-excitation.
In one implementation, the step of performing sharpening enhancement processing on the region to be sharpened may include: and inputting one or more pixel points adjacent to the inflection point in the first sub flat region and the inflection point and the change region into a sharpening enhancement filter to obtain pixel values of the pixel points in the first sub flat region, the inflection point and the one or more pixel points adjacent to the inflection point in the change region output by the sharpening enhancement filter so as to retain the edge information of the image. The number of the pixel points in the first sub-flat region is equal to the number of the pixel points in the change region input to the sharpening enhancement filter, and may be n, so that the number of taps of the sharpening enhancement filter may be 2n + 1.
Specifically, as shown in fig. 9, when the sharpening enhancement filter performs sharpening enhancement on the region to be sharpened in the first transition region, the pixel value of the inflection point may be subtracted by the first threshold to obtain the pixel value of the processed inflection point, and the pixel values of the pixel points adjacent to the inflection point may be changed, so that the processed pixel values of the pixel points in the first sub-flat region, the inflection point, and the change region input to the sharpening enhancement filter form a peak, and the processed inflection point is a base, and finally the pixel values processed by the pixel points in the first sub-flat region gradually decrease along the direction toward the inflection point, and the pixel values processed by the pixel points input to the change region of the sharpening enhancement filter gradually increase along the direction away from the inflection point.
Correspondingly, as shown in fig. 10, when the sharpening enhancement filter performs sharpening enhancement on the region to be sharpened in the second transition region, the pixel value of the inflection point may be increased by a second threshold to obtain a pixel value after the inflection point processing, and the pixel values of the pixel points adjacent to the inflection point may be changed, so that the pixel values of the pixel points input to the change region of the sharpening enhancement filter and the processed first sub-flat region form a peak, and the processed inflection point is a peak, and finally, the pixel values processed by the pixel points in the first sub-flat region gradually increase along a direction toward the inflection point, and the pixel values processed by the pixel points input to the change region of the sharpening enhancement filter gradually decrease along a direction away from the inflection point.
In another implementation, the first sub-flat region and the inflection point may be input to a sharpening enhancement filter, so that the sharpening enhancement filter performs a sharpening enhancement on the first sub-flat region according to the pixel values of the first sub-flat region and the inflection point. Corresponding to the first transition region, the pixel point in the middle of the first sub-flat region may be subtracted by the first threshold to obtain the pixel value after the pixel point in the middle of the first sub-flat region is processed, so that the pixel value after the first sub-flat region and the inflection point are processed forms a peak, and the pixel value in the middle of the first sub-flat region is a sharp bottom. Correspondingly, corresponding to the second transition region, the pixel point in the middle of the first sub-flat region may be added with the second threshold to obtain the pixel value after the pixel point in the middle of the first sub-flat region is processed, so that the pixel value after the first sub-flat region and the inflection point are processed forms a peak, and the pixel value in the middle of the first sub-flat region is a peak.
And performing smoothing filtering processing on the second sub flat area to eliminate the chain wave in the second sub flat area so as to eliminate the ringing effect in the image to be processed. In the process of performing the smoothing filtering processing on the second sub flat region, the processed pixel value of each pixel point in the second sub flat region can be obtained according to the pixel value of the neighborhood pixel point of each pixel point in the second sub flat region.
It can be understood that the pixel value after processing of each pixel point in the second sub-flat region can be obtained through mean filtering or non-linear filtering.
In the embodiment, nonlinear filtering is introduced into mean filtering to obtain the pixel value after processing of each pixel point in the second sub-flat region, so that the detailed information of the image can be better maintained while the ringing effect is eliminated.
In one implementation, when the direction of processing the image to be processed is 1, the step of obtaining the pixel value after processing each pixel point in the second sub-flat region may include: and confirming a floating threshold value for performing smooth filtering processing on the second sub flat region, and determining the pixel value of each pixel point in the second sub flat region after processing based on the floating threshold value.
In another implementation, when there are a plurality of processing directions of the image to be processed, the floating threshold value in each processing direction may be the same or different. The step of obtaining the processed pixel value of each pixel point in the second sub-flat region may include: confirming a floating threshold value for performing smooth filtering processing on the second sub-flat area in each direction; and performing smooth filtering processing on the second sub-flat area in the corresponding direction based on the floating threshold value in each direction.
Specifically, determining the pixel value after the pixel point processing in the second sub-flat region based on the floating threshold may include: confirming the pixel value of a neighborhood pixel point of a pixel point in a second sub flat area in the image to be processed; when the absolute value of the difference value between the pixel value of at least one neighborhood pixel and the pixel point in the second sub flat region is larger than the floating threshold, taking the pixel value of the pixel point in the second sub flat region as the pixel value of the neighborhood pixel of which the absolute value is larger than the floating threshold; and weighting the pixel values of the pixel points in the second sub flat region and the neighborhood pixel points of the pixel points to obtain the pixel values of the pixel points in the second sub flat region after the pixel points are processed.
The number of neighborhood pixels is generally multiple, and the number of neighborhood pixels is related to the specification of the smoothing filter. And a plurality of pixel points adjacent to the pixel points in the second sub flat region in the processing direction are neighborhood pixel points in the corresponding processing direction of the pixel points in the second sub flat region. For example, in fig. 2, F6 is a pixel point in the second sub-flat region of the image to be processed in the 90 ° processing direction, and the six neighborhood pixel points of F6 in the 90 ° processing direction are F3, F4, F5, F7, F8, and F9, respectively. For another example, in fig. 2, C7 is a pixel point in the second sub-flat region of the image to be processed in the processing direction of 0 °, and those four neighboring pixel points of C7 in the processing direction of 0 ° are a7, B7, D7, and E7, respectively.
As shown in fig. 11, the smoothing filter processing method may be as follows:
a) selecting an m tap filter, and setting a floating threshold R;
b) calculating a mask value for the neighborhood from abs (x [ i ] -x [ n ]) < R;
c) if the mask value is 1, replacing temp [ i ] ═ mask x [ i ]: x [ n ];
d) taking an average value: sum (temp [ i ])/m;
Eg:
a floating threshold value: 5
Figure BDA0002428726450000111
In the above example, the absolute values of the differences between the second and seventh values of input and the fourth value (the pixel value of the pixel to be currently processed) exceed the floating threshold 5, and the fourth value is directly used to replace the second and seventh values. The final smoothing filter output has a value of the mean 24 of 23, 25, 24, 25, 22, 26 and 25. Where the value of the smoothing filter output may be an integer or one or more bit decimal points may be retained.
S206: and weighting and fusing the pixel values obtained by processing each pixel point along each direction to obtain the pixel value of each pixel point so as to obtain a processed image.
In this embodiment, the average value of all pixel values obtained by processing each pixel point along each direction is used as the pixel value of each pixel point to obtain a processed image.
For example, when the direction in which the image to be processed is the 0 ° direction, the 45 ° direction, the 90 ° direction, and the 135 ° direction, the final pixel value I of the pixel point (I, j)i,jComprises the following steps:
Figure BDA0002428726450000112
wherein, I0,i,jThe pixel value of the pixel point (i, j) is obtained by processing along the 0-degree direction; i is45,i,jThe pixel value of the pixel point (i, j) is obtained by processing along the direction of 45 degrees; i is90,i,jThe pixel value of the pixel point (i, j) is obtained by processing along the 90-degree direction; i is135i,jIs the pixel value of pixel point (i, j) processed along 135 deg.
The method for removing ringing effect is generally implemented by a device for removing ringing effect, so that the present application also provides a device for removing ringing effect. Referring to fig. 12, fig. 12 is a schematic structural diagram of an embodiment of an apparatus for removing ringing effect according to the present application. The apparatus 10 for removing ringing effects in this application comprises a controller 11, a sharpening enhancement filter 12 and a smoothing filter 13;
the controller 11 is configured to determine an inflection point in a transition region in the image to be processed; the transition region comprises a flat region on one side of the inflection point and a change region on the other side of the inflection point, the pixel values of the pixel points in the flat region are approximately equal to the pixel values of the inflection point, and the pixel values of the pixel points in the change region are all larger than or all smaller than the pixel values of the inflection point; identifying a first sub-flat region close to the inflection point and a second sub-flat region far from the inflection point from the flat regions in the transition region to which the inflection point belongs; and controlling the sharpening enhancement filter 12 to perform sharpening enhancement on the region to be sharpened including the first sub-flat region, and controlling the smoothing filter 13 to perform smoothing filtering on the second sub-flat region to obtain a processed image.
The controller 11 determines an inflection point in the transition region, the region to be sharpened, and the second sub-flat region, the sharpening enhancement processor 12 performs sharpening enhancement on the region to be sharpened, and the smoothing filter 13 performs flat filtering on the second sub-flat region, which are described in the above embodiments of the method for removing the ringing effect, and are not described herein again.
Alternatively, and referring to fig. 6, the controller 11 may include a main controller and sub-controllers corresponding to respective processing directions. The main controller is used for confirming the processing direction of the image to be processed, controlling the sub-controllers corresponding to the determined processing direction to process the image to be processed, and performing weighted fusion on the pixel values of the sub-controllers after the pixel points in the image to be processed are processed to obtain the final pixel values of the pixel points in the image to be processed so as to obtain the processed image.
For example, the main controller determines that the processing directions of the image to be processed are 0 ° and 90 °, the main controller controls the controllers corresponding to the processing directions of 0 ° and 90 ° to be turned on and process the image to be processed, and the controllers corresponding to the processing directions of 45 ° and 135 ° do not process the image to be processed.
The above logical processes of the method for removing ringing effects are presented as a computer program which, in terms of a computer program, may be stored in a computer storage medium if it is sold or used as a stand-alone software product, and thus the present application proposes a computer storage medium. Referring to fig. 13, fig. 13 is a schematic structural diagram of an embodiment of a computer storage medium 20 according to the present application, in which a computer program 21 is stored, and the computer program is executed by a processor to implement the steps in the method for removing ringing effect.
The computer storage medium 20 may be a medium that can store a computer program, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, or may be a server that stores the computer program, and the server may send the stored computer program to another device for running or may run the stored computer program by itself. The computer storage medium 20 may be a combination of a plurality of entities from a physical point of view, for example, a plurality of servers, a server plus a memory, or a memory plus a removable hard disk.
The above embodiments are merely examples and are not intended to limit the scope of the present disclosure, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present disclosure or those directly or indirectly applied to other related technical fields are intended to be included in the scope of the present disclosure.

Claims (11)

1. A method for removing ringing, the method comprising:
acquiring an image to be processed;
confirming an inflection point in a transition region in the image to be processed; the transition region comprises a flat region on one side of the inflection point and a change region on the other side of the inflection point, the pixel values of the pixel points in the flat region are approximately equal to the pixel values of the inflection point, and the pixel values of the pixel points in the change region are all larger than or all smaller than the pixel values of the inflection point;
taking a first sub flat area close to the inflection point and a second sub flat area far away from the inflection point from a flat area in a transition area to which the inflection point belongs;
and carrying out sharpening enhancement processing on the region to be sharpened, and carrying out smoothing filtering processing on the second sub-flat region to obtain a processed image, wherein the region to be sharpened comprises the first sub-flat region.
2. The method of removing ringing effects of claim 1, wherein the first sub-flat region is n pixels adjacent to the inflection point in the flat region;
the sharpening enhancement processing of the region to be sharpened comprises the following steps: inputting a first group of pixel values of all pixel points in the region to be sharpened into a sharpening enhancement filter, and obtaining a second group of pixel values of the pixel points in the region to be sharpened output by the sharpening enhancement filter, so that the sharpening enhancement processing on the region to be sharpened is completed by utilizing the sharpening enhancement filter.
3. A method of deringing ring effects as claimed in claim 1, wherein: the transition region in which the pixel values of the pixel points in the change region are all larger than the pixel value of the inflection point is a first transition region; the transition region in which the pixel values of the pixel points in the change region are all smaller than the pixel value of the inflection point is a second transition region;
determining a first threshold for carrying out sharpening enhancement on a region to be sharpened in the first transition region, and taking a difference value between a pixel value of an inflection point in the first transition region in the image to be processed and the first threshold as a pixel value after the inflection point processing in the first transition region; and/or
Determining a second threshold for carrying out sharpening enhancement on the region to be sharpened in the second transition region, and taking the sum of the pixel value of the inflection point in the second transition region in the image to be processed and the second threshold as the pixel value after the inflection point processing in the second transition region.
4. The method of removing ringing effects of claim 1, wherein the smooth filtering of the second sub-flat region comprises: and obtaining the pixel value after the pixel point processing in the second sub flat region according to the pixel value of the neighborhood pixel point of the pixel point in the second sub flat region.
5. The method of claim 4, wherein obtaining the processed pixel values of the pixels in the second sub-flat region according to the pixel values of the neighboring pixels of the pixels in the second sub-flat region comprises:
confirming a floating threshold value and pixel values of neighborhood pixel points of pixel points in the second sub flat area in the image to be processed;
when the absolute value of the difference value between the pixel value of at least one neighborhood pixel and the pixel point in the second sub flat region is larger than the floating threshold, taking the pixel value of the pixel point in the second sub flat region as the pixel value of the neighborhood pixel of which the absolute value is larger than the floating threshold;
and weighting the pixel values of the pixel points in the second sub flat region and the pixel points in the neighborhood of the pixel points in the second sub flat region to obtain the pixel values after the pixel points in the second sub flat region are processed.
6. A method of deringing effects as claimed in claim 1, wherein the identifying of the transition region of the image to be processed and the inflection point in the transition region is preceded by: confirming the processing direction of the image to be processed;
the confirming an inflection point in a transition region in the image to be processed, and taking a first sub flat region close to the inflection point and a second sub flat region far away from the inflection point from the flat region comprises the following steps: confirming inflection points of transition regions in the image to be processed along at least one processing direction respectively; taking a first sub-flat region close to the inflection point and a second sub-flat region far from the inflection point from the flat regions confirmed in the respective processing directions;
the performing sharpening enhancement processing on the region to be sharpened and performing smoothing filtering processing on the second sub-flat region to obtain a processed image includes: and carrying out sharpening enhancement processing on the to-be-sharpened area in each processing direction, carrying out smooth filtering processing on the second sub-flat area in each processing direction to obtain pixel values obtained by processing pixel points in the to-be-processed image along each processing direction, and carrying out weighted fusion on the pixel values obtained by processing each pixel point along each processing direction to obtain the pixel value of each pixel point so as to obtain the processed image.
7. The method of claim 6, wherein performing a sharpening enhancement on the first sub-flat region in each direction and performing a smoothing filtering on the second sub-flat region in each direction comprises:
confirming an adjusting threshold value for carrying out sharpening enhancement processing on the first sub-flat area in each direction, and confirming a floating threshold value for carrying out smooth filtering processing on the second sub-flat area in each direction;
and performing sharpening enhancement processing on a first sub-flat region in the corresponding direction based on the adjusting threshold value in each direction, and performing smoothing filtering processing on a second sub-flat region in the corresponding direction based on the floating threshold value in each direction.
8. The method of claim 6, wherein the confirming a direction of processing the image to be processed comprises: confirming that the image to be processed is processed along at least one direction of a 0 DEG direction, a 45 DEG direction, a 90 DEG direction and a 135 DEG direction.
9. An apparatus for removing ringing, the apparatus comprising a controller, a smoothing filter, and a sharpening enhancement filter:
the controller is used for judging and confirming inflection points in a transition region in the acquired image to be processed; the transition region comprises a flat region on one side of the inflection point and a change region on the other side of the inflection point, the pixel values of the pixel points in the flat region are approximately equal to the pixel values of the inflection point, and the pixel values of the pixel points in the change region are all larger than or all smaller than the pixel values of the inflection point; identifying a first sub-flat region close to the inflection point and a second sub-flat region far from the inflection point from flat regions in a transition region to which the inflection point belongs; and controlling the sharpening enhancement filter to perform sharpening enhancement on an area to be sharpened, which comprises a first sub-flat area, and controlling the smoothing filter to perform smoothing filtering on a second sub-flat area to obtain a processed image.
10. A device for removing ringing as claimed in claim 9, wherein the controller comprises a main controller and sub-controllers corresponding to respective processing directions;
the main controller is used for confirming the processing direction of the image to be processed, controlling the sub-controllers corresponding to the determined processing direction to process the image to be processed, and performing weighted fusion on the pixel values of the sub-controllers after the pixel points in the image to be processed are processed to obtain the final pixel values of the pixel points in the image to be processed so as to obtain the processed image.
11. An apparatus having a storage function, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of deringing-down as claimed in any one of claims 1 to 8.
CN202010229261.6A 2020-03-27 2020-03-27 Method for removing ringing effect and related device Pending CN113450264A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010229261.6A CN113450264A (en) 2020-03-27 2020-03-27 Method for removing ringing effect and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010229261.6A CN113450264A (en) 2020-03-27 2020-03-27 Method for removing ringing effect and related device

Publications (1)

Publication Number Publication Date
CN113450264A true CN113450264A (en) 2021-09-28

Family

ID=77807948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010229261.6A Pending CN113450264A (en) 2020-03-27 2020-03-27 Method for removing ringing effect and related device

Country Status (1)

Country Link
CN (1) CN113450264A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100555684B1 (en) * 2004-09-02 2006-03-03 삼성전자주식회사 Image processing method for reducing ringing and apparatus thereof
CN101431606A (en) * 2008-12-01 2009-05-13 上海广电(集团)有限公司中央研究院 Self-adapting denoising processing method based on edge detection
TW200931949A (en) * 2008-01-14 2009-07-16 Sunplus Technology Co Ltd System for applying multi-direction and multi-slope region detection to image edge enhancement
CN102611831A (en) * 2012-01-12 2012-07-25 陆许明 Method for reducing compressed image encoding noise
CN109584185A (en) * 2018-12-19 2019-04-05 深圳市华星光电半导体显示技术有限公司 Image processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100555684B1 (en) * 2004-09-02 2006-03-03 삼성전자주식회사 Image processing method for reducing ringing and apparatus thereof
TW200931949A (en) * 2008-01-14 2009-07-16 Sunplus Technology Co Ltd System for applying multi-direction and multi-slope region detection to image edge enhancement
CN101431606A (en) * 2008-12-01 2009-05-13 上海广电(集团)有限公司中央研究院 Self-adapting denoising processing method based on edge detection
CN102611831A (en) * 2012-01-12 2012-07-25 陆许明 Method for reducing compressed image encoding noise
CN109584185A (en) * 2018-12-19 2019-04-05 深圳市华星光电半导体显示技术有限公司 Image processing method

Similar Documents

Publication Publication Date Title
US5917963A (en) Image processing apparatus and image processing method
CN107527333B (en) Quick image enhancement method based on gamma transformation
US5768440A (en) Adaptive noise removal for video images with less correction of current pixel for higher variations between surrounding pixels
CN109903294B (en) Image processing method and device, electronic equipment and readable storage medium
EP1496472B1 (en) Edge-sensitive image enhancement
JP2010226260A (en) Image output apparatus, edge enhancement device, and edge enhancement method
US20200394760A1 (en) Image adjustment method and associated image processing circuit
CN101377849B (en) Image processing methods and image processing apparatuses
CN110110474B (en) Material microstructure geometric model building method based on metallographic picture
CN113450264A (en) Method for removing ringing effect and related device
KR101101434B1 (en) Apparatus for improving sharpness of image
JP4962573B2 (en) Image processing device
JP2004104635A (en) Image processing apparatus
JP3804906B2 (en) Line image processing method and recording medium
JP2777202B2 (en) Image processing device
CN115311242A (en) Industrial camera image sharpening method, device, equipment and storage medium
CN113139997B (en) Depth map processing method, storage medium and terminal device
CN115689906A (en) Image processing method and device
CN111986095B (en) Image processing method and image processing device based on edge extraction
JP4040512B2 (en) Image processing method and image processing apparatus
JP4011494B2 (en) Image processing apparatus, image processing method, program, and recording medium
EP1622080B1 (en) Signal processing device and method, recording medium, and program
CN112200730A (en) Image filtering processing method, device, equipment and storage medium
JPH08317255A (en) Method and device for picture quality improvement
JP4035696B2 (en) Line segment detection apparatus and image processing apparatus

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