[go: up one dir, main page]

CN106686320A - A Tone Mapping Method Based on Number Density Equalization - Google Patents

A Tone Mapping Method Based on Number Density Equalization Download PDF

Info

Publication number
CN106686320A
CN106686320A CN201710054386.8A CN201710054386A CN106686320A CN 106686320 A CN106686320 A CN 106686320A CN 201710054386 A CN201710054386 A CN 201710054386A CN 106686320 A CN106686320 A CN 106686320A
Authority
CN
China
Prior art keywords
dynamic image
brightness
image
brightness range
high dynamic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710054386.8A
Other languages
Chinese (zh)
Other versions
CN106686320B (en
Inventor
周建锋
汪佳丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Star Sail Mdt Infotech Ltd
Tsinghua University
Original Assignee
Ningbo Star Sail Mdt Infotech Ltd
Tsinghua University
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 Ningbo Star Sail Mdt Infotech Ltd, Tsinghua University filed Critical Ningbo Star Sail Mdt Infotech Ltd
Priority to CN201710054386.8A priority Critical patent/CN106686320B/en
Publication of CN106686320A publication Critical patent/CN106686320A/en
Application granted granted Critical
Publication of CN106686320B publication Critical patent/CN106686320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses a tone mapping method based on numerical density balance, comprising the steps of acquiring a high-dynamic image; dividing a brightness range of the high-dynamic image into multiple brightness levels; when the high-dynamic image is a dark scene image, dividing the brightness range of the high-dynamic image into a first brightness range and a second brightness range, mapping the first brightness range to the first brightness range of a low-dynamic image, and mapping the second brightness range to the second brightness range of low-dynamic image; when the high-dynamic image is a non-dark scene image, mapping the brightness range of the high-dynamic image to the brightness range of the low-dynamic image. The tone mapping method has high computing speed, is simple to implement and is widely applicable.

Description

一种基于数密度均衡的色调映射方法A Tone Mapping Method Based on Number Density Equalization

技术领域technical field

本发明涉及图像及视频数据处理领域,特别涉及一种基于数密度均衡的色调映射方法。The invention relates to the field of image and video data processing, in particular to a tone mapping method based on number density equalization.

背景技术Background technique

高动态图像能够展现可能会被传统低动态图像丢失但却能被人类视觉系统感知的极暗和极亮区域的细节信息。它能够正确地表现真实世界的亮度范围。然而传统图像传感器的动态范围一般只有102个数量级,因此由于显示设备的限制,高动态图像无法在常规设备中显示,因此对高动态图像进行色调映射极具意义。High dynamic range images can reveal details of extremely dark and extremely bright areas that may be lost by traditional low dynamic images, but can be perceived by the human visual system. It correctly represents real-world brightness ranges. However, the dynamic range of traditional image sensors is generally only 102 orders of magnitude. Therefore, due to the limitation of display devices, high dynamic images cannot be displayed on conventional devices, so it is very meaningful to perform tone mapping on high dynamic images.

色调映射将高动态图像的亮度压缩到传统显示设备可以接受的范围,同时尽可能的保留原图的细节信息,最终达到设备中显示图像与人眼观察到的场景一致的效果。现有色调映射算法主要包括全局算法和局部算法两大类。Tone mapping compresses the brightness of high dynamic images to the acceptable range of traditional display devices, while retaining the details of the original image as much as possible, and finally achieves the effect that the image displayed on the device is consistent with the scene observed by human eyes. Existing tone mapping algorithms mainly include global algorithms and local algorithms.

全局算法对高动态图像中的所有像素点进行相同的变换算法,通常采用S型曲线。全局算法运算速度快,实现简单,但使图像对比度大大降低,容易丢失细节信息,不能很好地模拟真实的视觉相应特性,对处理复杂的场景和具有极高动态范围的图像效果不佳。The global algorithm performs the same transformation algorithm on all pixels in the high dynamic image, usually using an S-curve. The global algorithm is fast and easy to implement, but it greatly reduces the image contrast, easily loses detailed information, cannot simulate the real visual corresponding characteristics well, and is not effective for processing complex scenes and images with extremely high dynamic range.

局部算法针对图像不同的区域进行不同的变换。在调整图像中某点的灰度值时,将该点的空间位置考虑在内。通常采用基于模拟摄影的方法。局部算法计算量复杂,效率低,应用范围较为狭窄。Local algorithms perform different transformations for different regions of the image. When adjusting the gray value of a point in an image, the spatial position of that point is taken into account. Usually a method based on analog photography is used. The calculation amount of the local algorithm is complex, the efficiency is low, and the application range is relatively narrow.

发明内容Contents of the invention

为了克服现有技术的上述缺陷,本发明提供了一种基于数密度均衡的色调映射方法,利用低动态(LDR)显示设备色调再现高动态(HDR)图像内容。In order to overcome the above-mentioned defects of the prior art, the present invention provides a tone mapping method based on number density equalization, which utilizes low dynamic range (LDR) display devices to reproduce high dynamic range (HDR) image content in tone.

本发明提出的基于数密度均衡的色调映射方法,该方法包括步骤:获得一幅高动态图像;将所述高动态图像的亮度范围划分为多个亮度级;当所述高动态图像为较暗场景图像时,将所述高动态图像的亮度范围划分为第一亮度范围和第二亮度范围,将所述第一亮度范围映射到低动态图像的第一亮度范围,将所述第二亮度范围映射到低动态图像的第二亮度范围;当所述高动态图像为非较暗场景图像时,将所述高动态图像的亮度范围映射到低动态图像的亮度范围。The tone mapping method based on number density equalization proposed by the present invention comprises the steps of: obtaining a high dynamic image; dividing the brightness range of the high dynamic image into multiple brightness levels; when the high dynamic image is relatively dark During the scene image, the brightness range of the high dynamic image is divided into a first brightness range and a second brightness range, the first brightness range is mapped to the first brightness range of the low dynamic image, and the second brightness range is Mapping to the second brightness range of the low dynamic image; when the high dynamic image is a non-dark scene image, mapping the brightness range of the high dynamic image to the brightness range of the low dynamic image.

本发明的基于数密度均衡的色调映射方法具备如下优点:1.计算速度快,实现简单,本发明采用数密度均衡的方法进行色调映射,计算量小,运行速度快;2.适应场景广,本发明对不同场景图像进行不同方法处理,不仅能够适应光照充足的场景,同样适应较暗场景,有效保留细节信息,能够很好地模拟真实的视觉相应特性,对处理复杂的场景和具有极高动态范围的图像效果理想。The tone mapping method based on number density equalization of the present invention has the following advantages: 1. The calculation speed is fast and the implementation is simple. The present invention uses the number density equalization method for tone mapping, which has a small amount of calculation and fast operation speed; 2. It is suitable for a wide range of scenarios, The present invention processes images of different scenes in different ways, which can not only adapt to scenes with sufficient light, but also adapt to darker scenes, effectively retain detailed information, and can well simulate real visual corresponding characteristics. Images with dynamic range are ideal.

附图说明Description of drawings

为了进一步说明本发明涉及的技术方法。我们提供了详细的算法流程图,还给出了一个具体的处理实例,处理过程严格按照本交底书说描述的步骤进行。In order to further illustrate the technical method involved in the present invention. We provide a detailed algorithm flow chart, and also give a specific processing example, and the processing process is carried out in strict accordance with the steps described in this disclosure.

图1是基于数密度均衡的色调映射方法的算法流程图。FIG. 1 is an algorithm flow chart of a tone mapping method based on number density equalization.

图2是高动态图像亮度-数密度直方图示例。Figure 2 is an example of a brightness-number density histogram of a high dynamic image.

图3是欠曝光图像(左)和过曝光图像(右)。Figure 3 is an underexposed image (left) and an overexposed image (right).

图4是高动态图像亮度-数密度直方图实际示例。Figure 4 is a practical example of a brightness-number density histogram of a high dynamic image.

图5是映射完成后低动态图像亮度-数密度直方图实际示例。Figure 5 is a practical example of the brightness-number density histogram of the low dynamic image after the mapping is completed.

图6是映射完成后的低动态图像。Figure 6 is the low dynamic image after the mapping is completed.

具体实施方式detailed description

为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明进一步详细说明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be described in further detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

图1是本发明基于数密度均衡的色调映射方法的算法流程图,参照图1,该方法包括步骤:Fig. 1 is the algorithm flowchart of the tone mapping method based on number density equalization of the present invention, with reference to Fig. 1, this method comprises steps:

步骤100,首先获得一幅高动态(HDR)图像。Step 100, first obtain a high dynamic range (HDR) image.

该图像可以从数码设备(照相机、摄像机等等)直接获取或通过一定的算法合成获取。对于彩色图像,可以先将其转化为黑白图像。用I表示一幅高动态图像,其亮度范围为[0,HBmax],HBmax为高动态图像亮度最大值。The image can be obtained directly from a digital device (camera, video camera, etc.) or synthesized through a certain algorithm. For color images, you can convert them to black and white first. Use I to represent a high dynamic image, its brightness range is [0, HB max ], and HB max is the maximum brightness of the high dynamic image.

步骤200,统计每一亮度级的像素总数,得到图像I的“亮度—数密度”直方图,即统计每一亮度级的像素总数,图2表示高动态图像亮度-数密度直方图示例图。该步骤进一步包括:Step 200, counting the total number of pixels at each brightness level to obtain the "brightness-number density" histogram of image I, that is, counting the total number of pixels at each brightness level. Figure 2 shows an example diagram of the brightness-number density histogram of a high dynamic image. This step further includes:

步骤201:将亮度范围[0,HBmax]分为M份,得到高动态图像新的亮度范围[0,M-1],M大于255,M越大效果越好,根据本发明,优选的,M可以选择大于1000的值。[0,HBmax]被分为M份,因此得到M个子区间。Step 201: Divide the brightness range [0, HB max ] into M parts to obtain a new brightness range [0, M-1] of the high dynamic image, M is greater than 255, and the larger the M, the better the effect. According to the present invention, the preferred , M can choose a value greater than 1000. [0, HB max ] is divided into M parts, so M subintervals are obtained.

步骤202:统计各个子区间的像素数,第i个子区间的像素计数表示为Ni,且得到图像I的“亮度—数密度”直方图。Step 202: Count the number of pixels in each sub-interval, the pixel count of the i-th sub-interval is denoted as N i , and Obtain the "brightness-number density" histogram of image I.

步骤300,计算高动态图像I的平均亮度,根据计算的平均亮度来判断图像I是是较暗场景图像还是非较暗场景图像。Step 300, calculate the average brightness of the high dynamic image I, and judge whether the image I is a dark scene image or a non-dark scene image according to the calculated average brightness.

高动态图像I的平均亮度可通过方法计算获得,其中i=1,2,...M,Ni为第i个子区间的像素计数,N为图像像素总数。设定判断是否为较暗场景图像阈值,该阈值可由用户自行设定,当图像平均亮度大于该阈值时,则为非较暗场景图像,否则为较暗场景图像。The average brightness of the high dynamic picture I can pass Obtained by calculation, where i=1,2,...M, N i is the pixel count of the ith sub-interval, and N is the total number of image pixels. Set the threshold for judging whether it is a dark scene image. The threshold can be set by the user. When the average brightness of the image is greater than the threshold, it is a non-dark scene image, otherwise it is a dark scene image.

在该步骤,根据判断结果,若图像I为较暗场景图像,执行步骤400,若是非较暗场景图像否则执行步骤500。In this step, according to the judgment result, if the image I is a dark scene image, execute step 400, and if it is not a dark scene image, otherwise execute step 500.

步骤400,图像I为较暗场景图像时,根据步骤201,其中将高动态图像的亮度范围[0,HBmax]分为M份,得到高动态图像新的亮度范围[0,M-1]。将HDR图像色调映射为低动态LDR图像,具体地,将亮度范围[0,M-1]映射到[LBmin,255],0≤LBmin<255,其中LBmin为经过色调映射后的低动态(LDR)图像的亮度最小值。也就是说,将[0,M-1]分为 设定经过色调映射后的低动态图像亮度阈值为th,{LBmin<th<255},该阈值可由用户自行设定,而对应的高动态图像亮度阈值为Mth。步骤400进一步包括:Step 400, when image I is a darker scene image, according to step 201, wherein the brightness range [0, HB max ] of the high dynamic image is divided into M parts, and a new brightness range [0, M-1] of the high dynamic image is obtained . Tone map the HDR image to a low dynamic LDR image, specifically, map the brightness range [0,M-1] to [LB min ,255], 0≤LB min <255, where LB min is the low Brightness minimum for dynamic (LDR) images. That is, divide [0,M-1] into Set the low dynamic image brightness threshold after tone mapping as th, {LB min <th<255}, the threshold can be set by the user, and the corresponding high dynamic image brightness threshold is M th . Step 400 further includes:

步骤401:在高动态图像的亮度范围,当亮度小于等于Mth时,将高动态图像I亮度范围[0,Mth]映射到低动态图像[LBmin,th]。具体地,通过下面的方式进行映射,设定计数阈值将[0,M0]区间映射到LBmin,这些区间的计数刚刚超过NA,多余NA的计数计入下一个区间,将[M0+1,M1]区间映射到LBmin+1,这些区间的计数加上前一个区间多余的计数刚刚超过NA。以此类推,直至将[0,Mth]映射完毕Step 401: In the brightness range of the high dynamic image, when the brightness is less than or equal to M th , map the brightness range [0, M th ] of the high dynamic image to the low dynamic image [LB min , th]. Specifically, the mapping is performed in the following way, and the counting threshold is set Map [0,M 0 ] intervals to LB min , the counts of these intervals are just over NA , counts of excess NA are counted into the next interval, map [ M 0 +1, M 1 ] intervals to LB min +1 , the counts of these intervals plus the excess count of the previous interval just exceed N A . And so on, until [0,M th ] is mapped

步骤402,在高动态图像的亮度范围,当亮度大于Mth时,将高动态图像I亮度范围[Mth+1,M-1]映射到低动态图像亮度范围[th+1,255],根据未映射完的像素数rest_pixel和已映射完成的低动态亮度级数k来调整NA值,NA=rest_pixel/(256-k-LBmin),k=th,th+1,...255-LBmin,将[Mth+1,Mth+1]区间映射到LBmin+th+1,这些区间的计数刚刚超过NA,多余NA的计数计入下一个区间;以此类推,直至将[Mth+1,M]映射完毕。Step 402, in the brightness range of the high dynamic image, when the brightness is greater than M th , the high dynamic image I brightness range [M th +1, M-1] is mapped to the low dynamic image brightness range [th+1, 255], according to The mapped pixel number rest_pixel and the mapped low dynamic brightness level k are used to adjust the N A value, N A =rest_pixel/(256-k-LB min ), k=th,th+1,...255- LB min , map [M th +1,M th+1 ] intervals to LB min +th+1, the counts of these intervals just exceed N A , and the counts of excess N A are included in the next interval; and so on, until The mapping of [M th +1,M] is completed.

步骤500,图像I为非较暗场景图像,将亮度范围[0,HBmax]映射到[LBmin,255]。设定计数阈值将[0,M0]区间映射到LBmin,这些区间的计数刚刚超过NA,多余NA的计数计入下一个区间,将[M0+1,M1]区间映射到LBmin+1,这些区间的计数加上前一个区间多余的计数刚刚超过NA,以此类推,直至将[0,M],映射完毕。In step 500, the image I is a non-dark scene image, and the brightness range [0, HB max ] is mapped to [LB min , 255]. Set count threshold Map [0,M 0 ] intervals to LB min , the counts of these intervals are just over NA , counts of excess NA are counted into the next interval, map [ M 0 +1, M 1 ] intervals to LB min +1 , the counts of these intervals plus the redundant counts of the previous interval just exceed N A , and so on until [0,M] is mapped.

下面以一示例来详细说明。An example is used below to describe in detail.

步骤100:根据图3欠曝光图像和过曝光图像合成一幅高动态图像。Step 100: Synthesize a high dynamic image according to the underexposed image and the overexposed image in FIG. 3 .

步骤200:统计每一亮度级的像素总数,得到图像I的“亮度—数密度”直方图,即统计每一亮度级的像素总数,图4表示其高动态图像亮度-数密度直方图示例图,具体步骤如下:Step 200: Count the total number of pixels of each brightness level to obtain the "brightness-number density" histogram of image I, that is, count the total number of pixels of each brightness level. Figure 4 shows an example diagram of its high dynamic image brightness-number density histogram ,Specific steps are as follows:

步骤201:将亮度范围分为5000份,因此得到5000个子区间。Step 201: Divide the brightness range into 5000 parts, so 5000 sub-intervals are obtained.

步骤202:统计各个子区间的像素数,第i个子区间的像素计数表示为Ni,且得到图像I的“亮度—数密度”直方图,如图5所示。Step 202: Count the number of pixels in each sub-interval, the pixel count of the i-th sub-interval is denoted as N i , and Obtain the "brightness-number density" histogram of image I, as shown in Figure 5.

步骤300,设定是否为较暗场景图像阈值为2000,通过公式N/totoal_pixel计算高动态图像I的平均亮度为1255。因此该图像为较暗场景图像,执行步骤400。In step 300, set the threshold value of whether it is a darker scene image to 2000, and calculate the average brightness of the high dynamic image I as 1255 through the formula N/totoal_pixel. Therefore, the image is a darker scene image, and step 400 is executed.

步骤400,根据步骤201,得到高动态图像新的亮度范围[0,4999]。将HDR图像色调映射为低动态LDR图像,具体地,将亮度范围[0,4999]映射到[0,255]。也就是说,将[0,4999]分为256份,设定经过色调映射后的低动态图像亮度阈值为30,该阈值可调整,而对应的高动态图像亮度阈值为MthIn step 400, according to step 201, a new brightness range [0, 4999] of the high dynamic image is obtained. Tone map an HDR image to a low dynamic LDR image, specifically, map the luminance range [0,4999] to [0,255]. That is to say, divide [0,4999] into 256 parts, set the low dynamic image brightness threshold after tone mapping to 30, the threshold can be adjusted, and the corresponding high dynamic image brightness threshold is M th .

步骤401:在高动态图像的亮度范围,当亮度小于等于Mth时,将高动态图像I亮度范围[0,Mth]映射到低动态图像[0,30]。具体地,通过下面的方式进行映射,设定计数阈值将[0,M0]区间映射到低动态亮度0,M0的确定方式为[0,M0]区间的计数刚刚超过NA,多余NA的计数计入下一个区间,将[M0+1,M1]区间映射到,这些区间的计数加上前一个区间多余的计数刚刚超过NA。以此类推,直至将[0,Mth]映射完毕Step 401: In the brightness range of the high dynamic image, when the brightness is less than or equal to M th , map the brightness range [0, M th ] of the high dynamic image to the low dynamic image [0, 30]. Specifically, the mapping is performed in the following way, and the counting threshold is set Map [0,M 0 ] interval to low dynamic brightness 0, M 0 is determined as the count in [0,M 0 ] interval just exceeds N A , the count of excess N A is included in the next interval, and [M 0 +1,M 1 ] intervals to which the counts plus the excess count from the previous interval just exceed N A . And so on, until [0,M th ] is mapped

步骤402,在高动态图像的亮度范围,当亮度大于th时,将高动态图像I亮度范围[Mth+1,4999]映射到低动态图像亮度范围[th+1,255],根据未映射完的像素数rest_pixel和已映射完成的低动态亮度级数k来调整NA值,NA=rest_pixel/(256-k),k=th,th+1,...255,将[Mth+1,Mth+1]区间映射到th+1,这些区间的计数刚刚超过NA,多余NA的计数计入下一个区间;以此类推,直至将[Mth+1,4999]映射完毕。图5,图6分别为映射完成后的“亮度-数密度”直方图和色调映射后的图像。Step 402, in the brightness range of the high dynamic image, when the brightness is greater than th, the high dynamic image I brightness range [M th +1, 4999] is mapped to the low dynamic image brightness range [th+1, 255], according to the unmapped The number of pixels rest_pixel and the mapped low dynamic brightness level k are used to adjust the N A value, N A =rest_pixel/(256-k), k=th,th+1,...255, [M th +1 ,M th+1 ] intervals are mapped to th+ 1 , the counts of these intervals just exceed NA, and the counts of excess NA are included in the next interval; and so on until [ M th +1, 4999] is mapped. Figure 5 and Figure 6 are the "brightness-number density" histogram after mapping and the image after tone mapping respectively.

以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步详细说明,应理解的是,以上所述仅为本发明的具体实施例而已,并不用于限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention, and are not intended to limit the present invention. Within the spirit and principles of the present invention, any modifications, equivalent replacements, improvements, etc., shall be included in the protection scope of the present invention.

Claims (9)

1.一种基于数密度均衡的色调映射方法,该方法包括步骤:1. A tone mapping method based on number density equalization, the method comprising steps: 步骤100,获得一幅高动态图像;Step 100, obtaining a high dynamic image; 步骤200,将所述高动态图像的亮度范围划分为多个亮度级;Step 200, dividing the brightness range of the high dynamic image into multiple brightness levels; 步骤400,当所述高动态图像为较暗场景图像时,将所述高动态图像的亮度范围划分为第一亮度范围和第二亮度范围,将所述第一亮度范围映射到低动态图像的第一亮度范围,将所述第二亮度范围映射到低动态图像的第二亮度范围;Step 400, when the high dynamic image is a dark scene image, divide the brightness range of the high dynamic image into a first brightness range and a second brightness range, and map the first brightness range to the low dynamic image a first brightness range, mapping the second brightness range to a second brightness range of a low dynamic image; 步骤500,当所述高动态图像为非较暗场景图像时,将所述高动态图像的亮度范围映射到低动态图像的亮度范围。Step 500, when the high dynamic image is a non-dark scene image, map the brightness range of the high dynamic image to the brightness range of the low dynamic image. 2.根据权利要求1所述的方法,其特征在于,2. The method of claim 1, wherein, 在步骤100,所述高动态HDR图像亮度范围为[0,HBmax],HBmax为高动态图像亮度最大值;In step 100, the brightness range of the high dynamic HDR image is [0, HB max ], where HB max is the maximum brightness value of the high dynamic image; 在步骤200,将亮度范围[0,HBmax]分为M份,得到高动态图像新的亮度范围[0,M-1],M大于255,统计M个子区间的像素数,第i个子区间的像素计数表示为Ni,且 In step 200, the brightness range [0, HB max ] is divided into M parts to obtain a new brightness range [0, M-1] of the high dynamic image, M is greater than 255, and the number of pixels in the M sub-intervals is counted, the i-th sub-interval The pixel count of is denoted N i , and 3.根据权利要求2所述的方法,其特征在于,3. The method of claim 2, wherein, 在步骤400,高动态图像的第一亮度范围是[0,Mth],第二亮度范围是[Mth+1,M-1],低动态图像的第一亮度范围是[LBmin,th],低动态图像的第二亮度范围是[th+1,255],所述低动态图像的亮度范围是[LBmin,255],0≤LBmin<255,其中LBmin是所述低动态图像的亮度最小值,低动态图像亮度阈值为th,对应的高动态图像亮度阈值为MthIn step 400, the first luminance range of the high dynamic image is [0,M th ], the second luminance range is [M th +1,M-1], and the first luminance range of the low dynamic image is [LB min ,th ], the second brightness range of the low dynamic image is [th+1,255], the brightness range of the low dynamic image is [LB min ,255], 0≤LB min <255, wherein LB min is the low dynamic image The minimum brightness value, the low dynamic image brightness threshold is th, and the corresponding high dynamic image brightness threshold is M th . 4.根据权利要求3所述的方法,其特征在于,步骤400进一步包括:4. The method according to claim 3, wherein step 400 further comprises: 步骤401:在高动态图像的亮度范围,当亮度小于等于Mth时,将高动态图像I亮度范围[0,Mth]映射到低动态图像[LBmin,th];Step 401: In the brightness range of the high dynamic image, when the brightness is less than or equal to M th , map the brightness range [0, M th ] of the high dynamic image to the low dynamic image [LB min , th]; 步骤402,在高动态图像的亮度范围,当亮度大于th时,将高动态图像I亮度范围[Mth+1,M-1]映射到低动态图像亮度范围[th+1,255]。Step 402, in the brightness range of the high dynamic image, when the brightness is greater than th, map the brightness range [M th +1, M-1] of the high dynamic image to the brightness range [th+1, 255] of the low dynamic image. 5.根据权利要求4所述的方法,其特征在于,5. The method of claim 4, wherein, 在步骤401,将[0,M-1]分为[0,M0],[M0+1,M1],……,[Mth-1+1,Mth],……,设定计数阈值将[0,M0]区间映射到LBmin,该区间的像素计数刚刚超过NA,比NA多的像素计数计入下一个区间,将[M0+1,M1]区间映射到LBmin+1,该区间像素计数加上前一个区间比NA多的计数刚刚超过NA,以此类推,直至将[0,Mth]映射完毕;In step 401, divide [0, M-1] into [0, M 0 ], [M 0 +1, M 1 ], ..., [M th-1 +1, M th ], ..., Set count threshold Map the [0,M 0 ] interval to LB min , the pixel count in this interval just exceeds N A , and the pixel count more than N A is counted into the next interval, map the [M 0 +1,M 1 ] interval to LB min +1, the pixel count of this interval plus the count of the previous interval more than N A just exceeds N A , and so on until [0,M th ] is mapped; 在步骤402,在高动态图像的亮度范围,当亮度大于Mth时,将高动态图像I亮度范围[Mth+1,M-1]映射到低动态图像亮度范围[th+1,255],根据未映射完的像素数rest_pixel和已映射完成的低动态亮度级数k来调整NA值,NA=rest_pixel/(256-k-LBmin),k=th,th+1,...255-LBmin,将[Mth+1,Mth+1]区间映射到LBmin+th+1,该区间的像素计数刚刚超过NA,比NA多的计数计入下一个区间,以此类推,直至将[Mth+1,M-1]映射完毕。In step 402, in the brightness range of the high dynamic image, when the brightness is greater than M th , the high dynamic image I brightness range [M th +1, M-1] is mapped to the low dynamic image brightness range [th+1, 255], according to The unmapped pixel number rest_pixel and the mapped low dynamic brightness level k are used to adjust the N A value, N A =rest_pixel/(256-k-LB min ), k=th,th+1,...255 -LB min , map the [M th +1,M th+1 ] interval to LB min +th+1, the pixel count in this interval just exceeds N A , and counts more than N A are included in the next interval, so that By analogy, until [M th +1, M-1] is mapped. 6.根据权利要求2所述的方法,其特征在于,6. The method of claim 2, wherein, 在步骤500,将高动态图像的亮度范围[0,HBmax]映射到低动态图像的亮度范围[LBmin,255],LBmin是所述低动态图像的亮度最小值,低动态图像亮度阈值为th,对应的高动态图像亮度阈值为Mth,其中,将[0,M-1]分为[0,M0],[M0+1,M1],……,[Mth-1+1,Mth],……,设定计数阈值将[0,M0]区间映射到LBmin,该区间的像素计数刚刚超过NA,比NA多的计数计入下一个区间,将[M0+1,M1]区间映射到LBmin+1,该区间的像素计数加上前一个区间比NA多的计数刚刚超过NA,以此类推,直至将[0,M-1],映射完毕。In step 500, the brightness range [0, HB max ] of the high dynamic image is mapped to the brightness range [LB min , 255] of the low dynamic image, LB min is the brightness minimum value of the low dynamic image, and the low dynamic image brightness threshold is th, and the corresponding high dynamic image brightness threshold is M th , where [0, M-1] is divided into [0, M 0 ], [M 0 +1, M 1 ], ..., [M th- 1 +1, Mth ],..., Set count threshold Map the [0,M 0 ] interval to LB min , the pixel count in this interval just exceeds N A , and counts more than N A are included in the next interval, map the [M 0 +1,M 1 ] interval to LB min +1, the pixel count of this interval plus the count of the previous interval more than N A just exceeds N A , and so on until [0,M-1] is mapped. 7.根据权利要求1-6任一项所述的方法,其特征在于,还包括:7. The method according to any one of claims 1-6, further comprising: 步骤300,计算高动态图像的平均亮度,根据计算的平均亮度来判断图像是较暗场景图像还是非较暗场景图像。Step 300, calculating the average brightness of the high dynamic image, and judging whether the image is a dark scene image or a non-dark scene image according to the calculated average brightness. 8.根据权利要求7所述的方法,其特征在于,高动态图像的平均亮度通过方法计算获得,其中i=1,2,...M,Ni为第i个子区间的像素计数,N为图像像素总数,设定判断是否为较暗场景图像阈值,当图像平均亮度大于该阈值时,则为非较暗场景图像,否则为较暗场景图像。8. The method according to claim 7, wherein the average brightness of the high dynamic image is passed The method is calculated and obtained, where i=1,2,...M, N i is the pixel count of the i-th subinterval, N is the total number of image pixels, and the threshold for judging whether it is a darker scene image is set. When the average brightness of the image is greater than the When the threshold is set, it is a non-darker scene image, otherwise it is a darker scene image. 9.根据权利要求2-6任一项所述的方法,其特征在于,M大于1000。9. The method according to any one of claims 2-6, characterized in that M is greater than 1000.
CN201710054386.8A 2017-01-22 2017-01-22 A Tone Mapping Method Based on Number Density Equalization Active CN106686320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710054386.8A CN106686320B (en) 2017-01-22 2017-01-22 A Tone Mapping Method Based on Number Density Equalization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710054386.8A CN106686320B (en) 2017-01-22 2017-01-22 A Tone Mapping Method Based on Number Density Equalization

Publications (2)

Publication Number Publication Date
CN106686320A true CN106686320A (en) 2017-05-17
CN106686320B CN106686320B (en) 2019-06-18

Family

ID=58860129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710054386.8A Active CN106686320B (en) 2017-01-22 2017-01-22 A Tone Mapping Method Based on Number Density Equalization

Country Status (1)

Country Link
CN (1) CN106686320B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108024104A (en) * 2017-12-12 2018-05-11 上海顺久电子科技有限公司 The method and display device that a kind of high dynamic range images to input are handled
CN109035181A (en) * 2017-06-08 2018-12-18 泰邦泰平科技(北京)有限公司 A kind of wide dynamic range image processing method based on mean picture brightness
CN111508424A (en) * 2020-05-22 2020-08-07 东莞阿尔泰显示技术有限公司 L ED display screen tone mapping method and control system
CN111754412A (en) * 2019-03-29 2020-10-09 Tcl集团股份有限公司 Method and device for constructing data pairs and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102693538A (en) * 2011-02-25 2012-09-26 微软公司 Global alignment for high-dynamic range image generation
CN103281537A (en) * 2013-05-23 2013-09-04 华为技术有限公司 Compression method and device for dynamic range of image
US20140327691A1 (en) * 2001-06-08 2014-11-06 University Of Southern California High dynamic range image editing
US20140341468A1 (en) * 2010-01-27 2014-11-20 Adobe Systems Incorporated Methods and Apparatus for Tone Mapping High Dynamic Range Images
CN105139368A (en) * 2015-08-12 2015-12-09 旗瀚科技股份有限公司 Hybrid tone mapping method for machine vision

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140327691A1 (en) * 2001-06-08 2014-11-06 University Of Southern California High dynamic range image editing
US20140341468A1 (en) * 2010-01-27 2014-11-20 Adobe Systems Incorporated Methods and Apparatus for Tone Mapping High Dynamic Range Images
CN102693538A (en) * 2011-02-25 2012-09-26 微软公司 Global alignment for high-dynamic range image generation
CN103281537A (en) * 2013-05-23 2013-09-04 华为技术有限公司 Compression method and device for dynamic range of image
CN105139368A (en) * 2015-08-12 2015-12-09 旗瀚科技股份有限公司 Hybrid tone mapping method for machine vision

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109035181A (en) * 2017-06-08 2018-12-18 泰邦泰平科技(北京)有限公司 A kind of wide dynamic range image processing method based on mean picture brightness
CN108024104A (en) * 2017-12-12 2018-05-11 上海顺久电子科技有限公司 The method and display device that a kind of high dynamic range images to input are handled
CN111754412A (en) * 2019-03-29 2020-10-09 Tcl集团股份有限公司 Method and device for constructing data pairs and terminal equipment
CN111754412B (en) * 2019-03-29 2024-04-19 Tcl科技集团股份有限公司 Method and device for constructing data pair and terminal equipment
CN111508424A (en) * 2020-05-22 2020-08-07 东莞阿尔泰显示技术有限公司 L ED display screen tone mapping method and control system

Also Published As

Publication number Publication date
CN106686320B (en) 2019-06-18

Similar Documents

Publication Publication Date Title
CN112565636B (en) Image processing method, device, equipment and storage medium
CN110706172B (en) Low-illumination color image enhancement method based on adaptive chaotic particle swarm optimization
CN103024300B (en) A kind of method for high dynamic range image display and device
CN113573032B (en) Image processing method and projection system
WO2022000397A1 (en) Low-illumination image enhancement method and apparatus, and computer device
CN109686342B (en) Image processing method and device
JP6615917B2 (en) Real-time video enhancement method, terminal, and non-transitory computer-readable storage medium
CN103778900B (en) A kind of image processing method and system
CN111294575B (en) Image processing method, device, electronic device and storage medium
CN103353982A (en) Method for tone mapping based on histogram equalization
CN112991236B (en) Image enhancement method and device based on template
CN112258417B (en) Image generation method, device and equipment
WO2019056549A1 (en) Image enhancement method, and image processing device
CN105282529A (en) RAW space based digital wide dynamic method and device
CN112153240A (en) A method, device and readable storage medium for adjusting image quality
CN106686320A (en) A Tone Mapping Method Based on Number Density Equalization
CN110807735A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
CN112598609B (en) Dynamic image processing method and device
CN106534708A (en) Wide dynamic range image method
CN114119433B (en) A dark image processing method based on Bezier curve
CN107358592B (en) An Iterative Global Adaptive Image Enhancement Method
CN111031301A (en) Method for adjusting color gamut space, storage device and display terminal
CN111199525B (en) Image histogram equalization enhancement method and system
GB2588616A (en) Image processing method and apparatus
CN111598785A (en) A method, device, device and storage medium for enhancing image contrast

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant