Image tone mapping method, device, equipment and storage medium
By extracting brightness and hue information from images and using a preset mapping curve to dynamically map only the brightness, the problem of non-uniform color scaling in the RGB color system of the ACES tone mapping algorithm is solved, achieving more accurate color conversion.
Patent Information
- Application Number
- CN202111656306.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The ACES tone mapping algorithm causes unequal scaling of the three primary colors in the RGB color system, resulting in color cast and increased saturation in normal and low brightness areas, while high brightness areas appear whiter and have reduced saturation, thus losing color information.
Brightness and hue information are extracted from the target image. The brightness information is mapped to a specified dynamic range based on a preset mapping curve. The mapped image is then generated by combining the hue information, thus avoiding high dynamic range mapping of the overall color information.
It reduces color cast in normal and low-brightness areas and white cast in high-brightness areas, reduces the loss of color information, and improves the accuracy of tone mapping.
Smart Images

Figure CN114549667B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of games, and in particular to a tone mapping method and device for images, an image processing apparatus, and a storage medium. BACKGROUND
[0002] In games or other real-time rendering, as in film and photography, there is a need for mapping high dynamic range images to display device color space, because the color information range of the image is often greater than the color space of the display device. Such mapping is called tone mapping. The most commonly used tone mapping algorithm in the game industry is the ACES color correction curve based on the ACES (Academy Color Encoding System) standard, which is used by default in some game engines such as Unreal Engine and Messiah.
[0003] The target ACES mapping curve is a good solution and is widely used, but in the RGB color system, the color comes from different proportion differences of R, G and B, which causes unequal scaling of the three primary colors, resulting in two disadvantages: serious color deviation and significantly high saturation in normal and low brightness areas; and white deviation and reduced saturation in high brightness areas, resulting in loss of color information and inaccurate color conversion of tone mapping. SUMMARY
[0004] The main purpose of the present application is to solve the problem of inaccurate color conversion of ACES tone mapping.
[0005] The first aspect of the present application provides a tone mapping method for images, comprising: extracting luminance information and hue information from a target image; mapping the luminance information to a specified dynamic range based on a preset mapping curve to obtain mapped luminance information; and obtaining a mapped target image based on the mapped luminance information and the hue information.
[0006] Optionally, in the first implementation manner of the first aspect of the present application, the extracting luminance information and hue information from the target image comprises: obtaining RGB data corresponding to the target image, and converting the RGB data into a corresponding HSV color system, wherein the HSV color system comprises a hue component, a saturation component and a luminance component; taking the luminance component as the luminance information of the target image, and taking the hue component and the saturation component as the hue information of the target image.
[0007] Optionally, in a second implementation form of the first aspect of the present application, the mapping of the luminance information to the designated dynamic range based on the preset mapping curve comprises: mapping the luminance component corresponding to the luminance information based on the preset mapping curve to obtain a mapped luminance component; and converting the mapped luminance component into corresponding RGB data to obtain the luminance information in the designated dynamic range after mapping.
[0008] Optionally, in a third implementation form of the first aspect of the present application, the extracting of the luminance information and the hue information from the target image comprises: obtaining RGB data corresponding to the target image, and calculating luminance information corresponding to the RGB data according to a preset visual simulation algorithm and a set RGB weight coefficient; and calculating hue information corresponding to the RGB data according to the luminance information and the RGB data.
[0009] Optionally, in a fourth implementation form of the first aspect of the present application, the RGB weight coefficient is set as an RGB geometric progression value, and the calculation of the luminance information corresponding to the RGB data according to the preset visual simulation algorithm and the set RGB weight coefficient comprises: performing RGB geometric progression weight calculation on the RGB data according to the RGB geometric progression value by using the preset visual simulation algorithm to obtain the luminance information corresponding to the RGB data.
[0010] Optionally, in a fifth implementation form of the first aspect of the present application, the obtaining of a mapped target image based on the mapped luminance information and the hue information comprises: converting the hue information into corresponding expression information of luminance information and RGB data, merging the mapped luminance information and the expression information to obtain mapped RGB data, generating a mapped target image by using the mapped RGB data, or merging the mapped luminance information and the hue information to obtain the mapped RGB data, and generating a mapped target image by using the mapped RGB data.
[0011] Optionally, in a sixth implementation form of the first aspect of the present application, after the extracting of the luminance information and the hue information from the target image, the method further comprises: comparing the luminance information with a preset luminance threshold, and determining abnormal luminance data in the luminance information according to a comparison result; and performing interpolation transition processing on the abnormal luminance data and updating the abnormal luminance data to the luminance information.
[0012] The second aspect of the present application provides a tone mapping device of an image, comprising: an extraction module configured to extract luminance information and tone information from a target image; a mapping module configured to map the luminance information into a specified dynamic range based on a preset mapping curve to obtain mapped luminance information; and a generation module configured to generate a mapped target image based on the mapped luminance information and the tone information.
[0013] Optionally, in the first implementation manner of the second aspect of the present application, the extraction module comprises a component conversion unit configured to: acquire RGB data corresponding to the target image, and convert the RGB data into corresponding HSV color system, wherein the HSV color system comprises hue component, saturation component and luminance component; take the luminance component as the luminance information of the target image, and take the hue component and the saturation component as the tone information of the target image.
[0014] Optionally, in the second implementation manner of the second aspect of the present application, the mapping module comprises: a component mapping unit configured to map the luminance component corresponding to the luminance information based on the preset mapping curve to obtain mapped luminance component; and a component conversion unit configured to convert the mapped luminance component into corresponding RGB data to obtain luminance information in the mapped specified dynamic range.
[0015] Optionally, in the third implementation manner of the second aspect of the present application, the extraction module further comprises a visual conversion unit configured to: acquire RGB data corresponding to the target image, and calculate luminance information corresponding to the RGB data according to a preset visual simulation algorithm and set RGB weight coefficient; and calculate tone information corresponding to the RGB data according to the luminance information and the RGB data.
[0016] Optionally, in the fourth implementation manner of the second aspect of the present application, the RGB weight coefficient is set as RGB equal ratio value, and the visual conversion unit is further configured to: perform RGB equal ratio weight calculation on the RGB data according to the RGB equal ratio value by using the preset visual simulation algorithm to obtain the luminance information corresponding to the RGB data.
[0017] Optionally, in the fifth implementation manner of the second aspect of the present application, the generation module comprises: a first merging unit configured to convert the tone information into corresponding luminance information and expression information of RGB data, merge the mapped luminance information and the expression information to obtain mapped RGB data, and generate a mapped target image by using the mapped RGB data; and a second merging unit configured to merge the mapped luminance information and the tone information to obtain mapped RGB data, and generate a mapped target image by using the mapped RGB data.
[0018] Optionally, in a sixth implementation form of the second aspect of the present application, the tone mapping device of the image further comprises an interpolation filtering module, configured to: compare the luminance information with a preset luminance threshold, and determine abnormal luminance data in the luminance information according to a comparison result; and perform interpolation transition processing on the abnormal luminance data and update the abnormal luminance data to the luminance information.
[0019] The third aspect of the present application provides a tone mapping device of an image, comprising: a memory and at least one processor, the memory storing instructions; and the at least one processor invoking the instructions in the memory to enable the tone mapping device of the image to perform the above-mentioned tone mapping method of the image.
[0020] The fourth aspect of the present application provides a computer readable storage medium, the computer readable storage medium storing instructions, when the instructions are run on a computer, enabling the computer to perform the above-mentioned tone mapping method of the image.
[0021] In the technical solution provided by the present application, the luminance in the target image is mapped in a high dynamic range, such as extracting and separating the luminance information and the tone information in the color information of the target image, without mapping the overall color information in a high dynamic range, but mapping the luminance information, and then updating the luminance information to the color information in combination with the tone information to obtain the mapped color information, which is used to generate a high dynamic range luminance mapping image. Only the luminance is mapped, which prevents the color phase from being biased, reduces the degree of color deviation and increases the saturation degree in the normal and low luminance regions, and reduces the degree of white deviation and decreases the saturation degree in the high luminance region, thereby reducing the loss of color information. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 FIG. 1 is a schematic diagram of a first embodiment of the tone mapping method of the image in the present application;
[0023] Figure 2 FIG. 2 is a schematic diagram of a second embodiment of the tone mapping method of the image in the present application;
[0024] Figure 3 FIG. 3 is a schematic diagram of a third embodiment of the tone mapping method of the image in the present application;
[0025] Figure 4 FIG. 4 is a schematic diagram of an embodiment of the tone mapping device of the image in the present application;
[0026] Figure 5 FIG. 5 is a schematic diagram of another embodiment of the tone mapping device of the image in the present application;
[0027] Figure 6An embodiment of the image tone mapping device in the embodiments of the present application. DETAILED DESCRIPTION
[0028] The embodiments of the present application provide an image tone mapping method, device, equipment and storage medium, brightness information and tone information are extracted from a target image; the brightness information is mapped into a specified dynamic range based on a preset mapping curve to obtain mapped brightness information; and a mapped target image is obtained based on the mapped brightness information and the tone information. In the mapping of the high dynamic range of the image, the embodiments of the present application reduce the degree of color deviation and high saturation in the normal and low brightness area, and reduce the degree of white deviation and low saturation in the high brightness area, thereby reducing the loss of color information.
[0029] The terms "first", "second", "third", "fourth" and the like in the description, claims, as well as in the above drawings of the present application, if any, are intended to distinguish between similar objects and not necessarily in an ordinal sense, it is to be understood that the use of the terms so used herein is merely intended to distinguish the various embodiments from each other, and equivalent changes and modifications can be introduced therein by one skilled in the art to which the present application pertains without departing from the spirit or scope of the present application. In addition, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that comprises a list of steps or units is not necessarily limited to those steps or units clearly recited, but can include other steps or units that are not expressly recited or inherent to such processes, methods, products or apparatus.
[0030] For the sake of understanding, the specific flow of the embodiments of the present application is described below, please refer to Figure 1 The first embodiment of the image tone mapping method in the embodiments of the present application comprises:
[0031] 101. Extracting brightness information and tone information from a target image;
[0032] It can be understood that the execution subject of the present application can be an image tone mapping device, and can also be a terminal or a server, and the specific execution subject is not limited herein. The embodiments of the present application take the server as the execution subject for example.
[0033] In this embodiment, when the target image is subjected to tone mapping, its color information can be obtained and represented by hexadecimal (#RRGGBB), RGB data or HSV (Hue, Saturation, Value) color system. By converting the different representation of the color information of the target image, the luminance information and the tone information can be extracted, or the luminance information and the tone information can be extracted by converting the different representation of the color information. Specifically, in the HSV color system, the V value can be directly extracted as the corresponding luminance information, and the H value and the S value are the corresponding tone information. For example, in the RGB data, the luminance information and the tone information can be calculated according to the corresponding formula.
[0034] 102. mapping the luminance information to a specified dynamic range based on a preset mapping curve to obtain mapped luminance information;
[0035] In this embodiment, the luminance information is mapped to a high dynamic range by using a mapping curve, specifically a high dynamic range tone mapping curve. Compared with the traditional high dynamic range tone mapping, the two processes are the same, and the ACES mapping curve is also used. The difference is that the input parameter is converted from color information to luminance information, the ACES mapping curve is applied to the high dynamic range luminance mapping by using the luminance information, and other data in the luminance information remain unchanged, such as saturation, hue, or tone, so that the mapped luminance information is obtained.
[0036] Specifically, in this embodiment, the luminance information can be replaced by the color information for high dynamic range luminance mapping. Further optimization can be performed on at least one item, such as the extraction method of the luminance information for mapping, the three-color proportion adjustment of the RGB data extraction, the mapping algorithm simplification, the edge transition of the high-contrast partition of the luminance, and the like, so that the high dynamic range mapping effect of the luminance information is better.
[0037] 103. obtaining a mapped target image based on the mapped luminance information and the tone information.
[0038] In this embodiment, after the luminance information is subjected to high dynamic range mapping, the generated mapped luminance information is combined with the tone information to obtain corrected color information, which can be used to generate a high dynamic range luminance mapped target image. When the color information range of the target image is greater than the color space of the display device, the target image is mapped to an image that can be displayed in the device color space. In subsequent real-time rendering of the image, such as game map or other images, higher accuracy mapping conversion is achieved.
[0039] In the embodiment of the present application, by performing high dynamic range mapping on the brightness in the target image, such as extracting and separating the brightness information and the hue information in the color information of the target image, the high dynamic range mapping is not performed on the whole color information, but the brightness information is mapped, and then the color information is updated by combining the hue information to obtain the mapped color information, which is used to generate a high dynamic range brightness mapping image. Only the brightness is mapped, which prevents the color phase from being biased, reduces the degree of color deviation and saturation in the normal and low brightness area, and reduces the degree of white deviation and saturation in the high brightness area, thereby reducing the loss of color information.
[0040] Please refer to Figure 2 The second embodiment of the image hue mapping method in the embodiment of the present application comprises:
[0041] 201, acquiring RGB data corresponding to the target image, and converting the RGB data into corresponding HSV color system, wherein the HSV color system comprises a hue component, a saturation component and a brightness component;
[0042] 202, taking the brightness component as the brightness information of the target image, and taking the hue component and the saturation component as the hue information of the target image;
[0043] In the embodiment, for the extraction of the brightness information and the hue information in the target image, one execution scheme is to split the RGB data into a preset HSV color system, wherein the color components in the HSV color system at least include a brightness component as the brightness information, and a hue component and a saturation component as the hue information, for subsequent high dynamic range mapping according to a mapping curve, and other color components are not specifically limited here.
[0044] In one embodiment, RGB data in RGB color format can be acquired, and then the RGB color is converted into an HSV color system including a hue (H value), a saturation (S value) and a brightness (V value) three color components. The brightness component V value in the HSV is applied to the ACES color correction curve for brightness mapping, so as to realize the brightness mapping of the RGB data. When the RGB data in RGB color format is converted into the HSV color system, a function RGBToHSV() can be used for conversion.
[0045] 203, based on a preset mapping curve, mapping the brightness component corresponding to the brightness information to obtain a mapped brightness component;
[0046] 204, converting the mapped brightness component into corresponding RGB data to obtain brightness information in a specified dynamic range after mapping;
[0047] In this embodiment, the luminance component in the HSV color system is mapped according to a preset mapping curve, which can be represented as a mapping function including multiple curve parameters. The input luminance component is calculated according to the mapping function to obtain the mapped luminance component. After implementing the high dynamic range mapping of the luminance component in the HSV color system, the mapped luminance component is converted into luminance information in the RGB data format, so as to obtain the luminance information in the RGB data format after luminance mapping. When converting the color system HSV into the RGB data, the function HSVToRGB() can be used for conversion.
[0048] When the HSV color system is used to implement the high dynamic range mapping of the luminance information in the RGB data format, the following process can be performed:
[0049] float3 HSVToRGB(float3 c)
[0050] {
[0051] float4 K = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
[0052] float3 p = abs(frac(c.xxx + K.xyz)*6.0 - K.www);
[0053] return c.z * lerp(K.xxx, saturate(p - K.xxx), c.y);
[0054] }
[0055] float3 RGBToHSV(float3 c)
[0056] {
[0057] float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
[0058] float4 p = lerp(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g));
[0059] float4 q = lerp(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r));
[0060] float d = q.x - min(q.w, q.y);
[0061] float e = 1.0e-10;
[0062] return float3(abs(q.z+(q.w-q.y) / (6.0*d+e)),d / (q.x+e),q.x);
[0063] Wherein, the luminance component is mapped in high dynamic range by the formula "q.z+(q.w-q.y) / (6.0*d+e)),d / (q.x+e)".
[0064] 205、Based on the mapped luminance information and the tone information, a mapped target image is obtained.
[0065] Referring to Figure 3 , the third embodiment of the image tone mapping method in the embodiment of the application comprises:
[0066] 301, obtaining the RGB data corresponding to the target image, and using a preset visual simulation algorithm to calculate the luminance information corresponding to the RGB data according to the set RGB weight coefficient;
[0067] 302, calculating the tone information corresponding to the RGB data according to the luminance information and the RGB data;
[0068] In the embodiment, the previous scheme is provided to separate the luminance component in the RGB data through the HSV color system, so as to realize the high dynamic range mapping of the luminance information, but the scheme will generate a large amount of calculation overhead in the process of mutual conversion of the HSV color system and the color space of the RGB data; and in some high-light areas, it will restore some inaccurate colors. Therefore, another scheme is provided herein, that is, the visual simulation algorithm is applied to extract the luminance information in the RGB data to perform the luminance mapping of the RGB data.
[0069] Specifically, the human eye luminance formula can be used as the visual simulation algorithm to extract the luminance information and the tone information in the RGB data, and the specific extraction process is as follows:
[0070]
[0071]
[0072] Wherein, x is the RGB data, l is the luminance information extracted from the RGB data, t is the tone information extracted from the RGB data, this type of visual simulation algorithm is usually obtained based on psychology, W R , W G and W Bare determined according to the sensitivity of the human eye to the R, G, and B three primary colors, wherein, W R , W G , and W B may be set to 0.3, 0.6, and 0.1 respectively, and preferably set to 0.22, 0.707, and 0.071.
[0073] In this embodiment, the original setting parameters of W R , W G , and W B in the visual simulation algorithm are applied, and since the original setting parameters are obtained based on the identification of the human eye to the brightness information, color deviation problems are prone to occur, which can be optimized by adjusting the RGB weight coefficients, including: setting the RGB weight coefficients as RGB equi-ratio values; using a preset visual simulation algorithm to perform RGB equi-ratio weight calculation on the RGB data according to the RGB equi-ratio values, to obtain the brightness information corresponding to the RGB data.
[0074] Here, RGB three colors can be processed in equi-ratio to obtain better mapping effect, that is, W R , W G , and W B may be set to 1 / 3 respectively, corresponding to the brightness information l = dot(l, float3(0.333f, 0.333f, 0.333f)), where f is R, G, and B in turn.
[0075] 303, comparing the brightness information with a preset brightness threshold value, and determining abnormal brightness data in the brightness information according to the comparison result;
[0076] 304, performing interpolation transition processing on the abnormal brightness data and updating to the brightness information;
[0077] In this embodiment, color errors may exist in some high-light areas when performing high dynamic range mapping on the brightness information. Therefore, when performing high dynamic range mapping on the brightness information, a brightness threshold value can be further set, and some areas with brightness exceeding the brightness threshold value are divided into abnormal brightness data in brightness mapping, and then the abnormal brightness data is subjected to interpolation transition processing, and the ACES color correction curve of the RGB data is applied to the area corresponding to the abnormal brightness data to adjust the abnormal brightness data, and subsequent brightness mapping is performed on the basis of the adjustment. Preferably, when performing interpolation transition processing on the abnormal brightness data, the related processing function is l = lerp(l, x, saturate(x * 0.0803)).
[0078] 305, mapping the brightness information into a specified dynamic range based on a preset mapping curve to obtain mapped brightness information;
[0079] 306、combine the mapped luminance information and the tone information to obtain mapped RGB data, and generate a mapped target image using the mapped RGB data.
[0080] In this embodiment, after the luminance information in the RGB data is mapped in a high dynamic range using the tone mapping algorithm, the mapped luminance information and the tone information can be directly combined to generate a mapped target image. Specifically, in combination with the high dynamic range tone mapping of the luminance information and the subsequent combination with the tone information, the following algorithm can be used:
[0081]
[0082] wherein x out are curve parameters of the ACES mapping curve.
[0083] Further, in order to further reduce the calculation amount of the luminance information after mapping and generating the mapped RGB data, the algorithm of the aforementioned ACES(x out ) can be simplified, and the specific implementation is as follows:
[0084] 1) convert the tone information into corresponding luminance information and expression information of the RGB data, and combine the mapped luminance information and the expression information to obtain mapped RGB data;
[0085] 2) generate a mapped target image using the mapped RGB data.
[0086] Specifically, according to the related information of t=x / I, the expression information of x / I can be used to replace t to obtain the following algorithm:
[0087]
[0088] In addition, a best embodiment of tone mapping of an image is provided as follows:
[0089] float3 TJiaACES(float3 x)
[0090] {
[0091] float a=2.51f;
[0092] float b=0.03f;
[0093] float c=2.43f;
[0094] float d=0.59f;
[0095] float e = 0.14f;
[0096] float3 l = dot(x, float3(0.333f, 0.333f, 0.333f));
[0097] return saturate((x * (a * l + b)) / (l * (c * l + d) + e));
[0098] }
[0099] Wherein, the brightness information is mapped in high dynamic range by the equation "(x*(a*l+b)) / (l*(c*l+d)+e)".
[0100] The image tone mapping method in the embodiment of the present application is described above, and the image tone mapping device in the embodiment of the present application is described below, please refer to Figure 4 , the image tone mapping device in the embodiment of the present application includes:
[0101] The extraction module 401 is configured to extract brightness information and tone information from a target image.
[0102] The mapping module 402 is configured to map the brightness information into a specified dynamic range based on a preset mapping curve to obtain mapped brightness information.
[0103] The generation module 403 is configured to obtain a mapped target image based on the mapped brightness information and the tone information.
[0104] In the embodiment of the present application, the brightness in the target image is mapped in high dynamic range, such as extracting and separating the brightness information and the tone information in the color information of the target image, without mapping the whole color information in high dynamic range, but mapping the brightness information in brightness, and then updating to the color information combined with the tone information to obtain the mapped color information, so as to generate a high dynamic range brightness mapping image, only the brightness is mapped, the color phase is prevented from being biased, the degree of color deviation and high saturation in normal and low brightness areas is reduced, and the degree of white deviation and low saturation in high brightness areas is reduced, so as to reduce the loss of color information.
[0105] Please refer to Figure 5 , another embodiment of the image tone mapping device in the embodiment of the present application includes:
[0106] The extraction module 401 is configured to extract brightness information and tone information from a target image.
[0107] The mapping module 402 is configured to map the luminance information into a designated dynamic range based on a preset mapping curve, to obtain mapped luminance information.
[0108] The generating module 403 is configured to generate a mapped target image based on the mapped luminance information and the hue information.
[0109] Specifically, the extraction module 401 includes a component conversion unit 4011 configured to:
[0110] obtain RGB data corresponding to the target image, and convert the RGB data into corresponding HSV color system, wherein the HSV color system includes hue component, saturation component and luminance component;
[0111] take the luminance component as the luminance information of the target image, and take the hue component and the saturation component as the hue information of the target image.
[0112] Specifically, the mapping module 402 includes:
[0113] The component mapping unit 4021 is configured to map the luminance component corresponding to the luminance information based on a preset mapping curve, to obtain a mapped luminance component.
[0114] The component conversion unit 4022 is configured to convert the mapped luminance component into corresponding RGB data, to obtain luminance information in a designated dynamic range.
[0115] Specifically, the extraction module 401 further includes a visual conversion unit 4012 configured to:
[0116] obtain RGB data corresponding to the target image, and calculate luminance information corresponding to the RGB data according to a preset visual simulation algorithm and set RGB weight coefficients;
[0117] calculate hue information corresponding to the RGB data according to the luminance information and the RGB data.
[0118] Specifically, the RGB weight coefficients are set as RGB equal ratio values, and the visual conversion unit 4012 is further configured to:
[0119] perform RGB equal ratio weight calculation on the RGB data according to the RGB equal ratio values by using the preset visual simulation algorithm, to obtain the luminance information corresponding to the RGB data.
[0120] Specifically, the generating module 403 includes:
[0121] The first merging unit 4031 is configured to convert the tone information into corresponding color information and expression information of RGB data, and merge the mapped luminance information and the expression information to obtain mapped RGB data; and generate a mapped target image by using the mapped RGB data.
[0122] The second merging unit 4032 is configured to merge the mapped luminance information and the tone information to obtain mapped RGB data, and generate a mapped target image by using the mapped RGB data.
[0123] Specifically, the image tone mapping device further comprises an interpolation filtering module 404 configured to:
[0124] contrast the luminance information with a preset luminance threshold, and determine abnormal luminance data in the luminance information according to a result of the contrast;
[0125] perform interpolation transition processing on the abnormal luminance data and update the abnormal luminance data to the luminance information.
[0126] The above Figure 4 and Figure 5 The image tone mapping device in the embodiment of the present application is described in detail from the perspective of a modular functional entity, and the image tone mapping device in the embodiment of the present application is described in detail from the perspective of hardware processing.
[0127] Figure 6 is a structural schematic diagram of an image tone mapping device provided by the embodiment of the present application. The image tone mapping device 600 can have great differences due to different configurations or performances, and can comprise one or more processors (central processing units, CPUs) 610 (for example, one or more processors) and a memory 620, one or more storage media 630 (for example, one or more mass storage devices) for storing an application program 633 or data 632. The memory 620 and the storage media 630 can be temporary storage or persistent storage. The program stored in the storage medium 630 can comprise one or more modules (not shown in the figure), and each module can comprise a series of instruction operations in the image tone mapping device 600. Furthermore, the processor 610 can be configured to communicate with the storage medium 630, and execute the series of instruction operations in the storage medium 630 on the image tone mapping device 600.
[0128] The image tone mapping device 600 can also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input / output interfaces 660, and / or one or more operating systems 631, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that, Figure 6 The illustrated image tone mapping device architecture is not meant to imply architectural limitations but does reflect a more typical architecture of an image tone mapping device. The image tone mapping device can include more or fewer of the illustrated components, or combine certain components, or have a different arrangement of the components.
[0129] The present application also provides an image tone mapping device, the computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor to cause the processor to perform the steps of the image tone mapping method in the above embodiments.
[0130] The present application also provides a computer readable storage medium, which can be a non-volatile computer readable storage medium or a volatile computer readable storage medium, the computer readable storage medium storing instructions, the instructions being executed on a computer to cause the computer to perform the steps of the image tone mapping method.
[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0132] The integrated unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0133] The above-described embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalent replacements; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of tone mapping an image, characterized by, The tone mapping method of the image comprises: extracting luminance information and tone information from a target image; mapping the luminance information into a specified dynamic range based on a preset mapping curve to obtain mapped luminance information; obtaining a mapped target image based on the mapped luminance information and the tone information; the extracting luminance information and tone information from a target image comprises: using a human eye luminance formula as a visual simulation algorithm to extract luminance information and tone information in RGB data, and the extraction process is as follows: ; ; wherein x is RGB data, I is luminance information extracted from the RGB data, t is hue information extracted from the RGB data, W R , W G , and W B are RGB weight coefficients determined according to the sensitivity of the human eye to the R, G, and B primary colors; the RGB weight coefficients are set as RGB equal-ratio values.
2. The method of tone mapping of an image according to claim 1, characterized in that, the mapping the luminance information into a specified dynamic range based on a preset mapping curve to obtain mapped luminance information comprises: mapping a luminance component corresponding to the luminance information based on a preset mapping curve to obtain a mapped luminance component; converting the mapped luminance component into corresponding RGB data to obtain luminance information in the mapped specified dynamic range.
3. The method of tone mapping an image according to claim 1, wherein, the obtaining a mapped target image based on the mapped luminance information and the tone information comprises: converting the tone information into expression information of corresponding luminance information and RGB data, merging the mapped luminance information and the expression information to obtain mapped RGB data, and generating a mapped target image using the mapped RGB data; or, merging the mapped luminance information and the tone information to obtain mapped RGB data, and generating a mapped target image using the mapped RGB data. after the extracting luminance information and tone information from a target image, further comprising:
4. The method of tone mapping of an image according to any one of claims 1 to 3, characterized in that, comparing the luminance information with a preset luminance threshold, and determining abnormal luminance data in the luminance information according to the comparison result; performing interpolation transition processing on the abnormal luminance data and updating the luminance information. The tone mapping device of the image comprises:
5. An apparatus for tone mapping an image, characterized by, an extraction module configured to extract luminance information and tone information from a target image; a mapping module configured to map the luminance information into a specified dynamic range based on a preset mapping curve to obtain mapped luminance information; a generation module configured to obtain a mapped target image based on the mapped luminance information and the tone information; the extraction module is further configured to use a human eye luminance formula as a visual simulation algorithm to extract luminance information and tone information in RGB data, and the extraction process is as follows: The tone mapping device of the image comprises a memory and at least one processor, and the memory stores instructions; ; ; wherein x is RGB data, I is luminance information extracted from the RGB data, t is hue information extracted from the RGB data, W R , W G , and W B are RGB weight coefficients determined according to the sensitivity of the human eye to the R, G, and B primary colors; the RGB weight coefficients are set as RGB equal-ratio values.
6. A tone mapping device of an image, characterized by, the at least one processor invokes the instructions in the memory to enable the tone mapping device of the image to perform the steps of the tone mapping method of the image according to any one of claims 1-4. The instructions are executed by the processor to implement the steps of the tone mapping method of the image according to any one of claims 1-4.
7. A computer-readable storage medium having stored thereon instructions, the computer-readable storage medium comprising:
Citation Information
Patent Citations
HDR image rapid mapping display method
CN113570519A