WO2019153731A1 - 图像处理方法及*** - Google Patents

图像处理方法及*** Download PDF

Info

Publication number
WO2019153731A1
WO2019153731A1 PCT/CN2018/103920 CN2018103920W WO2019153731A1 WO 2019153731 A1 WO2019153731 A1 WO 2019153731A1 CN 2018103920 W CN2018103920 W CN 2018103920W WO 2019153731 A1 WO2019153731 A1 WO 2019153731A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
value
partition
histogram
brightness value
Prior art date
Application number
PCT/CN2018/103920
Other languages
English (en)
French (fr)
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 WO2019153731A1 publication Critical patent/WO2019153731A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Definitions

  • the present application relates to the field of image processing technologies, and in particular, to an image processing method and system.
  • CLAHE Contrast
  • CLAHE Limited Adaptive Histogram Equalization
  • AHE Adaptive Histogram Equalization
  • the CLAHE algorithm uses a recursive process and enhances the visibility of local details of the image by enhancing the contrast of the local regions.
  • the key to the CLAHE algorithm is to limit the magnification of the contrast by cropping the histogram before calculating the conversion function.
  • a parameter of the CLAHE algorithm is used to limit the predefined values: first, the image is divided into several sub-blocks, and the histogram of each sub-block is calculated separately, and each histogram is reallocated by limiting the contrast.
  • the existing CLAHE algorithm still leads to excessive enhancement of the local area of the image, and the black picture is not black enough and local distortion.
  • the present application provides an image processing method and system to improve the local distortion of a target image caused by an existing CLAHE algorithm.
  • the application proposes an image processing method, which includes:
  • Step S10 input a target image, perform partition processing on the target image, and obtain a partition image
  • Step S20 acquiring a maximum brightness Max, a minimum brightness Min of the target image, and a maximum brightness value SubMax and a minimum brightness value SubMin of the partition image;
  • Step S30 performing histogram accumulation on the partition image, performing histogram equalization processing on the image accumulated by the histogram according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image, to obtain the partition.
  • Step S40 Obtain a corresponding value of a neighboring partition of each pixel in the target image by using a lookup table (Look Up Table), and calculate a corresponding value of the adjacent partition to obtain a corresponding value. a final value of the brightness of the pixel;
  • Step S50 combining the final values of the brightness of all the pixels into a new image
  • Step S60 correcting the new image by using a correction function, and outputting a final image.
  • the correction function is a linear function that corrects the maximum brightness value and the minimum brightness value of the new image.
  • the step S30 includes:
  • Step S31 performing histogram accumulation on the partition image
  • Step S32 Obtain a maximum value and a minimum value of the histogram equalization according to the obtained maximum brightness value SubMax and the minimum brightness value SubMin of the partition image;
  • Step S33 performing histogram equalization processing on the image accumulated by the histogram by using a contrast limiting algorithm
  • Step S34 Obtain a LUT lookup table corresponding to the partition image.
  • the maximum value of the histogram equalization is 255-a*(255-SubMax), and the minimum value of the histogram equalization is b*(SubMin), where 0 ⁇ a ⁇ 1,0 ⁇ b ⁇ 1.
  • the step S40 includes:
  • Step S41 Obtain a corresponding value of four partitions around each pixel in the target image by using the LUT lookup table;
  • Step S42 Calculate the corresponding values of the four partitions by using bilinear interpolation
  • Step S43 obtaining a final value of the brightness of the corresponding pixel.
  • the present application also provides an image processing system, where the image processing system includes: a partitioning module, a scanning module, a pre-processing module, a computing module, a collection module, and a correction module;
  • the partitioning module is configured to input a target image, perform partition processing on the target image, and obtain a partition image;
  • the scanning module is configured to acquire a maximum brightness Max, a minimum brightness Min of the target image, and a maximum brightness value SubMax and a minimum brightness value SubMin of the partition image;
  • the pre-processing module is configured to perform histogram accumulation on the partition image, and perform histogram equalization on the image accumulated by the histogram according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image. Processing, obtaining a LUT lookup table corresponding to the partition image;
  • the calculating module is configured to obtain a corresponding value of a neighboring partition of each pixel in the target image by using the LUT lookup table, and calculate a corresponding value of the adjacent partition to obtain a corresponding pixel point.
  • the aggregation module is configured to combine the final values of the brightness of all pixels into a new image
  • the correction module is configured to correct the new image by using a correction function, and output a final image.
  • the pre-processing module includes: a histogram accumulation unit, a histogram equalization pre-processing unit, a histogram equalization unit, and an acquisition look-up table unit;
  • the histogram accumulation unit is configured to perform histogram accumulation on the partition image
  • the histogram equalization pre-processing unit is configured to obtain a maximum value and a minimum value of the histogram equalization according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image;
  • the histogram equalization unit is configured to perform histogram equalization processing on the image accumulated by the histogram by using a contrast limiting algorithm
  • the acquiring a lookup table unit is configured to obtain a LUT lookup table corresponding to the partition image.
  • the maximum value of the histogram equalization is 255-a*(255-SubMax), and the minimum value of the histogram equalization is b*(SubMin), where 0 ⁇ a ⁇ 1,0 ⁇ b ⁇ 1.
  • the calculation module includes: a search unit, a bilinear interpolation unit, and an output unit;
  • the searching unit is configured to obtain, by using the LUT lookup table, a corresponding value of four partitions around each pixel in the target image;
  • the bilinear interpolation unit is configured to calculate the corresponding values of the four partitions by using bilinear interpolation
  • the output unit obtains a final value of the brightness of the corresponding pixel.
  • the correction function is a linear function that corrects the maximum brightness value and the minimum brightness value of the new image.
  • the application also proposes an image processing method, which includes:
  • Step S10 input a target image, perform partition processing on the target image, and obtain a partition image
  • Step S20 acquiring a maximum brightness value Max, a minimum brightness value Min of the target image, and a maximum brightness value SubMax and a minimum brightness value SubMin of the partition image;
  • Step S30 performing histogram accumulation on the partition image, performing histogram equalization processing on the image accumulated by the histogram according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image, to obtain the partition.
  • Step S40 Obtain a corresponding value of a neighboring partition of each pixel in the target image by using the display lookup table, calculate a corresponding value of the adjacent partition, and obtain a final value of a brightness of the corresponding pixel. ;
  • Step S50 combining the final values of the brightness of all the pixels into a new image
  • Step S60 correcting the new image by using a correction function, and outputting a final image.
  • the step S30 includes:
  • Step S31 performing histogram accumulation on the partition image
  • Step S32 Obtain a maximum value and a minimum value of the histogram equalization according to the obtained maximum brightness value SubMax and the minimum brightness value SubMin of the partition image;
  • Step S33 performing histogram equalization processing on the image accumulated by the histogram by using a contrast limiting algorithm
  • Step S34 Obtain a display lookup table corresponding to the partition image.
  • the maximum value of the histogram equalization is 255-a*(255-SubMax), and the minimum value of the histogram equalization is b*(SubMin), where 0 ⁇ a ⁇ 1,0 ⁇ b ⁇ 1.
  • the step S40 includes:
  • Step S41 Obtain a corresponding value of four partitions around each pixel in the target image by using the display lookup table;
  • Step S42 Calculate the corresponding values of the four partitions by using bilinear interpolation
  • Step S43 obtaining a final value of the brightness of the corresponding pixel.
  • the detection of the maximum and minimum values of the target image and the brightness of the partition image is added, and the reference value is provided for the subsequent histogram equalization, and the black image in the target image is not black or bright.
  • the area is too bright for processing, reducing local and scene distortion.
  • FIG. 1 is a schematic flow chart of an image processing method according to the present application.
  • FIG. 2 is a schematic diagram of a target image partitioning process of an image processing method according to the present application.
  • FIG. 3 is a schematic structural diagram of an image processing system according to the present application.
  • FIG. 4 is a schematic structural diagram of an image processing system according to the present application.
  • FIG. 1 is a schematic flowchart diagram of an image processing method according to a preferred embodiment, wherein the image processing method includes:
  • Step S10 input a target image, perform partition processing on the target image, and obtain a partition image
  • the target image is input, and the target image is divided into a plurality of partition images of equal size; wherein the partition refers to horizontal and vertical division of the target image. Partitions can't be divided too much, which will affect the speed of operation; partitions can't be divided too little, which will make the calculation result not accurate enough; for example, the target image can be divided into 4*4 or 3*3 partition images, as shown in Figure 2.
  • the target image is divided into nine equal-sized partition images.
  • Step S20 acquiring a maximum brightness Max, a minimum brightness Min of the target image, and a maximum brightness value SubMax and a minimum brightness value SubMin of the partition image;
  • the scanned data is a maximum grayscale and a minimum grayscale of the target image; when the target image is colored, separately processing the three colors may cause serious Color cast, so it can generally be converted into color space (such as RGB to HSV), and then only the luminance component processing, and then inversely converted back to the RGB color space.
  • color space such as RGB to HSV
  • Step S30 performing histogram accumulation on the partition image, performing histogram equalization processing on the image accumulated by the histogram according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image, to obtain the partition.
  • the histogram accumulation refers to performing probability distribution under the accumulation of gray levels, and each probability value represents less than or equal to the gray. Probability of degree
  • a maximum value and a minimum value of the histogram equalization are obtained;
  • the maximum value of the histogram equalization is 255-a* (255-SubMax)
  • the minimum value of the histogram equalization is b*(SubMin), where 0 ⁇ a ⁇ 1, 0 ⁇ b ⁇ 1, and the maximum value and the minimum value are used as the limit values of the subsequent contrast limiting algorithm;
  • the histogram equalization process refers to changing the gray histogram of the original image from a certain gray interval in the comparative set to a uniform distribution in the entire gray range. Histogram equalization nonlinearly stretches the image and redistributes the image pixel values so that the number of pixels in a certain gray range is approximately the same, that is, the histogram distribution of a given image is changed to a "uniform" distribution histogram. distributed. For example, if the original image has a gray level of f at (x, y) and the changed image is g, the method of image enhancement can be expressed as mapping the gray level f at (x, y) to g. ;
  • the LUT is essentially a RAM (Random Access Memory). After it writes the data to the RAM in advance, each time a signal is input, it is equivalent to inputting an address to look up the table, find out the content corresponding to the address, and then output. Therefore, the LUT lookup table is a mapping table of pixel grayscale values, which converts the actually sampled pixel grayscale values into certain transformations such as threshold, inversion, binarization, contrast adjustment, linear transformation, etc. into another A grayscale value corresponding to it.
  • Step S40 Obtain a corresponding value of a neighboring partition of each pixel in the target image by using the LUT lookup table, and calculate a corresponding value of the adjacent partition to obtain a final value of the brightness of the corresponding pixel. ;
  • a corresponding value of four partitions around each pixel in the target image is obtained by using the LUT lookup table; as shown in FIG. 2, taking the pixel point G as an example, searching for four adjacent partitions 1 of the pixel point G LUT values of the hollow origin corresponding to 2, 4, and 5;
  • bilinear interpolation also known as bilinear interpolation.
  • bilinear interpolation is a linear interpolation extension of an interpolation function with two variables. The core idea is to perform linear interpolation in two directions. Bilinear interpolation is a prior art and will not be described in detail here.
  • Step S50 combining the final values of the brightness of all the pixels into a new image
  • Step S60 correcting the new image by using a correction function, and outputting a final image
  • the final values of the brightness of all the pixels are combined into a new image. Due to the CLAHE algorithm, the Max of the new image brightness must be smaller than the Max of the target image, and the Min of the new image brightness must be larger than the Min of the target image, which may result in a combination.
  • the local image brightness of the new image is not bright enough or the black area is not black enough, resulting in distortion of the partial image; therefore, in the subsequent steps, the new image needs to be corrected by using a correction function, which is a linear function for the new image.
  • the maximum brightness value and the minimum brightness value are corrected.
  • the present application proposes an image processing method, first inputting a target image, performing partition processing on the target image to obtain a partition image; secondly, acquiring a maximum brightness Max, a minimum brightness Min, and a maximum of the partition image of the target image. a brightness value SubMax, a minimum brightness value SubMin; performing histogram accumulation on the partition image, and performing histogram equalization on the image accumulated by the histogram according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image Processing, obtaining a LUT lookup table corresponding to the partition image; again, obtaining a corresponding value of a neighboring partition of each pixel in the target image by using the LUT lookup table, and performing corresponding values of the adjacent partitions Calculating, obtaining the final value of the brightness of the corresponding pixel; finally, combining the final values of the brightness of all the pixels into a new image, and correcting the new image with a correction function, and outputting the final image.
  • the detection of the maximum and minimum values of the target image and the brightness of the partition image is added, and the reference value is provided for the subsequent histogram equalization, and the black image in the target image is not black or bright.
  • the area is too bright for processing, reducing local and scene distortion.
  • FIG. 3 is a schematic structural diagram of an image processing system according to a preferred embodiment of the present application.
  • the image processing system 30 includes a partitioning module 301, a scanning module 302, a pre-processing module 303, a computing module 304, and a collection module 305. And a correction module 306;
  • the partitioning module 301 is configured to input a target image, perform partition processing on the target image, and obtain a partition image;
  • the scanning module 302 is configured to acquire a maximum brightness Max, a minimum brightness Min of the target image, and a maximum brightness value SubMax and a minimum brightness value SubMin of the partition image;
  • the pre-processing module 303 is configured to perform histogram accumulation on the partition image, and perform histogram equalization on the image accumulated by the histogram according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image. Processing, obtaining a LUT lookup table corresponding to the partition image,
  • the maximum value of the histogram equalization is 255-a*(255-SubMax), and the minimum value of the histogram equalization is b*(SubMin), where 0 ⁇ a ⁇ 1, 0 ⁇ b ⁇ 1;
  • the calculating module 304 is configured to obtain, by using the LUT lookup table, a corresponding value of a neighboring partition of each pixel in the target image, and calculate a corresponding value of the adjacent partition to obtain a corresponding pixel.
  • the aggregation module 305 is configured to combine the final values of the brightness of all pixels into a new image
  • the correction module 306 is configured to correct the new image by using a correction function, and output a final image, wherein the correction function is a linear function, and corrects a maximum brightness value and a minimum brightness value of the new image.
  • the pre-processing module 303 includes: a histogram accumulation unit 3031, a histogram equalization pre-processing unit 3032, a histogram equalization unit 3033, and an acquisition look-up table unit 3034;
  • the histogram accumulation unit 3031 is configured to perform histogram accumulation on the partition image
  • the histogram equalization pre-processing unit 3032 is configured to obtain a maximum value and a minimum value of the histogram equalization according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image;
  • the histogram equalization unit 3033 is configured to perform histogram equalization processing on the image accumulated by the histogram by using a contrast limiting algorithm
  • the acquisition lookup table unit 3034 is configured to obtain a LUT lookup table corresponding to the partition image.
  • the calculation module 304 includes: a search unit 3041, a bilinear interpolation unit 3042, and an output unit 3043;
  • the searching unit 3041 is configured to obtain, by using the LUT lookup table, a corresponding value of four partitions around each pixel in the target image;
  • the bilinear interpolation unit 3042 is configured to calculate a corresponding value of the four partitions by using bilinear interpolation;
  • the output unit 3043 obtains a final value of the brightness of the corresponding pixel.
  • the present application provides a schematic structural diagram of an image processing system, where the image processing system includes: a partitioning module, a scanning module, a pre-processing module, a computing module, a collection module, and a correction module.
  • the image processing system includes: a partitioning module, a scanning module, a pre-processing module, a computing module, a collection module, and a correction module.
  • a program to instruct related hardware can be stored in a computer readable storage medium, such as It is stored in a memory of the terminal and executed by at least one processor within the terminal, and may include a flow of an embodiment of a display method based on a virtual location during execution.
  • the storage medium may include: a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
  • each functional module may be integrated into one processing chip, or each module may exist separately or may be integrated by two or more modules.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the principles and implementations of the present application are described in the following by using specific examples. The description of the above embodiments is only for helping to understand the method of the present application and its core ideas. Meanwhile, for those skilled in the art, according to the present application, There is a change in the scope of the present invention and the scope of application, and the contents of this specification should not be construed as limiting the present application.

