Tone mapping method and device based on floating point exponential logarithm, terminal and medium

Through the tone mapping method based on floating point index logarithm, the basic layer and detail layer of the image are extracted and tone mapping is performed, which solves the problem of poor image processing effect of large changes in exposure settings in the prior art, and achieves more consistent and high-quality image processing results.

CN119991525APending Publication Date: 2025-05-13SHENZHEN JUYUAN VIDEOCHIP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510133450.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the prior art, when processing images with large changes in exposure settings, the tone mapping effect is significantly reduced, resulting in inconsistent processing results.

Method used

The tone mapping method based on floating point index logarithm is adopted, and the tone mapping parameters are obtained by pre-processing the RGB image, natural logarithmic transformation, bilateral filtering, and obtaining tone mapping parameters, and the base layer and detail layer of the image are extracted, and tone mapping is performed based on these layers.

Benefits of technology

It effectively solves the problem of image conversion effect degradation with large changes in exposure settings, and improves the consistency and quality of image processing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991525A_ABST
    Figure CN119991525A_ABST
Patent Text Reader

Abstract

The invention discloses a tone mapping method and device based on floating point exponential logarithm, a terminal and a medium, and the method comprises the steps: obtaining an RGB image, carrying out the preprocessing of the RGB image, and determining a gray value image; performing natural logarithm calculation on the gray value image to determine a logarithm domain image; performing bilateral filtering on the logarithm domain image to determine a bilateral filtering image; obtaining a tone mapping parameter corresponding to the gray value image, and determining an image base layer based on the tone mapping parameter and the bilateral filtering image; determining an image detail layer according to the logarithm domain image and the bilateral filtering image; and performing tone mapping on the RGB image according to the image base layer and the image detail layer, and determining a target RGB image. According to the method, the base layer and the detail layer of the image are extracted through logarithmic transformation and bilateral filtering, so that tone mapping is carried out based on the base layer and the detail layer, and the problem that processing results are inconsistent due to the fact that the conversion effect of the image with large exposure setting change is remarkably reduced in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a tone mapping method, device, terminal and medium based on floating-point exponential logarithm. Background Art

[0002] Tone mapping is a key technique in image processing that aims to convert high dynamic range (HDR) images into a format suitable for display devices, such as traditional monitors and screens, which have limited dynamic range. Without tone mapping, high dynamic range images, when displayed on these devices, usually result in low dynamic range (LDR) images with significantly reduced quality due to limitations in brightness, color depth, and contrast. In contrast, tone mapping technology improves image quality by extending the dynamic range, enriching color expression, and enhancing contrast. Tone mapping usually compresses the brightness range through nonlinear transformations so that the processed image matches the visual perception characteristics of the human eye.

[0003] However, existing tone mapping techniques are mainly applicable to images with consistent exposure conditions, and their effectiveness may be significantly reduced for images with large variations in exposure settings, resulting in inconsistent processing results.

[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the invention

[0005] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a tone mapping method, device, terminal and medium based on floating-point exponential logarithm are provided, aiming to solve the problem that the conversion effect of the prior art for images with large changes in exposure settings is significantly reduced, resulting in inconsistent processing results.

[0006] The technical solution adopted by the present invention to solve the problem is as follows:

[0007] In a first aspect, an embodiment of the present invention provides a tone mapping method based on a floating-point exponential logarithm, wherein the method comprises:

[0008] Acquire an RGB image, preprocess the RGB image, and determine a grayscale value image;

[0009] Performing a natural logarithm transformation on the grayscale image to determine a logarithmic domain image;

[0010] Performing bilateral filtering on the logarithmic domain image to determine a bilateral filtered image;

[0011] Acquire tone mapping parameters corresponding to the grayscale image, and determine an image base layer based on the tone mapping parameters and the bilateral filtered image;

[0012] Determine an image detail layer according to the logarithmic domain image and the bilateral filtered image;

[0013] Tone mapping is performed on the RGB image according to the image base layer and the image detail layer to determine a target RGB image.

[0014] In one implementation method, performing a natural logarithmic transformation on the grayscale image to determine a logarithmic domain image includes:

[0015] Performing a natural logarithm transformation on the grayscale image to convert each grayscale value in the grayscale image into a floating-point natural logarithm;

[0016] The mantissa of each floating-point natural logarithm is approximately calculated by Taylor series expansion to determine the logarithmic domain image.

[0017] In one implementation method, performing bilateral filtering on the logarithmic domain image to determine the bilateral filtered image includes:

[0018] Generate a filter mask, wherein the filter mask is used to determine the pixel value of the central pixel point position of the area covered by the filter mask based on weighted summation of each pixel point in the area covered by the filter mask;

[0019] A preset step length is obtained, and bilateral filtering is performed on the logarithmic domain image according to the preset step length and the filter mask to determine the bilateral filtered image.

[0020] In one implementation method, determining the pixel value of the central pixel point position of the filter mask coverage area by weighted summing of the pixels of the filter mask coverage area includes:

[0021] Calculating the difference between the pixel values ​​of each pixel point in the area covered by the filter mask and the central pixel point, and determining the approximate bilateral weight corresponding to each pixel point based on the difference in each pixel value by using a lookup table;

[0022] Determine a total weighted pixel value and a total weight value based on the pixel value corresponding to each pixel point and each approximate bilateral weight;

[0023] The pixel value of the central pixel point position of the filter mask coverage area is determined according to the total weighted pixel value and the total weight value.

[0024] In one implementation method, obtaining tone mapping parameters corresponding to the grayscale image includes:

[0025] Acquire a plurality of historical tone mapping data, wherein each of the historical tone mapping data comprises a historical gray value image corresponding to a historical RGB image and a historical tone mapping parameter;

[0026] Performing data fitting on a plurality of the historical tone mapping data to determine a mapping relationship between the historical gray value image and the historical tone mapping parameters;

[0027] The tone mapping parameters are determined according to the grayscale value image and the mapping relationship.

[0028] In one implementation method, tone mapping is performed on the RGB image according to the image base layer and the image detail layer to determine a target RGB image, including:

[0029] Determining a tone mapping ratio according to the image base layer and the image detail layer;

[0030] Performing tone mapping on the RGB image according to the tone mapping ratio;

[0031] Correct the tone-mapped RGB image to determine the target RGB image.

[0032] In one implementation method, determining a tone mapping ratio according to the image base layer and the image detail layer includes:

[0033] After adding each pixel value in the image base layer to the pixel value at the corresponding position in the image detail layer, a natural exponential transformation is performed to determine a first proportional calculation image;

[0034] Performing a natural exponential transformation on the image detail layer to determine a second scale calculation image;

[0035] The tone mapping ratio is determined by calculating a quotient of the first ratio calculation image and the second ratio calculation image.

[0036] In a second aspect, an embodiment of the present invention further provides a tone mapping device based on a floating-point exponential logarithm, wherein the tone mapping device based on a floating-point exponential logarithm comprises:

[0037] A preprocessing module is used to obtain an RGB image, preprocess the RGB image, and determine a gray value image;

[0038] A logarithmic domain conversion module, used for performing a natural logarithmic transformation on the gray value image to determine a logarithmic domain image;

[0039] A bilateral filtering module, used for performing bilateral filtering on the logarithmic domain image to determine a bilateral filtered image;

[0040] An image base layer determination module, configured to obtain tone mapping parameters corresponding to the gray value image, and determine an image base layer based on the tone mapping parameters and the bilateral filtered image;

[0041] An image detail layer determination module, used to determine an image detail layer according to the logarithmic domain image and the bilateral filtered image;

[0042] The tone mapping module is used to perform tone mapping on the RGB image according to the image base layer and the image detail layer to determine a target RGB image.

[0043] In a third aspect, an embodiment of the present invention further provides a terminal, comprising a memory and one or more processors; the memory stores one or more programs; the program comprises instructions for executing a tone mapping method based on floating-point exponential logarithm as described above; and the processor is used to execute the program.

[0044] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a plurality of instructions are stored, wherein the instructions are suitable for being loaded and executed by a processor to implement any of the above-mentioned floating-point exponential logarithm-based tone mapping methods.

[0045] Beneficial effects of the present invention: The embodiment of the present invention obtains an RGB image, pre-processes the RGB image, and determines a gray value image; performs natural logarithm calculation on the gray value image to determine a log domain image; performs bilateral filtering on the log domain image to determine a bilateral filtered image; obtains tone mapping parameters corresponding to the gray value image, and determines an image base layer based on the tone mapping parameters and the bilateral filtered image; determines an image detail layer based on the log domain image and the bilateral filtered image; performs tone mapping on the RGB image based on the image base layer and the image detail layer to determine a target RGB image. The present invention extracts the base layer and detail layer of an image through logarithmic transformation and bilateral filtering, and thus performs tone mapping based on the base layer and the detail layer, thereby solving the problem that the conversion effect of the prior art is significantly reduced for images with large changes in exposure settings, resulting in inconsistent processing results. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 It is a flowchart of a tone mapping method based on floating-point exponential logarithm provided in an embodiment of the present invention.

[0048] Figure 2 It is a flowchart of a specific embodiment of a tone mapping method based on floating-point exponential logarithm provided in an embodiment of the present invention.

[0049] Figure 3 Schematic diagram of a natural logarithm calculation module provided in an embodiment of the present invention.

[0050] Figure 4 It is a schematic diagram of a bilateral filtering module provided by an embodiment of the present invention.

[0051] Figure 5 It is a schematic diagram of a natural exponential transformation calculation module provided in an embodiment of the present invention.

[0052] Figure 6 It is a schematic diagram of the internal modules of the floating-point exponential logarithm-based tone mapping device provided in an embodiment of the present invention.

[0053] Figure 7 It is a principle block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The present invention discloses a tone mapping method, device, terminal and medium based on floating-point exponential logarithm. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0055] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0056] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0057] Tone mapping is a key technique in image processing that aims to convert high dynamic range (HDR) images into a format suitable for display devices, such as traditional monitors and screens, which have limited dynamic range. Without tone mapping, high dynamic range images, when displayed on these devices, usually result in low dynamic range (LDR) images with significantly reduced quality due to limitations in brightness, color depth, and contrast. In contrast, tone mapping technology improves image quality by extending the dynamic range, enriching color expression, and enhancing contrast. Tone mapping usually compresses the brightness range through nonlinear transformations so that the processed image matches the visual perception characteristics of the human eye.

[0058] However, existing tone mapping techniques are mainly applicable to images with consistent exposure conditions, and their effectiveness may be significantly reduced for images with large variations in exposure settings, resulting in inconsistent processing results.

[0059] In view of the above-mentioned defects of the prior art, the present invention provides a tone mapping method based on floating-point exponential logarithm, wherein the method obtains an RGB image, pre-processes the RGB image, and determines a gray value image; performs natural logarithm calculation on the gray value image to determine a log domain image; performs bilateral filtering on the log domain image to determine a bilateral filtered image; obtains tone mapping parameters corresponding to the gray value image, and determines an image base layer based on the tone mapping parameters and the bilateral filtered image; determines an image detail layer according to the log domain image and the bilateral filtered image; and tone maps the RGB image according to the image base layer and the image detail layer to determine a target RGB image. The present invention extracts the base layer and detail layer of the image through logarithmic transformation and bilateral filtering, thereby performing tone mapping based on the base layer and the detail layer, thereby solving the problem that the conversion effect of the prior art is significantly reduced for images with large changes in exposure settings, resulting in inconsistent processing results.

[0060] Exemplary methods:

[0061] like Figure 1 As shown, the method includes:

[0062] Step S100: Acquire an RGB image, preprocess the RGB image, and determine a gray value image.

[0063] Specifically, in this embodiment, the RGB image is generally a high dynamic range (HDR) image. In order to be displayed on a device with a limited dynamic range, such as a traditional display and screen, the high dynamic range image needs to be tone mapped so that the processed image matches the visual perception characteristics of the human eye. Figure 2As shown, for an input high dynamic range RGB image, the RGB image is first preprocessed and converted into a gray value image to reduce the complexity of the color, thereby reducing the amount of calculation in the subsequent tone mapping process.

[0064] Step S200: Perform natural logarithm transformation on the grayscale image to determine a logarithmic domain image.

[0065] In simple terms, the grayscale image is mapped to the logarithmic domain through the natural logarithm transformation to obtain a logarithmic domain image. This process compresses the brightness value of the image to match the perception characteristics of the human eye, thereby better adapting to the dynamic range of the display device.

[0066] In one implementation, performing a natural logarithmic transformation on the grayscale image to determine a logarithmic domain image includes:

[0067] Step S201, performing natural logarithm transformation on the gray value image, converting each gray value in the gray value image into a floating point natural logarithm;

[0068] Step S202: performing approximate calculation on the mantissa of each floating-point natural logarithm through Taylor series expansion to determine a logarithmic domain image.

[0069] Specifically, Figure 3 As shown, the grayscale image is transformed into a natural logarithm by the logarithm module, and a logarithm domain image is output. In the logarithm module, the grayscale value corresponding to each pixel in the grayscale image is converted into a floating-point natural logarithm. The floating-point natural logarithm is 32 bits and can be decomposed into an exponential part and a mantissa part. The logarithm value of the exponential part is stored through a lookup table (LUT), and the mantissa part is approximated by Taylor series expansion. By using a high-radix Taylor expansion to accelerate the floating-point natural logarithm, the number of polynomial expansions is greatly reduced, while expensive division operations are avoided, the computational efficiency is improved, and the consumption of hardware resources is reduced. For the approximate calculation of the mantissa part, Taylor expansion or piecewise linear approximation can also be used, and other hardware acceleration technologies (such as parallel computing and pipeline acceleration) can also be used to optimize performance.

[0070] Step S300: performing bilateral filtering on the logarithmic domain image to determine a bilateral filtered image.

[0071] In simple terms, bilateral filtering can consider the similarity between pixel values ​​while considering spatial distance, and can preserve edge information while smoothing the image. This embodiment can remove noise and details in the image by performing bilateral filtering on the logarithmic domain image, thereby preserving brightness information and reducing contrast loss.

[0072] In one implementation, performing bilateral filtering on the logarithmic domain image to determine the bilateral filtered image includes:

[0073] Step S301: Generate a filter mask, wherein the filter mask is used to determine the pixel value of the central pixel point position of the area covered by the filter mask by weighted summation of each pixel point in the area covered by the filter mask;

[0074] Step S302: Obtain a preset step length, perform bilateral filtering on the logarithmic domain image according to the preset step length and the filter mask, and determine the bilateral filtered image.

[0075] Specifically, a filter mask is first generated, which defines the weight relationship between pixels when filtering an image. When the filter mask is covered on the image, the pixel value of each pixel in the area covered by the filter mask is weighted (i.e., the pixel value of the pixel is multiplied by the weight value corresponding to the pixel) and summed to obtain the pixel value corresponding to the central pixel position in the area covered by the filter mask. Then, a preset step size is obtained, and the filter mask is used to slide on the logarithmic domain image with the preset step size to generate a bilateral filtered image.

[0076] In one implementation, determining the pixel value of the central pixel point position of the filter mask coverage area by weighted summing of the pixels of the filter mask coverage area includes:

[0077] Calculating the difference between the pixel values ​​of each pixel point in the area covered by the filter mask and the central pixel point, and determining the approximate bilateral weight corresponding to each pixel point based on the pixel value difference by using a lookup table;

[0078] Determine a total weighted pixel value and a total weight value based on the pixel value corresponding to each pixel point and each approximate bilateral weight;

[0079] The pixel value of the central pixel point position of the filter mask coverage area is determined according to the total weighted pixel value and the total weight value.

[0080] Specifically, Figure 4As shown, considering that the bilateral approximate weight can reduce the computational complexity while maintaining the advantages of bilateral filtering (such as retaining edge information), this embodiment calculates the difference between the pixel values ​​of each pixel point in the filter mask coverage area and the central pixel point, and selects the approximate bilateral weight (ABW) based on the difference of each pixel value through a lookup table. For example, the weights between pixels with large pixel value differences are lower, and the weights between pixels with similar pixel values ​​are higher. After determining the approximate bilateral weights corresponding to each pixel point, first calculate the weighted pixel value of the pixel point according to the pixel value corresponding to each pixel point and the approximate bilateral weight; then, the weighted pixel values ​​corresponding to each pixel point in the filter mask coverage area and each approximate bilateral weight are summed row by row through an addition tree to obtain the corresponding total weighted pixel value and total weight value respectively; finally, the lookup table is used to perform division calculation based on the total weighted pixel value and the total weight value, and the result of bilateral filtering is output. This embodiment combines bilateral filtering with lookup tables, approximate calculations and other methods to greatly improve the calculation speed and resource efficiency while ensuring processing accuracy. In addition, in addition to the implementation method combining LUT with approximate calculation, other forms of hardware acceleration methods can also be used, such as using FPGA (field programmable gate array) or ASIC (application specific integrated circuit) to further optimize computing speed and resource utilization.

