WO2019200658A1 - Method for image smoothing processing, electronic device, and computer readable storage medium - Google Patents

Method for image smoothing processing, electronic device, and computer readable storage medium 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
Application number
PCT/CN2018/088019
Other languages
French (fr)
Chinese (zh)
Inventor
朱江
赵斌
张裕桦
陈宏贵
Original Assignee
深圳市华星光电技术有限公司
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 深圳市华星光电技术有限公司 filed Critical 深圳市华星光电技术有限公司
Publication of WO2019200658A1 publication Critical patent/WO2019200658A1/en

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
    • G06T5/70

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.

Abstract

Disclosed is a method for image smoothing processing, comprising: extracting a luminance component from an inputted image; performing, according to the extracted luminance component, flat region detection on the image to determine whether each pixel of the image is in a flat region; if the pixel is in a flat region, performing smoothing processing on the pixel; and after compositing luminance components, outputting a smoothened image. Also disclosed are an electronic device and a computer readable storage medium. The invention can suppress noise in a flat region of an image, and enables a luminance component at the flat region to have moderate gradation, thereby improving image quality.

Description

图像平滑处理方法、电子装置及计算机可读存储介质Image smoothing processing method, electronic device and computer readable storage medium 技术领域Technical field
本发明涉及图像处理技术领域,尤其涉及一种图像平滑处理方法、电子装置及计算机可读存储介质。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.
背景技术Background technique
随着技术的发展和市场需求的变化,平板电视愈来愈受人们的欢迎,电视的解析度也越来越高,高解析度的视频及信号需求亦越来越大。但是,目前尚有很多的视频文件和信号源解析度比较低,这些视频文件及信号源在平板电视上放大至需要的解析度时会带入噪声。特别是图像的平坦区域会出现水印及马赛克等现象,严重影响了图像的品质。With the development of technology and changes in market demand, flat-panel TVs are becoming more and more popular, and the resolution of TVs is getting higher and higher. The demand for high-resolution video and signals is also growing. However, there are still many video files and signal sources with low resolution. These video files and signal sources will bring noise when they are amplified to the required resolution on a flat-panel TV. In particular, watermarks and mosaics appear in flat areas of the image, which seriously affects the quality of the image.
发明内容Summary of the invention
本发明的主要目的在于提出一种图像平滑处理方法、电子装置及计算机可读存储介质,旨在解决如何对图像的平坦区域进行处理以抑制噪声的问题。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.
为实现上述目的,本发明提供的一种图像平滑处理方法,该方法包括步骤:To achieve the above objective, the present invention provides an image smoothing processing method, the method comprising the steps of:
从输入的图像中提取亮度分量;Extracting a luminance component from the input image;
根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;Performing flat area detection on the image according to the extracted luminance component, and determining whether each pixel in the image is in a flat area;
当所述像素处于平坦区域时,对所述像素进行平滑处理;及Smoothing the pixels when the pixels are in a flat region; and
进行亮度分量合成后输出平滑后的图像。The smoothed image is output after the luminance component is combined.
可选地,所述方法在从输入的图像中提取亮度分量的步骤之后还包括步骤:对所述亮度分量进行位数提升,从而根据提升后的亮度分量对所述图像进行平坦区域检测;Optionally, after the step of extracting a luminance component from the input image, 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;
在进行亮度分量合成的步骤之前还包括步骤:通过抖动显示将所述图像中每个像素处理后的新亮度值转变成低位,从而根据转变后的亮度分量数据进行亮度分量合成。Before the step of combining the luminance components, 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.
可选地,在对所述亮度分量进行位数提升的步骤中,将所述亮度分量的位数从8bit转变成10bit或者12bit;Optionally, in the step of performing 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;
在将所述新亮度值转变成低位的步骤中,将每个像素处理后的新亮度值的位数从10bit或者12bit转变成8bit。In the step of converting the new luminance value into a low bit, the number of bits of the new luminance value after each pixel processing is changed from 10 bit or 12 bits to 8 bits.
可选地,所述平坦区域检测包括步骤:Optionally, the flat area detection comprises the steps of:
计算每个目标像素的平坦度值;Calculating the flatness value of each target pixel;
以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;Determining, from the target pixel, a maximum value of the flatness value of the pixel in the preset area according to a preset area size M*N;
将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。Comparing the flatness maximum value with a preset threshold value, if the flatness maximum value is smaller than the threshold value, the target pixel needs to perform smoothing processing; otherwise, the target pixel does not need to perform smoothing processing. .
可选地,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。Optionally, the flatness value is a maximum value of absolute values of luminance differences of the target pixel and adjacent pixels.
此外,为实现上述目的,本发明还提出一种电子装置,所述电子装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的图像平滑处理程序,所述图像平滑处理程序被所述处理器执行时实现如下步骤:In addition, in order to achieve the above object, 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:
从输入的图像中提取亮度分量;Extracting a luminance component from the input image;
根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;Performing flat area detection on the image according to the extracted luminance component, and determining whether each pixel in the image is in a flat area;
当所述像素处于平坦区域时,对所述像素进行平滑处理;及Smoothing the pixels when the pixels are in a flat region; and
进行亮度分量合成后输出平滑后的图像。The smoothed image is output after the luminance component is combined.
可选地,在从输入的图像中提取亮度分量的步骤之后还包括步骤:对所述亮度分量进行位数提升,从而根据提升后的亮度分量对所述图像进行平坦区域检测;Optionally, after the step of extracting the luminance component from the input image, 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;
在进行亮度分量合成的步骤之前还包括步骤:通过抖动显示将所述图像中每个像素处理后的新亮度值转变成低位,从而根据转变后的亮度分量数据进行亮度分量合成。Before the step of combining the luminance components, 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.
可选地,所述平坦区域检测包括步骤:Optionally, the flat area detection comprises the steps of:
计算每个目标像素的平坦度值;Calculating the flatness value of each target pixel;
以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;Determining, from the target pixel, a maximum value of the flatness value of the pixel in the preset area according to a preset area size M*N;
将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。Comparing the flatness maximum value with a preset threshold value, if the flatness maximum value is smaller than the threshold value, the target pixel needs to perform smoothing processing; otherwise, the target pixel does not need to perform smoothing processing. .
可选地,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。Optionally, the flatness value is a maximum value of absolute values of luminance differences of the target pixel and adjacent pixels.
进一步地,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有图像平滑处理程序,所述图像平滑处理程序被处理器执行时实现如上述的图像平滑处理方法的步骤。Further, in order to achieve the above object, 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. First, 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. In addition, 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. 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.
附图说明DRAWINGS
图1为本发明第一实施例提出的一种电子装置的架构图;1 is a block diagram of an electronic device according to a first embodiment of the present invention;
图2为本发明第二实施例提出的一种图像平滑处理方法的流程图;2 is a flowchart of an image smoothing processing method according to a second embodiment of the present invention;
图3为本发明第三实施例提出的一种图像平滑处理方法的流程图;3 is a flowchart of an image smoothing processing method according to a third embodiment of the present invention;
图4为本发明中目标像素及其相邻像素的示意图;4 is a schematic diagram of a target pixel and its adjacent pixels in the present invention;
图5为本发明中在预设区域内求平坦度最大值的示意图。Fig. 5 is a schematic view showing the maximum value of flatness in a preset area in the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说 明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
实施例一 Embodiment 1
参阅图1所示,本发明第一实施例提出一种电子装置2。所述电子装置2具有图像显示和图像处理功能,可以是平板电视等。所述电子装置2包括存储器20、处理器22和图像平滑处理程序28。Referring to FIG. 1, 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.
其中,所述存储器20至少包括一种类型的可读存储介质,用于存储安装于所述电子装置2的操作系统和各类应用软件,例如图像平滑处理程序28的程序代码等。此外,所述存储器20还可以用于暂时地存储已经输出或者将要输出的各类数据。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.
所述处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制所述电子装置2的总体操作。本实施例中,所述处理器22用于运行所述存储器20中存储的程序代码或者处理数据,例如运行所述图像平滑处理程序28等。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. In this embodiment, 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.
所述图像平滑处理程序28被所述处理器22执行时,实现如下步骤:When the image smoothing program 28 is executed by the processor 22, the following steps are implemented:
(1)从输入的图像中提取亮度分量。(1) Extracting a luminance component from the input image.
(2)对所述亮度分量进行位数提升。(2) The number of bits of the luminance component is increased.
(3)根据提升后的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域。(3) Performing flat area detection on the image based on the boosted luminance component, and determining whether each pixel in the image is in a flat area.
(4)当所述像素处于平坦区域时,对所述像素进行平滑处理。(4) When the pixel is in a flat area, the pixel is smoothed.
(5)将所述图像中每个像素处理后的新亮度值转变成低位。(5) Converting the new luminance value processed by each pixel in the image to a low level.
(6)进行亮度分量合成后输出平滑后的图像。(6) The smoothed image is output after the luminance component is combined.
上述步骤的详细说明请参阅下述第二实施例和第三实施例,在此不再赘述。For details of the above steps, please refer to the following second embodiment and the third embodiment, and details are not described herein again.
本领域技术人员可以理解,图2中示出的结构并不构成对所述电子装置2的限定,所述电子装置2还可以包括其他必要部件(例如屏幕等),或者组合某些部件,或者不同的部件布置。It will be understood by those skilled in the art that the structure shown in 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.
实施例二 Embodiment 2
参阅图2所示,本发明第二实施例提出一种图像平滑处理方法,应用于所述电子装置2中。在本实施例中,根据不同的需求,图2所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。该方法包括以下步骤:Referring to FIG. 2, a second embodiment of the present invention provides an image smoothing processing method applied to the electronic device 2. In this embodiment, 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:
S100,从输入的图像中提取亮度分量。S100, extracting a luminance component from the input image.
具体地,一般情况下,一个图像中的每个像素可能包括亮度分量、色度分量等。当需要对图像进行平滑处理时,首先获取输入的图像,然后提取所述图像的亮度分量。所述图像可以采取的颜色空间是YUV、HSL或者HSV等。Specifically, in general, each pixel in an image may include a luminance component, a chrominance component, and the like. When it is necessary to smooth the 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.
S102,根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域。当所述像素处于平坦区域时,执行步骤S104。当所述像素处于非平坦区域时,直接执行步骤S106。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.
具体地,当从所述图像中提取出亮度分量之后,需要根据所述亮度分量对每个像素进行平坦区域检测。对于平坦区域的像素进行平滑处理,对于非平坦区域的像素则不作处理。Specifically, after 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.
在本实施例中,所述平坦区域检测包括:In this embodiment, the flat area detection includes:
(1)计算每个像素(称为目标像素)的平坦度值。所述平坦度值为目标像素与相邻像素(周围的8个像素)的亮度差的绝对值中的最大值。如图4所示,为目标像素及其相邻像素的示意图。其中,像素(j,i)为所述目标像素,其他像 素为像素(j,i)的相邻像素。此步骤需要遍历所述图像中的每个目标像素,分别计算对应的所述平坦度值。为了便于计算,所述目标像素从所述图像的第二行开始至倒数第二行结束,对应每行从第二个像素开始至倒数第二个像素结束。计算公式如下:(1) Calculate the flatness value of each pixel (referred to as a target pixel). The flatness value is a maximum value among absolute values of luminance differences of the target pixel and the adjacent pixels (eight pixels around). As shown in 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. For ease of calculation, 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:
f1=|y(j,i)–y(j,i-1)|;F1=|y(j,i)–y(j,i-1)|;
f2=|y(j,i)–y(j,i+1)|;F2=|y(j,i)–y(j,i+1)|;
f3=|y(j,i)–y(j-1,i-1)|;F3=|y(j,i)–y(j-1,i-1)|;
f4=|y(j,i)–y(j-1,i)|;F4=|y(j,i)–y(j-1,i)|;
f5=|y(j,i)–y(j-1,i+1)|;F5=|y(j,i)–y(j-1,i+1)|;
f6=|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)|;F7=|y(j,i)–y(j+1,i)|;
f8=|y(j,i)–y(j+1,i+1)|;F8=|y(j,i)–y(j+1,i+1)|;
fabs(j,i)=max(f1f2f3f4f5f6f7f8);Fabs(j,i)=max(f1f2f3f4f5f6f7f8);
其中,y表示对应像素的亮度分量,fabs(j,i)表示像素(j,i)的平坦度值。所述平坦度值越小,表示该像素处在平坦区域的可能性越大。Where y represents the luminance component of the corresponding pixel, and 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.
(2)以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值。其中,M和N一般为奇数,如3*3、5*5、7*7等,所设置的区域越大,后续进行平滑处理的能力越强。如图5所示,为在预设区域内求平坦度最大值的示意图。在图5中,所述预设区域的大小为5*5,计算出该区域内25个像素的所述平坦度值的最大值。(2) 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. Among them, 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. As shown in FIG. 5, it is a schematic diagram of finding the maximum value of the flatness in the preset area. In FIG. 5, 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.
(3)将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。(3) comparing the flatness maximum value with a preset threshold value, if the flatness maximum value is smaller than the threshold value, the target pixel needs to perform smoothing processing; otherwise, the target pixel does not need to be processed. Smoothing is performed.
S104,对所述像素进行平滑处理。S104: Smooth processing the pixel.
具体地,当所述目标像素处于平坦区域时,对所述目标像素进行平滑处理。在本实施例中,所述平滑处理采取均值法,即所述目标像素的新亮度值为所述预设区域内所有像素的亮度值的平均值。Specifically, when the target pixel is in a flat region, the target pixel is smoothed. In this embodiment, 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.
S106,进行亮度分量合成后输出平滑后的图像。S106, after the luminance component is synthesized, the smoothed image is output.
具体地,根据所述图像中每个像素的新亮度值进行亮度分量合成,通过对应的颜色空间反变换成RGB数据输出。Specifically, 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.
本实施例所提出的图像平滑处理方法,首先对图像亮度分量进行检测,按照预先设置的区域大小检测出像素是否处在平坦区域,然后对该区域中心点像素(目标像素)进行平滑处理,以抑制图像平坦区域的噪声,并使图像平坦区域亮度分量平缓渐变,提升了图像的品质及电子装置的显示品质。另外,通过取目标像素与相邻像素亮度差的绝对值的最大值来评判该目标像素处于平坦区域的可能性,计算方法简单,便于硬件实现。通过设置区域的大小可控制对平坦区域中像素的平滑处理能力,简单灵活,实用性强。In the image smoothing processing method proposed in this embodiment, 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. In addition, by taking the maximum value of the absolute value of the luminance difference between the target pixel and the adjacent pixel to judge the possibility that the target pixel is in a flat region, 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.
实施例三Embodiment 3
参阅图3所示,本发明第三实施例提出一种图像平滑处理方法。在第三实施例中,所述图像平滑处理方法的步骤与第二实施例相类似,区别在于该方法还包括步骤S202和S208。Referring to FIG. 3, a third embodiment of the present invention provides an image smoothing processing method. In the third embodiment, 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:
S200,从输入的图像中提取亮度分量。S200, extracting a luminance component from the input image.
具体地,一般情况下,一个图像中的每个像素可能包括亮度分量、色度分量等。当需要对图像进行边缘增强时,首先获取输入的图像,然后提取所述图像的亮度分量。所述图像可以采取的颜色空间是YUV、HSL或者HSV等。Specifically, in general, each pixel in an image may include a luminance component, a chrominance component, and the like. When edge enhancement of an image is required, 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.
S202,对所述亮度分量进行位数提升。S202. Perform a bit increase on the brightness component.
具体地,将所述亮度分量的位数从8bit转变成10bit或者12bit或者更高。Specifically, the number of bits of the luminance component is changed from 8 bits to 10 bits or 12 bits or higher.
S204,根据提升后的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域。当所述像素处于平坦区域时,执行步骤S206。当所述像素处于非平坦区域时,直接执行步骤S208。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.
具体地,当对所述亮度分量进行位数提升之后,需要根据所述亮度分量对每个像素进行平坦区域检测。对于平坦区域的像素进行平滑处理,对于非平坦区域的像素则不作处理。Specifically, after the number of bits of the luminance component is increased, 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.
在本实施例中,所述平坦区域检测包括:In this embodiment, the flat area detection includes:
(1)计算每个像素(称为目标像素)的平坦度值。所述平坦度值为目标像素与相邻像素(周围的8个像素)的亮度差的绝对值中的最大值。如图4所示,为目标像素及其相邻像素的示意图。其中,像素(j,i)为所述目标像素,其他像素为像素(j,i)的相邻像素。此步骤需要遍历所述图像中的每个目标像素,分别计算对应的所述平坦度值。为了便于计算,所述目标像素从所述图像的第二行开始至倒数第二行结束,对应每行从第二个像素开始至倒数第二个像素结束。计算公式如下:(1) Calculate the flatness value of each pixel (referred to as a target pixel). The flatness value is a maximum value among absolute values of luminance differences of the target pixel and the adjacent pixels (eight pixels around). As shown in 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. For ease of calculation, 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:
f1=|y(j,i)–y(j,i-1)|;F1=|y(j,i)–y(j,i-1)|;
f2=|y(j,i)–y(j,i+1)|;F2=|y(j,i)–y(j,i+1)|;
f3=|y(j,i)–y(j-1,i-1)|;F3=|y(j,i)–y(j-1,i-1)|;
f4=|y(j,i)–y(j-1,i)|;F4=|y(j,i)–y(j-1,i)|;
f5=|y(j,i)–y(j-1,i+1)|;F5=|y(j,i)–y(j-1,i+1)|;
f6=|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)|;F7=|y(j,i)–y(j+1,i)|;
f8=|y(j,i)–y(j+1,i+1)|;F8=|y(j,i)–y(j+1,i+1)|;
fabs(j,i)=max(f1f2f3f4f5f6f7f8);Fabs(j,i)=max(f1f2f3f4f5f6f7f8);
其中,y表示对应像素的亮度分量,fabs(j,i)表示像素(j,i)的平坦度值。所 述平坦度值越小,表示该像素处在平坦区域的可能性越大。Where y represents the luminance component of the corresponding pixel, and 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.
(2)以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值。其中,M和N一般为奇数,如3*3、5*5、7*7等,所设置的区域越大,后续进行平滑处理的能力越强。如图5所示,为在预设区域内求平坦度最大值的示意图。在图5中,所述预设区域的大小为5*5,计算出该区域内25个像素的所述平坦度值的最大值。(2) 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. Among them, 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. As shown in FIG. 5, it is a schematic diagram of finding the maximum value of the flatness in the preset area. In FIG. 5, 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.
(3)将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。(3) comparing the flatness maximum value with a preset threshold value, if the flatness maximum value is smaller than the threshold value, the target pixel needs to perform smoothing processing; otherwise, the target pixel does not need to be processed. Smoothing is performed.
S206,对所述像素进行平滑处理。S206, performing smoothing on the pixel.
具体地,当所述目标像素处于平坦区域时,对所述目标像素进行平滑处理。在本实施例中,所述平滑处理采取均值法,即所述目标像素的新亮度值为所述预设区域内所有像素的亮度值的平均值。Specifically, when the target pixel is in a flat region, the target pixel is smoothed. In this embodiment, 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.
S208,将所述图像中每个像素的新亮度值转变成低位。S208. Convert a new brightness value of each pixel in the image to a low level.
具体地,对于所述图像中每个像素的新亮度值,经过抖动显示(Dithering),从高位(10bit或者12bit)转变成8bit。针对未进行平滑处理的像素,所述新亮度值与进行位数提升后的亮度分量值相同,未发生改变。Specifically, for a new luminance value of each pixel in the image, it is converted from a high bit (10 bit or 12 bit) to 8 bit by dithering. For the pixels that have not been smoothed, the new luminance value is the same as the luminance component value after the digit enhancement, and no change occurs.
S210,进行亮度分量合成后输出平滑后的图像。S210, after the luminance component is synthesized, the smoothed image is output.
具体地,将转变后的亮度分量数据进行亮度分量合成,通过对应的颜色空间反变换成RGB数据输出。Specifically, 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.
实施例四Embodiment 4
本发明还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质存储有图像平滑处理程序,所述图像平滑处理程序可被至少一个处理器执行,以使所述至少一个处理器执行如上述的图像平滑处理方法的步骤。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.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that 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.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。The embodiments of the present invention have been described above with reference to the drawings, but the present invention is not limited to the specific embodiments described above, and the specific embodiments described above are merely illustrative and not restrictive, and those skilled in the art In the light of the present invention, many forms may be made without departing from the spirit and scope of the invention as claimed.

