WO2019153731A1 - Image processing method and system - Google Patents

Image processing method and system 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
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 WO2019153731A1 publication Critical patent/WO2019153731A1/en

Links

Classifications

    • G06T5/94
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration by the use of 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.

Abstract

An image processing method and system. When a target image is partitioned, the maximum and minimum brightness values of the target image and partitioned images are additionally detected to provide reference values for subsequent histogram equalization; and a black frame which is not black enough or a bright region which is too bright in the target image is processed, thus reducing local distortion and scene distortion.

Description

图像处理方法及系统Image processing method and system 技术领域Technical field
本申请涉及图像处理技术领域,尤其涉及一种图像处理方法及系统。The present application relates to the field of image processing technologies, and in particular, to an image processing method and system.
背景技术Background technique
随着显示器的发展,图像质量越来越被消费者所看重,因此各种可以提升显示效果的图像算法得到了广泛的应用。而在图像的生成、传输和变换过程中,由于多种因素的影响,总会造成图像质量的下降,因此产生了图像处理技术。With the development of displays, image quality is increasingly valued by consumers, so various image algorithms that can improve display effects have been widely used. In the process of image generation, transmission and transformation, due to the influence of various factors, the image quality will always be degraded, thus resulting in image processing technology.
现有技术中,一般采用CLAHE(Contrast Limited Adaptive Histogram Equalization,CLAHE)算法对图像进行修正。CLAHE算法是在传统的数字图像处理算法AHE(Adaptive Histogram Equalization,自适应直方图均衡化)中的改进。In the prior art, CLAHE (Contrast) is generally adopted. The Limited Adaptive Histogram Equalization (CLAHE) algorithm corrects the image. The CLAHE algorithm is an improvement in the traditional digital image processing algorithm AHE (Adaptive Histogram Equalization).
CLAHE算法采用递归的过程并通过增强局部区域的对比度,从而增强图像局部细节的可视性。CLAHE算法的关键是在计算转化函数之前通过剪裁直方图限制对比度的放大。CLAHE算法的一个参数用来限制预定义的值:首先将图像分为若干个子块,依次分别计算每个子块的直方图,通过限制对比度对每个直方图进行重新分配。但现有的CLAHE算法仍会导致图像局部区域增强过度,出现黑画面不够黑以及局部失真等问题。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. However, 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.
技术问题technical problem
本申请提供一种图像处理方法及系统,以改善现有CLAHE算法所引起目标图像局部失真的问题。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.
技术解决方案Technical solution
本申请提出了一种图像处理方法,其包括:The application proposes an image processing method, which includes:
步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;Step S10: input a target image, perform partition processing on the target image, and obtain a partition image;
步骤S20、获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;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;
步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表;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 LUT lookup table corresponding to the image;
步骤S40、利用所述显示查找表(Look Up Table,LUT查找表)获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;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;
步骤S50、集合所有像素的所述亮度的终值组合成新图像;Step S50, combining the final values of the brightness of all the pixels into a new image;
步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像,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.
在本申请的图像处理方法中,所述步骤S30包括:In the image processing method of the present application, the step S30 includes:
步骤S31、对所述分区图像进行直方图累积;Step S31, performing histogram accumulation on the partition image;
步骤S32、根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;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;
步骤S33、利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;Step S33, performing histogram equalization processing on the image accumulated by the histogram by using a contrast limiting algorithm;
步骤S34、获得所述分区图像所对应的LUT查找表。Step S34: Obtain a LUT lookup table corresponding to the partition image.
在本申请的图像处理方法中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。In the image processing method of the present application, 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.
在本申请的图像处理方法中,所述步骤S40包括:In the image processing method of the present application, the step S40 includes:
步骤S41、利用所述LUT查找表获得所述目标图像中每个像素点周围四个分区的对应值;Step S41: Obtain a corresponding value of four partitions around each pixel in the target image by using the LUT lookup table;
步骤S42、利用双线性插值对所述四个分区对应值进行计算;Step S42: Calculate the corresponding values of the four partitions by using bilinear interpolation;
步骤S43、获得相应所述像素点的亮度的终值。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;
所述扫描模块,用于获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;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;
所述前置处理模块,用于对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表;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;
所述计算模块,用于利用所述LUT查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;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 final value of the brightness;
所述集合模块,用于集合所有像素的所述亮度的终值组合成新图像;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.
本申请的图像处理系统中,所述前置处理模块包括:直方图累计单元、直方图均衡化前置处理单元、直方图均衡化单元以及获取查找表单元;In the image processing system of the present application, 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;
所述直方图均衡化前置处理单元,用于根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;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;
所述获取查找表单元,用于获得所述分区图像所对应的LUT查找表。The acquiring a lookup table unit is configured to obtain a LUT lookup table corresponding to the partition image.
本申请的图像处理系统中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。In the image processing system of the present application, 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.
本申请的图像处理系统中,所述计算模块包括:查找单元、双线性插值单元以及输出单元;In the image processing system of the present application, the calculation module includes: a search unit, a bilinear interpolation unit, and an output unit;
所述查找单元,用于利用所述LUT查找表获得所述目标图像中每个像素点周围四个分区的对应值;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.
本申请的图像处理系统中,所述修正函数为一次线性函数,对所述新图像的最大亮度值和最小亮度值进行修正。In the image processing system of the present application, 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:
步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;Step S10: input a target image, perform partition processing on the target image, and obtain a partition image;
步骤S20、获取所述目标图像的最大亮度值Max、最小亮度值Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;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;
步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的显示查找表;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. a display lookup table corresponding to the image;
步骤S40、利用所述显示查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;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. ;
步骤S50、集合所有像素的所述亮度的终值组合成新图像;Step S50, combining the final values of the brightness of all the pixels into a new image;
步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像。Step S60, correcting the new image by using a correction function, and outputting a final image.
在本申请的图像处理方法中,所述步骤S30包括:In the image processing method of the present application, the step S30 includes:
步骤S31、对所述分区图像进行直方图累积;Step S31, performing histogram accumulation on the partition image;
步骤S32、根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;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;
步骤S33、利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;Step S33, performing histogram equalization processing on the image accumulated by the histogram by using a contrast limiting algorithm;
步骤S34、获得所述分区图像所对应的显示查找表。Step S34: Obtain a display lookup table corresponding to the partition image.
在本申请的图像处理方法中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。In the image processing method of the present application, 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.
在本申请的图像处理方法中,所述步骤S40包括:In the image processing method of the present application, the step S40 includes:
步骤S41、利用所述显示查找表获得所述目标图像中每个像素点周围四个分区的对应值;Step S41: Obtain a corresponding value of four partitions around each pixel in the target image by using the display lookup table;
步骤S42、利用双线性插值对所述四个分区对应值进行计算;Step S42: Calculate the corresponding values of the four partitions by using bilinear interpolation;
步骤S43、获得相应所述像素点的亮度的终值。Step S43, obtaining a final value of the brightness of the corresponding pixel.
有益效果Beneficial effect
本申请通过对目标图像进行分区处理时,增加了对目标图像以及分区图像亮度的最大值以及最小值的侦测,为后续直方图均衡化提供参考值,对目标图像中黑画面不够黑或者亮区过亮进行处理,减少了局部以及场景失真。When the target image is partitioned, 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.
附图说明DRAWINGS
为了更清楚地说明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单介绍,显而易见地,下面描述中的附图仅仅是发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are merely inventions. For some embodiments, other drawings may be obtained from those of ordinary skill in the art without departing from the drawings.
图1为本申请一种图像处理方法的流程示意图;1 is a schematic flow chart of an image processing method according to the present application;
图2为本申请一种图像处理方法目标图像分区处理示意图;2 is a schematic diagram of a target image partitioning process of an image processing method according to the present application;
图3为本申请一种图像处理系统的结构示意图;3 is a schematic structural diagram of an image processing system according to the present application;
图4为本申请一种图像处理系统的结构示意图。4 is a schematic structural diagram of an image processing system according to the present application.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
以下各实施例的说明是参考附加的图示,用以例示本申请可用以实施的特定实施例。本申请所提到的方向用语,例如[上]、[下]、[前]、[后]、[左]、[右]、[内]、[外]、[侧面]等,仅是参考附加图式的方向。因此,使用的方向用语是用以说明及理解本申请,而非用以限制本申请。在图中,结构相似的单元是用以相同标号表示。The following description of the various embodiments is provided to illustrate the specific embodiments of the invention. Directional terms mentioned in this application, such as [upper], [lower], [previous], [post], [left], [right], [inside], [outside], [side], etc., are only references Attach the direction of the drawing. Therefore, the directional terminology used is for the purpose of illustration and understanding, and is not intended to be limiting. In the figures, structurally similar elements are denoted by the same reference numerals.
图1所示为优选实施例一种图像处理方法的流程示意图,其中,所述图像处理方法包括:FIG. 1 is a schematic flowchart diagram of an image processing method according to a preferred embodiment, wherein the image processing method includes:
步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;Step S10: input a target image, perform partition processing on the target image, and obtain a partition image;
首先,输入目标图像,将所述目标图像分成若干个等大小的分区图像;其中,分区是指对目标图像进行横向和纵向的划分。分区不能分的太多,会影响运算速度;分区亦不可以分的太少,会使运算结果不够精确;例如,可以把目标图像分成4*4或3*3个分区图像,如图2所示,将目标图像分成9个大小相等的分区图像。First, 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.
步骤S20、获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;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;
对所述目标进行分区处理前,首先扫描所述目标图像,获取所述图像的最大亮度Max、最小亮度Min;当所述目标图像被分区成若干相等的分区图像后,利用相关软件获取每一所述分区图像的最大亮度值SubMax、最小亮度值SubMin;Before performing the partition processing on the target, first scanning the target image to obtain a maximum brightness Max and a minimum brightness Min of the image; and after the target image is partitioned into a plurality of equal partition images, acquiring each using the relevant software. a maximum brightness value SubMax of the partition image, a minimum brightness value SubMin;
优选的,当所述目标图像为黑白图像时,所扫描的数据为所述目标图像的最大灰阶和最小灰阶;当所述目标图像为彩色时,对三种颜色分开处理会导致严重的偏色,故一般可以将其进行颜色空间转换(如RGB转为HSV),然后仅对亮度分量处理,再反变换回RGB颜色空间。Preferably, when the target image is a black and white 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.
步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表;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 LUT lookup table corresponding to the image;
首先,对所述分区图像进行直方图累积,以黑白图像为例,所述直方图累积是指将图像组成成分在灰度级的累计下,进行概率分布,每一个概率值代表小于等于此灰度值的概率;First, performing histogram accumulation on the partition image, taking a black and white image as an example. 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
其次,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1,以此最大值和最小值作为后续对比限制算法的限制值;Secondly, according to the obtained maximum brightness value SubMax and minimum brightness value SubMin of the partition image, 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;
再次,利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理,并获得所述分区图像所对应的LUT查找表;And performing a histogram equalization process on the image accumulated by the histogram by using a contrast limiting algorithm, and obtaining a LUT lookup table corresponding to the partition image;
以黑白图像为例,所述直方图均衡化处理是指,把原始图像的灰度直方图从比较集中的某个灰度区间变成在全部灰度范围内的均匀分布。直方图均衡化对图像进行非线性拉伸,重新分配图像像素值,使一定灰度范围内的像素数量大致相同,也即是,把给定图像的直方图分布改变成“均匀”分布直方图分布。例如,设原始图像在(x,y)处的灰度为f,而改变后的图像为g,则对图像增强的方法可表述为将在(x,y)处的灰度f映射为g;Taking the black and white image as an example, 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. ;
LUT本质上是一个RAM(Random Access Memory,随机存取存储器)。它把数据事先写入RAM后,每当输入一个信号就等于输入一个地址进行查表,找出地址对应的内容,然后输出。因此,LUT查找表是一张像素灰阶值的映射表,它将实际采样到的像素灰阶值经过一定的变换如阈值、反转、二值化、对比度调整、线性变换等,变成另外一个与之相对应的灰阶值。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.
步骤S40、利用所述LUT查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;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. ;
首先,利用所述LUT查找表获得所述目标图像中每个像素点周围四个分区的对应值;如图2所示,以像素点G为例,查找像素点G的四个相邻分区1、2、4、5所对应的空心原点的LUT值;First, 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;
其次,利用双线性插值对所述四个分区的对应值进行计算,获得相应所述像素点的亮度的终值;Secondly, calculating the corresponding values of the four partitions by using bilinear interpolation to obtain a final value of the brightness of the corresponding pixel point;
所示双线性插值,又称为双线性内插。在数学上,双线性插值是有两个变量的插值函数的线性插值扩展,其核心思想是在两个方向分别进行一次线性插值,双线性插值为现有技术,此处不在详细叙述。The bilinear interpolation shown, also known as bilinear interpolation. Mathematically, 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.
步骤S50、集合所有像素的所述亮度的终值组合成新图像;Step S50, combining the final values of the brightness of all the pixels into a new image;
步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像;Step S60, correcting the new image by using a correction function, and outputting a final image;
集合所有像素的所述亮度的终值组合成新图像,由于CLAHE算法的原因,新图像亮度的Max必定小于目标图像的Max,新图像亮度的Min必定大于目标图像的Min,可能导致组合成的新图像局部位置亮度不够亮或者黑色区域不够黑,导致局部图像的失真;因此,后续步骤中,需要利用修正函数对新图像进行修正,所述修正函数为一次线性函数,对所述新图像的最大亮度值和最小亮度值进行修正,该一次线性函数为f(x)=mx+n,将新图像映射至目标图像的区间(Min,Max),并输出最终图像。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 linear function is f(x)=mx+n, the new image is mapped to the interval (Min, Max) of the target image, and the final image is output.
本申请提出了一种图像处理方法,首先输入目标图像,将所述目标图像进行分区处理,获得分区图像;其次,获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表;再次,利用所述LUT查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;最后,集合所有像素的所述亮度的终值组合成新图像,并利用修正函数对所述新图像进行修正,并输出最终图像。本申请通过对目标图像进行分区处理时,增加了对目标图像以及分区图像亮度的最大值以及最小值的侦测,为后续直方图均衡化提供参考值,对目标图像中黑画面不够黑或者亮区过亮进行处理,减少了局部以及场景失真。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. When the target image is partitioned, 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.
图3所示为本申请优选实施例一种图像处理系统的结构示意图,其中,所述图像处理系统30包括:分区模块301、扫描模块302、前置处理模块303、计算模块304、集合模块305以及修正模块306;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;
所述分区模块301,用于输入目标图像,将所述目标图像进行分区处理,获得分区图像;The partitioning module 301 is configured to input a target image, perform partition processing on the target image, and obtain a partition image;
所述扫描模块302,用于获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;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;
所述前置处理模块303,用于对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的LUT查找表,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,
其中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1;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;
所述计算模块304,用于利用所述LUT查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;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 final value of the brightness;
所述集合模块305,用于集合所有像素的所述亮度的终值组合成新图像;The aggregation module 305 is configured to combine the final values of the brightness of all pixels into a new image;
所述修正模块306,用于利用修正函数对所述新图像进行修正,并输出最终图像,其中,所述修正函数为一次线性函数,对所述新图像的最大亮度值和最小亮度值进行修正,所述修正函数为f(x)=mx+n。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 correction function is f(x)=mx+n.
如图4所示,所述前置处理模块303包括:直方图累计单元3031、直方图均衡化前置处理单元3032、直方图均衡化单元3033以及获取查找表单元3034;As shown in FIG. 4, 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;
所述直方图累计单元3031,用于对所述分区图像进行直方图累积;The histogram accumulation unit 3031 is configured to perform histogram accumulation on the partition image;
所述直方图均衡化前置处理单元3032,用于根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;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;
所述直方图均衡化单元3033,用于利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;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;
所述获取查找表单元3034,用于获得所述分区图像所对应的LUT查找表。The acquisition lookup table unit 3034 is configured to obtain a LUT lookup table corresponding to the partition image.
如图4所示,所述计算模块304包括:查找单元3041、双线性插值单元3042以及输出单元3043;As shown in FIG. 4, the calculation module 304 includes: a search unit 3041, a bilinear interpolation unit 3042, and an output unit 3043;
所述查找单元3041,用于利用所述LUT查找表获得所述目标图像中每个像素点周围四个分区的对应值;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;
所述双线性插值单元3042,用于利用双线性插值对所述四个分区的对应值进行计算;The bilinear interpolation unit 3042 is configured to calculate a corresponding value of the four partitions by using bilinear interpolation;
所述输出单元3043,获得相应所述像素点的亮度的终值。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. When the target image is partitioned, 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.
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,如存储在终端的存储器中,并被该终端内的至少一个处理器执行,在执行过程中可包括如基于虚拟位置的显示方法的实施例的流程。其中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps of the foregoing embodiments can be completed by a program to instruct related hardware, and the program 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.
以上对本申请实施例提供的一种图像处理方法及系统进行了详细介绍,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。An image processing method and system provided by the embodiments of the present application are described in detail above, and 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. In one module. 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.

