A locally adaptive tone mapping method

By employing a locally adaptive tone mapping method, the base layer and detail layer are separated by adjusting the filtering window and coefficients of the bilateral filter. This solves the problem of poor adaptability in existing technologies, improves the image's sense of depth and contrast, and achieves better image quality.

CN119941598BActive Publication Date: 2025-11-04HEFEI JUNZHENG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311453205.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2025-11-04
Estimated Expiration
2043-11-01

AI Technical Summary

Technical Problem

Existing tone mapping methods based on bilateral filtering suffer from poor local adaptability, resulting in insufficient image depth and low contrast.

Method used

By calculating the local variance of image brightness, adjusting the filter window size and filter coefficients of the bilateral filter, the base layer and detail layer of the image are separated. The base layer is then compressed and the detail layer is enhanced by mapping curves, ultimately restoring the tone-mapped image.

Benefits of technology

It improves the local adaptability of images, enhances the sense of depth and contrast, and produces wide dynamic range images that are more in line with human visual perception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941598B_ABST
    Figure CN119941598B_ABST
Patent Text Reader

Abstract

The application provides a local adaptive tone mapping method, comprising the following steps: S1, inputting an image and extracting image brightness; S2, performing logarithmic transformation on the image brightness; S3, calculating the image variance D of logY, and the window size is M*M; S4, adjusting the filtering window size N and the filtering coefficient of the bilateral filter according to the variance D; S5, taking the output of the bilateral filtering as the base layer logYBase, and the difference between logY and the base layer is the detail layer logYDetail, logYDetail=logY-logYBase; S6, compressing the base layer, enhancing the detail layer, and adding the base layer and the detail layer to obtain the enhanced brightness graph: logYEn=f(logYBase)+alpha*logYDetail, wherein f(·) represents a mapping curve, which is usually similar to a gamma shape, and a user can adjust it according to requirements, alpha represents an enhancement coefficient, and the greater the value, the stronger the image details; S7, converting the logarithmic domain brightness back to the linear domain: YEn=10 logYEn ^logYEn; S8, restoring the image color according to the RGB three-channel values and Y of the original image and the enhanced YEn to obtain a tone-mapped image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of image processing, and particularly relates to a local adaptive tone mapping method. BACKGROUND

[0002] With the development of computer graphics, people have higher and higher requirements for the dynamic range of images, and the images have wide application in the fields of security and vehicle-mounted, such as backlight face scenes, vehicle lamp scenes, etc. The standard dynamic range image has a dynamic range greater than that of a sensor, resulting in insufficient dynamic range of the obtained image and the phenomenon of overexposure and underexposure of the image, which cannot meet market demand. Therefore, the technology for expanding the dynamic range of images is also developing, which is usually referred to as a tone mapping method. The main idea of the tone mapping method is based on the Retinex theory, which considers that the image information perceived by the human eye contains illumination information of a scene and reflection information of an object, wherein the illumination information reflects the dynamic range of the scene, which is usually referred to as a base layer of the image, and the reflection information reflects the real content of the scene, which is usually referred to as a detail layer of the image. By compressing the illumination information and enhancing the reflection information, a wide dynamic range image more consistent with the human eye perception can be obtained. The main difficulty of this kind of method is how to better decompose the base layer and the detail layer of the image. At present, the most widely used tone mapping method is a tone mapping algorithm based on bilateral filtering, which uses bilateral filtering to decompose the illumination information and the reflection information of the image, but the adaptability of the method is weak and the local adjustability is not good.

[0003] In the prior art, the tone mapping method based on bilateral filtering has the problem of poor local adaptability, and cannot well consider each region in the image. Specifically, the base layer of the image obtained by decomposition has the problem that the large edges of the image are excessively smoothed and the small details are not smooth enough. Thus, the tone-mapped image has insufficient level of detail and low contrast. SUMMARY

[0004] In order to solve the above problems, the purpose of the present application is to solve the problem of poor local adaptability of the tone mapping method based on bilateral filtering. In the image, the performance is that the level of detail of the image is not enough and the contrast is low.

