WO2019200658A1 - 图像平滑处理方法、电子装置及计算机可读存储介质 - Google Patents

图像平滑处理方法、电子装置及计算机可读存储介质 Download PDF

Info

Publication number
WO2019200658A1
WO2019200658A1 PCT/CN2018/088019 CN2018088019W WO2019200658A1 WO 2019200658 A1 WO2019200658 A1 WO 2019200658A1 CN 2018088019 W CN2018088019 W CN 2018088019W WO 2019200658 A1 WO2019200658 A1 WO 2019200658A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
value
flatness
target pixel
luminance component
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.)
Ceased
Application number
PCT/CN2018/088019
Other languages
English (en)
French (fr)
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.)
TCL China Star Optoelectronics Technology Co Ltd
Original Assignee
Shenzhen China Star Optoelectronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen China Star Optoelectronics Technology Co Ltd filed Critical Shenzhen China Star Optoelectronics Technology Co Ltd
Publication of WO2019200658A1 publication Critical patent/WO2019200658A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/21Circuitry for suppressing or minimising disturbance, e.g. moiré or halo
    • H04N5/213Circuitry for suppressing or minimising impulsive noise
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to an image smoothing processing method, an electronic device, and a computer readable storage medium.
  • a main object of the present invention is to provide an image smoothing processing method, an electronic device, and a computer readable storage medium, aiming at solving the problem of how to process a flat region of an image to suppress noise.
  • the present invention provides an image smoothing processing method, the method comprising the steps of:
  • the smoothed image is output after the luminance component is combined.
  • the method further includes the steps of: performing a bit number enhancement on the luminance component, thereby performing flat region detection on the image according to the enhanced luminance component;
  • the method further includes the step of: converting the new luminance value processed by each pixel in the image into a low bit by the dither display, thereby performing luminance component synthesis according to the converted luminance component data.
  • bit number enhancement on the luminance component, converting the number of bits of the luminance component from 8 bits to 10 bits or 12 bits;
  • the number of bits of the new luminance value after each pixel processing is changed from 10 bit or 12 bits to 8 bits.
  • the flat area detection comprises the steps of:
  • the flatness value is a maximum value of absolute values of luminance differences of the target pixel and adjacent pixels.
  • the present invention also provides an electronic device, the electronic device comprising: a memory, a processor, and an image smoothing processing program stored on the memory and operable on the processor, The image smoothing process is implemented by the processor to implement the following steps:
  • the smoothed image is output after the luminance component is combined.
  • the method further includes the step of: performing a bit increase on the luminance component, thereby performing flat region detection on the image according to the enhanced luminance component;
  • the method further includes the step of: converting the new luminance value processed by each pixel in the image into a low bit by the dither display, thereby performing luminance component synthesis according to the converted luminance component data.
  • the flat area detection comprises the steps of:
  • the flatness value is a maximum value of absolute values of luminance differences of the target pixel and adjacent pixels.
  • the present invention further provides a computer readable storage medium having an image smoothing processing program stored thereon, and the image smoothing processing program is executed by a processor to implement the above The steps of the image smoothing method.
  • the image smoothing processing method, the electronic device and the computer readable storage medium proposed by the invention are mainly used for suppressing noise of a flat region of an image, and gradually grading a luminance component of the flat region of the image.
  • the image brightness component is detected, and whether the pixel is in a flat area is detected according to the size of the preset area, and then the center point pixel of the area is smoothed, thereby improving the image quality and the display quality of the electronic device.
  • the luminance component is converted into a high bit for calculation, and then restored to a low level by the dithering display, which improves the arithmetic precision, so that the luminance component of the output image flat region changes more gently.
  • the probability of the target pixel being in a flat region is judged by taking the maximum value of the absolute value of the luminance difference between the target pixel and the adjacent pixel, and the calculation method is simple and convenient for hardware implementation.
  • the smoothing ability of the pixels in the flat area can be controlled, which is simple, flexible, and practical.
  • FIG. 1 is a block diagram of an electronic device according to a first embodiment of the present invention.
  • FIG. 2 is a flowchart of an image smoothing processing method according to a second embodiment of the present invention.
  • FIG. 3 is a flowchart of an image smoothing processing method according to a third embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a target pixel and its adjacent pixels in the present invention.
  • Fig. 5 is a schematic view showing the maximum value of flatness in a preset area in the present invention.
  • a first embodiment of the present invention provides an electronic device 2.
  • the electronic device 2 has an image display and image processing function, and may be a flat panel television or the like.
  • the electronic device 2 includes a memory 20, a processor 22, and an image smoothing program 28.
  • the memory 20 includes at least one type of readable storage medium for storing an operating system and various types of application software installed in the electronic device 2, such as program code of the image smoothing program 28. Further, the memory 20 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 22 is typically used to control the overall operation of the electronic device 2.
  • the processor 22 is configured to run program code or process data stored in the memory 20, such as running the image smoothing process 28 and the like.
  • the smoothed image is output after the luminance component is combined.
  • FIG. 2 does not constitute a limitation on the electronic device 2, and the electronic device 2 may further include other necessary components (such as a screen, etc.), or combine some components, or Different parts are arranged.
  • a second embodiment of the present invention provides an image smoothing processing method applied to the electronic device 2.
  • the order of execution of the steps in the flowchart shown in FIG. 2 may be changed according to different requirements, and some steps may be omitted.
  • the method includes the following steps:
  • each pixel in an image may include a luminance component, a chrominance component, and the like.
  • the input image is first acquired, and then the luminance component of the image is extracted.
  • the color space that the image can take is YUV, HSL or HSV, and the like.
  • step S102 Perform flat area detection on the image according to the extracted luminance component, and determine whether each pixel in the image is in a flat area. When the pixel is in a flat area, step S104 is performed. When the pixel is in a non-flat area, step S106 is directly performed.
  • the luminance component is extracted from the image, it is necessary to perform flat region detection for each pixel according to the luminance component.
  • the pixels in the flat area are smoothed, and the pixels in the non-flat area are not processed.
  • the flat area detection includes:
  • the flatness value is a maximum value among absolute values of luminance differences of the target pixel and the adjacent pixels (eight pixels around).
  • FIG. 4 it is a schematic diagram of a target pixel and its neighboring pixels. Wherein, the pixel (j, i) is the target pixel, and the other pixels are adjacent pixels of the pixel (j, i). This step requires traversing each of the target pixels in the image to calculate a corresponding flatness value.
  • the target pixel ends from the second row of the image to the penultimate row, ending with each row starting from the second pixel to the second to last pixel. Calculated as follows:
  • y represents the luminance component of the corresponding pixel
  • fabs(j, i) represents the flatness value of the pixel (j, i). The smaller the flatness value, the greater the likelihood that the pixel is in a flat region.
  • the maximum value of the flatness value of the pixels in the preset area is obtained according to the preset area size M*N centering on the target pixel.
  • M and N are generally odd numbers, such as 3*3, 5*5, 7*7, etc., the larger the area is set, the stronger the subsequent smoothing processing capability.
  • FIG. 5 it is a schematic diagram of finding the maximum value of the flatness in the preset area.
  • the size of the preset area is 5*5, and the maximum value of the flatness value of 25 pixels in the area is calculated.
  • the target pixel when the target pixel is in a flat region, the target pixel is smoothed.
  • the smoothing process adopts an averaging method, that is, the new luminance value of the target pixel is an average value of luminance values of all pixels in the preset region.
  • the luminance component synthesis is performed according to the new luminance value of each pixel in the image, and inversely transformed into the RGB data output by the corresponding color space.
  • the image brightness component is first detected, and whether the pixel is in a flat area is detected according to a preset size of the area, and then the center point pixel (target pixel) of the area is smoothed to The noise in the flat region of the image is suppressed, and the luminance component of the flat region of the image is gently graded, thereby improving the quality of the image and the display quality of the electronic device.
  • the calculation method is simple and convenient for hardware implementation. By setting the size of the area, the smoothing ability of the pixels in the flat area can be controlled, which is simple, flexible, and practical.
  • a third embodiment of the present invention provides an image smoothing processing method.
  • the steps of the image smoothing processing method are similar to those of the second embodiment, except that the method further includes steps S202 and S208.
  • the method includes the following steps:
  • each pixel in an image may include a luminance component, a chrominance component, and the like.
  • edge enhancement of an image the input image is first acquired, and then the luminance component of the image is extracted.
  • the color space that the image can take is YUV, HSL or HSV, and the like.
  • the number of bits of the luminance component is changed from 8 bits to 10 bits or 12 bits or higher.
  • step S204 Perform flat area detection on the image according to the enhanced luminance component, and determine whether each pixel in the image is in a flat area. When the pixel is in a flat area, step S206 is performed. When the pixel is in a non-flat area, step S208 is directly performed.
  • the flat area detection includes:
  • the flatness value is a maximum value among absolute values of luminance differences of the target pixel and the adjacent pixels (eight pixels around).
  • FIG. 4 it is a schematic diagram of a target pixel and its neighboring pixels. Wherein, the pixel (j, i) is the target pixel, and the other pixels are adjacent pixels of the pixel (j, i). This step requires traversing each of the target pixels in the image to calculate a corresponding flatness value.
  • the target pixel ends from the second row of the image to the penultimate row, ending with each row starting from the second pixel to the second to last pixel. Calculated as follows:
  • y represents the luminance component of the corresponding pixel
  • fabs(j, i) represents the flatness value of the pixel (j, i). The smaller the flatness value, the greater the likelihood that the pixel is in a flat region.
  • the maximum value of the flatness value of the pixels in the preset area is obtained according to the preset area size M*N centering on the target pixel.
  • M and N are generally odd numbers, such as 3*3, 5*5, 7*7, etc., the larger the area is set, the stronger the subsequent smoothing processing capability.
  • FIG. 5 it is a schematic diagram of finding the maximum value of the flatness in the preset area.
  • the size of the preset area is 5*5, and the maximum value of the flatness value of 25 pixels in the area is calculated.
  • the target pixel when the target pixel is in a flat region, the target pixel is smoothed.
  • the smoothing process adopts an averaging method, that is, the new luminance value of the target pixel is an average value of luminance values of all pixels in the preset region.
  • the new luminance value is converted from a high bit (10 bit or 12 bit) to 8 bit by dithering.
  • the new luminance value is the same as the luminance component value after the digit enhancement, and no change occurs.
  • the converted luminance component data is subjected to luminance component synthesis, and inversely transformed into RGB data output by the corresponding color space.
  • the image smoothing processing method proposed in this embodiment firstly converts the luminance component into a high level for calculation, and then restores the luminance component from a high level to a low level through the dither display, thereby improving the operation precision and making the brightness component of the output image flat region change more. Smooth, better image processing.
  • the present invention further provides another embodiment, that is, a computer readable storage medium storing an image smoothing processing program, the image smoothing processing program being executable by at least one processor, The at least one processor is caused to perform the steps of the image smoothing processing method as described above.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

