High dynamic range image tone mapping method, device, medium and program product
By calculating the brightness logarithm and the large-scale texture layer logarithm of the HDR image, image details are enhanced, and the brightness distribution is optimized through histogram statistics and cropping abnormal brightness values, the problem that traditional tone mapping methods are difficult to maintain image detail characteristics when compressing the dynamic range, achieving efficient image quality improvement.
Patent Information
- Application Number
- CN202411857001.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Traditional tone mapping methods are difficult to maintain the rationality of the detailed characteristics and brightness distribution of the image while compressing the dynamic range of a high dynamic range image.
By calculating the brightness logarithm and the logarithm of large-scale texture layers of the HDR image, the detailed information of the image is enhanced, and the abnormal brightness value is optimized through histogram statistics and cropping. Then, the average brightness and luminance standard deviation of the LDR image are determined based on the crop compensation histogram, and local detail enhancement and accurate mapping of color channels are performed.
It significantly improves the subjective visual quality and user experience of low dynamic range images, maintains the rationality of the detailed characteristics and brightness distribution of the image, so that the output LDR images can show the quality and details close to the original HDR images on different display devices.
Smart Images

Figure CN119313598B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a high dynamic range image tone mapping method, device, medium and program product. Background Art
[0002] A high dynamic range (HDR) image is an image that is capable of representing a wider range of brightness than a standard low dynamic range (LDR) image. It can capture and present light intensities from very dark to very bright, thus being closer to the real-world details and colors that the human eye can see, providing richer colors and more delicate light and shadow transitions.
[0003] HDR images have been widely used in high-definition medical display terminals, photographic art, virtual reality and other fields due to their wide brightness range and rich color details.
[0004] However, the high dynamic range characteristics of HDR images place higher demands on storage, transmission and display devices. Traditional tone mapping methods often find it difficult to compress the dynamic range while maintaining the image's detail features and reasonable brightness distribution. Summary of the invention
[0005] In view of the above-mentioned technical problems and defects, the purpose of the present invention is to provide a high dynamic range image tone mapping method, device, medium and program product, which can effectively maintain the image detail characteristics and the rationality of brightness distribution while compressing the dynamic range of the high dynamic range image, thereby significantly improving the subjective visual quality and user experience of the low dynamic range image.
[0006] To achieve the above-mentioned purpose, in a first aspect, the present invention provides a high dynamic range image tone mapping method, comprising: determining the brightness logarithm and the large-scale texture layer logarithm of the high dynamic range image to be processed; enhancing the detail information of the high dynamic range image according to the brightness logarithm and the large-scale texture layer logarithm to obtain a global detail enhanced image; performing histogram statistics on the brightness logarithm of the global detail enhanced image to obtain a brightness histogram; respectively clipping and removing abnormal brightness values in the low brightness part, the medium brightness part and the high brightness part of the brightness histogram; compensating the part of the brightness histogram from which the abnormal brightness value is clipped to obtain a brightness optimized histogram and a brightness optimized image corresponding to the high dynamic range image; based on the brightness clipping compensation histogram, Determine the average brightness and brightness standard deviation of the intermediate low dynamic range image after the high dynamic range image is mapped; after determining the target image brightness of the low dynamic range image according to the average brightness and the brightness standard deviation, obtain the normalized brightness grayscale image corresponding to the low dynamic range image; perform local detail enhancement processing on the low dynamic range image based on the normalized brightness grayscale image to obtain a local detail enhanced image; restore the brightness of the local detail enhanced image to the original brightness range of the high dynamic range image to obtain the output brightness of the low dynamic range image; when the output brightness is determined, map the color channel of the high dynamic range image to the color channel of the low dynamic range image, and merge the color space to obtain the final output low dynamic range image.
[0007] The present invention can distinguish the global brightness and large-scale texture information in the image by calculating the brightness logarithm and the large-scale texture layer logarithm of the HDR image, so as to optimize these information separately in the subsequent processing. Then, by performing histogram statistics on the brightness logarithm of the global detail enhanced image, and cutting and removing the abnormal brightness values in the low brightness, medium brightness and high brightness parts respectively, the negative impact of extreme brightness values on the image quality is effectively reduced. After the abnormal brightness value is cut, the remaining brightness histogram is optimized by the compensation mechanism to fill the vacancy caused by cutting, so as to keep the brightness distribution of the image balanced. In addition, by determining the average brightness and brightness standard deviation of the LDR image based on the brightness cutting compensation histogram, the brightness level of the image can be more accurately controlled to ensure that the mapped image is consistent with the original image in brightness and contrast. Finally, through the local detail enhancement and accurate mapping of the color channel, not only the details of the image are enhanced, but also the authenticity and consistency of the color are maintained, so that the final output LDR image retains the detail features and the rationality of the brightness distribution of the HDR image to the greatest extent while compressing the dynamic range, and significantly improves the visual quality and user experience of the image.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, compensating for the portion of the brightness histogram where abnormal brightness values are clipped includes: compensating for the portion of the brightness histogram where abnormal brightness values are clipped using a brightness compensation function, wherein the brightness compensation function includes:
[0009]
[0010] Among them, L is the original brightness value, L′ is the brightness value compensated after redistribution, and L max is the maximum brightness value in the image, p and q are control parameters used to control the shape of the function curve.
[0011] The technical solution of the above embodiment is adopted to compensate for the clipped part of abnormal brightness value by introducing brightness compensation function, which uses nonlinear mapping to enhance the local contrast of the image without introducing additional brightness value, effectively avoiding the problem of image detail loss and contrast imbalance. This compensation mechanism not only optimizes the brightness histogram, but also improves the overall visual effect of the image, so that the LDR image can show richer details and more natural color transition at different brightness levels, significantly improving the image quality.
[0012] In combination with some embodiments of the first aspect, in some embodiments, p is specifically a contrast control parameter, and the contrast control parameter is adjusted according to the contrast of the high dynamic range image.
[0013] By adopting the technical solution of the above embodiment, the contrast control parameter p is dynamically adjusted according to the contrast of the high dynamic range image, so that the detail enhancement process is more in line with the actual contrast characteristics of the image. This dynamic adjustment strategy allows the method to adaptively respond to the contrast changes of different images, enhance the image details while maintaining the naturalness and realism of the image, avoid the unnatural visual effects caused by over-enhancement, and improve the flexibility and effect of image processing.
[0014] In combination with some embodiments of the first aspect, in some embodiments, the mathematical expression of the contrast control parameter includes: p=1+C·Contrast(I); wherein C is an adjustment coefficient, I represents the high dynamic range image, and Contrast(I) is a contrast index based on image I, and the contrast index includes brightness standard deviation, brightness range, or peak signal-to-noise ratio.
[0015] By adopting the technical solution of the above embodiment, a specific calculation method of the contrast control parameter p is provided, and the contrast index is combined with the adjustment coefficient C, providing an accurate tool for quantifying and controlling the image contrast. This method enables the parameter p to be adjusted according to different contrast indexes such as brightness standard deviation, brightness range or peak signal-to-noise ratio, providing more flexibility and accuracy for image processing, and ensuring that the image can obtain the best visual effect under different conditions.
[0016] In combination with some embodiments of the first aspect, in some embodiments, q is specifically a brightness compression control parameter, and the brightness compression control parameter is adjusted according to the average brightness of the high dynamic range image, or the peak value of the brightness histogram.
[0017] By adopting the technical solution of the above embodiment, a brightness compression control parameter q is defined, and is adjusted according to the average brightness of the high dynamic range image or the peak value of the brightness histogram, providing precise control for brightness mapping. This adjustment mechanism makes the brightness compression process of the image more refined, and can be adaptively adjusted according to the specific brightness characteristics of the image, effectively avoiding the problem of excessive or insufficient brightness compression, and ensuring that the LDR image has better visual performance while maintaining the brightness information of the HDR image.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the mathematical expression of the brightness compression control parameter includes:
[0019]
[0020] Where AvgLum(I) is the average luminance of image I, k and m are experimental parameters, and e is a natural constant.
[0021] By adopting the technical solution of the above embodiment, a specific mathematical expression of the brightness compression control parameter q is provided, so that the adjustment of the parameter q is more scientific and accurate. By introducing the experimental parameters k and m, the degree of brightness compression can be adaptively adjusted according to the average brightness of the image, so that the brightness of the LDR image is more in line with the visual perception of the human eye, the dynamic range and contrast of the image are improved, and the image can show good visual effects on different display devices.
[0022] In combination with some embodiments of the first aspect, in some embodiments, the detail information of the high dynamic range image is enhanced according to the brightness logarithm and the large-scale texture layer logarithm, including: determining the brightness detail layer logarithm of the high dynamic range image according to the brightness logarithm and the large-scale texture layer logarithm; when the brightness detail layer logarithm is determined, enhancing the detail information of the high dynamic range image based on a detail enhancement formula, the detail enhancement formula including: L' e =λ1ln(b)+λ2d; where L'e is the logarithm of the enhanced brightness, ln(b) is the logarithm of the large-scale texture layer, d is the logarithm of the brightness detail layer, and λ1 and λ2 are adjustment factors.
[0023] The technical solution of the above embodiment is adopted to provide specific steps for enhancing the details of HDR images based on the logarithm of brightness and the logarithm of large-scale texture layers, including determining the logarithm of brightness detail layers and applying detail enhancement formulas. This method effectively retains and enhances the detail information of HDR images by precisely controlling the detail enhancement process of images, while avoiding image distortion caused by over-enhancement. This detail enhancement technology significantly improves the visual clarity and depth of LDR images, so that the images can still show details and textures close to the original HDR images after compressing the dynamic range.
[0024] In a second aspect, an embodiment of the present invention provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation method of the first aspect or the second aspect.
[0025] In a third aspect, the present invention provides a computer-readable storage medium comprising instructions, which, when executed on the electronic device, causes the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation of the first aspect or the second aspect.
[0026] In a fourth aspect, the present invention provides a computer program product comprising instructions, which, when the computer program product is run on the electronic device, enables the electronic device to execute the method described in the first aspect or the second aspect, and any possible implementation of the first aspect or the second aspect.
[0027] It is understandable that the electronic device provided in the second aspect, the storage medium provided in the third aspect, and the computer program product provided in the fourth aspect are all used to execute the method provided in the present invention. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.
[0028] One or more technical solutions provided by the present invention have at least the following technical effects or advantages:
[0029] 1. Optimize brightness distribution and detail enhancement: This invention optimizes brightness distribution and detail enhancement. By accurately calculating the brightness logarithm and large-scale texture layer logarithm of HDR images, it effectively identifies and enhances the image detail information. By cutting out abnormal brightness values and performing compensation processing, the brightness histogram is optimized, so that the converted LDR image can show richer details and more natural color transitions at different brightness levels, significantly improving the visual quality of the image and user experience.
[0030] 2. Effective compression of dynamic range: The present invention realizes effective compression of dynamic range. By determining the average brightness and brightness standard deviation of the LDR image based on the brightness clipping compensation histogram and obtaining the normalized brightness grayscale image, local detail enhancement processing is performed, effectively compressing the wide dynamic range of the HDR image to a range suitable for the LDR display device, while retaining the details and color information of the original HDR image to the maximum extent, solving the problem that the traditional tone mapping method is difficult to maintain the image detail characteristics when compressing the dynamic range.
[0031] 3. Accurate mapping and merging of color channels: After determining the output brightness, the present invention accurately maps the color channels of the HDR image to the color channels of the LDR image, and merges the color space to obtain the final output LDR image. This step ensures the authenticity and consistency of the color, so that the final LDR image is optimized in color and brightness, significantly improving the visual quality of the image, so that the image can show quality and details close to the original HDR image on different display devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings herein are incorporated into and constitute a part of the specification, showing embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0033] Figure 1 is a flow chart of a high dynamic range image tone mapping method according to an embodiment of the present invention;
[0034] Figure 2 It is a schematic diagram of the architecture of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The terms used in the following embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to be limiting of the present invention. As used in the specification of the present invention, the singular expressions "a", "a", "above", "the" and "this" are intended to also include plural expressions, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present invention refers to any or all possible combinations comprising one or more of the listed items.
[0036] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, unless otherwise specified, the meaning of "plurality" is two or more.
[0037] It should also be noted that, unless otherwise clearly specified and limited, in the embodiments of the present invention, the terms such as "setting" and "connection" should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two components; it can be a wired communication connection or a wireless communication connection. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. The embodiments of the present invention are described in detail below.
[0038] The embodiment of the present invention provides a high dynamic range image tone mapping method, which can effectively convert an HDR image into an image suitable for display on a low dynamic range device, while retaining the details and color information of the original HDR image to the maximum extent. By enhancing the global details and local details of the HDR image, the method significantly improves the visual quality and clarity of the image, so that the converted LDR image is closer to the real world perceived by the human eye in terms of brightness, contrast and color. In addition, by optimizing the brightness histogram and compensating for abnormal brightness values after clipping, the method can avoid too dark or too bright areas in the image while compressing the dynamic range, ensuring a more balanced brightness distribution of the image. Finally, through precise color channel mapping and color space merging, the generated LDR image can show good color reproducibility and visual consistency on various display devices, thereby improving the user experience.
[0039] Combine the following Figure 1 To illustrate the high dynamic range image tone mapping method of this embodiment, the method can be performed by an image processing system, and the method specifically includes the following steps:
[0040] Step 201, determining the brightness logarithm and large-scale texture layer logarithm of the high dynamic range image to be processed.
[0041] The brightness logarithm refers to the value obtained by converting the brightness value of a high dynamic range image through a natural logarithm function. This conversion helps to expand the dynamic range of the image and enhance dark details.
[0042] The large-scale texture layer refers to the image layer obtained by applying a smoothing filter (such as a Gaussian filter) to a high dynamic range image. It mainly captures and highlights the large-scale texture and structural information in the image, filters out small details and noise, and is used to identify and enhance the macroscopic features of the image in image processing and analysis. The logarithm of the large-scale texture layer is the logarithm of each brightness value in the large-scale texture layer b.
[0043] Specifically, in order to determine the brightness logarithm and large-scale texture layer logarithm of the high dynamic range image to be processed (hereinafter may also be referred to as HDR image), it is first necessary to calculate the brightness of each pixel value of the HDR image, usually by weighted summation, combining the data of the three color channels of red, green and blue (R, G, B respectively), and using formulas such as Lw=0.299R+0.587G+0.114B to obtain the brightness value Lw.
[0044] Next, take the natural logarithm of the calculated brightness value Lw to obtain the brightness logarithm Le. At the same time, apply a low-pass filter, such as a Gaussian filter, to the original high dynamic range image. This filter can effectively smooth the image, reduce high-frequency noise and details, and retain low-frequency information, that is, the large-scale structure and slowly changing texture features in the image. In this way, the filtered large-scale texture layer b contains the large-scale structural information in the original image, providing important basic data for subsequent image processing steps. Then, apply the natural logarithm function transformation to each brightness value bi in the large-scale texture layer b, that is, ln(bi), to obtain the logarithm of the large-scale texture layer ln(b). This logarithmic transformation helps to expand the dynamic range of the large-scale texture layer, so that the large-scale structural information can be better retained and utilized in subsequent image processing steps.
[0045] In this way, by logarithmically transforming the brightness and large-scale texture layers of the HDR image, the brightness range of the original scene can be effectively compressed, and the necessary data basis can be provided for the subsequent global detail enhancement and tone mapping steps.
[0046] Step 202: Enhance the detail information of the high dynamic range image according to the brightness logarithm and the large-scale texture layer logarithm to obtain a global detail enhanced image.
[0047] Specifically, the brightness logarithm and large-scale texture layer logarithm of the HDR image are first calculated, and then the brightness detail layer logarithm is obtained by calculating the difference between the two. This difference reflects the detail information in the image. Then, the global brightness logarithm is enhanced by combining the large-scale texture layer logarithm and the brightness detail layer logarithm. Finally, the enhanced brightness logarithm is exponentially transformed and restored to the original brightness space to obtain a global detail enhanced image. This process effectively enhances the detail information of the image while maintaining the overall brightness and contrast of the image.
[0048] Among them, the brightness detail layer refers to the image layer obtained by removing large-scale textures and slowly changing illumination components from the brightness information of the original HDR image in high dynamic range image processing. It mainly contains small and medium-scale details and rapidly changing local features in the image. The logarithm of the brightness detail layer is the result of logarithmic transformation of the brightness detail layer. This transformation helps to further analyze and process image details because it can compress the range of extreme brightness values, making the detail information more prominent during dynamic range compression or enhancement, which is convenient for subsequent image processing steps such as tone mapping and detail enhancement.
[0049] In some embodiments, according to the brightness logarithm and the large-scale texture layer logarithm, the detail information of the high dynamic range image is enhanced, specifically including: according to the brightness logarithm and the large-scale texture layer logarithm, determining the brightness detail layer logarithm of the high dynamic range image; when the brightness detail layer logarithm is determined, enhancing the detail information of the high dynamic range image based on a detail enhancement formula, the detail enhancement formula including: L' e =λ1ln(b)+λ2d; where L' e is the logarithm of the enhanced brightness, ln(b) is the logarithm of the large-scale texture layer, d is the logarithm of the brightness detail layer, and λ1 and λ2 are adjustment factors.
[0050] Specifically, the image brightness logarithm is first calculated, which is obtained by taking the logarithm of the brightness value of the image, and then the large-scale texture layer logarithm is calculated, which is usually obtained by taking the logarithm after applying a smoothing filter to the image. The brightness detail layer logarithm is obtained by subtracting the large-scale texture layer logarithm from the brightness logarithm. This step reveals the brightness detail information remaining after removing the large-scale changes in the image, that is, those local details and textures that vary at different scales.
[0051] In this way, the logarithm d of the brightness detail layer can be expressed as, d = L e -ln(b), where L e is the logarithm of brightness, and ln(b) is the logarithm of large-scale texture layer. In this way, the brightness details in the image can be accurately captured and represented, providing a basis for subsequent detail enhancement processing.
[0052] In this embodiment, the detail enhancement formula L' e =λ1ln(b)+λ2d, which is used to enhance the detail information of high dynamic range (HDR) images.
[0053] Enhanced brightness logarithm L' e : This is the new brightness logarithm obtained after detail enhancement, which will be used in subsequent image processing steps to generate the final output image.
[0054] Large-scale texture layer logarithm ln(b): This represents the large-scale texture and structural information in the image. By applying a smoothing filter (such as a Gaussian filter) to the image to remove details and noise, we obtain the large-scale texture layer and then take its natural logarithm.
[0055] Brightness detail layer logarithm d: This is obtained by subtracting the large-scale texture layer logarithm from the brightness logarithm of the original image, which contains the small and medium-scale details and texture information in the image.
[0056] Adjustment factors λ1 and λ2: These two factors are used to balance the contribution of large-scale texture and brightness details in the final enhanced result. λ1 controls the influence of large-scale texture, while λ2 controls the influence of brightness details. By adjusting these parameters, the effect of detail enhancement can be optimized according to the specific content of the image and the enhancement goal.
[0057] The core idea of this formula is to decompose the brightness information of the image into two parts: large-scale texture and brightness details, and process them separately. In this way, the large-scale structural information can be retained while enhancing the image details, thereby generating a detail-enhanced image that is both clear and natural. This detail enhancement technology is particularly suitable for improving the visual quality of images, especially in application scenarios where texture and edge information need to be emphasized.
[0058] Step 203: Perform histogram statistics on the brightness logarithm of the global detail enhanced image to obtain a brightness histogram.
[0059] Specifically, the brightness value of each pixel in the global detail enhanced image can be collected and counted, and their frequency distribution at different brightness levels can be statistically analyzed to construct a histogram describing the image brightness distribution. This histogram shows the number of occurrences of brightness values from the darkest to the brightest in the image, providing an intuitive graphical representation for further analysis and adjustment of the image brightness distribution.
[0060] Step 204 , respectively clipping and removing abnormal brightness values in the low brightness part, the medium brightness part and the high brightness part of the brightness histogram.
[0061] Specifically, the thresholds for each brightness part are first determined. These thresholds are set based on the statistical data of the histogram to identify those abnormal brightness values that are extreme and do not conform to the overall brightness distribution of the image. Among them, abnormal brightness values refer to those extreme values in the brightness histogram of the image that are far away from the main brightness distribution. These values may appear due to shooting conditions, equipment limitations, or the characteristics of the image itself, and appear as particularly bright or dark areas. Compared with most pixel values in the image, they constitute outliers in the brightness distribution and may affect the overall visual effect and quality of the image.
[0062] Then, for pixels below the low brightness threshold, pixels above the high brightness threshold, and pixels that deviate significantly from the normal distribution in the medium brightness area, cropping is performed, that is, reducing the representation of these pixel values in the image to ensure a more balanced brightness distribution of the image and reduce visual distortion caused by extreme brightness values. This process helps to optimize the overall visual effect of the image and make it more consistent with the human eye's perception of natural scenes.
[0063] In this embodiment, when defining the low brightness part, medium brightness part and high brightness part in the brightness histogram, the overall distribution of the histogram is usually referred to, the range of brightness values is determined, and the threshold is set according to the specific content and needs of the image. The low brightness part usually refers to the area with lower brightness values in the histogram, corresponding to the dark part of the image; the high brightness part refers to the area with higher brightness values, corresponding to the bright part of the image; and the medium brightness part is the area between the two, which contains most of the medium brightness values. This division can be achieved through statistical analysis methods, such as calculating the percentile, standard deviation of the brightness value or using empirical thresholds, in order to optimize and adjust these different brightness areas separately in image processing.
[0064] Step 205 , compensating for the portion of the brightness histogram where abnormal brightness values are cut off, to obtain a brightness optimized histogram and a brightness optimized image corresponding to the high dynamic range image.
[0065] After clipping the abnormal brightness values in the brightness histogram, in order to compensate for the resulting visual and information loss, an adjustment strategy can be used to redistribute the removed brightness values to the rest of the histogram, especially those areas close to the abnormal values but still within the normal range. This compensation process is achieved by expanding the adjacent brightness levels, enhancing the details and gradients in the image while maintaining the overall brightness balance.
[0066] Specifically, first, by analyzing the brightness histogram, abnormal brightness values that are far away from the main brightness distribution are identified. Then, these abnormal brightness values are removed from the histogram to reduce their impact on the overall visual effect of the image. After cropping, in order to compensate for the gaps in brightness distribution caused by the removal of outliers, the remaining brightness values are redistributed. This usually involves expanding the adjacent brightness levels so that the space originally occupied by the outliers is filled by the adjacent brightness values, resulting in a visually smooth transition. Through the above compensation adjustment, a more balanced and natural brightness optimized histogram is obtained, which shows the optimized brightness distribution and avoids the influence of extreme brightness values. Finally, this brightness optimized histogram is applied back to the original high dynamic range image, and the brightness value of each pixel is adjusted accordingly to reflect the new brightness distribution.
[0067] The image after brightness adjustment is called brightness optimized image. This image maintains the wide dynamic range of HDR image, while optimizing the brightness distribution, reducing the impact of abnormal brightness values, so that the details of the image at different brightness levels are better displayed.
[0068] This embodiment compensates for the gaps caused by clipping outliers by adjusting and optimizing the brightness histogram, and then applies the optimized brightness distribution to the original image, thereby obtaining a brightness optimized image. Such an image is more visually balanced, has richer details, and is more suitable for display on low dynamic range devices.
[0069] Step 206 : determining the average brightness and brightness standard deviation of the intermediate low dynamic range image after the high dynamic range image is mapped based on the brightness clipping compensation histogram.
[0070] Specifically, when determining the average brightness and brightness standard deviation of the intermediate low dynamic range image after mapping the high dynamic range image based on the brightness clipping and compensation histogram, the clipped and compensated histogram is first analyzed. This step involves calculating the average of all brightness values in the histogram, namely the average brightness, which reflects the overall brightness level of the image.
[0071] Next, the dispersion of the brightness value relative to the average brightness, that is, the brightness standard deviation, is calculated, which measures the fluctuation range and contrast of the brightness in the image.
[0072] The role of these two statistics is to provide key parameters for mapping HDR images to low dynamic range images (hereinafter referred to as LDR images), ensuring that the mapped images are consistent with the original images in terms of brightness and contrast, while adapting to the dynamic range of LDR display devices.
[0073] Through this statistical-based method, the wide dynamic range of the HDR image can be effectively compressed into the limited range of the LDR image while preserving the image details and layers as much as possible.
[0074] Step 207 : after determining the target image brightness of the low dynamic range image according to the average brightness and the brightness standard deviation, obtaining a normalized brightness grayscale image corresponding to the low dynamic range image.
[0075] Specifically, in order to determine the target image brightness of the low dynamic range image, the target brightness level is first set based on the average brightness and brightness standard deviation of the intermediate LDR image after the high dynamic range (HDR) image is mapped. This step involves compressing the brightness range of the HDR image to adapt to the display capabilities of the LDR image while maintaining the visual effect of the image. Specifically, the overall brightness level of the image is determined based on the average brightness to ensure that the image is not too bright or too dark, while the brightness standard deviation helps maintain the contrast of the image to ensure that there is sufficient distinction between bright and dark areas. In this way, a target brightness value that meets the capabilities of the display device and maintains image quality can be determined.
[0076] Then obtain the corresponding normalized brightness grayscale image. This process involves normalizing each pixel value of the LDR image relative to the target brightness value, that is, mapping the original brightness value to a uniform range, usually between 0 and 1. After normalization, a brightness grayscale image is obtained, in which the value of each pixel is expressed as a relative brightness value relative to the target brightness. In this way, the normalized brightness grayscale image can provide a standardized view of the image brightness distribution, providing a unified brightness benchmark for subsequent image processing steps, such as local detail enhancement and color mapping.
[0077] Among them, the normalization process includes: first determining the global brightness range of the image, that is, finding the brightest and darkest pixel values in the image. Then, for each pixel in the image, subtract the darkest pixel value of the entire image from its original brightness value to obtain a relative brightness value, and then divide this relative brightness value by the difference between the brightest and darkest pixel values, so that the brightness value of each pixel is converted to a proportional value between 0 and 1, where 0 represents the darkest and 1 represents the brightest. In this way, the original brightness value is mapped to a uniform range, achieving normalization, so that the brightness distribution of the image can be compared and processed on a standardized scale.
[0078] Step 208: Perform local detail enhancement processing on the low dynamic range image based on the normalized brightness grayscale image to obtain a local detail enhanced image.
[0079] Specifically, local areas in the low dynamic range image are first identified, which may contain important texture or edge information. Then, enhancement algorithms such as local contrast enhancement or high frequency enhancement are applied to these local areas to highlight details and textures. The specific operation may involve adjusting the contrast of the local area, strengthening the edge, or increasing the sharpness of the local area.
[0080] In this way, the local details of the low dynamic range image are enhanced, making the image richer and clearer in detail expression, and finally a local detail enhanced image is obtained, which has better visual layering and three-dimensional sense while retaining the overall naturalness of the image.
[0081] Step 209: restore the brightness of the local detail enhanced image to the original brightness range of the high dynamic range image to obtain the output brightness of the low dynamic range image.
[0082] Specifically, it is first necessary to determine the original brightness range of the high dynamic range image and the current brightness range of the local detail enhanced image. Then, through a brightness mapping function, each pixel value in the local detail enhanced image is proportionally adjusted to correspond to the brightness level of the original HDR image. This process involves brightness stretching or compressing the enhanced image to ensure that the local details of the image match the original HDR image in brightness while maintaining the effect of detail enhancement. Finally, a low dynamic range image with brightness restoration is obtained, and its output brightness is visually closer to the brightness and contrast of the original HDR image, so that rich details and layers can be displayed at different brightness levels.
[0083] In this embodiment, the brightness mapping function is a mathematical relationship that defines how to map the brightness value of an image from one range to another range. Specifically, when restoring the brightness of the local detail enhanced image to the original brightness range of the high dynamic range (HDR) image, this function performs the following steps:
[0084] 1. Determine the mapping relationship: First, it is necessary to determine the current brightness range (minimum brightness and maximum brightness) of the local detail enhanced image and the original brightness range of the HDR image. This involves analyzing the brightness histograms of the two images.
[0085] 2. Construct a mapping function: Based on the above information, construct a function that can linearly or nonlinearly map the brightness value of the enhanced image to the brightness value of the original HDR image. This function can be a simple linear transformation, such as f(x) = ax + b, where a and b are coefficients calculated based on the brightness range of the two images, ensuring that the mapped brightness value corresponds to the brightness value of the original HDR image.
[0086] 3. Apply mapping function: Apply this mapping function to each pixel of the local detail enhanced image to adjust its brightness value. This means that the brightness value of each pixel will be recalculated according to the mapping function to reflect the corresponding brightness in the original HDR image.
[0087] 4. Ensure natural transition: In some cases, it may also be necessary to consider the transition between brightness values and ensure that the mapped image has no unnatural brightness jumps or discontinuities, which may involve using more complex nonlinear mapping functions to smooth brightness changes.
[0088] 5. Output adjusted image: After applying the brightness mapping function, the result is a brightness restored low dynamic range (LDR) image whose brightness values now match the original HDR image while retaining the enhanced image details.
[0089] The purpose of this brightness mapping function is to ensure that the brightness information of the image is preserved and correctly converted between the different image processing stages so that the final output LDR image is visually as close as possible to the quality and feel of the original HDR image.
[0090] Step 210, when the output brightness is determined, the color channel of the high dynamic range image is mapped to the color channel of the low dynamic range image, and the color spaces are merged to obtain a final output low dynamic range image.
[0091] First, each color channel (usually red, green, and blue) in the HDR image needs to be scaled to match the color range and brightness level of the LDR image. Specifically, a scaling factor is determined for each color channel based on the color values of the HDR image and the target color range of the LDR image, and then this factor is applied to linearly map the color values of the HDR image to the color space of the LDR image. During the mapping process, the relative relationship of the colors and the naturalness of the color transition must also be ensured to avoid color distortion and inharmoniousness. Finally, the adjusted color channels are merged to form the final LDR image, which adapts to the display capabilities of the LDR display device while maintaining the color richness and brightness levels of the original HDR image.
[0092] This embodiment can distinguish the global brightness and large-scale texture information in the image by calculating the brightness logarithm and large-scale texture layer logarithm of the HDR image, so that these information can be optimized separately in subsequent processing. Then, by performing histogram statistics on the brightness logarithm of the global detail enhanced image, and cutting and removing the abnormal brightness values in the low brightness, medium brightness and high brightness parts respectively, the negative impact of extreme brightness values on image quality is effectively reduced. After the abnormal brightness value is cut, the remaining brightness histogram is optimized by the compensation mechanism to fill the vacancy caused by cutting, thereby maintaining the brightness distribution of the image balanced. In addition, by determining the average brightness and brightness standard deviation of the LDR image based on the brightness cutting compensation histogram, the brightness level of the image can be more accurately controlled to ensure that the mapped image is consistent with the original image in brightness and contrast. Finally, through local detail enhancement and accurate mapping of color channels, not only the details of the image are enhanced, but also the authenticity and consistency of the color are maintained, so that the final output LDR image retains the detail features and the rationality of the brightness distribution of the HDR image to the greatest extent while compressing the dynamic range, significantly improving the visual quality and user experience of the image.
[0093] In some embodiments, compensating for the portion of the brightness histogram where abnormal brightness values are clipped specifically includes:
[0094] The portion of the brightness histogram in which the abnormal brightness value is cut off is compensated by a brightness compensation function, and the brightness compensation function includes:
[0095]
[0096] Among them, L is the original brightness value, L′ is the brightness value compensated after redistribution, and L max is the maximum brightness value in the image, p and q are control parameters used to control the shape of the function curve.
[0097] The brightness compensation function can flexibly adjust the brightness distribution of the image to meet different visual and display requirements. Specifically:
[0098] 1. Nonlinear adjustment: The exponents p and q in the function allow nonlinear adjustment of the brightness value L. This nonlinear characteristic is particularly important for simulating the nonlinear perception of brightness by the human eye, because the human eye is not uniformly sensitive to changes in brightness, especially in areas with higher or lower brightness.
[0099] 2. Local and global contrast enhancement: The local contrast of the image can be enhanced. It helps to adjust the global contrast so that the image maintains a balanced brightness overall.
[0100] 3. Detail protection: When L is small, that is, in the dark area of the image, The value will be small, which means that the details in the dark areas will not be over-enhanced, thus protecting the details in these areas.
[0101] 4. High light suppression: When L is close to L max , that is, in the highlight area of the image, The value of will be very large, resulting in This helps suppress the brightness of highlight areas and prevent overexposure.
[0102] 5. Flexibility and control: Parameters p and q provide additional control, allowing adjustments based on specific image content and target visual effects. Different p and q values can produce different brightness adjustment effects, thus adapting to a variety of different images and scenes.
[0103] 6. Adaptability: This function can adapt to different image brightness ranges and distributions because it is based on L relative to L max This means it can be used for images with different exposure and lighting conditions.
[0104] In summary, the brightness compensation function can optimize the brightness distribution, enhance the contrast, and adapt to different display devices and viewing environments while maintaining image details through its nonlinear and adaptive characteristics, thereby improving the visual quality of the image and user experience.
[0105] In some embodiments, p is specifically a contrast control parameter, and the contrast control parameter is adjusted according to the contrast of the high dynamic range image.
[0106] In order to adjust the contrast control parameter p according to the contrast of the high dynamic range image, the contrast index of the high dynamic range image is first calculated, which can usually be done by analyzing the brightness histogram of the image, such as using the standard deviation of the brightness value or the brightness range (the difference between the brightest and darkest pixel values) as a measure of contrast.
[0107] Then, according to the calculated contrast value, an adjustment strategy is set. If the image contrast is high, the value of p may be reduced to reduce the contrast and avoid distortion caused by over-enhancement; on the contrary, if the image contrast is low, the value of p is increased to improve the contrast and make the image details more distinct. Such an adjustment ensures that the parameter p can respond to the contrast characteristics of the image and achieve a more natural and balanced image visual effect.
[0108] Further, the mathematical expression of the contrast control parameter p includes: p=1+C·Contrast(I);
[0109] Wherein, C is an adjustment coefficient, I represents the high dynamic range image, and Contrast(I) is a contrast index based on the image I. The contrast index includes a brightness standard deviation, a brightness range, or a peak signal-to-noise ratio.
[0110] The contrast control parameter can dynamically adjust the parameter p according to the contrast of the image to adapt to different image processing requirements. Specifically:
[0111] Base value: The constant 1 in the expression ensures that p has a base value. Even when the contrast is zero (i.e., the image brightness is uniform), p will not be zero, thereby ensuring the basic function of the brightness compensation function.
[0112] Adjustment factor C: The adjustment factor C allows you to control the degree to which contrast affects the p-value. By adjusting the value of C, you can achieve fine control of contrast in different image processing scenarios to achieve the desired visual effect.
[0113] Contrast index Contrast(I): The contrast index Contrast(I) can be brightness standard deviation, brightness range or peak signal-to-noise ratio, etc. These indicators can reflect the contrast characteristics of the image. Using these indicators to adjust the value of p can ensure that p can be adaptively adjusted according to the actual contrast of the image.
[0114] Dynamic adjustment: The C·Contrast(I) term in the expression allows p to increase as the image contrast increases, or decrease as the contrast decreases. This dynamic adjustment helps maintain the visual balance and detail richness of the image during brightness compensation, and avoids inconsistent image processing caused by fixed parameters.
[0115] Adaptability: This mathematical expression ensures that the value of p is adaptable in different images and scenes, so that the best image processing effect can be obtained in various situations.
[0116] In summary, the mathematical expression of the contrast control parameter p = 1 + C Contrast (I) provides a reasonable and flexible method to dynamically adjust the value of p by combining the basic value, adjustment coefficient and contrast index to adapt to different image processing requirements and ensure that the image can maintain good visual effects and detail performance after brightness compensation.
[0117] In some embodiments, q is specifically a brightness compression control parameter, and the brightness compression control parameter is adjusted according to the average brightness of the high dynamic range image, or the peak value of the brightness histogram.
[0118] Among them, the brightness compression control parameter q is a key adjustment factor used to control the brightness compression degree when mapping a high dynamic range (HDR) image to a low dynamic range (LDR) image. This parameter can be adjusted according to the average brightness of the HDR image or the peak value of the brightness histogram to achieve different visual effects and adapt to different display devices.
[0119] Specifically, if the average brightness of the HDR image is high, it means that the image is brighter overall. In this case, increasing the value of q can enhance the compression of the bright parts, prevent overexposure of the bright parts and maintain details. On the contrary, if the average brightness is low, it means that the image is darker overall. Reducing the value of q can reduce compression to avoid loss of dark details. Similarly, if the peak of the brightness histogram is high, it means that there are brighter areas in the image. Increasing q can better control the brightness of these areas and maintain the brightness level of the image. If the peak is low, reduce q to avoid visual distortion caused by over-compression.
[0120] In this way, the parameter q can be flexibly adjusted according to the specific brightness characteristics of the image to achieve the best visual effect and dynamic range compression.
[0121] In some embodiments, the mathematical expression of the brightness compression control parameter q includes:
[0122]
[0123] Where AvgLum(I) is the average luminance of image I, k and m are experimental parameters, and e is a natural constant.
[0124] This embodiment can dynamically adjust the value of q according to the average brightness AvgLum(I) of the image to adapt to different image brightness conditions. Specifically:
[0125] S-shaped curve: The mathematical expression of q produces an S-shaped curve, where the value of q is close to 0.5 when AvgLum(I) is close to m, close to 1 when AvgLum(I) is much larger than m, and close to 0 when AvgLum(I) is much smaller than m. This S-shaped curve property enables q to respond smoothly to changes in average brightness.
[0126] Experimental parameters k and m: Parameter k controls the slope of the S-shaped curve, that is, the sensitivity of q to changes in average brightness. Parameter m controls the midpoint of the S-shaped curve, that is, the reference value of the average brightness. Adjusting parameters k and m requires experimentation and optimization based on the average brightness and histogram distribution of high dynamic range images. Parameter k controls the steepness of the S-shaped curve and affects the sensitivity of brightness compression. When a faster response to brightness changes is required, the value of k is increased, and when a smoother brightness transition is required, the value of k is reduced. Parameter m is adjusted according to the average brightness level of the image to ensure that the mid-tone brightness area of the image is properly compressed. The optimal value range of k and m can be determined through multiple experiments, so that the brightness compression control parameter q can better adapt to different image content and display requirements to achieve the best visual effect.
[0127] Average brightness AvgLum(I): Average brightness is a measure of the central tendency of the image brightness distribution, which reflects the overall brightness level of the image. Adjusting q according to the average brightness can ensure that the brightness compression control parameters can adapt to the actual brightness conditions of the image, thereby maintaining the visual balance of the image during the brightness mapping process.
[0128] Natural constant e: The natural constant e is a fundamental constant in mathematics with a value of approximately 2.71828. In this expression, e is used to construct an exponential function that provides a smooth transition when AvgLum(I) approaches m and a fast response when AvgLum(I) moves away from m.
[0129] In summary, this mathematical expression provides a reasonable and flexible method to dynamically adjust the brightness compression control parameter q by combining the characteristics of the S-shaped curve, the adjustment of experimental parameters, the measurement of average brightness, and the mathematical properties of natural constants to adapt to different image processing requirements and ensure that the image can maintain good visual effects and dynamic range after brightness mapping.
[0130] The high dynamic range image tone mapping method provided in this embodiment solves the problem that traditional tone mapping technology often causes loss of image details and unreasonable brightness distribution when compressing the dynamic range.
[0131] This embodiment firstly calculates the brightness logarithm and large-scale texture layer logarithm of the HDR image, accurately identifies and enhances the detail information of the image, and generates a global detail enhanced image. Then, by performing histogram statistics on the enhanced brightness logarithm, the abnormal brightness value is identified and clipped, thereby avoiding the influence of extreme brightness on the image quality. The introduction of the compensation mechanism further optimizes the brightness distribution and ensures that the brightness level and details of the image are reasonably preserved. In addition, the method also involves determining the average brightness and brightness standard deviation of the LDR image based on the brightness clipping compensation histogram, and obtaining a normalized brightness grayscale image to perform local detail enhancement processing, thereby further improving the visual clarity and depth of the image. Finally, by restoring the brightness of the local detail enhanced image to the original brightness range of the HDR image, accurately mapping the color channel, and merging the color space, an LDR image with optimized color and brightness is obtained. While compressing the dynamic range, this embodiment improves the subjective visual quality and user experience of the image, so that the output LDR image can show quality and details close to the original HDR image on different display devices, effectively solving the limitations of the traditional tone mapping method.
[0132] The method provided in the above embodiment can be executed by an image processing system, which can include an electronic device. The electronic device in the embodiment of the present invention is described below from the perspective of hardware processing. Figure 2 , is a schematic diagram of a physical device structure of an electronic device in an embodiment of the present invention.
[0133] It should be noted that Figure 2 The structure of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0134] like Figure 2 As shown, the electronic device includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method described in the above embodiment. In RAM 403, various programs and data required for system operation are also stored. CPU 401, ROM 402 and RAM 403 are connected to each other through bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0135] The following components are connected to the I / O interface 405: an input section 406 including an audio input device, a button switch, etc.; an output section 407 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0136] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, various functions defined in the present invention are performed.
[0137] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0138] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.
[0139] Specifically, the electronic device of this embodiment includes a processor and a memory, the memory is coupled to one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the electronic device to execute the method provided by the above embodiment.
[0140] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the electronic device, the electronic device implements the method provided in the above embodiment.
[0141] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
[0142] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0143] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A high dynamic range image tone mapping method, characterized in that: include: Determine the brightness logarithm and the large-scale texture layer logarithm of the high dynamic range image to be processed; According to the brightness logarithm and the large-scale texture layer logarithm, detail information of the high dynamic range image is enhanced to obtain a global detail enhanced image; Performing histogram statistics on the brightness logarithm of the global detail enhanced image to obtain a brightness histogram; Respectively cutting out abnormal brightness values in a low brightness part, a medium brightness part and a high brightness part of the brightness histogram; Compensating the portion of the brightness histogram where abnormal brightness values are clipped to obtain a brightness clipping compensation histogram and a brightness optimized image corresponding to the high dynamic range image; Determining the average brightness and brightness standard deviation of the intermediate low dynamic range image after mapping the high dynamic range image based on the brightness clipping compensation histogram; After determining the target image brightness of the low dynamic range image according to the average brightness and the brightness standard deviation, obtaining a normalized brightness grayscale image corresponding to the low dynamic range image; Performing local detail enhancement processing on the low dynamic range image based on the normalized brightness grayscale image to obtain a local detail enhanced image; Restoring the brightness of the local detail enhanced image to the original brightness range of the high dynamic range image to obtain the output brightness of the low dynamic range image; When the output brightness is determined, the color channels of the high dynamic range image are mapped to the color channels of the low dynamic range image, and the color spaces are merged to obtain a low dynamic range image that is finally output.
2. The method according to claim 1, characterized in that The compensating for the portion of the brightness histogram where abnormal brightness values are cut off includes: The portion of the brightness histogram in which abnormal brightness values are cut off is compensated by a brightness compensation function, wherein the brightness compensation function comprises: Among them, L is the original brightness value, L′ is the brightness value compensated after redistribution, and L max is the maximum brightness value in the image, p and q are control parameters used to control the shape of the function curve.
3. The method according to claim 2, characterized in that p is specifically a contrast control parameter, and the contrast control parameter is adjusted according to the contrast of the high dynamic range image.
4. The method according to claim 3, characterized in that The mathematical expression of the contrast control parameter includes: p=1+C·Contrast(I); Wherein, C is an adjustment coefficient, I represents the high dynamic range image, and Contrast(I) is a contrast index based on the image I, wherein the contrast index includes a brightness standard deviation, a brightness range, or a peak signal-to-noise ratio.
5. The method according to claim 2, characterized in that: q is specifically a brightness compression control parameter, and the brightness compression control parameter is adjusted according to the average brightness of the high dynamic range image or the peak value of the brightness histogram.
6. The method according to claim 5, characterized in that The mathematical expression of the brightness compression control parameter includes: Where AvgLum(I) is the average luminance of image I, k and m are experimental parameters, and e is a natural constant.
7. The method according to any one of claims 1 to 6, characterized in that: The step of enhancing the detail information of the high dynamic range image according to the brightness logarithm and the large-scale texture layer logarithm includes: Determine the brightness detail layer logarithm of the high dynamic range image according to the brightness logarithm and the large-scale texture layer logarithm; when the brightness detail layer logarithm is determined, enhance the detail information of the high dynamic range image based on a detail enhancement formula, wherein the detail enhancement formula includes: L' e =λ1ln(b)+λ2d; where L' e is the enhanced brightness logarithm, ln(b) is the large-scale texture layer logarithm, d is the brightness detail layer logarithm, λ1 and λ2 are adjustment factors.
8. An electronic device, characterized in that: including one or more processors and memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 7.
10. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
A high dynamic range image tone mapping method with detail enhancement and brightness self-adaptation
CN109410126A
Method for reversely generating high-dynamic-range image by low-dynamic-range image with brightness and color self-adaption and rich details
CN110009574A