Claims (14)

  1. 一种图像平滑处理方法,其中,该方法包括步骤:An image smoothing method, wherein the method comprises the steps of:
    从输入的图像中提取亮度分量;Extracting a luminance component from the input image;
    根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;Performing flat area detection on the image according to the extracted luminance component, and determining whether each pixel in the image is in a flat area;
    当所述像素处于平坦区域时,对所述像素进行平滑处理;及Smoothing the pixels when the pixels are in a flat region; and
    进行亮度分量合成后输出平滑后的图像。The smoothed image is output after the luminance component is combined.
  2. 根据权利要求1所述的图像平滑处理方法,其中,所述方法在从输入的图像中提取亮度分量的步骤之后还包括步骤:对所述亮度分量进行位数提升,从而根据提升后的亮度分量对所述图像进行平坦区域检测;The image smoothing processing method according to claim 1, wherein the method further comprises the step of: performing a digit enhancement on the luminance component after the step of extracting a luminance component from the input image, thereby based on the luminance component after the enhancement Performing flat area detection on the image;
    在进行亮度分量合成的步骤之前还包括步骤:通过抖动显示将所述图像中每个像素处理后的新亮度值转变成低位,从而根据转变后的亮度分量数据进行亮度分量合成。Before the step of combining the luminance components, 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.
  3. 根据权利要求2所述的图像平滑处理方法,其中,在对所述亮度分量进行位数提升的步骤中,将所述亮度分量的位数从8bit转变成10bit或者12bit;The image smoothing processing method according to claim 2, wherein in the step of increasing the number of bits of the luminance component, the number of bits of the luminance component is changed from 8 bits to 10 bits or 12 bits;
    在将所述新亮度值转变成低位的步骤中,将每个像素处理后的新亮度值的位数从10bit或者12bit转变成8bit。In the step of converting the new luminance value into a low bit, the number of bits of the new luminance value after each pixel processing is changed from 10 bit or 12 bits to 8 bits.
  4. 根据权利要求1所述的图像平滑处理方法,其中,所述平坦区域检测包括步骤:The image smoothing processing method according to claim 1, wherein said flat area detection comprises the steps of:
    计算每个目标像素的平坦度值;Calculating the flatness value of each target pixel;
    以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;Determining, from the target pixel, a maximum value of the flatness value of the pixel in the preset area according to a preset area size M*N;
    将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。Comparing the flatness maximum value with a preset threshold value, if the flatness maximum value is smaller than the threshold value, the target pixel needs to perform smoothing processing; otherwise, the target pixel does not need to perform smoothing processing. .
  5. 根据权利要求2所述的图像平滑处理方法,其中,所述平坦区域检测包括步骤:The image smoothing processing method according to claim 2, wherein said flat area detection comprises the steps of:
    计算每个目标像素的平坦度值;Calculating the flatness value of each target pixel;
    以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;Determining, from the target pixel, a maximum value of the flatness value of the pixel in the preset area according to a preset area size M*N;
    将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。Comparing the flatness maximum value with a preset threshold value, if the flatness maximum value is smaller than the threshold value, the target pixel needs to perform smoothing processing; otherwise, the target pixel does not need to perform smoothing processing. .
  6. 根据权利要求4所述的图像平滑处理方法,其中,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。The image smoothing processing method according to claim 4, wherein the flatness value is a maximum value among absolute values of luminance differences of the target pixel and adjacent pixels.
  7. 根据权利要求5所述的图像平滑处理方法,其中,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。The image smoothing processing method according to claim 5, wherein the flatness value is a maximum value among absolute values of luminance differences of the target pixel and adjacent pixels.
  8. 一种电子装置,其中,所述电子装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的图像平滑处理程序,所述图像平滑处理程序被所述处理器执行时实现如下步骤:An electronic device, comprising: a memory, a processor, and an image smoothing program stored on the memory and operable on the processor, the image smoothing program being The following steps are implemented during execution:
    从输入的图像中提取亮度分量;Extracting a luminance component from the input image;
    根据所提取的亮度分量对所述图像进行平坦区域检测,判断所述图像中的每个像素是否处于平坦区域;Performing flat area detection on the image according to the extracted luminance component, and determining whether each pixel in the image is in a flat area;
    当所述像素处于平坦区域时,对所述像素进行平滑处理;及Smoothing the pixels when the pixels are in a flat region; and
    进行亮度分量合成后输出平滑后的图像。The smoothed image is output after the luminance component is combined.
  9. 根据权利要求8所述的电子装置,其中,在从输入的图像中提取亮度分量的步骤之后还包括步骤:对所述亮度分量进行位数提升,从而根据提升后的亮度分量对所述图像进行平坦区域检测;The electronic device according to claim 8, wherein the step of extracting the luminance component from the input image further comprises the step of: increasing the number of bits of the luminance component to thereby perform the image on the image according to the enhanced luminance component Flat area detection;
    在进行亮度分量合成的步骤之前还包括步骤:通过抖动显示将所述图像中每个像素处理后的新亮度值转变成低位,从而根据转变后的亮度分量数据进行亮度分量合成。Before the step of combining the luminance components, 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.
  10. 根据权利要求8所述的电子装置,其中,所述平坦区域检测包括步骤:The electronic device of claim 8, wherein the flat region detection comprises the steps of:
    计算每个目标像素的平坦度值;Calculating the flatness value of each target pixel;
    以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;Determining, from the target pixel, a maximum value of the flatness value of the pixel in the preset area according to a preset area size M*N;
    将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。Comparing the flatness maximum value with a preset threshold value, if the flatness maximum value is smaller than the threshold value, the target pixel needs to perform smoothing processing; otherwise, the target pixel does not need to perform smoothing processing. .
  11. 根据权利要求9所述的电子装置,其中,所述平坦区域检测包括步骤:The electronic device of claim 9, wherein the flat area detection comprises the steps of:
    计算每个目标像素的平坦度值;Calculating the flatness value of each target pixel;
    以所述目标像素为中心,按照预先设置的区域大小M*N求出该预设区域内像素的所述平坦度值的最大值;Determining, from the target pixel, a maximum value of the flatness value of the pixel in the preset area according to a preset area size M*N;
    将所述平坦度最大值与预设的阈值进行比较,如果所述平坦度最大值比所述阈值小,则所述目标像素需要进行平滑处理,反之,所述目标像素则不需要进行平滑处理。Comparing the flatness maximum value with a preset threshold value, if the flatness maximum value is smaller than the threshold value, the target pixel needs to perform smoothing processing; otherwise, the target pixel does not need to perform smoothing processing. .
  12. 根据权利要求10所述的电子装置,其中,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。The electronic device according to claim 10, wherein the flatness value is a maximum value among absolute values of luminance differences of the target pixel and adjacent pixels.
  13. 根据权利要求11所述的电子装置,其中,所述平坦度值为所述目标像素与相邻像素的亮度差的绝对值中的最大值。The electronic device according to claim 11, wherein the flatness value is a maximum value among absolute values of luminance differences of the target pixel and adjacent pixels.
  14. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有图像平滑处理程序,所述图像平滑处理程序被处理器执行时实现如权利要求1所述的图像平滑处理方法的步骤。A computer readable storage medium, wherein the computer readable storage medium stores an image smoothing processing program, and the image smoothing processing program is executed by a processor to implement the steps of the image smoothing processing method according to claim 1. .