Claims (13)

  1. 一种图像处理方法,其包括:An image processing method comprising:
    步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;Step S10: input a target image, perform partition processing on the target image, and obtain a partition image;
    步骤S20、获取所述目标图像的最大亮度值Max、最小亮度值Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;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;
    步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的显示查找表;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. a display lookup table corresponding to the image;
    步骤S40、利用所述显示查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;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. ;
    步骤S50、集合所有像素的所述亮度的终值组合成新图像;Step S50, combining the final values of the brightness of all the pixels into a new image;
    步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像,Step S60, correcting the new image by using a correction function, and outputting a final image.
    所述修正函数为一次线性函数,用于对所述新图像的最大亮度值和最小亮度值进行修正。The correction function is a linear function for correcting the maximum brightness value and the minimum brightness value of the new image.
  2. 根据权利要求1所述图像处理方法,其中,所述步骤S30包括:The image processing method according to claim 1, wherein said step S30 comprises:
    步骤S31、对所述分区图像进行直方图累积;Step S31, performing histogram accumulation on the partition image;
    步骤S32、根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;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;
    步骤S33、利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;Step S33, performing histogram equalization processing on the image accumulated by the histogram by using a contrast limiting algorithm;
    步骤S34、获得所述分区图像所对应的显示查找表。Step S34: Obtain a display lookup table corresponding to the partition image.
  3. 根据权利要求2所述图像处理方法,其中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。The image processing method according to claim 2, wherein the maximum value of the histogram equalization is 255-a*(255-SubMax), and the minimum value of the histogram equalization is b*(SubMin), wherein 0 ≤ a ≤ 1, 0 ≤ b ≤ 1.
  4. 根据权利要求1所述图像处理方法,其中,所述步骤S40包括:The image processing method according to claim 1, wherein said step S40 comprises:
    步骤S41、利用所述显示查找表获得所述目标图像中每个像素点周围四个分区的对应值;Step S41: Obtain a corresponding value of four partitions around each pixel in the target image by using the display lookup table;
    步骤S42、利用双线性插值对所述四个分区对应值进行计算;Step S42: Calculate the corresponding values of the four partitions by using bilinear interpolation;
    步骤S43、获得相应所述像素点的亮度的终值。Step S43, obtaining a final value of the brightness of the corresponding pixel.
  5. 一种图像处理系统,其中,所述图像处理系统包括:分区模块、扫描模块、前置处理模块、计算模块、集合模块以及修正模块;An image processing system, comprising: a partitioning module, a scanning module, a preprocessing 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;
    所述扫描模块用于获取所述目标图像的最大亮度Max、最小亮度Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;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;
    所述前置处理模块用于对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的显示查找表;The pre-processing module is configured to perform histogram accumulation on the partition image, and perform 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. Obtaining a display 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 display lookup table, and calculate a corresponding value of the adjacent partition to obtain a brightness of the corresponding pixel Final value
    所述集合模块用于集合所有像素的所述亮度的终值组合成新图像;The set 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 with a correction function and output a final image.
  6. 根据权利要求5所述图像处理系统,其中,所述前置处理模块包括:直方图累计单元、直方图均衡化前置处理单元、直方图均衡化单元以及获取查找表单元;The image processing system according to claim 5, wherein the pre-processing module comprises: 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;
    所述直方图均衡化前置处理单元用于根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;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 acquisition lookup table unit is configured to obtain a display lookup table corresponding to the partition image.
  7. 根据权利要求6所述图像处理系统,其中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。The image processing system according to claim 6, wherein the maximum value of the histogram equalization is 255-a*(255-SubMax), and the minimum value of the histogram equalization is b*(SubMin), wherein 0 ≤ a ≤ 1, 0 ≤ b ≤ 1.
  8. 根据权利要求5所述图像处理系统,其中,所述计算模块包括:查找单元、双线性插值单元以及输出单元;The image processing system according to claim 5, wherein said calculation module comprises: a lookup unit, a bilinear interpolation unit, and an output unit;
    所述查找单元用于利用所述显示查找表获得所述目标图像中每个像素点周围四个分区的对应值;The searching unit is configured to obtain, by using the display 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.
  9. 根据权利要求5所述图像处理系统,其中,所述修正函数为一次线性函数,用于对所述新图像的最大亮度值和最小亮度值进行修正。The image processing system according to claim 5, wherein said correction function is a linear function for correcting a maximum brightness value and a minimum brightness value of said new image.
  10. 一种图像处理方法,其包括:An image processing method comprising:
    步骤S10、输入目标图像,将所述目标图像进行分区处理,获得分区图像;Step S10: input a target image, perform partition processing on the target image, and obtain a partition image;
    步骤S20、获取所述目标图像的最大亮度值Max、最小亮度值Min以及所述分区图像的最大亮度值SubMax、最小亮度值SubMin;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;
    步骤S30、对所述分区图像进行直方图累积,根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,对所述直方图累积的图像进行直方图均衡化处理,获得所述分区图像所对应的显示查找表;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. a display lookup table corresponding to the image;
    步骤S40、利用所述显示查找表获得所述目标图像中每个像素点的相邻分区的对应值,对所述相邻分区的对应值进行计算,获得相应所述像素点的亮度的终值;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. ;
    步骤S50、集合所有像素的所述亮度的终值组合成新图像;Step S50, combining the final values of the brightness of all the pixels into a new image;
    步骤S60、利用修正函数对所述新图像进行修正,并输出最终图像。Step S60, correcting the new image by using a correction function, and outputting a final image.
  11. 根据权利要求10所述图像处理方法,其中,所述步骤S30包括:The image processing method according to claim 10, wherein said step S30 comprises:
    步骤S31、对所述分区图像进行直方图累积;Step S31, performing histogram accumulation on the partition image;
    步骤S32、根据得到的所述分区图像的最大亮度值SubMax和最小亮度值SubMin,获得直方图均衡化的最大值和最小值;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;
    步骤S33、利用对比限制算法对所述直方图累积的图像进行直方图均衡化处理;Step S33, performing histogram equalization processing on the image accumulated by the histogram by using a contrast limiting algorithm;
    步骤S34、获得所述分区图像所对应的显示查找表。Step S34: Obtain a display lookup table corresponding to the partition image.
  12. 根据权利要求11所述图像处理方法,其中,所述直方图均衡化的最大值为255-a*(255-SubMax),所述直方图均衡化的最小值为b*(SubMin),其中,0≤a≤1,0≤b≤1。The image processing method according to claim 11, wherein a maximum value of said histogram equalization is 255-a*(255-SubMax), and a minimum value of said histogram equalization is b*(SubMin), wherein 0 ≤ a ≤ 1, 0 ≤ b ≤ 1.
  13. 根据权利要求10所述图像处理方法,其中,所述步骤S40包括:The image processing method according to claim 10, wherein said step S40 comprises:
    步骤S41、利用所述显示查找表获得所述目标图像中每个像素点周围四个分区的对应值;Step S41: Obtain a corresponding value of four partitions around each pixel in the target image by using the display lookup table;
    步骤S42、利用双线性插值对所述四个分区对应值进行计算;Step S42: Calculate the corresponding values of the four partitions by using bilinear interpolation;
    步骤S43、获得相应所述像素点的亮度的终值。Step S43, obtaining a final value of the brightness of the corresponding pixel.
