Image tone mapping processing method and device, electronic equipment and storage medium
By using adaptive tone mapping curve processing, the problems of image detail loss and low contrast in existing technologies are solved, achieving efficient preservation of image details and improvement of contrast on low dynamic range displays.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2026-03-27
AI Technical Summary
Existing tone mapping techniques often result in loss of image detail and underutilization of display resources, as well as low image contrast, when compressing high dynamic range images to low dynamic range displays.
By determining the inflection points, start points, and end points of the tone mapping curve, and combining the peak brightness of the image and the display device, an adaptive tone mapping curve is generated to precisely control the image brightness distribution, avoid the loss of highlight and shadow details, and make full use of display resources.
It achieves the goal of compressing dynamic range while preserving image details to the maximum extent, improving image contrast, and ensuring full utilization of display resources.
Smart Images

Figure CN121746271A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image tone mapping processing method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of computer graphics technology, the demand for image processing is increasing. Tone mapping technology is particularly important in scenarios where high dynamic range (HDR) images are approximated on media with limited dynamic range. HDR images have a wide brightness range, enabling them to reflect real scenes more meticulously; however, they also have a relatively large data volume and are difficult to display directly on devices with limited dynamic range, such as common cathode ray tube displays, LCD monitors, or projectors.
[0003] Tone mapping technology aims to compress the dynamic range of HDR images below the dynamic range of the output device, enabling HDR images to be adapted for Low Dynamic Range (LDR) displays. Specifically, tone mapping technology significantly reduces contrast to bring scene brightness to a displayable range while preserving as much image detail and color as possible—information crucial for representing the original scene.
[0004] However, while tone mapping technology can theoretically achieve near-perfect display of HDR images on LDR devices, existing techniques often result in a series of changes to the image after tone mapping processing. These include loss of image detail, low image contrast, and underutilization of display resources. Therefore, a better tone mapping technology is urgently needed to ensure that while compressing the dynamic range, the original image details are preserved to the maximum extent, the display device's resources are fully utilized, and image contrast is improved. Summary of the Invention
[0005] Based on this, the purpose of this application is to provide an image tone mapping processing method, apparatus, electronic device, and storage medium, which realizes the compression of the brightness dynamic range, can better preserve the details of the original image, make full use of the display resources of the display device, and improve the image contrast.
[0006] A first aspect of this application provides an image tone mapping processing method, the method comprising the following steps:
[0007] The brightness channel data of the image to be processed, the first peak brightness of the image to be processed, and the second peak brightness of the display device are obtained; wherein, the first peak brightness is the maximum brightness channel value in the image to be processed, and the second peak brightness is the maximum brightness channel value displayed by the display device.
[0008] The inflection point of the tone mapping curve is determined based on the first peak brightness and the second peak brightness.
[0009] The tone mapping curve is determined based on the preset start point, the inflection point, and the preset end point of the tone mapping curve.
[0010] Based on the tone mapping curve, tone mapping is performed on the luminance channel data of the image to be processed to obtain the tone-mapped image of the image to be processed.
[0011] A second aspect of this application provides an image tone mapping processing apparatus, comprising:
[0012] The brightness channel data acquisition module is used to acquire the brightness channel data of the image to be processed, the first peak brightness of the image to be processed, and the second peak brightness of the display device; wherein, the first peak brightness is the maximum brightness channel value in the image to be processed, and the second peak brightness is the maximum brightness channel value displayed by the display device.
[0013] The inflection point determination module is used to determine the inflection point of the tone mapping curve based on the first peak brightness and the second peak brightness.
[0014] The tone mapping curve determination module is used to determine the tone mapping curve based on the preset start point, the inflection point, and the preset end point of the tone mapping curve.
[0015] The tone mapping image acquisition module is used to perform tone mapping on the luminance channel data of the image to be processed according to the tone mapping curve, so as to obtain the tone mapping image of the image to be processed.
[0016] A third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, it controls the device on which the computer-readable storage medium is located to implement the method described in any of the above.
[0017] A fourth aspect of this application provides a computer device including a processor, a memory, and a computer-readable program stored in the memory, wherein the computer-readable program, when executed by the processor, implements the steps of the method as described above.
[0018] The image tone mapping processing method provided in this application determines the inflection point of the tone mapping curve based on a first peak brightness and a second peak brightness. This inflection point is derived from the image content. The tone mapping curve is determined according to a preset start point, a preset end point, and the inflection point of the tone mapping curve. This tone mapping curve is an image content-adaptive tone mapping curve. Using this tone mapping curve to perform tone mapping on the image to be processed allows for adaptive adjustment of image brightness, enabling precise control of the image's brightness distribution, effectively avoiding the loss of detail in highlights and shadows, fully utilizing display resources, and improving image contrast.
[0019] To better understand and implement this application, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0020] Figure 1 A schematic flowchart illustrating the image tone mapping processing method provided in this application embodiment;
[0021] Figure 2 This is a flowchart illustrating step S20 of the image tone mapping processing method provided in the embodiments of this application.
[0022] Figure 3 A schematic block diagram of the image tone mapping processing apparatus provided in the embodiments of this application;
[0023] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. Wherein, when the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.
[0025] It should be understood that the embodiments described below do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0026] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application are also intended to include the plural forms unless the context clearly indicates otherwise. Furthermore, in the description of this application, unless otherwise stated, “a plurality” means two or more. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items, for example, A and / or B, which can represent: A alone, A and B together, and B alone; the character “ / ” generally indicates that the preceding and following objects are in an “or” relationship.
[0027] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, this information should not be limited to these terms, and these terms are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances. Depending on the context, the word "if" as used in this application can be interpreted as "when," "when," or "in response to determination."
[0028] Tone mapping technology significantly reduces contrast to bring scene brightness to a displayable range while preserving image details and colors—essential information for representing the original scene. However, although tone mapping can theoretically achieve near-perfect display of HDR images on LDR devices, current techniques typically result in a series of changes to the image after tone mapping processing.
[0029] Currently, tone mapping uses two standard calculation methods: standard PQ truncation and static mapping. Standard PQ truncation displays the brightness within the display's capabilities, while displaying values outside the range, resulting in overexposed highlights and loss of highlight detail. Static mapping compresses the image content's maximum brightness of 10,000 nits to the display's capabilities, but the actual peak brightness of the content often falls short of 10,000 nits, leading to underutilization of display resources and lower image contrast.
[0030] Therefore, there is an urgent need for a better tone mapping processing technology to ensure that while compressing the dynamic range, the details of the original image are preserved to the maximum extent, making full use of the display resources of the display device and improving the image contrast.
[0031] To address the aforementioned issues, considering that the location of the inflection point of the tone mapping curve affects the overall brightness compression of the image, and that the slope of each part of the tone mapping curve affects the compression of each brightness component of the image—specifically, the slope value of the tone mapping curve at the inflection point affects the image contrast; the slope value of the tone mapping curve at the starting point affects the compression of low-brightness components in the image; and the slope value of the tone mapping curve at the ending point affects the compression of high-brightness components in the image—this application first determines the location of the inflection point of the tone mapping curve, and then determines the slope of each part of the tone mapping curve based on the starting point, inflection point, and ending point. This enables adaptive adjustment of image brightness, precisely controlling the brightness distribution of the image, effectively avoiding the loss of highlight and shadow details, fully utilizing display resources, and improving image contrast.
[0032] Please see Figure 1 This is a flowchart illustrating an image tone mapping processing method provided in one embodiment of this application. The image tone mapping processing method provided in this embodiment includes the following steps:
[0033] S10: Obtain the brightness channel data of the image to be processed, the first peak brightness of the image to be processed, and the second peak brightness of the display device; wherein, the first peak brightness is the maximum brightness channel value in the image to be processed, and the second peak brightness is the maximum brightness channel value displayed by the display device;
[0034] S20: Determine the inflection point of the tone mapping curve based on the first peak brightness and the second peak brightness;
[0035] S30: Determine the tone mapping curve based on the preset start point, the inflection point, and the preset end point of the tone mapping curve.
[0036] S40: Based on the tone mapping curve, perform tone mapping on the luminance channel data of the image to be processed to obtain the tone-mapped image of the image to be processed.
[0037] The image tone mapping processing method provided in this application determines the inflection point of the tone mapping curve based on a first peak brightness and a second peak brightness. This inflection point is derived from the image content. The tone mapping curve is determined according to a preset start point, a preset end point, and the inflection point of the tone mapping curve. This tone mapping curve is an image content-adaptive tone mapping curve. Using this tone mapping curve to perform tone mapping on the image to be processed allows for adaptive adjustment of image brightness, enabling precise control of the image's brightness distribution, effectively avoiding the loss of detail in highlights and shadows, fully utilizing display resources, and improving image contrast.
[0038] The following embodiments of this application use a computer as the execution subject to illustrate the various steps of the image tone mapping processing method.
[0039] For step S10, acquire the brightness channel data of the image to be processed, the first peak brightness of the image to be processed, and the second peak brightness of the display device; wherein, the first peak brightness is the maximum brightness channel value in the image to be processed, and the second peak brightness is the maximum brightness channel value displayed by the display device.
[0040] The image to be processed refers to an image whose brightness dynamic range is greater than that of the display device; therefore, tone mapping is required.
[0041] It's important to note that for a single frame of an image, each pixel typically has three primary color components: red (R), green (G), and blue (B), forming the pixel's RGB color space. In the RGB color space, the display effect of a pixel can be determined by the R, G, and B values. Of course, pixels can also be divided into other primary color components, thus forming other types of color spaces, such as the CMY (cyan, magenta, yellow) color space.
[0042] In addition to the color spaces based on the three primary color components mentioned above, existing technologies also include color spaces composed of luminance and chrominance. Luminance can also be called grayscale value, and chrominance includes hue and saturation. Specifically, these color spaces include the YUV color space, the YCbCr color space (a scaled and offset version of YUV, often used in continuous image processing in films or color spaces in digital photography systems), the Hue, Saturation, Intensity (HSI) color space, and the HSV color space, etc.
[0043] In the YUV color space, the Y channel represents luminance information, and the UV channels represent chrominance information.
[0044] In this embodiment, the image to be processed is RGB data. Through color space conversion, the RGB data of the image can be converted into YUV data, thereby obtaining the Y channel data of the image to be processed in the YUV color space. The image to be processed may also be data in other color spaces, but not RGB data. Through color space conversion, the YUV data of the image to be processed can be obtained, thereby obtaining the luminance channel data of the image to be processed.
[0045] After obtaining the luminance channel data of each pixel in the image to be processed, the luminance channel values of each pixel can be compared to determine the maximum luminance channel value, thus obtaining the first peak brightness. The maximum luminance channel value of the display device is the maximum luminance channel value that the display screen of the display device can display. By obtaining the display screen information of the display device, the second peak brightness can be obtained.
[0046] For step S20, the inflection point of the tone mapping curve is determined based on the first peak brightness and the second peak brightness.
[0047] The inflection point of the tone mapping curve refers to the point on the curve where the slope changes significantly. By appropriately adjusting the position of the inflection point, fine control over image brightness can be achieved.
[0048] In this embodiment, the trajectory of the inflection point of the tone mapping curve can be determined based on the first peak brightness and the second peak brightness. Specifically, the trajectory of the inflection point is a straight line, and the slope of this line can be determined based on the first peak brightness and the second peak brightness. The intercept of this line can be determined based on the second peak brightness.
[0049] In an optional embodiment, please refer to Figure 2 Step S20, including steps S21 to S24, is as follows:
[0050] S21: Subtract the first peak brightness from the second peak brightness to obtain the first difference;
[0051] S22: Multiply the first difference by the preset value to obtain the first product result;
[0052] S23: Subtract the second peak brightness from the first product result to obtain the second difference;
[0053] S24: The second difference is used as the inflection point of the tone mapping curve at the first abscissa and the first ordinate of the first coordinate system; wherein, the first coordinate system is a plane rectangular coordinate system, the abscissa of the first coordinate system represents the brightness of the image before tone mapping, and the ordinate of the first coordinate system represents the brightness of the image after tone mapping.
[0054] In this embodiment, the formula for calculating the inflection point of the tone mapping curve is as follows:
[0055] KS = D max - k(C max - D max)
[0056] Where Cmax represents the first peak brightness, Dmax represents the second peak brightness, k represents the preset value, KS represents the first horizontal coordinate of the inflection point in the first coordinate system, and the first vertical coordinate is the same as the first horizontal coordinate.
[0057] As the value of k changes, the coordinates of the inflection point (KS, KS) will change. The larger the value of k, the larger the proportion of the highlighted part, and the more details will be retained in the tone-mapped image.
[0058] Determining the inflection point of the tone mapping curve based on the first peak brightness and the second peak brightness allows the tone mapping curve generated based on this inflection point to be adapted to the image content of the image to be processed, thereby improving the quality of subsequent tone-mapped image generation.
[0059] For step S30, the tone mapping curve is determined based on the preset start point, the inflection point, and the preset end point of the tone mapping curve.
[0060] The starting point and ending point of the tone mapping curve can be manually set according to actual needs.
[0061] After determining the coordinates of the start point, inflection point, and end point of the tone mapping curve, the coordinates of the start point, inflection point, and end point of the tone mapping curve can be interpolated to obtain a smooth and continuous tone mapping curve.
[0062] In an optional embodiment, the starting point of the preset tone mapping curve is determined based on the minimum brightness channel value in the image to be processed and the minimum brightness channel value displayed by the display device.
[0063] In this embodiment of the application, the starting point of the preset tone mapping curve is (Cmin, Dmin), where Cmin represents the minimum brightness channel value in the image to be processed, and Dmin represents the minimum brightness channel displayed by the display device.
[0064] By determining the starting point of the preset tone mapping curve using the minimum brightness channel value in the image to be processed and the minimum brightness channel value displayed on the display device, the authenticity and reliability of the starting point data can be guaranteed, thereby improving the quality of the tone mapping curve generation.
[0065] In an optional embodiment, the termination point of the preset tone mapping curve is determined based on the maximum luminance channel value in the image to be processed and the maximum luminance channel value displayed by the display device.
[0066] In this embodiment of the application, the preset end point of the tone mapping curve is (Cmax, Dmax), where Cmax represents the maximum brightness channel value in the image to be processed, and Dmax represents the maximum brightness channel displayed by the display device.
[0067] By determining the maximum brightness channel value in the image to be processed and the maximum brightness channel value displayed on the display device, the termination point of the preset tone mapping curve can be guaranteed to be authentic and reliable, thereby improving the quality of tone mapping curve generation.
[0068] In an optional embodiment, step S30 includes step S31, which is as follows:
[0069] S31: Perform Hermit interpolation on the preset start point, inflection point, and end point of the tone mapping curve to obtain the tone mapping curve.
[0070] Hermite interpolation is a special type of interpolation polynomial where, at a given node, the function value of the interpolation polynomial, and its derivatives up to the specified order, are equal to the corresponding order values of the interpolated function.
[0071] In this embodiment of the application, the x-coordinate and y-coordinate of the starting point, the turning point, and the ending point of the preset tone mapping curve are known. The tone mapping curve is obtained by performing tri-point cubic Hermite interpolation on the starting point, the turning point, and the ending point of the tone mapping curve.
[0072] Hermitian interpolation of the start, inflection, and end points of the tone mapping curve can ensure a smooth and continuous tone mapping curve, thus improving the quality of the generated tone mapping curve.
[0073] In an optional embodiment, the tone mapping curve includes a first curve segment, which is the curve segment between the starting point and the inflection point of the tone mapping curve, and the maximum slope of the starting point of the tone mapping curve is the slope between the inflection point and the starting point of the tone mapping curve.
[0074] In this embodiment, the first curve segment corresponds to the low-brightness portion of the image to be processed, and the slope of the starting point is defaulted to 0. To ensure the image is compressed overall, the maximum slope of the starting point is [value missing]. The slope value of the starting point can be adjusted according to the desired degree of compression of the low-brightness part. The larger the slope value, the greater the brightness change of the darkest part. The lower the slope value, the higher the brightness, which is suitable for images with more details in the darkest part and the desired presentation.
[0075] As the coordinates of the inflection point change, the range of values for the slope at the starting point will also change accordingly. By changing the slope value at the starting point, different tone mapping curves can be generated, thereby altering the degree of compression of low-brightness portions in the image.
[0076] In an optional embodiment, the tone mapping curve includes a second curve segment, which is the curve segment between the inflection point of the tone curve and the termination point of the tone mapping curve, and the maximum slope of the termination point of the tone mapping curve is the slope between the termination point and the inflection point of the tone mapping curve.
[0077] In this embodiment, the second curve segment corresponds to the high-brightness portion of the image to be processed, and the slope of the termination point is defaulted to 0. To conform to the human eye's sensitivity to brightness and retain more brightness content, the maximum value is... The slope value of the termination point can be adjusted according to the desired degree of compression of the brightest part. The larger the slope value, the greater the brightness change of the brightest part. The lower the slope value, the higher the brightness, which is suitable for images with a lot of detail in the brightest part and the desired image presentation.
[0078] As the coordinates of the inflection point change, the range of values for the slope at the termination point will also change accordingly. By changing the slope value at the termination point, different tone mapping curves can be generated, thereby altering the degree of compression of the bright areas in the image.
[0079] In an optional embodiment, the minimum slope of the tone mapping curve at the inflection point of the tone mapping curve is 1.
[0080] In this embodiment, the slope of the inflection point is set to 1 by default. The slope of the inflection point is used to adjust the compression state near the inflection point. The larger the slope value, the greater the contrast of the overall image. However, an excessively large value will result in more obvious noise near the inflection point.
[0081] The contrast of the overall image can be dynamically adjusted by changing the slope of the inflection point of the tone mapping curve.
[0082] For step S40, tone mapping is performed on the luminance channel data of the image to be processed according to the tone mapping curve to obtain the tone-mapped image of the image to be processed.
[0083] In this embodiment of the application, after obtaining the tone mapping curve, the luminance channel data of each pixel in the image to be processed is input to the tone mapping curve, and the tone mapping curve outputs the compressed luminance channel data to obtain the tone-mapped image.
[0084] The following are embodiments of the apparatus described in this application, which can be used to execute the methods described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the methods described in the embodiments of this application.
[0085] Please see Figure 3 This illustration shows a schematic diagram of the image tone mapping processing apparatus provided in an embodiment of this application. The image tone mapping processing apparatus 5 provided in this embodiment includes:
[0086] The brightness channel data acquisition module 51 is used to acquire the brightness channel data of the image to be processed, the first peak brightness of the image to be processed, and the second peak brightness of the display device; wherein, the first peak brightness is the maximum brightness channel value in the image to be processed, and the second peak brightness is the maximum brightness channel value displayed by the display device.
[0087] The inflection point determination module 52 is used to determine the inflection point of the tone mapping curve based on the first peak brightness and the second peak brightness.
[0088] The tone mapping curve determination module 53 is used to determine the tone mapping curve based on the preset start point, the inflection point, and the preset end point of the tone mapping curve.
[0089] The tone mapping image acquisition module 54 is used to perform tone mapping on the luminance channel data of the image to be processed according to the tone mapping curve, so as to obtain the tone mapping image of the image to be processed.
[0090] The image tone mapping processing method provided in this application determines the inflection point of the tone mapping curve based on a first peak brightness and a second peak brightness. This inflection point is derived from the image content. The tone mapping curve is determined according to a preset start point, a preset end point, and the inflection point of the tone mapping curve. This tone mapping curve is an image content-adaptive tone mapping curve. Using this tone mapping curve to perform tone mapping on the image to be processed allows for adaptive adjustment of image brightness, enabling precise control of the image's brightness distribution, effectively avoiding the loss of detail in highlights and shadows, fully utilizing display resources, and improving image contrast.
[0091] The following are embodiments of the device described in this application, which can be used to execute the methods described in the embodiments of this application. For details not disclosed in the embodiments of the device described in this application, please refer to the methods described in the embodiments of this application.
[0092] Please see Figure 4 This application also provides an electronic device 300, which may specifically be a computer, mobile phone, tablet computer, image tone mapping processing device, etc. In an exemplary embodiment of this application, the electronic device 300 is an image tone mapping processing device, which may include: at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, user interface 304, and at least one communication bus 305.
[0093] The user interface 304 is primarily used to provide an input interface for the user and to acquire user input data. Optionally, the user interface may also include a standard wired interface or a wireless interface.
[0094] The network interface 303 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0095] The communication bus 305 is used to enable communication between these components.
[0096] The processor 301 may include one or more processing cores. The processor connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory, and by calling data stored in memory. Optionally, the processor may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.
[0097] The memory 302 may include random access memory (RAM) or read-only memory. Optionally, the memory may include a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. The memory may also optionally be at least one storage device located remotely from the aforementioned processor. Figure 4 As shown, a memory, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and operating applications.
[0098] The processor can be used to call the application program storing the image tone mapping processing method in the memory, and specifically execute the method steps of the above embodiment. For the specific execution process, please refer to the detailed description shown in the embodiment, which will not be repeated here.
[0099] This application also provides a computer-readable storage medium storing a computer program thereon, the instructions of which are adapted to be loaded by a processor and executed by the method steps of the embodiments shown above. For details of the execution process, please refer to the specific descriptions shown in the embodiments, which will not be repeated here. The device containing the storage medium can be an electronic device such as a personal computer, laptop computer, smartphone, or tablet computer.
[0100] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0101] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0102] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function selected in one or more boxes.
[0103] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function selected in one or more boxes.
[0104] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0105] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0106] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape storage, disk storage, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0107] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0108] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. An image tone mapping processing method, characterized in that, The method includes the following steps: The brightness channel data of the image to be processed, the first peak brightness of the image to be processed, and the second peak brightness of the display device are obtained; wherein, the first peak brightness is the maximum brightness channel value in the image to be processed, and the second peak brightness is the maximum brightness channel value displayed by the display device. The inflection point of the tone mapping curve is determined based on the first peak brightness and the second peak brightness. The tone mapping curve is determined based on the preset start point, the inflection point, and the preset end point of the tone mapping curve. Based on the tone mapping curve, tone mapping is performed on the luminance channel data of the image to be processed to obtain the tone-mapped image of the image to be processed.
2. The image tone mapping processing method according to claim 1, characterized in that: The step of determining the inflection point of the tone mapping curve based on the first peak brightness and the second peak brightness includes: Subtract the first peak brightness from the second peak brightness to obtain the first difference; Multiply the first difference by a preset value to obtain the first product result; Subtract the second peak brightness from the first product result to obtain the second difference; The second difference is used as the inflection point of the tone mapping curve, and the first horizontal and first vertical coordinates are used in the first coordinate system. The first coordinate system is a Cartesian coordinate system, where the horizontal coordinate of the first coordinate system represents the image brightness before tone mapping, and the vertical coordinate of the first coordinate system represents the image brightness after tone mapping.
3. The image tone mapping processing method according to claim 1, characterized in that: The step of determining the tone mapping curve based on the preset start point, the inflection point, and the preset end point of the tone mapping curve includes: The tone mapping curve is obtained by Hermit interpolation of the preset start point, the inflection point, and the preset end point of the tone mapping curve.
4. The image tone mapping processing method according to claim 3, characterized in that: The tone mapping curve includes a first curve segment, which is the curve segment between the starting point and the turning point of the tone mapping curve. The maximum slope of the starting point of the tone mapping curve is the slope between the turning point and the starting point of the tone mapping curve.
5. The image tone mapping processing method according to claim 3, characterized in that: The tone mapping curve includes a second curve segment, which is the curve segment between the inflection point of the tone curve and the termination point of the tone mapping curve. The maximum slope of the termination point of the tone mapping curve is the slope between the termination point and the inflection point of the tone mapping curve.
6. The image tone mapping processing method according to claim 3, characterized in that: The minimum slope of the tone mapping curve at the inflection point of the tone mapping curve is 1.
7. The image tone mapping processing method according to any one of claims 1 to 6, characterized in that: The starting point of the preset tone mapping curve is determined based on the minimum brightness channel value in the image to be processed and the minimum brightness channel value displayed by the display device.
8. The image tone mapping processing method according to any one of claims 1 to 6, characterized in that: The termination point of the preset tone mapping curve is determined based on the maximum brightness channel value in the image to be processed and the maximum brightness channel value displayed by the display device.
9. An image tone mapping processing apparatus, characterized in that, include: A brightness channel data acquisition module is used to acquire brightness channel data of an image to be processed, a first peak brightness of the image to be processed, and a second peak brightness of a display device; wherein, the first peak brightness is the maximum brightness channel value in the image to be processed, and the second peak brightness is the maximum brightness channel value displayed by the display device; The inflection point determination module is used to determine the inflection point of the tone mapping curve based on the first peak brightness and the second peak brightness. The tone mapping curve determination module is used to determine the tone mapping curve based on the preset start point, the inflection point, and the preset end point of the tone mapping curve. The tone mapping image acquisition module is used to perform tone mapping on the luminance channel data of the image to be processed according to the tone mapping curve, so as to obtain the tone mapping image of the image to be processed.
10. A computer-readable storage medium, characterized in that, It stores a computer program thereon, which, when executed, controls the device containing the computer-readable storage medium to implement the method as described in any one of claims 1-8.
11. An electronic device, characterized in that, The method includes a processor, a memory, and a computer-readable program stored in the memory, which, when executed by the processor, implements the steps of the method as described in any one of claims 1-8.