PCT/CN2018/088019 2018-04-16 2018-05-23 Method for image smoothing processing, electronic device, and computer readable storage medium WO2019200658A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810336784.3 2018-04-16
CN201810336784.3A CN108513044B (en) 2018-04-16 2018-04-16 Image smoothing method, electronic device and computer readable storage medium

Publications (1)

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

Family

ID=63382331

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/088019 WO2019200658A1 (en) 2018-04-16 2018-05-23 Method for image smoothing processing, electronic device, and computer readable storage medium

Country Status (2)

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

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 (en) * 2019-11-14 2022-11-18 海信视像科技股份有限公司 Image processing method and apparatus
CN113132703B (en) * 2019-12-30 2024-03-29 海信视像科技股份有限公司 Image processing method and apparatus
CN113963672B (en) * 2021-11-05 2023-02-24 惠州华星光电显示有限公司 Display brightness adjusting method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1951121A (en) * 2004-10-15 2007-04-18 松下电器产业株式会社 Block noise reducing device and image display
CN101123682A (en) * 2006-08-11 2008-02-13 松下电器产业株式会社 Method, device and integrated circuit for reducing image ring noise
CN103778599A (en) * 2012-10-23 2014-05-07 浙江大华技术股份有限公司 Image processing method and system thereof
CN106485687A (en) * 2016-09-20 2017-03-08 深圳市华星光电技术有限公司 A kind of histogrammic image contrast Enhancement Method and display device
CN107257452A (en) * 2017-07-21 2017-10-17 浙江大华技术股份有限公司 A kind of image processing method, device and computing device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102006026843A1 (en) * 2006-06-09 2007-12-20 Carl Zeiss Nts Gmbh Method for processing a digital gray value image
JP5591165B2 (en) * 2011-03-25 2014-09-17 公益財団法人鉄道総合技術研究所 Method for detecting deformation area on concrete surface
CN102779339A (en) * 2011-12-31 2012-11-14 北京京东方光电科技有限公司 Image processing method and system
CN102611831B (en) * 2012-01-12 2014-09-24 陆许明 Method for reducing compressed image encoding noise
CN103530878B (en) * 2013-10-12 2016-01-13 北京工业大学 A kind of edge extracting method based on convergence strategy
US9576346B2 (en) * 2015-03-24 2017-02-21 Intel Corporation Non-local means image denoising with an adaptive directional spatial filter
CN111915534B (en) * 2015-12-30 2022-09-27 展讯通信(天津)有限公司 Image denoising method and device
CN105654445B (en) * 2016-01-28 2018-08-21 东南大学 A kind of handset image denoising method based on wavelet transformation edge detection

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1951121A (en) * 2004-10-15 2007-04-18 松下电器产业株式会社 Block noise reducing device and image display
CN101123682A (en) * 2006-08-11 2008-02-13 松下电器产业株式会社 Method, device and integrated circuit for reducing image ring noise
CN103778599A (en) * 2012-10-23 2014-05-07 浙江大华技术股份有限公司 Image processing method and system thereof
CN106485687A (en) * 2016-09-20 2017-03-08 深圳市华星光电技术有限公司 A kind of histogrammic image contrast Enhancement Method and display device
CN107257452A (en) * 2017-07-21 2017-10-17 浙江大华技术股份有限公司 A kind of image processing method, device and computing device

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 (en) 2020-11-13
CN108513044A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
WO2019200657A1 (en) Method for processing image edge, electronic device, and computer readable storage medium
WO2019200658A1 (en) Method for image smoothing processing, electronic device, and computer readable storage medium
JP5205007B2 (en) Light source estimation method and apparatus
JP4221434B2 (en) Outline correction method, image processing apparatus, and display apparatus
US8164649B2 (en) White balance adjusting device, imaging apparatus, and recording medium storing white balance adjusting program
US20150036927A1 (en) Apparatus and method of compensating chromatic aberration of image
KR102307501B1 (en) Optical compensation system and Optical compensation method thereof
US8290261B2 (en) Image processing apparatus and image processing method
CN113573032A (en) Image processing method and projection system
WO2016111020A1 (en) Image processing device, image capturing device, image processing method, and image processing program
US9565411B2 (en) Image processing device, image processing method, and non-transitory computer-readable recording medium for recording image processing program
US7289666B2 (en) Image processing utilizing local color correction and cumulative histograms
US9665948B2 (en) Saturation compensation method
JP2015231140A (en) Image processing device, image processing method, and program
KR101279576B1 (en) Method for generating panorama image within digital image processing apparatus
US20130322519A1 (en) Video processing method using adaptive weighted prediction
KR20100067268A (en) Apparatus and method for adjusting auto white balance using effective area
CN114390266A (en) Image white balance processing method and device and computer readable storage medium
KR100782848B1 (en) Method for digital image processing and system thereof
US7949183B2 (en) Methods and apparatus for enhancing color data
JP2020156016A (en) Image processing system, image processing method, and program
US10127851B2 (en) Image processing method of OLED display device
CN111383180B (en) Image enhancement method, device and computer storage medium
CN116939374B (en) Lens shading correction method and device and electronic equipment
US10701328B2 (en) Image processing device, image processing method, and image processing program

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