Landscapes

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

Abstract

一种图像处理方法及***,对目标图像进行分区处理时,增加了对目标图像以及分区图像亮度的最大值以及最小值的侦测,为后续直方图均衡化提供参考值,对目标图像中黑画面不够黑或者亮区过亮进行处理,减少了局部以及场景失真。

Description

图像处理方法及*** 技术领域
本申请涉及图像处理技术领域,尤其涉及一种图像处理方法及***。
背景技术
随着显示器的发展,图像质量越来越被消费者所看重,因此各种可以提升显示效果的图像算法得到了广泛的应用。而在图像的生成、传输和变换过程中,由于多种因素的影响,总会造成图像质量的下降,因此产生了图像处理技术。
现有技术中,一般采用CLAHE(Contrast Limited Adaptive Histogram Equalization,CLAHE)算法对图像进行修正。CLAHE算法是在传统的数字图像处理算法AHE(Adaptive Histogram Equalization,自适应直方图均衡化)中的改进。
CLAHE算法采用递归的过程并通过增强局部区域的对比度,从而增强图像局部细节的可视性。CLAHE算法的关键是在计算转化函数之前通过剪裁直方图限制对比度的放大。CLAHE算法的一个参数用来限制预定义的值:首先将图像分为若干个子块,依次分别计算每个子块的直方图,通过限制对比度对每个直方图进行重新分配。但现有的CLAHE算法仍会导致图像局部区域增强过度,出现黑画面不够黑以及局部失真等问题。
技术问题
本申请提供一种图像处理方法及***,以改善现有CLAHE算法所引起目标图像局部失真的问题。
技术解决方案
本申请提出了一种图像处理方法,其包括:
步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;
步骤S20、获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表;
步骤S40、利用所述显示查找表(Look Up Table,LUT查找表)获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;
步骤S50、集合所有像素的所述亮度的终值组合成新图像;
步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像,
所述修正函数为一次线性函数,对所述新图像的最大亮度值和最小亮度值进行修正。
在本申请的图像处理方法中,所述步骤S30包括:
步骤S31、对所述分区图像进行直方图累积;
步骤S32、根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;
步骤S33、利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;
步骤S34、获得所述分区图像所对应的LUT查找表。
在本申请的图像处理方法中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。
在本申请的图像处理方法中,所述步骤S40包括:
步骤S41、利用所述LUT查找表获得所述目标图像中每个像素点周围四个分区的对应值;
步骤S42、利用双线性插值对所述四个分区对应值进行计算;
步骤S43、获得相应所述像素点的亮度的终值。
本申请还提出了一种图像处理***,其中,所述图像处理***包括:分区模块、扫描模块、前置处理模块、计算模块、集合模块以及修正模块;
所述分区模块,用于输入目标图像,将所述目标图像进行分区处理,获得分区图像;
所述扫描模块,用于获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
所述前置处理模块,用于对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表;
所述计算模块,用于利用所述LUT查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;
所述集合模块,用于集合所有像素的所述亮度的终值组合成新图像;
所述修正模块,用于利用修正函数对所述新图像进行修正,并输出最终图像。
本申请的图像处理***中,所述前置处理模块包括:直方图累计单元、直方图均衡化前置处理单元、直方图均衡化单元以及获取查找表单元;
所述直方图累计单元,用于对所述分区图像进行直方图累积;
所述直方图均衡化前置处理单元,用于根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;
所述直方图均衡化单元,用于利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;
所述获取查找表单元,用于获得所述分区图像所对应的LUT查找表。
本申请的图像处理***中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。
本申请的图像处理***中,所述计算模块包括:查找单元、双线性插值单元以及输出单元;
所述查找单元,用于利用所述LUT查找表获得所述目标图像中每个像素点周围四个分区的对应值;
所述双线性插值单元,用于利用双线性插值对所述四个分区对应值进行计算;
所述输出单元,获得相应所述像素点的亮度的终值。
本申请的图像处理***中,所述修正函数为一次线性函数,对所述新图像的最大亮度值和最小亮度值进行修正。
本申请还提出了一种图像处理方法,其包括:
步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;
步骤S20、获取所述目标图像的最大亮度值Max、最小亮度值Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的显示查找表;
步骤S40、利用所述显示查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;
步骤S50、集合所有像素的所述亮度的终值组合成新图像;
步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像。
在本申请的图像处理方法中,所述步骤S30包括:
步骤S31、对所述分区图像进行直方图累积;
步骤S32、根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;
步骤S33、利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;
步骤S34、获得所述分区图像所对应的显示查找表。
在本申请的图像处理方法中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。
在本申请的图像处理方法中,所述步骤S40包括:
步骤S41、利用所述显示查找表获得所述目标图像中每个像素点周围四个分区的对应值;
步骤S42、利用双线性插值对所述四个分区对应值进行计算;
步骤S43、获得相应所述像素点的亮度的终值。
有益效果
本申请通过对目标图像进行分区处理时,增加了对目标图像以及分区图像亮度的最大值以及最小值的侦测,为后续直方图均衡化提供参考值,对目标图像中黑画面不够黑或者亮区过亮进行处理,减少了局部以及场景失真。
附图说明
为了更清楚地说明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单介绍,显而易见地,下面描述中的附图仅仅是发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一种图像处理方法的流程示意图;
图2为本申请一种图像处理方法目标图像分区处理示意图;
图3为本申请一种图像处理***的结构示意图;
图4为本申请一种图像处理***的结构示意图。
本发明的最佳实施方式
以下各实施例的说明是参考附加的图示,用以例示本申请可用以实施的特定实施例。本申请所提到的方向用语,例如[上]、[下]、[前]、[后]、[左]、[右]、[内]、[外]、[侧面]等,仅是参考附加图式的方向。因此,使用的方向用语是用以说明及理解本申请,而非用以限制本申请。在图中,结构相似的单元是用以相同标号表示。
图1所示为优选实施例一种图像处理方法的流程示意图,其中,所述图像处理方法包括:
步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;
首先,输入目标图像,将所述目标图像分成若干个等大小的分区图像;其中,分区是指对目标图像进行横向和纵向的划分。分区不能分的太多,会影响运算速度;分区亦不可以分的太少,会使运算结果不够精确;例如,可以把目标图像分成4*4或3*3个分区图像,如图2所示,将目标图像分成9个大小相等的分区图像。
步骤S20、获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
对所述目标进行分区处理前,首先扫描所述目标图像,获取所述图像的最大亮度Max、最小亮度Min;当所述目标图像被分区成若干相等的分区图像后,利用相关软件获取每一所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
优选的,当所述目标图像为黑白图像时,所扫描的数据为所述目标图像的最大灰阶和最小灰阶;当所述目标图像为彩色时,对三种颜色分开处理会导致严重的偏色,故一般可以将其进行颜色空间转换(如RGB转为HSV),然后仅对亮度分量处理,再反变换回RGB颜色空间。
步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表;
首先,对所述分区图像进行直方图累积,以黑白图像为例,所述直方图累积是指将图像组成成分在灰度级的累计下,进行概率分布,每一个概率值代表小于等于此灰度值的概率;
其次,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1,以此最大值和最小值作为后续对比限制算法的限制值;
再次,利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理,并获得所述分区图像所对应的LUT查找表;
以黑白图像为例,所述直方图均衡化处理是指,把原始图像的灰度直方图从比较集中的某个灰度区间变成在全部灰度范围内的均匀分布。直方图均衡化对图像进行非线性拉伸,重新分配图像像素值,使一定灰度范围内的像素数量大致相同,也即是,把给定图像的直方图分布改变成“均匀”分布直方图分布。例如,设原始图像在(x,y)处的灰度为f,而改变后的图像为g,则对图像增强的方法可表述为将在(x,y)处的灰度f映射为g;
LUT本质上是一个RAM(Random Access Memory,随机存取存储器)。它把数据事先写入RAM后,每当输入一个信号就等于输入一个地址进行查表,找出地址对应的内容,然后输出。因此,LUT查找表是一张像素灰阶值的映射表,它将实际采样到的像素灰阶值经过一定的变换如阈值、反转、二值化、对比度调整、线性变换等,变成另外一个与之相对应的灰阶值。
步骤S40、利用所述LUT查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;
首先,利用所述LUT查找表获得所述目标图像中每个像素点周围四个分区的对应值;如图2所示,以像素点G为例,查找像素点G的四个相邻分区1、2、4、5所对应的空心原点的LUT值;
其次,利用双线性插值对所述四个分区的对应值进行计算,获得相应所述像素点的亮度的终值;
所示双线性插值,又称为双线性内插。在数学上,双线性插值是有两个变量的插值函数的线性插值扩展,其核心思想是在两个方向分别进行一次线性插值,双线性插值为现有技术,此处不在详细叙述。
步骤S50、集合所有像素的所述亮度的终值组合成新图像;
步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像;
集合所有像素的所述亮度的终值组合成新图像,由于CLAHE算法的原因,新图像亮度的Max必定小于目标图像的Max,新图像亮度的Min必定大于目标图像的Min,可能导致组合成的新图像局部位置亮度不够亮或者黑色区域不够黑,导致局部图像的失真;因此,后续步骤中,需要利用修正函数对新图像进行修正,所述修正函数为一次线性函数,对所述新图像的最大亮度值和最小亮度值进行修正,该一次线性函数为f(x)=mx+n,将新图像映射至目标图像的区间(Min,Max),并输出最终图像。
本申请提出了一种图像处理方法,首先输入目标图像,将所述目标图像进行分区处理,获得分区图像;其次,获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表;再次,利用所述LUT查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;最后,集合所有像素的所述亮度的终值组合成新图像,并利用修正函数对所述新图像进行修正,并输出最终图像。本申请通过对目标图像进行分区处理时,增加了对目标图像以及分区图像亮度的最大值以及最小值的侦测,为后续直方图均衡化提供参考值,对目标图像中黑画面不够黑或者亮区过亮进行处理,减少了局部以及场景失真。
图3所示为本申请优选实施例一种图像处理***的结构示意图,其中,所述图像处理***30包括:分区模块301、扫描模块302、前置处理模块303、计算模块304、集合模块305以及修正模块306;
所述分区模块301,用于输入目标图像,将所述目标图像进行分区处理,获得分区图像;
所述扫描模块302,用于获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
所述前置处理模块303,用于对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表,
其中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1;
所述计算模块304,用于利用所述LUT查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;
所述集合模块305,用于集合所有像素的所述亮度的终值组合成新图像;
所述修正模块306,用于利用修正函数对所述新图像进行修正,并输出最终图像,其中,所述修正函数为一次线性函数,对所述新图像的最大亮度值和最小亮度值进行修正,所述修正函数为f(x)=mx+n。
如图4所示,所述前置处理模块303包括:直方图累计单元3031、直方图均衡化前置处理单元3032、直方图均衡化单元3033以及获取查找表单元3034;
所述直方图累计单元3031,用于对所述分区图像进行直方图累积;
所述直方图均衡化前置处理单元3032,用于根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;
所述直方图均衡化单元3033,用于利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;
所述获取查找表单元3034,用于获得所述分区图像所对应的LUT查找表。
如图4所示,所述计算模块304包括:查找单元3041、双线性插值单元3042以及输出单元3043;
所述查找单元3041,用于利用所述LUT查找表获得所述目标图像中每个像素点周围四个分区的对应值;
所述双线性插值单元3042,用于利用双线性插值对所述四个分区的对应值进行计算;
所述输出单元3043,获得相应所述像素点的亮度的终值。
本申请提出了一种图像处理***的结构示意图,其中,所述图像处理***包括:分区模块、扫描模块、前置处理模块、计算模块、集合模块以及修正模块。本申请通过对目标图像进行分区处理时,增加了对目标图像以及分区图像亮度的最大值以及最小值的侦测,为后续直方图均衡化提供参考值,对目标图像中黑画面不够黑或者亮区过亮进行处理,减少了局部以及场景失真。
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如基于虚拟位置的显示方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。
以上对本申请实施例提供的一种图像处理方法及***进行了详细介绍,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (13)

  1. 一种图像处理方法,其包括:
    步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;
    步骤S20、获取所述目标图像的最大亮度值Max、最小亮度值Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
    步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的显示查找表;
    步骤S40、利用所述显示查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;
    步骤S50、集合所有像素的所述亮度的终值组合成新图像;
    步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像,
    所述修正函数为一次线性函数,用于对所述新图像的最大亮度值和最小亮度值进行修正。
  2. 根据权利要求1所述图像处理方法,其中,所述步骤S30包括:
    步骤S31、对所述分区图像进行直方图累积;
    步骤S32、根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;
    步骤S33、利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;
    步骤S34、获得所述分区图像所对应的显示查找表。
  3. 根据权利要求2所述图像处理方法,其中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。
  4. 根据权利要求1所述图像处理方法,其中,所述步骤S40包括:
    步骤S41、利用所述显示查找表获得所述目标图像中每个像素点周围四个分区的对应值;
    步骤S42、利用双线性插值对所述四个分区对应值进行计算;
    步骤S43、获得相应所述像素点的亮度的终值。
  5. 一种图像处理***,其中,所述图像处理***包括:分区模块、扫描模块、前置处理模块、计算模块、集合模块以及修正模块;
    所述分区模块用于输入目标图像,将所述目标图像进行分区处理,获得分区图像;
    所述扫描模块用于获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
    所述前置处理模块用于对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的显示查找表;
    所述计算模块用于利用所述显示查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;
    所述集合模块用于集合所有像素的所述亮度的终值组合成新图像;
    所述修正模块用于利用修正函数对所述新图像进行修正,并输出最终图像。
  6. 根据权利要求5所述图像处理***,其中,所述前置处理模块包括:直方图累计单元、直方图均衡化前置处理单元、直方图均衡化单元以及获取查找表单元;
    所述直方图累计单元用于对所述分区图像进行直方图累积;
    所述直方图均衡化前置处理单元用于根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;
    所述直方图均衡化单元用于利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;
    所述获取查找表单元用于获得所述分区图像所对应的显示查找表。
  7. 根据权利要求6所述图像处理***,其中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。
  8. 根据权利要求5所述图像处理***,其中,所述计算模块包括:查找单元、双线性插值单元以及输出单元;
    所述查找单元用于利用所述显示查找表获得所述目标图像中每个像素点周围四个分区的对应值;
    所述双线性插值单元用于利用双线性插值对所述四个分区对应值进行计算;
    所述输出单元获得相应所述像素点的亮度的终值。
  9. 根据权利要求5所述图像处理***,其中,所述修正函数为一次线性函数,用于对所述新图像的最大亮度值和最小亮度值进行修正。
  10. 一种图像处理方法,其包括:
    步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;
    步骤S20、获取所述目标图像的最大亮度值Max、最小亮度值Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;
    步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的显示查找表;
    步骤S40、利用所述显示查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;
    步骤S50、集合所有像素的所述亮度的终值组合成新图像;
    步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像。
  11. 根据权利要求10所述图像处理方法,其中,所述步骤S30包括:
    步骤S31、对所述分区图像进行直方图累积;
    步骤S32、根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;
    步骤S33、利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;
    步骤S34、获得所述分区图像所对应的显示查找表。
  12. 根据权利要求11所述图像处理方法,其中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。
  13. 根据权利要求10所述图像处理方法,其中,所述步骤S40包括:
    步骤S41、利用所述显示查找表获得所述目标图像中每个像素点周围四个分区的对应值;
    步骤S42、利用双线性插值对所述四个分区对应值进行计算;
    步骤S43、获得相应所述像素点的亮度的终值。