[0005] Specifically, the present application provides a local adaptive tone mapping method, which comprises the following steps:

[0006] S1, inputting an image and extracting image brightness:

[0007] Y = 0.2989 * R + 0.5870 * G + 0.1140 * B,

[0008] wherein Y is the image brightness, R, G and B represent RGB three-channel data of the image, respectively;

[0009] S2, log transform the image intensity, the specific method is to take the base 10, Y log:

[0010] logY = log10(Y);

[0011] S3, calculate the local variance D of each pixel point of logY, wherein the local window size is M*M, M is in pixels, and 3<=M<=81, the pixel matrix with the current pixel point as the center and M / 2 as the radius is represented by logYLocal, and the calculation method of the local variance D is as follows:

[0012]

[0013]

[0014] S4, adjust the filter window size N of the bilateral filter according to the variance D, the larger the D is, the smaller the filter window is, and the relationship therebetween can be defined by oneself, including using:

[0015]

[0016]

[0017] Wherein, N min and N max represent the minimum value and the maximum value of the window size, and ε represents an adjustment coefficient; round() represents rounding to the nearest integer;

[0018] S5, the output of the bilateral filter is used as the base layer logYBase, and logY minus the base layer is equal to the detail layer logYDetail

[0019] logYDetail = logY - logYBase;

[0020] S6, compress the base layer, enhance the detail layer, and add to obtain the enhanced intensity graph logYEn:

[0021] logYEn = f(logYBase) + a*logYDetail,

[0022] Wherein f(·) represents a mapping curve, the curve can be defined by oneself according to requirements, because the human eye is more sensitive to details in the dark area, so it is usually in the shape of gamma, and users can also adjust it according to requirements, and a represents an enhancement coefficient, the larger the value is, the stronger the image details are;

[0023] S7, take the base 10 of logYEn to get the exponent, convert the log domain intensity to the linear domain, and obtain the enhanced intensity YEn:

[0024] YEn = 10logYEn ;

[0025] S8, according to the original image RGB three channel values and Y, and enhanced YEn, restore image color, get the image after tone mapping:

[0026]

[0027]

[0028]

[0029] In step S3, for the 1080P size image, including using 81*81.

[0030] In step S4, including using N min =31, N max =101, ε=0.01.

[0031] In step S6, α=1.2.

[0032] Therefore, the advantages of the present application are: the method is simple, which can effectively overcome the defects of the prior art. BRIEF DESCRIPTION OF DRAWINGS

[0033] The accompanying drawings, which are included to provide a further understanding of the application and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application.

[0034] Figure 1 is a schematic diagram of the method flow of the present application.

[0035] Figure 2 is a schematic diagram of the method flow of the present application.

[0036] Figure 3 is a schematic diagram of the mapping curve in step S6 of the method of the present application. DETAILED DESCRIPTION

[0037] In order to more clearly understand the technical content and advantages of the present application, the present application will be further described in detail in conjunction with the drawings.

[0038] As Figure 1As shown, the present application proposes a local adaptive tone mapping method, mainly including: extracting image brightness Y, making log transformation on Y to obtain logY, calculating the variance information of logY, adjusting the filter window and filter coefficient of bilateral filtering according to the variance information, and then obtaining the base layer of the image, subtracting the base layer from logY to obtain the detail layer of the image, compressing the base layer, enhancing the detail layer, and then adding the processed base layer and detail layer to obtain the enhanced image, making exponential transformation on the enhanced image, and recovering the color to obtain the tone mapping image.

[0039] The specific implementation is as Figure 2 As shown, including:

[0040] S1, input image, extract image brightness:

[0041] Y = 0.2989 * R + 0.5870 * G + 0.1140 * B

[0042] Where Y is the image brightness, R, G, and B represent the RGB three-channel data of the image respectively;

[0043] S2, make log transformation on the image brightness:

[0044] logY = log10(Y)