PCT/CN2018/103920 2018-02-12 2018-09-04 Image processing method and system WO2019153731A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810143881.0 2018-02-12
CN201810143881.0A CN108470329A (en) 2018-02-12 2018-02-12 A kind of image processing method and system

Publications (1)

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

Family

ID=63266510

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103920 WO2019153731A1 (en) 2018-02-12 2018-09-04 Image processing method and system

Country Status (2)

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

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470329A (en) * 2018-02-12 2018-08-31 深圳市华星光电半导体显示技术有限公司 A kind of image processing method and system
CN109658333A (en) * 2018-11-14 2019-04-19 深圳市华星光电半导体显示技术有限公司 Method, image amplification interpolation device and the display device of image amplification interpolation
CN109636759B (en) * 2018-12-18 2020-10-30 深圳市华星光电半导体显示技术有限公司 Image processing method
CN111626967A (en) * 2019-02-28 2020-09-04 富华科精密工业(深圳)有限公司 Image enhancement method, image enhancement device, computer device and readable storage medium
CN110472472B (en) * 2019-05-30 2022-04-19 北京市遥感信息研究所 Airport detection method and device based on SAR remote sensing image
CN110704264B (en) * 2019-09-30 2024-02-09 歌尔光学科技有限公司 Black field brightness comparison table generation method and device, projector and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510305A (en) * 2008-12-15 2009-08-19 四川虹微技术有限公司 Improved self-adapting histogram equilibrium method
US7840066B1 (en) * 2005-11-15 2010-11-23 University Of Tennessee Research Foundation Method of enhancing a digital image by gray-level grouping
CN104156921A (en) * 2014-08-08 2014-11-19 大连理工大学 Self-adaptive low-illuminance or non-uniform-brightness image enhancement method
CN107481202A (en) * 2017-08-14 2017-12-15 深圳市华星光电半导体显示技术有限公司 A kind of method of dynamic range of images enhancing
CN108470329A (en) * 2018-02-12 2018-08-31 深圳市华星光电半导体显示技术有限公司 A kind of image processing method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440635B (en) * 2013-09-17 2016-06-22 厦门美图网科技有限公司 A kind of contrast limited adaptive histogram equalization method based on study
US9691139B2 (en) * 2013-12-07 2017-06-27 Razzor Technologies Adaptive contrast in image processing and display
CN106651819A (en) * 2016-12-15 2017-05-10 深圳市华星光电技术有限公司 Image processing method and apparatus

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 (en) * 2008-12-15 2009-08-19 四川虹微技术有限公司 Improved self-adapting histogram equilibrium method
CN104156921A (en) * 2014-08-08 2014-11-19 大连理工大学 Self-adaptive low-illuminance or non-uniform-brightness image enhancement method
CN107481202A (en) * 2017-08-14 2017-12-15 深圳市华星光电半导体显示技术有限公司 A kind of method of dynamic range of images enhancing
CN108470329A (en) * 2018-02-12 2018-08-31 深圳市华星光电半导体显示技术有限公司 A kind of image processing method and system

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2019153731A1 (en) Image processing method and system
JP3956887B2 (en) Image processing apparatus, image processing method, and image processing program
KR100467610B1 (en) Method and apparatus for improvement of digital image quality
US11227566B2 (en) Method for reducing brightness of images, a data-processing apparatus, and a display apparatus
TWI519151B (en) Image processing method and image processing apparatus
US20130182019A1 (en) Method of calculating correction value and display device
CN101340511A (en) Adaptive video image enhancing method based on lightness detection
US20190080441A1 (en) Image processing method and device
CN107862672B (en) Image defogging method and device
US11074849B2 (en) Display method, display device, and display
WO2021218603A1 (en) Image processing method and projection system
KR100843817B1 (en) Tone correcting apparatus, mobile terminal, image capturing apparatus, mobile phone, and tone correcting method
JP4011073B2 (en) Tone correction device
CN108280836B (en) Image processing method and device
US7932939B2 (en) Apparatus and method for correcting blurred images
CN113068011B (en) Image sensor, image processing method and system
US20160275697A1 (en) Image correction method and image correction device
TWI789158B (en) Image processing method, image processing system, and non-transitory computer readable storage medium
JP4308280B2 (en) Tone correction device
KR102303666B1 (en) Method of image processing, image processor performing the method and display device having the image processor
JP4232831B2 (en) Image processing apparatus, image processing method, and image processing program
JP2003046807A (en) Image display device and image display method
JP5312171B2 (en) Image processing apparatus and method
KR20160069452A (en) Image processing device, image processing method and program
US20230095785A1 (en) Chroma correction of inverse gamut mapping for standard dynamic range to high dynamic range image conversion

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