PCT/CN2018/103920 2018-02-12 2018-09-04 图像处理方法及*** WO2019153731A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810143881.0A CN108470329A (zh) 2018-02-12 2018-02-12 一种图像处理方法及***
CN201810143881.0 2018-02-12

Publications (1)

Publication Number Publication Date
WO2019153731A1 true WO2019153731A1 (zh) 2019-08-15

Family

ID=63266510

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103920 WO2019153731A1 (zh) 2018-02-12 2018-09-04 图像处理方法及***

Country Status (2)

Country Link
CN (1) CN108470329A (zh)
WO (1) WO2019153731A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114049490A (zh) * 2021-11-05 2022-02-15 河南鑫安利安全科技股份有限公司 一种智能化职业卫生预警方法及***

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470329A (zh) * 2018-02-12 2018-08-31 深圳市华星光电半导体显示技术有限公司 一种图像处理方法及***
CN109658333A (zh) * 2018-11-14 2019-04-19 深圳市华星光电半导体显示技术有限公司 图像放大插值的方法、图像放大插值装置以及显示装置
CN109636759B (zh) * 2018-12-18 2020-10-30 深圳市华星光电半导体显示技术有限公司 图像处理方法
CN111626967A (zh) * 2019-02-28 2020-09-04 富华科精密工业(深圳)有限公司 图像增强方法、装置、计算机装置及可读存储介质
CN110472472B (zh) * 2019-05-30 2022-04-19 北京市遥感信息研究所 基于sar遥感图像的机场检测方法与装置
CN110704264B (zh) * 2019-09-30 2024-02-09 歌尔光学科技有限公司 黑场亮度的对照表生成方法、装置、投影仪及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510305A (zh) * 2008-12-15 2009-08-19 四川虹微技术有限公司 一种改进的自适应直方图均衡方法
US7840066B1 (en) * 2005-11-15 2010-11-23 University Of Tennessee Research Foundation Method of enhancing a digital image by gray-level grouping
CN104156921A (zh) * 2014-08-08 2014-11-19 大连理工大学 一种低照度或亮度不均图像的自适应图像增强方法
CN107481202A (zh) * 2017-08-14 2017-12-15 深圳市华星光电半导体显示技术有限公司 一种图像动态范围增强的方法
CN108470329A (zh) * 2018-02-12 2018-08-31 深圳市华星光电半导体显示技术有限公司 一种图像处理方法及***

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440635B (zh) * 2013-09-17 2016-06-22 厦门美图网科技有限公司 一种基于学习的对比度受限自适应直方图均衡方法
US9691139B2 (en) * 2013-12-07 2017-06-27 Razzor Technologies Adaptive contrast in image processing and display
CN106651819A (zh) * 2016-12-15 2017-05-10 深圳市华星光电技术有限公司 一种图像处理方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7840066B1 (en) * 2005-11-15 2010-11-23 University Of Tennessee Research Foundation Method of enhancing a digital image by gray-level grouping
CN101510305A (zh) * 2008-12-15 2009-08-19 四川虹微技术有限公司 一种改进的自适应直方图均衡方法
CN104156921A (zh) * 2014-08-08 2014-11-19 大连理工大学 一种低照度或亮度不均图像的自适应图像增强方法
CN107481202A (zh) * 2017-08-14 2017-12-15 深圳市华星光电半导体显示技术有限公司 一种图像动态范围增强的方法
CN108470329A (zh) * 2018-02-12 2018-08-31 深圳市华星光电半导体显示技术有限公司 一种图像处理方法及***

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114049490A (zh) * 2021-11-05 2022-02-15 河南鑫安利安全科技股份有限公司 一种智能化职业卫生预警方法及***