本发明公开了一种图像平滑处理方法,该方法包括:从输入的图像中提取亮度分量;根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;当所述像素处于平坦区域时,对所述像素进行平滑处理;进行亮度分量合成后输出平滑后的图像。本发明还公开了一种电子装置和计算机可读存储介质。由此,能够抑制图像平坦区域的噪声,并使图像平坦区域亮度分量平缓渐变,以提高图像的品质。

Description

图像平滑处理方法、电子装置及计算机可读存储介质 技术领域
本发明涉及图像处理技术领域,尤其涉及一种图像平滑处理方法、电子装置及计算机可读存储介质。
背景技术
随着技术的发展和市场需求的变化,平板电视愈来愈受人们的欢迎,电视的解析度也越来越高,高解析度的视频及信号需求亦越来越大。但是,目前尚有很多的视频文件和信号源解析度比较低,这些视频文件及信号源在平板电视上放大至需要的解析度时会带入噪声。特别是图像的平坦区域会出现水印及马赛克等现象,严重影响了图像的品质。
发明内容
本发明的主要目的在于提出一种图像平滑处理方法、电子装置及计算机可读存储介质,旨在解决如何对图像的平坦区域进行处理以抑制噪声的问题。
为实现上述目的,本发明提供的一种图像平滑处理方法,该方法包括步骤:
从输入的图像中提取亮度分量;
根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;
当所述像素处于平坦区域时,对所述像素进行平滑处理;及
进行亮度分量合成后输出平滑后的图像。
可选地,所述方法在从输入的图像中提取亮度分量的步骤之后还包括步骤:对所述亮度分量进行位数提升,从而根据提升后的亮度分量对所述图像进行平坦区域检测;
在进行亮度分量合成的步骤之前还包括步骤:通过抖动显示将所述图像中每个像素处理后的新亮度值转变成低位,从而根据转变后的亮度分量数据进行亮度分量合成。
可选地,在对所述亮度分量进行位数提升的步骤中,将所述亮度分量的位数从8bit转变成10bit或者12bit;
在将所述新亮度值转变成低位的步骤中,将每个像素处理后的新亮度值的位数从10bit或者12bit转变成8bit。
可选地,所述平坦区域检测包括步骤:
计算每个目标像素的平坦度值;
以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;
将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。
可选地,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。
此外,为实现上述目的,本发明还提出一种电子装置,所述电子装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的图像平滑处理程序,所述图像平滑处理程序被所述处理器执行时实现如下步骤:
从输入的图像中提取亮度分量;
根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;
当所述像素处于平坦区域时,对所述像素进行平滑处理;及
进行亮度分量合成后输出平滑后的图像。
可选地,在从输入的图像中提取亮度分量的步骤之后还包括步骤:对所述亮度分量进行位数提升,从而根据提升后的亮度分量对所述图像进行平坦区域检测;
在进行亮度分量合成的步骤之前还包括步骤:通过抖动显示将所述图像中每个像素处理后的新亮度值转变成低位,从而根据转变后的亮度分量数据进行亮度分量合成。
可选地,所述平坦区域检测包括步骤:
计算每个目标像素的平坦度值;
以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;
将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。
可选地,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。
进一步地,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有图像平滑处理程序,所述图像平滑处理程序被处理器执行时实现如上述的图像平滑处理方法的步骤。
本发明提出的图像平滑处理方法、电子装置及计算机可读存储介质,主要用于抑制图像平坦区域的噪声,并使图像平坦区域亮度分量平缓渐变。首先对图像亮度分量进行检测,按照预先设置的区域大小检测出像素是否处在平坦区域,然后对该区域中心点像素进行平滑处理,提升了图像的品质及电子装置的显示品质。另外,将亮度分量转变成高位进行计算,然后通过抖动显示还原至低位,提高了运算精度,使得输出的图像平坦区域亮度分量变化更加平缓。通过取目标像素与相邻像素亮度差的绝对值的最大值来评判该目标像素处于平坦区域的可能性,计算方法简单,便于硬件实现。通过设置区域的大小可控制对平坦区域中像素的平滑处理能力,简单灵活,实用性强。
附图说明
图1为本发明第一实施例提出的一种电子装置的架构图;
图2为本发明第二实施例提出的一种图像平滑处理方法的流程图;
图3为本发明第三实施例提出的一种图像平滑处理方法的流程图;
图4为本发明中目标像素及其相邻像素的示意图;
图5为本发明中在预设区域内求平坦度最大值的示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说 明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
实施例一
参阅图1所示,本发明第一实施例提出一种电子装置2。所述电子装置2具有图像显示和图像处理功能,可以是平板电视等。所述电子装置2包括存储器20、处理器22和图像平滑处理程序28。
其中,所述存储器20至少包括一种类型的可读存储介质,用于存储安装于所述电子装置2的操作系统和各类应用软件,例如图像平滑处理程序28的程序代码等。此外,所述存储器20还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制所述电子装置2的总体操作。本实施例中,所述处理器22用于运行所述存储器20中存储的程序代码或者处理数据,例如运行所述图像平滑处理程序28等。
所述图像平滑处理程序28被所述处理器22执行时,实现如下步骤:
(1)从输入的图像中提取亮度分量。
(2)对所述亮度分量进行位数提升。
(3)根据提升后的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域。
(4)当所述像素处于平坦区域时,对所述像素进行平滑处理。
(5)将所述图像中每个像素处理后的新亮度值转变成低位。
(6)进行亮度分量合成后输出平滑后的图像。
上述步骤的详细说明请参阅下述第二实施例和第三实施例,在此不再赘述。
本领域技术人员可以理解,图2中示出的结构并不构成对所述电子装置2的限定,所述电子装置2还可以包括其他必要部件(例如屏幕等),或者组合某些部件,或者不同的部件布置。
实施例二
参阅图2所示,本发明第二实施例提出一种图像平滑处理方法,应用于所述电子装置2中。在本实施例中,根据不同的需求,图2所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。该方法包括以下步骤:
S100,从输入的图像中提取亮度分量。
具体地,一般情况下,一个图像中的每个像素可能包括亮度分量、色度分量等。当需要对图像进行平滑处理时,首先获取输入的图像,然后提取所述图像的亮度分量。所述图像可以采取的颜色空间是YUV、HSL或者HSV等。
S102,根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域。当所述像素处于平坦区域时,执行步骤S104。当所述像素处于非平坦区域时,直接执行步骤S106。
具体地,当从所述图像中提取出亮度分量之后,需要根据所述亮度分量对每个像素进行平坦区域检测。对于平坦区域的像素进行平滑处理,对于非平坦区域的像素则不作处理。
在本实施例中,所述平坦区域检测包括:
(1)计算每个像素(称为目标像素)的平坦度值。所述平坦度值为目标像素与相邻像素(周围的8个像素)的亮度差的绝对值中的最大值。如图4所示,为目标像素及其相邻像素的示意图。其中,像素(j,i)为所述目标像素,其他像 素为像素(j,i)的相邻像素。此步骤需要遍历所述图像中的每个目标像素,分别计算对应的所述平坦度值。为了便于计算,所述目标像素从所述图像的第二行开始至倒数第二行结束,对应每行从第二个像素开始至倒数第二个像素结束。计算公式如下:
f1=|y(j,i)–y(j,i-1)|;
f2=|y(j,i)–y(j,i+1)|;
f3=|y(j,i)–y(j-1,i-1)|;
f4=|y(j,i)–y(j-1,i)|;
f5=|y(j,i)–y(j-1,i+1)|;
f6=|y(j,i)–y(j+1,i-1)|;
f7=|y(j,i)–y(j+1,i)|;
f8=|y(j,i)–y(j+1,i+1)|;
fabs(j,i)=max(f1f2f3f4f5f6f7f8);
其中,y表示对应像素的亮度分量,fabs(j,i)表示像素(j,i)的平坦度值。所述平坦度值越小,表示该像素处在平坦区域的可能性越大。
(2)以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值。其中,M和N一般为奇数,如3*3、5*5、7*7等,所设置的区域越大,后续进行平滑处理的能力越强。如图5所示,为在预设区域内求平坦度最大值的示意图。在图5中,所述预设区域的大小为5*5,计算出该区域内25个像素的所述平坦度值的最大值。
(3)将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。
S104,对所述像素进行平滑处理。
具体地,当所述目标像素处于平坦区域时,对所述目标像素进行平滑处理。在本实施例中,所述平滑处理采取均值法,即所述目标像素的新亮度值为所述预设区域内所有像素的亮度值的平均值。
S106,进行亮度分量合成后输出平滑后的图像。
具体地,根据所述图像中每个像素的新亮度值进行亮度分量合成,通过对应的颜色空间反变换成RGB数据输出。
本实施例所提出的图像平滑处理方法,首先对图像亮度分量进行检测,按照预先设置的区域大小检测出像素是否处在平坦区域,然后对该区域中心点像素(目标像素)进行平滑处理,以抑制图像平坦区域的噪声,并使图像平坦区域亮度分量平缓渐变,提升了图像的品质及电子装置的显示品质。另外,通过取目标像素与相邻像素亮度差的绝对值的最大值来评判该目标像素处于平坦区域的可能性,计算方法简单,便于硬件实现。通过设置区域的大小可控制对平坦区域中像素的平滑处理能力,简单灵活,实用性强。
实施例三
参阅图3所示,本发明第三实施例提出一种图像平滑处理方法。在第三实施例中,所述图像平滑处理方法的步骤与第二实施例相类似,区别在于该方法还包括步骤S202和S208。
该方法包括以下步骤:
S200,从输入的图像中提取亮度分量。
具体地,一般情况下,一个图像中的每个像素可能包括亮度分量、色度分量等。当需要对图像进行边缘增强时,首先获取输入的图像,然后提取所述图像的亮度分量。所述图像可以采取的颜色空间是YUV、HSL或者HSV等。
S202,对所述亮度分量进行位数提升。
具体地,将所述亮度分量的位数从8bit转变成10bit或者12bit或者更高。
S204,根据提升后的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域。当所述像素处于平坦区域时,执行步骤S206。当所述像素处于非平坦区域时,直接执行步骤S208。
具体地,当对所述亮度分量进行位数提升之后,需要根据所述亮度分量对每个像素进行平坦区域检测。对于平坦区域的像素进行平滑处理,对于非平坦区域的像素则不作处理。
在本实施例中,所述平坦区域检测包括:
(1)计算每个像素(称为目标像素)的平坦度值。所述平坦度值为目标像素与相邻像素(周围的8个像素)的亮度差的绝对值中的最大值。如图4所示,为目标像素及其相邻像素的示意图。其中,像素(j,i)为所述目标像素,其他像素为像素(j,i)的相邻像素。此步骤需要遍历所述图像中的每个目标像素,分别计算对应的所述平坦度值。为了便于计算,所述目标像素从所述图像的第二行开始至倒数第二行结束,对应每行从第二个像素开始至倒数第二个像素结束。计算公式如下:
f1=|y(j,i)–y(j,i-1)|;
f2=|y(j,i)–y(j,i+1)|;
f3=|y(j,i)–y(j-1,i-1)|;
f4=|y(j,i)–y(j-1,i)|;
f5=|y(j,i)–y(j-1,i+1)|;
f6=|y(j,i)–y(j+1,i-1)|;
f7=|y(j,i)–y(j+1,i)|;
f8=|y(j,i)–y(j+1,i+1)|;
fabs(j,i)=max(f1f2f3f4f5f6f7f8);
其中,y表示对应像素的亮度分量,fabs(j,i)表示像素(j,i)的平坦度值。所 述平坦度值越小,表示该像素处在平坦区域的可能性越大。
(2)以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值。其中,M和N一般为奇数,如3*3、5*5、7*7等,所设置的区域越大,后续进行平滑处理的能力越强。如图5所示,为在预设区域内求平坦度最大值的示意图。在图5中,所述预设区域的大小为5*5,计算出该区域内25个像素的所述平坦度值的最大值。
(3)将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。
S206,对所述像素进行平滑处理。
具体地,当所述目标像素处于平坦区域时,对所述目标像素进行平滑处理。在本实施例中,所述平滑处理采取均值法,即所述目标像素的新亮度值为所述预设区域内所有像素的亮度值的平均值。
S208,将所述图像中每个像素的新亮度值转变成低位。
具体地,对于所述图像中每个像素的新亮度值,经过抖动显示(Dithering),从高位(10bit或者12bit)转变成8bit。针对未进行平滑处理的像素,所述新亮度值与进行位数提升后的亮度分量值相同,未发生改变。
S210,进行亮度分量合成后输出平滑后的图像。
具体地,将转变后的亮度分量数据进行亮度分量合成,通过对应的颜色空间反变换成RGB数据输出。
本实施例所提出的图像平滑处理方法,首先将亮度分量转变成高位进行计算,然后再通过抖动显示将亮度分量从高位还原为低位,提高了运算精度,使得输出的图像平坦区域亮度分量变化更加平缓,图像处理效果更佳。
实施例四
本发明还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质存储有图像平滑处理程序,所述图像平滑处理程序可被至少一个处理器执行,以使所述至少一个处理器执行如上述的图像平滑处理方法的步骤。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。