[0081] Step S400: Acquire tone mapping parameters corresponding to the grayscale image, and determine an image base layer based on the tone mapping parameters and the bilateral filtered image.

[0082] In simple terms, for different grayscale images, if you want to achieve a good mapping effect, the required tone mapping parameters are different. This embodiment selects the corresponding tone mapping parameters based on the grayscale image to achieve parameter adaptation, so that the tone mapping effect can be dynamically adjusted to adapt to the brightness and exposure conditions of different images, thereby maintaining the consistency of image quality and detail expression.

[0083] After obtaining the tone mapping parameters corresponding to the grayscale image, the pixel values ​​in the bilateral filtered image are multiplied by the tone mapping parameters to obtain the image base layer. The image base layer retains the low-frequency information of the image, such as the overall brightness and a large range of grayscale changes.

[0084] In one implementation, obtaining tone mapping parameters corresponding to the grayscale image includes:

[0085] Step S401, obtaining a plurality of historical tone mapping data, wherein each of the historical tone mapping data includes a historical gray value image corresponding to a historical RGB image and a historical tone mapping parameter;

[0086] Step S402: performing data fitting on a plurality of the historical tone mapping data to determine a mapping relationship between the historical gray value image and the historical tone mapping parameters;

[0087] Step S403: Determine the tone mapping parameters according to the gray value image and the mapping relationship.

[0088] Specifically, the historical tone mapping data is RGB image data that has been tone mapped. In the historical tone mapping data, the historical tone mapping parameters can generally enable the historical RGB image to maintain a good visual effect after tone mapping. This embodiment calculates the mean of each pixel value in the historical gray value image, and then calculates the mapping relationship between the mean of each pixel value of the item value of the historical gray value image and the historical tone mapping parameters through a data fitting method, and stores the mapping relationship in a lookup table. When it is necessary to obtain the tone mapping parameters corresponding to the gray value image, first calculate the mean of each pixel value in the gray value image, and then find the corresponding tone mapping parameters in the lookup table according to the mean. This embodiment introduces an adaptive calculation strategy in the mapping process, dynamically adjusts the tone mapping parameters according to the exposure characteristics of the input image, and ensures the consistency of image quality and effect under exposure changes.

[0089] Step S500: determining an image detail layer according to the logarithmic domain image and the bilateral filtered image.

[0090] In simple terms, the image detail layer is obtained by calculating the difference between the pixel value of each pixel in the logarithmic domain image and the pixel value of the corresponding position in the bilateral filter image. The image detail layer mainly retains the high-frequency details of the image, such as local contrast and detail information.

[0091] Step S600: Perform tone mapping on the RGB image according to the image base layer and the image detail layer to determine a target RGB image.

[0092] In simple terms, the target RGB image is an image after tone mapping of the RGB image. Since the image base layer and the image detail layer retain the low-frequency information and high-frequency details of the image respectively, the brightness information and details of the graphics can be reasonably retained and enhanced by combining the image base layer and the image detail layer. This embodiment performs tone mapping on the RGB image based on the image base layer and the image detail layer, thereby obtaining a high-quality target RGB image.

[0093] In one implementation, tone mapping is performed on the RGB image according to the image base layer and the image detail layer to determine a target RGB image, including:

[0094] Step S601, determining a tone mapping ratio according to the image base layer and the image detail layer;

[0095] Step S602: performing tone mapping on the RGB image according to the tone mapping ratio;

[0096] Step S603: Correct the tone-mapped RGB image to determine a target RGB image.

[0097] Specifically, the tone mapping ratio is determined according to the image base layer and the image detail layer, including: adding each pixel value in the image base layer with the pixel value at the corresponding position in the image detail layer, performing a natural exponential transform, and determining a first proportional calculation image; performing a natural exponential transform on the image detail layer to determine a second proportional calculation image; and calculating the quotient of the first proportional calculation image and the second proportional calculation image to determine the tone mapping ratio.