Also Published As

Publication number Publication date
CN108470329A (zh) 2018-08-31

Similar Documents

Publication Publication Date Title
WO2019153731A1 (zh) 图像处理方法及***
WO2018133609A1 (zh) 从低动态图像生成高动态图像的方法
JP3956887B2 (ja) 画像処理装置および画像処理方法並びに画像処理プログラム
KR100467610B1 (ko) 디지털 화질 개선 방법 및 장치
US11227566B2 (en) Method for reducing brightness of images, a data-processing apparatus, and a display apparatus
US20190080441A1 (en) Image processing method and device
TWI519151B (zh) 影像處理方法以及影像處理裝置
US20130182019A1 (en) Method of calculating correction value and display device
CN101340511A (zh) 一种基于亮度检测的自适应视频图像增强方法
CN108280836B (zh) 一种图像处理方法及装置
KR100843817B1 (ko) 계조 보정 장치, 휴대 단말 기기, 촬상 장치, 휴대 전화 및 계조 보정 방법
CN107862672B (zh) 图像去雾的方法及装置
US11074849B2 (en) Display method, display device, and display
WO2021218603A1 (zh) 图像处理方法及投影***
JP4011073B2 (ja) 階調補正装置
US7932939B2 (en) Apparatus and method for correcting blurred images
CN113068011B (zh) 图像传感器、图像处理方法及***
US10178359B2 (en) Macropixel processing system, method and article
US20160275697A1 (en) Image correction method and image correction device
TWI789158B (zh) 影像處理方法、系統以及非暫態電腦可讀取記錄媒體
JP4308280B2 (ja) 階調補正装置
KR102303666B1 (ko) 영상 처리 방법, 영상 처리 방법을 수행하는 영상 처리 장치, 및 영상 처리 장치를 포함하는 표시 장치
JP4232831B2 (ja) 画像処理装置および画像処理方法並びに画像処理プログラム
JP2003046807A (ja) 画像表示装置および画像表示方法
JP5312171B2 (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: 18905733

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: 18905733

Country of ref document: EP

Kind code of ref document: A1