Claims (14)

  1. 一种图像平滑处理方法,其中,该方法包括步骤:
    从输入的图像中提取亮度分量;
    根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;
    当所述像素处于平坦区域时,对所述像素进行平滑处理;及
    进行亮度分量合成后输出平滑后的图像。
  2. 根据权利要求1所述的图像平滑处理方法,其中,所述方法在从输入的图像中提取亮度分量的步骤之后还包括步骤:对所述亮度分量进行位数提升,从而根据提升后的亮度分量对所述图像进行平坦区域检测;
    在进行亮度分量合成的步骤之前还包括步骤:通过抖动显示将所述图像中每个像素处理后的新亮度值转变成低位,从而根据转变后的亮度分量数据进行亮度分量合成。
  3. 根据权利要求2所述的图像平滑处理方法,其中,在对所述亮度分量进行位数提升的步骤中,将所述亮度分量的位数从8bit转变成10bit或者12bit;
    在将所述新亮度值转变成低位的步骤中,将每个像素处理后的新亮度值的位数从10bit或者12bit转变成8bit。
  4. 根据权利要求1所述的图像平滑处理方法,其中,所述平坦区域检测包括步骤:
    计算每个目标像素的平坦度值;
    以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;
    将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。
  5. 根据权利要求2所述的图像平滑处理方法,其中,所述平坦区域检测包括步骤:
    计算每个目标像素的平坦度值;
    以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;
    将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。
  6. 根据权利要求4所述的图像平滑处理方法,其中,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。
  7. 根据权利要求5所述的图像平滑处理方法,其中,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。
  8. 一种电子装置,其中,所述电子装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的图像平滑处理程序,所述图像平滑处理程序被所述处理器执行时实现如下步骤:
    从输入的图像中提取亮度分量;
    根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;
    当所述像素处于平坦区域时,对所述像素进行平滑处理;及
    进行亮度分量合成后输出平滑后的图像。
  9. 根据权利要求8所述的电子装置,其中,在从输入的图像中提取亮度分量的步骤之后还包括步骤:对所述亮度分量进行位数提升,从而根据提升后的亮度分量对所述图像进行平坦区域检测;
    在进行亮度分量合成的步骤之前还包括步骤:通过抖动显示将所述图像中每个像素处理后的新亮度值转变成低位,从而根据转变后的亮度分量数据进行亮度分量合成。
  10. 根据权利要求8所述的电子装置,其中,所述平坦区域检测包括步骤:
    计算每个目标像素的平坦度值;
    以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;
    将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。
  11. 根据权利要求9所述的电子装置,其中,所述平坦区域检测包括步骤:
    计算每个目标像素的平坦度值;
    以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;
    将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。
  12. 根据权利要求10所述的电子装置,其中,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。
  13. 根据权利要求11所述的电子装置,其中,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。
  14. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有图像平滑处理程序,所述图像平滑处理程序被处理器执行时实现如权利要求1所述的图像平滑处理方法的步骤。