[0045] S3, calculate the image variance D of logY, the window size is M*M, for 1080P size image, this paper uses 81*81;

[0046] S4, according to the variance D, adjust the filter window size N of bilateral filter, the larger D is, the smaller the filter window is, the relationship between them can be defined by yourself, this paper uses:

[0047]

[0048] Where, N min and N max represent the minimum and maximum values of the window size, and ε represents the adjustment coefficient, this paper uses N min = 31, N max = 101, ε = 0.01;

[0049] S5, the output of bilateral filtering is used as the base layer logYBase, and logY minus the base layer is equal to the detail layer logYDetail

[0050] logYDetail = logY - logYBase;

[0051] S6, compress the base layer, enhance the detail layer, and add to obtain the enhanced brightness graph:

[0052] logYEn = f (logYBase) + a*logYDetail

[0053] Where f(·) represents the mapping curve, which can be defined by oneself according to the requirement, and is usually in the shape of gamma because the human eye is more sensitive to the details in the dark area, and the user can also adjust it by oneself according to the requirement, and a represents the enhancement coefficient, the greater the value, the stronger the image details, and a = 1.2 in this article; the mapping curve can adopt the curve as shown in Figure 3 ;

[0054] S7, logYEn is calculated in the base of 10 to convert the logarithmic domain brightness back to the linear domain to obtain the enhanced brightness YEn:

[0055] YEn = 10 logYEn ;

[0056] S8, according to the RGB three-channel values and Y of the original image and the enhanced YEn, the image color is recovered to obtain the tone-mapped image:

[0057]

[0058]

[0059]

[0060] The above only describes the preferred embodiments of the present application and is not used to limit the present application, and the embodiments of the present application can have various changes and variations for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A locally adaptive tone mapping method, characterized in that, The method includes the following steps: S1, Input image, extract image brightness: Y=0.2989*R+0.5870*G+0.1140*B, Where Y is the image brightness, and R, G, and B represent the RGB three-channel data of the image, respectively; S2, perform a logarithmic transformation on the image brightness, specifically by calculating the logarithm of Y to base 10: logY = log10(Y); S3, calculate the local variance D of logY for each pixel, where the local window size is M*M, M is in pixels, and 3<=M<=81. The pixel matrix centered at the current pixel with a radius of M / 2 is represented by logYLocal. The local variance D is calculated as follows: S4. Adjust the filter window size N of the bilateral filter based on the variance D. The larger D is, the smaller the filter window. The relationship between the two can be defined by the user, including in the following ways: Where, N min and N max The minimum and maximum window sizes are represented by ε, where ε is the adjustment factor; round() represents rounding to the nearest integer. S5, the output of the bilateral filter is used as the base layer logYBase, and logY minus the base layer equals the detail layer. logYDetail logYDetail=logY–logYBase; S6, compress the base layer, enhance the detail layer, and sum them to obtain the enhanced brightness map logYEn: logYEn=f(logYBase)+α*logYDetail, Where f(·) represents the mapping curve, which can be defined according to the needs. Because the human eye is more sensitive to the details in dark areas, it is usually gamma in shape. Users can also adjust it according to their needs. α represents the enhancement coefficient. The larger the value, the stronger the image details. S7, calculate the base-10 exponent of logYEn to transform the logarithmic domain brightness back to the linear domain, and obtain the enhanced brightness YEn: YEn=10 logYEn ; S8, based on the RGB three-channel values ​​and Y of the original image, and the enhanced YEn, restores the image color to obtain the tone-mapped image:

2. The locally adaptive tone mapping method according to claim 1, characterized in that, In step S3, for a 1080P image, 81*81 is used.

3. The locally adaptive tone mapping method according to claim 1, characterized in that, Step S4 includes using N min =31, N max =101, ε=0.

01.

4. The locally adaptive tone mapping method according to claim 1, characterized in that, In step S6, α = 1.2.

Citation Information

Patent Citations

  • Tone mapping method based on edge preservation total variation model

    CN102938837A

  • Tone mapping method of high dynamic range image

    CN111105359A