[0098] In this embodiment, an intermediate result before tone mapping is obtained by additively fusing the image base layer and the image detail layer, thereby ensuring that the brightness information and details of the image are reasonably preserved and enhanced; a natural exponential transform is performed on the intermediate result and the image detail layer respectively, and the image is restored from the logarithmic domain to the grayscale domain to obtain a first ratio calculated image and a second ratio calculated image, and the tone mapping ratio is obtained by calculating the quotient of the first ratio calculated image and the second ratio calculated image.

[0099] Figure 5 This is the natural exponential transformation calculation module. The natural exponential transformation is also calculated based on single-precision floating-point numbers. In the exponential module, the exponential value of the integer part is stored through a lookup table (LUT), and the exponential value of the mantissa part is calculated through Taylor expansion. This method significantly reduces the hardware resource consumption in the calculation while ensuring a high calculation accuracy.

[0100] After the tone mapping ratio is obtained, the tone mapping of the RGB image is realized by multiplying each pixel value in the RGB image by the tone mapping ratio, and then the RGB image after the tone mapping is corrected so that the brightness value of the image further matches the perception characteristics of the human eye. This embodiment adopts Gamma correction processing, which makes the mapped image more in line with the requirements of the display device and improves the visual effect of the image.

[0101] Based on the above embodiments, the method can support real-time processing of 4K video at 30 frames per second through an optimized pixel-level pipeline architecture. This gives the system a significant advantage in the field of high-resolution video stream processing and can meet the dual requirements of real-time performance and image quality.

[0102] Based on the above embodiments, the present invention also provides a tone mapping device based on floating-point exponential logarithm, such as Figure 6 As shown, the device comprises:

[0103] The preprocessing module 01 is used to obtain an RGB image, preprocess the RGB image, and determine a gray value image;

[0104] The logarithmic domain conversion module 02 is used to perform natural logarithmic transformation on the gray value image to determine a logarithmic domain image;

[0105] A bilateral filtering module 03, used for performing bilateral filtering on the logarithmic domain image to determine a bilateral filtered image;

[0106] An image base layer determination module 04 is used to obtain tone mapping parameters corresponding to the gray value image, and determine the image base layer based on the tone mapping parameters and the bilateral filtered image;

[0107] An image detail layer determination module 05, configured to determine an image detail layer according to the logarithmic domain image and the bilateral filtered image;

[0108] The tone mapping module 06 is used to perform tone mapping on the RGB image according to the image base layer and the image detail layer to determine a target RGB image.

[0109] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be shown as follows: Figure 7 As shown. The terminal includes a processor, a memory, a network interface, and a display screen connected through a system bus. Among them, the processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a tone mapping method based on a floating-point exponential logarithm is implemented. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.

[0110] Those skilled in the art will understand that Figure 7 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0111] In one implementation, one or more programs are stored in a memory of the terminal and are configured to be executed by one or more processors. The one or more programs include instructions for performing a tone mapping method based on floating-point exponential logarithms.

[0112] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0113] In summary, the present invention discloses a tone mapping method, device, terminal and medium based on floating-point exponential logarithm, wherein the method obtains an RGB image, pre-processes the RGB image, and determines a gray value image; performs natural logarithm calculation on the gray value image to determine a log domain image; performs bilateral filtering on the log domain image to determine a bilateral filtered image; obtains tone mapping parameters corresponding to the gray value image, and determines an image base layer based on the tone mapping parameters and the bilateral filtered image; determines an image detail layer according to the log domain image and the bilateral filtered image; and tone maps the RGB image according to the image base layer and the image detail layer to determine a target RGB image. The present invention extracts the base layer and detail layer of an image through logarithmic transformation and bilateral filtering, thereby performing tone mapping based on the base layer and the detail layer, thereby solving the problem that the conversion effect of the prior art is significantly reduced for images with large changes in exposure settings, resulting in inconsistent processing results.

[0114] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A tone mapping method based on floating point exponential logarithm, characterized in that: The method comprises: Acquire an RGB image, preprocess the RGB image, and determine a grayscale value image; Performing a natural logarithm transformation on the grayscale image to determine a logarithmic domain image; Performing bilateral filtering on the logarithmic domain image to determine a bilateral filtered image; Acquire tone mapping parameters corresponding to the grayscale image, and determine an image base layer based on the tone mapping parameters and the bilateral filtered image; Determine an image detail layer according to the logarithmic domain image and the bilateral filtered image; Tone mapping is performed on the RGB image according to the image base layer and the image detail layer to determine a target RGB image.