PCT/CN2018/088019 2018-04-16 2018-05-23 图像平滑处理方法、电子装置及计算机可读存储介质 Ceased WO2019200658A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810336784.3A CN108513044B (zh) 2018-04-16 2018-04-16 图像平滑处理方法、电子装置及计算机可读存储介质
CN201810336784.3 2018-04-16

Publications (1)

Publication Number Publication Date
WO2019200658A1 true WO2019200658A1 (zh) 2019-10-24

Family

ID=63382331

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/088019 Ceased WO2019200658A1 (zh) 2018-04-16 2018-05-23 图像平滑处理方法、电子装置及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN108513044B (zh)
WO (1) WO2019200658A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11445211B1 (en) * 2020-12-10 2022-09-13 Amazon Technologies, Inc. Psychovisually optimized dithering for image and video encoding

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110807750B (zh) * 2019-11-14 2022-11-18 海信视像科技股份有限公司 图像处理方法和设备
CN113132703B (zh) * 2019-12-30 2024-03-29 海信视像科技股份有限公司 图像处理方法和设备
CN113963672B (zh) * 2021-11-05 2023-02-24 惠州华星光电显示有限公司 显示器亮度调节方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1951121A (zh) * 2004-10-15 2007-04-18 松下电器产业株式会社 降低块状噪声装置及图像显示装置
CN101123682A (zh) * 2006-08-11 2008-02-13 松下电器产业株式会社 可减少图像振铃噪声的方法、装置及集成电路
CN103778599A (zh) * 2012-10-23 2014-05-07 浙江大华技术股份有限公司 一种图像处理方法及系统
CN106485687A (zh) * 2016-09-20 2017-03-08 深圳市华星光电技术有限公司 一种直方图的影像对比增强方法及显示装置
CN107257452A (zh) * 2017-07-21 2017-10-17 浙江大华技术股份有限公司 一种图像处理方法、装置及计算设备

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102006026843A1 (de) * 2006-06-09 2007-12-20 Carl Zeiss Nts Gmbh Verfahren zur Bearbeitung eines digitalen Grauwertbildes
JP5591165B2 (ja) * 2011-03-25 2014-09-17 公益財団法人鉄道総合技術研究所 コンクリート表面の変状領域の検出方法
CN102779339A (zh) * 2011-12-31 2012-11-14 北京京东方光电科技有限公司 一种图像处理方法及系统
CN102611831B (zh) * 2012-01-12 2014-09-24 陆许明 降低压缩图像编码噪声的方法
CN103530878B (zh) * 2013-10-12 2016-01-13 北京工业大学 一种基于融合策略的边缘提取方法
US9576346B2 (en) * 2015-03-24 2017-02-21 Intel Corporation Non-local means image denoising with an adaptive directional spatial filter
CN106934768B (zh) * 2015-12-30 2020-07-03 展讯通信(天津)有限公司 一种图像去噪的方法及装置
CN105654445B (zh) * 2016-01-28 2018-08-21 东南大学 一种基于小波变换边缘检测的手机图像去噪方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1951121A (zh) * 2004-10-15 2007-04-18 松下电器产业株式会社 降低块状噪声装置及图像显示装置
CN101123682A (zh) * 2006-08-11 2008-02-13 松下电器产业株式会社 可减少图像振铃噪声的方法、装置及集成电路
CN103778599A (zh) * 2012-10-23 2014-05-07 浙江大华技术股份有限公司 一种图像处理方法及系统
CN106485687A (zh) * 2016-09-20 2017-03-08 深圳市华星光电技术有限公司 一种直方图的影像对比增强方法及显示装置
CN107257452A (zh) * 2017-07-21 2017-10-17 浙江大华技术股份有限公司 一种图像处理方法、装置及计算设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11445211B1 (en) * 2020-12-10 2022-09-13 Amazon Technologies, Inc. Psychovisually optimized dithering for image and video encoding

Also Published As

Publication number Publication date
CN108513044B (zh) 2020-11-13
CN108513044A (zh) 2018-09-07

Similar Documents

Publication Publication Date Title
WO2019200657A1 (zh) 图像边缘处理方法、电子装置及计算机可读存储介质
CN101155313B (zh) 光源估计方法和系统
US20150036927A1 (en) Apparatus and method of compensating chromatic aberration of image
KR102307501B1 (ko) 광학 보상 시스템 및 광학 보상 방법
WO2019200658A1 (zh) 图像平滑处理方法、电子装置及计算机可读存储介质
WO2021218603A1 (zh) 图像处理方法及投影系统
US8290261B2 (en) Image processing apparatus and image processing method
US9565411B2 (en) Image processing device, image processing method, and non-transitory computer-readable recording medium for recording image processing program
WO2016111020A1 (ja) 画像処理装置、撮像装置、画像処理方法、画像処理プログラム
US7289666B2 (en) Image processing utilizing local color correction and cumulative histograms
JP2015231140A (ja) 画像処理装置、画像処理方法、及び、プログラム
KR20130000665A (ko) 역광 프레임을 검출하고, 보정하는 방법 및 장치
US20160093066A1 (en) Saturation compensation method
KR101279576B1 (ko) 디지털 영상 처리 장치에서의 파노라마 영상 생성 방법
KR20100067268A (ko) 유효 영역을 이용한 자동 화이트 밸런스 조정 장치 및 방법
US10701328B2 (en) Image processing device, image processing method, and image processing program
US10127851B2 (en) Image processing method of OLED display device
US7949183B2 (en) Methods and apparatus for enhancing color data
CN114390266A (zh) 一种图像白平衡处理方法、设备及计算机可读存储介质
US9930349B2 (en) Image processing to retain small color/gray differences
TWI917040B (zh) 具有物件偵測的影像處理方法及影像處理裝置
KR100782848B1 (ko) 디지털 이미지 처리 방법 및 그 시스템
JP2020156016A (ja) 画像処理装置、画像処理方法、及びプログラム
CN111383180B (zh) 图像增强方法、装置以及计算机存储介质
JP5099438B2 (ja) 画像処理装置および方法、並びにプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18915654

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18915654

Country of ref document: EP

Kind code of ref document: A1