2. The tone mapping method based on floating point exponential logarithm according to claim 1, characterized in that: Performing a natural logarithmic transformation on the grayscale image to determine a logarithmic domain image includes: Performing a natural logarithm transformation on the grayscale image to convert each grayscale value in the grayscale image into a floating-point natural logarithm; The mantissa of each floating-point natural logarithm is approximately calculated by Taylor series expansion to determine the logarithmic domain image.

3. The tone mapping method based on floating point exponential logarithm according to claim 1, characterized in that: Performing bilateral filtering on the logarithmic domain image to determine a bilateral filtered image includes: Generate a filter mask, wherein the filter mask is used to determine the pixel value of the central pixel point position of the area covered by the filter mask based on weighted summation of each pixel point in the area covered by the filter mask; A preset step length is obtained, and bilateral filtering is performed on the logarithmic domain image according to the preset step length and the filter mask to determine the bilateral filtered image.

4. The tone mapping method based on floating point exponential logarithm according to claim 3, characterized in that: Determining the pixel value of the central pixel point position of the filter mask coverage area by weighted summing of the pixels of the filter mask coverage area includes: Calculating the difference between the pixel values ​​of each pixel point in the area covered by the filter mask and the central pixel point, and determining the approximate bilateral weight corresponding to each pixel point based on the difference in each pixel value by using a lookup table; Determine a total weighted pixel value and a total weight value based on the pixel value corresponding to each pixel point and each of the approximate bilateral weights; The pixel value of the central pixel point position of the filter mask coverage area is determined according to the total weighted pixel value and the total weight value.

5. The tone mapping method based on floating point exponential logarithm according to claim 1, characterized in that: Obtaining tone mapping parameters corresponding to the grayscale image, including: Acquire a plurality of historical tone mapping data, wherein each of the historical tone mapping data comprises a historical gray value image corresponding to a historical RGB image and a historical tone mapping parameter; Performing data fitting on a plurality of the historical tone mapping data to determine a mapping relationship between the historical gray value image and the historical tone mapping parameters; The tone mapping parameters are determined according to the grayscale value image and the mapping relationship.

6. The tone mapping method based on floating point exponential logarithm according to claim 1, characterized in that: Performing tone mapping on the RGB image according to the image base layer and the image detail layer to determine a target RGB image includes: Determining a tone mapping ratio according to the image base layer and the image detail layer; Performing tone mapping on the RGB image according to the tone mapping ratio; Correct the tone-mapped RGB image to determine the target RGB image.

7. The floating point exponential logarithm-based tone mapping method according to claim 6, characterized in that: Determining a tone mapping ratio according to the image base layer and the image detail layer includes: After adding each pixel value in the image base layer to the pixel value at the corresponding position in the image detail layer, a natural exponential transformation is performed to determine a first proportional calculation image; Performing a natural exponential transformation on the image detail layer to determine a second scale calculation image; The tone mapping ratio is determined by calculating a quotient of the first ratio calculation image and the second ratio calculation image.

8. A tone mapping device based on floating point exponential logarithm, characterized in that: The device comprises: A preprocessing module is used to obtain an RGB image, preprocess the RGB image, and determine a gray value image; A logarithmic domain conversion module, used for performing a natural logarithmic transformation on the gray value image to determine a logarithmic domain image; A bilateral filtering module, used for performing bilateral filtering on the logarithmic domain image to determine a bilateral filtered image; An image base layer determination module, configured to obtain tone mapping parameters corresponding to the gray value image, and determine an image base layer based on the tone mapping parameters and the bilateral filtered image; An image detail layer determination module, used to determine an image detail layer according to the logarithmic domain image and the bilateral filtered image; The tone mapping module is used to perform tone mapping on the RGB image according to the image base layer and the image detail layer to determine a target RGB image.

9. A terminal, characterized in that: The terminal includes a memory and one or more processors; the memory stores one or more programs; the program contains instructions for executing the floating-point exponential logarithm-based tone mapping method as described in any one of claims 1-7; and the processor is used to execute the program.

10. A computer-readable storage medium having a plurality of instructions stored thereon, characterized in that: The instructions are suitable for being loaded and executed by a processor to implement the steps of the floating-point exponential logarithm-based tone mapping method described in any one of claims 1 to 7.