Tone mapping method, apparatus, display device, and storage medium

By performing sub-image segmentation, histogram equalization, and brightness compression on HDR images, the problem of local detail loss when mapping HDR images onto LDR display devices is solved, achieving high-quality tone mapping effects.

CN116843566BActive Publication Date: 2026-01-20FENGMI TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310790467.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2026-01-20
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

Existing technologies often result in the loss of local image details when mapping HDR images to LDR display devices, leading to poor image quality after tone mapping.

Method used

The HDR image is divided into multiple sub-images, and histogram equalization and grayscale adjustment are performed. Combined with global and local brightness mean compression, global and local tone mapping is achieved to ensure that the brightness value changes smoothly.

Benefits of technology

While maintaining high-quality global tone mapping, local detail loss is avoided, further improving image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116843566B_ABST
    Figure CN116843566B_ABST
Patent Text Reader

Abstract

The application relates to a tone mapping method and device, a display device and a storage medium. The method comprises the following steps: dividing a gray image of a high dynamic range image into multiple sub-images for histogram equalization processing to obtain initial gray values of each pixel point; adjusting the gray values of each pixel point according to the initial gray values of the pixel points in a target sub-image within a preset range around each pixel point to obtain a first image; converting the first image into a color image containing a brightness channel to obtain a second image; determining a global brightness mean value of the second image, and performing global dynamic range compression on the brightness values of the second image according to the global brightness mean value to obtain a third image; for each pixel point in the third image, a target neighborhood range with a gentle brightness value change around the pixel point is determined, and the brightness value at the pixel point is compressed according to the local brightness mean value in the target neighborhood range to obtain a target image. The method can improve the image quality after tone mapping.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of display technology and image processing technology, in particular to a tone mapping method and device, a display device and a storage medium. BACKGROUND

[0002] HDR (High Dynamic Range) technology has developed rapidly in recent years and gradually becomes mainstream in the field of images and videos. Compared with ordinary images, HDR images can provide more dynamic range and image details, greatly improve the contrast of picture details, and better reflect the visual effects in the real environment. However, since HDR images have higher brightness, deeper depth and wider color gamut, they cannot be displayed on some low-performance display devices. At present, some LCD displays usually discretize color channels to 8-bit, and the color interval has only 255 levels, so HDR images cannot be displayed on these display devices, such as some low-end LCD projection devices, which cannot directly display HDR images like high-end projection devices. Therefore, it is necessary to perform tone mapping on HDR images so that the HDR images can adapt to the display of LDR display devices.

[0003] In the traditional method, each pixel point in the HDR image is uniformly mapped to map the color, brightness and dynamic range of the HDR image to the annotation range of the LDR display device. However, this method can cause certain loss of local details in the image, resulting in poor image quality after tone mapping. SUMMARY

[0004] Therefore, it is necessary to provide a tone mapping method, device, display device, computer readable storage medium and computer program product capable of improving image quality to solve the above technical problems.

[0005] In a first aspect, the present application provides a tone mapping method. The method comprises:

[0006] dividing a gray image of a high dynamic range image to be tone mapped into a plurality of sub-images;

[0007] respectively performing histogram equalization processing on each of the sub-images to obtain a preliminary gray value of a pixel point in each of the sub-images;

[0008] respectively adjusting a gray value of a pixel point in each of the sub-images according to a preliminary gray value of a pixel point in a target sub-image within a preset range around the pixel point in each of the sub-images, and obtaining a first image based on the adjusted gray value of each of the pixel points in each of the sub-images;

[0009] converting the first image into a color image containing a brightness channel to obtain a second image;

[0010] determining a global brightness mean value of the second image in the brightness channel, and performing global dynamic range compression on the brightness value of the second image in the brightness channel according to the global brightness mean value, to obtain a third image;

[0011] For each pixel point in the third image, a target neighborhood range around the pixel point is determined, and a brightness value at the pixel point is compressed according to a local brightness mean value in the target neighborhood range, to obtain a target image after tone mapping corresponding to the high dynamic range image; the brightness values in the target neighborhood range change gently.

[0012] In a second aspect, the present application further provides a tone mapping device. The device comprises:

[0013] A preliminary equalization module is configured to divide a grayscale image of a high dynamic range image to be tone mapped into a plurality of sub-images; and perform histogram equalization processing on each of the sub-images, to obtain a preliminary grayscale value of a pixel point in each of the sub-images.

[0014] A grayscale value adjustment module is configured to adjust a grayscale value of a pixel point in each of the sub-images according to a preliminary grayscale value of a pixel point in a target sub-image within a preset range around the pixel point in each of the sub-images, and obtain a first image based on the adjusted grayscale value of each of the pixel points in each of the sub-images.

[0015] A global brightness compression module is configured to convert the first image into a color image containing a brightness channel, to obtain a second image; determine a global brightness mean value of the second image in the brightness channel; and perform global dynamic range compression on the brightness value of the second image in the brightness channel according to the global brightness mean value, to obtain a third image.

[0016] A local brightness compression module is configured to, for each pixel point in the third image, determine a target neighborhood range around the pixel point, and compress a brightness value at the pixel point according to a local brightness mean value in the target neighborhood range, to obtain a target image after tone mapping corresponding to the high dynamic range image; the brightness values in the target neighborhood range change gently.

[0017] In one of the embodiments, the preliminary equalization module is further configured to determine a grayscale histogram corresponding to each of the sub-images; determine a target gray level in each of the grayscale histograms that is greater than or equal to a preset threshold value; average the grayscale values of the target gray levels and distribute the average grayscale values to each of the gray levels in the grayscale histogram, to obtain an adjusted grayscale histogram; and perform histogram equalization processing on the adjusted grayscale histogram corresponding to each of the sub-images, to obtain a preliminary grayscale value of a pixel point in each of the sub-images.

[0018] In one of the embodiments, the gray value adjustment module is further configured to take each pixel point in each of the sub-images as a pixel point to be adjusted, determine each target sub-image within a preset range around the pixel point to be adjusted, determine a distance between the pixel point to be adjusted and each of the target sub-images, determine a weight corresponding to each of the target sub-images according to the distances, perform weighted fusion on the preliminary gray values of the pixel points in each of the target sub-images according to the weights corresponding to the target sub-images respectively, obtain an adjusted gray value corresponding to the pixel point to be adjusted, and obtain a first image based on the adjusted gray values of the pixel points to be adjusted in each of the sub-images.

[0019] In one of the embodiments, the global brightness compression module is further configured to determine a global brightness mean value of the second image in the brightness channel, and compress the brightness value of each pixel point in the second image in the brightness channel respectively according to the global brightness mean value to obtain a third image.

[0020] In one of the embodiments, the local brightness compression module is further configured to, for each pixel point in the third image, perform filtering processing on the brightness value at the pixel point using a Gaussian filter to obtain a brightness response corresponding to the pixel point, wherein the brightness response is used to represent a brightness mean value within a scale range of the Gaussian filter around the pixel point, and in a case where the brightness response is less than or equal to a preset threshold, iteratively increase the scale of the Gaussian filter, and return to perform the step of performing filtering processing on the brightness value at the pixel point using the Gaussian filter to obtain the brightness response corresponding to the pixel point and subsequent steps to obtain a target neighborhood range around the pixel point, wherein a radius of the target neighborhood range is a maximum value of the scale of the Gaussian filter determined in the case where the brightness response is less than or equal to the preset threshold.

[0021] In one of the embodiments, the local brightness compression module is further configured to, for each pixel point in the third image, take the brightness response under the scale of the target neighborhood range corresponding to the pixel point as a local brightness mean value in the target neighborhood range, and compress the brightness value at the pixel point according to the local brightness mean value to obtain a target image corresponding to the tone-mapped high dynamic range image.

[0022] In a third aspect, the present application further provides a display device. The display device comprises a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps in the tone mapping method described in the embodiments of the present application.

[0023] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, causes the processor to perform the steps of the tone mapping method according to any one of the embodiments of the present application.

[0024] In a fifth aspect, the present application provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, causes the processor to perform the steps of the tone mapping method according to any one of the embodiments of the present application.

[0025] The tone mapping method, device, display device, storage medium and computer program product can divide the gray image of the high dynamic range image to be tone mapped into a plurality of sub-images, perform histogram equalization processing on each sub-image respectively to obtain the preliminary gray value of the pixel point in each sub-image, realize global tone mapping, then adjust the gray value of the pixel point in each sub-image according to the preliminary gray value of the pixel point of the target sub-image within the preset range around the pixel point in each sub-image respectively, obtain the first image based on the adjusted gray value of each pixel point in each sub-image, consider the gray value of the adjacent region, improve the quality of the image after global tone mapping, convert the first image into a color image containing a luminance channel to obtain a second image, determine the global luminance average of the second image in the luminance channel, and perform global dynamic range compression on the luminance value of the second image in the luminance channel according to the global luminance average to obtain a third image, for each pixel point in the third image, determine a target neighborhood range with a gentle luminance value change around the pixel point, and perform compression on the luminance value at the pixel point according to the local luminance average in the target neighborhood range to obtain a target image after tone mapping corresponding to the high dynamic range image, realize local tone mapping of the image, perform local tone mapping on the basis of high-quality global tone mapping, avoid loss of local details, and further improve the image quality. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 An application environment diagram of the tone mapping method in one embodiment;

[0027] Figure 2 A flowchart of the tone mapping method in one embodiment;

[0028] Figure 3 A comparison diagram of the gray histograms before and after histogram equalization processing in one embodiment;

[0029] Figure 4 A diagram for adjusting the gray value of a pixel point in one embodiment;

[0030] Figure 5A structural block diagram of a tone mapping device in one embodiment;

[0031] Figure 6 An internal structural diagram of a display device in one embodiment. DETAILED DESCRIPTION

[0032] For the purpose, technical solutions and advantages of the present application to be more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0033] The tone mapping method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 . The display terminal 102 communicates with the computer device 104 through a network. The computer device 104 can send an image to be displayed to the display terminal 102. If the image to be displayed is a high dynamic range image, the display terminal 102 can perform the tone mapping method in the embodiments of the present application to tone map the high dynamic range image to obtain a target image, and the display device 102 can display the target image. The display device 102 can be, but is not limited to, any one of a projection device, a display, a display screen, etc. The computer device 104 can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server can be implemented by an independent server or a server cluster composed of multiple servers.

[0034] In some embodiments, as shown in Figure 2 , a tone mapping method is provided. Taking the display device 102 in Figure 1 as an example, the method comprises the following steps:

[0035] Step 202, dividing a gray image of a high dynamic range image to be tone mapped into a plurality of sub-images.

[0036] The high dynamic range image (HDR image, High Dynamic Range Image) refers to an image with higher dynamic range of luminance and color depth than traditional images. For example, each pixel point in a traditional image has only 8-bit depth, while an HDR image can have higher depth, such as 16-bit, 32-bit or even higher, so as to more accurately represent the luminance and color details in the scene.

[0037] In some embodiments, the display device can obtain the image to be displayed from the computer device, or obtain the image to be displayed locally from the display device. In some embodiments, if the image to be displayed is a high dynamic range image, the display device can perform step 202 and subsequent steps.

[0038] In some embodiments, the display device can divide the gray-scale image into a plurality of sub-images of the same size. For example, the gray-scale image can be divided into a plurality of sub-images of 8*8 size. In other embodiments, the display device can also divide the gray-scale image into a plurality of sub-images of inconsistent sizes.

[0039] In some embodiments, the display device can automatically determine the size of the divided sub-images according to the size of the gray-scale image and a preset number. The preset number is the preset number of sub-images to be divided.

[0040] In other embodiments, the size of the sub-image can be preset, and the display device can divide the gray-scale image into a plurality of sub-images according to the preset size of the sub-image.

[0041] Step 204, respectively, histogram equalization processing is carried out on each sub-image, to obtain the preliminary gray value of each pixel point in the sub-image.

[0042] The histogram equalization processing is a processing that transforms the distribution of the gray-scale histogram of the image into a more balanced distribution. It can be understood that by histogram equalization processing on the sub-image, global dynamic range compression of the gray value of the sub-image can be achieved. As shown in Figure 3 The gray-scale distribution in the gray-scale histogram before the histogram equalization processing is very uneven, and the gray-scale distribution in the gray-scale histogram after the histogram equalization processing is more balanced, achieving global dynamic range compression of the gray value in the image.

[0043] In some embodiments, the display device can determine the gray-scale histogram of the sub-image, then determine the histogram equalization function according to the gray-scale histogram, map the gray value of each pixel point in the sub-image to a new gray value according to the histogram equalization function, and obtain the preliminary gray value of each pixel point in the sub-image.

[0044] In some embodiments, the display device can first limit the gray value of the target gray level in the sub-image that is greater than or equal to a preset threshold, and then perform histogram equalization processing on each sub-image after the limitation to obtain the preliminary gray value of each pixel point in the sub-image. The limitation refers to restricting the size of the gray value to avoid excessively large gray values.

[0045] In step 206, the display device adjusts the gray value of each pixel point in each sub-image according to the preliminary gray value of the pixel point in the target sub-image within the preset range around the pixel point in each sub-image, and obtains the first image based on the adjusted gray value of each pixel point in each sub-image.

[0046] In some embodiments, the display device can determine each pixel point in each sub-image as a pixel point to be adjusted, determine a target sub-image within a preset range around the pixel point to be adjusted, then determine the preliminary gray value mean of each pixel point in the target sub-image, and adjust the gray value of the pixel point to be adjusted according to the preliminary gray value mean of each pixel point in the target sub-image.

[0047] In some embodiments, the target sub-image within the preset range around the pixel point to be adjusted can be a target sub-image adjacent to the pixel point to be adjusted. The number of target sub-images corresponding to one pixel point to be adjusted is one, two or four. It can be understood that for a pixel point to be adjusted near the corners of the gray image, the number of corresponding target sub-images is one, for example, the solid line in FIG. 4A is the boundary line of each sub-image, and the pixel point 402 in FIG. 4A is near the corners of the gray image, so the target sub-image corresponding to the pixel point 402 is only one, that is, the sub-image in which the pixel point 402 itself is located. Figure 4 Figure 4 For a pixel point to be adjusted near the edges of the gray image, the number of corresponding target sub-images is two, for example, the pixel point 404 in FIG. 4B is near the edges of the gray image, so the number of target sub-images corresponding to the pixel point 404 is two, that is, the sub-image in which the pixel point 404 itself is located and the sub-image adjacent to the right side of the sub-image in which the pixel point 404 itself is located. Figure 4 Figure 4 For a pixel point to be adjusted not near the corners and edges of the gray image, the number of corresponding target sub-images is four, for example, the pixel point 406 in FIG. 4C is not near the corners and edges of the gray image, so the number of target sub-images corresponding to the pixel point 406 is four, that is, the sub-image in which the pixel point 406 itself is located, and the sub-images adjacent to the upper side, left side and upper left side of the sub-image in which the pixel point 406 itself is located.

[0048] In some embodiments, when the number of target sub-images corresponding to the pixel point to be adjusted is one, the display device can determine the preliminary gray value mean corresponding to the target sub-image as the adjusted gray value corresponding to the pixel point to be adjusted. When the number of target sub-images corresponding to the pixel point to be adjusted is more than one, the display device can perform weighted fusion on the preliminary gray value mean corresponding to each target sub-image to obtain the adjusted gray value corresponding to the pixel point to be adjusted.

[0049] ​​Step 208, convert the first image into a color image containing a luminance channel to obtain a second image.

[0050] The pixel value of a pixel point in the second image under the luminance channel is the luminance value.

[0051] In some embodiments, the display device can convert the first image into a color image in the RGB color space, and then convert the color image in the RGB color space into a color image in the XYZ color space to obtain the second image. The XYZ color space includes an X channel, a Y channel, and a Z channel. The Y channel is the luminance channel. The pixel value of a pixel point in the color image in the XYZ color space under the Y channel (i.e., the luminance channel) is the luminance value.

[0052] In some embodiments, the display device can multiply the pixel value of each pixel point in the color image in the RGB color space by a transformation matrix to obtain the pixel value of each pixel point in the color image in the XYZ color space, i.e., to obtain the second image. The transformation matrix is a transformation matrix from the RGB color space to the XYZ color space.

[0053] In some embodiments, the transformation matrix is:

[0054]

[0055] Step 210, determine the global luminance mean of the second image under the luminance channel, and perform global dynamic range compression on the luminance values of the second image under the luminance channel according to the global luminance mean to obtain a third image.

[0056] The global luminance mean is used to represent the mean of the luminance values of each pixel point in the second image under the luminance channel.

[0057] In some embodiments, the global luminance mean can be any one of the average logarithmic value, the arithmetic mean, or the geometric mean of the luminance values of each pixel point in the second image under the luminance channel.

[0058] In some embodiments, in the case of using the average logarithmic value, the display device can determine the sum of the logarithmic values of the luminance values of each pixel point in the second image under the luminance channel, perform exponential transformation on the sum of the logarithmic values to obtain an exponential result, and then determine the global luminance mean of the second image under the luminance channel according to the ratio of the exponential result to the number of pixel points in the second image.

[0059] Step 212, for each pixel point in the third image, determine a target neighborhood range around the pixel point, and perform compression on the luminance value at the pixel point according to the local luminance mean in the target neighborhood range to obtain a target image after tone mapping of the high dynamic range image; the luminance values in the target neighborhood range change gently.

[0060] wherein the local brightness mean in the target neighborhood range refers to a mean of the brightness values of each pixel point in the target neighborhood range in the brightness channel, i.e., used to represent the brightness mean in the local range of the target neighborhood range.

[0061] In some embodiments, the display device can respectively determine the target neighborhood range of each pixel point, and determine the mean of the brightness values of each pixel point in the target neighborhood range in the brightness channel to obtain the local brightness mean in the target neighborhood range, and then compress the brightness value at the pixel point according to the local brightness mean in the target neighborhood range to obtain the target image.

[0062] In some embodiments, the display device can determine, for each pixel point, the maximum neighborhood range in which the brightness values around the pixel point change gently to obtain the target neighborhood range.

[0063] In other embodiments, the target neighborhood range can also not be the maximum neighborhood range in which the brightness values change gently, but in the case that the brightness values change gently within a preset neighborhood range around the pixel point, the preset neighborhood range is determined as the target neighborhood range; in the case that the brightness values do not change gently within the preset neighborhood range around the pixel point, the maximum neighborhood range in which the brightness values around the pixel point change gently is determined as the target neighborhood range.

[0064] In some embodiments, the display device can determine the compressed brightness value corresponding to each pixel point according to the ratio between the brightness value at each pixel point in the third image and the local brightness mean in the corresponding target neighborhood range, and obtain the target image based on the compressed brightness value corresponding to each pixel point.

[0065] In some embodiments, the display device can add the local brightness mean in the target neighborhood range corresponding to each pixel point to 1 to obtain a compression ratio, and then determine the compressed brightness value corresponding to each pixel point according to the ratio between the brightness value at each pixel point in the third image and the corresponding compression ratio.

[0066] The color tone mapping method divides the gray image of the high dynamic range image to be color tone mapped into a plurality of sub-images, respectively performs histogram equalization processing on each sub-image to obtain a preliminary gray value of each pixel point in the sub-image, realizes global color tone mapping, then respectively adjusts the gray value of each pixel point in each sub-image according to the preliminary gray value of the pixel point of the target sub-image within a preset range around each pixel point in each sub-image, obtains a first image based on the adjusted gray value of each pixel point in each sub-image, can consider the gray value of the adjacent region, avoid the noise in the image being amplified in the near constant region, improve the quality of the image after global color tone mapping, converts the first image into a color image containing a brightness channel to obtain a second image, determines the global brightness average value of the second image in the brightness channel, and performs global dynamic range compression on the brightness value of the second image in the brightness channel according to the global brightness average value to obtain a third image, for each pixel point in the third image, determines a target neighborhood range with a gentle brightness value change around the pixel point, and compresses the brightness value at the pixel point according to the local brightness average value in the target neighborhood range to obtain a target image after color tone mapping corresponding to the high dynamic range image, realizing local color tone mapping of the image, performing local color tone mapping on the basis of high-quality global color tone mapping, avoiding loss of local details, and further improving the image quality.

[0067] In some embodiments, the histogram equalization processing on each sub-image to obtain a preliminary gray value of each pixel point in the sub-image includes: determining a gray histogram corresponding to each sub-image; determining a target gray level with a gray value greater than or equal to a preset threshold in each gray histogram, and distributing the gray value of the target gray level to each gray level in the gray histogram to obtain an adjusted gray histogram; and performing histogram equalization processing on the adjusted gray histogram corresponding to each sub-image to obtain a preliminary gray value of each pixel point in the sub-image.

[0068] In some embodiments, the display device can determine a target gray level with a gray value greater than or equal to a preset threshold in the gray histogram of each sub-image, determine a total sum of the gray values exceeding the preset threshold of each target gray level, set the gray value of the target gray level to the preset threshold, and then add the ratio of the total sum of the gray values exceeding the preset threshold to the total number of gray levels to each gray level in the gray histogram to obtain an adjusted gray histogram.

[0069] For example, the target gray level b higher than the preset threshold a in the gray histogram is summed to obtain a total sum of the gray values exceeding the preset threshold c, each target gray level b is set to a, then the ratio d of the total sum of the gray values exceeding the preset threshold c to the total number of gray levels 256 is obtained, and the ratio d is added to each gray level in the gray histogram to obtain an adjusted gray histogram.

[0070] In the above embodiments, the target gray scale whose gray scale value is greater than or equal to the preset threshold value is determined in the gray scale histogram of each sub-image respectively, the gray scale value of the target gray scale is evenly distributed to each gray scale in the gray scale histogram to obtain an adjusted gray scale histogram, the limitation of the gray scale value of the target gray scale greater than or equal to the preset threshold value in the gray scale histogram of each sub-image is realized, the image corresponding to the adjusted gray scale histogram is more smooth, and the image quality is improved, and then the histogram equalization processing is performed based on the adjusted gray scale histogram, so that the obtained image has higher quality.

[0071] In some embodiments, the histogram equalization processing is respectively performed on each sub-image to obtain the preliminary gray scale value of each pixel point in the sub-image, including: for each sub-image, determining the number of gray scales in the sub-image and the number of pixel points corresponding to each gray scale; determining the target gray scale in which the gray scale value of each pixel point in the sub-image is located, and determining the total number of pixel points corresponding to the target gray scale and each gray scale lower than the target gray scale; for each pixel point in the sub-image, determining the proportion of the total number corresponding to the pixel point to the number of pixel points in the sub-image, and compressing the gray scale value of the pixel point according to the product of the proportion and the number of gray scales to obtain the preliminary gray scale value of the pixel point.

[0072] In some embodiments, the display device can calculate the gray scale histogram of the sub-image to determine the number of gray scales in the sub-image and the number of pixel points corresponding to each gray scale.

[0073] In some embodiments, the display device can multiply the gray scale value of the pixel point by the product of the proportion and the number of gray scales to obtain the preliminary gray scale value corresponding to the pixel point.

[0074] In some embodiments, the display device can determine a histogram equalization function according to the gray scale histogram, map the gray scale value of each pixel point in the sub-image to a new gray scale value according to the histogram equalization function to obtain the preliminary gray scale value, and the histogram equalization function can be expressed by the following formula:

[0075]

[0076] wherein M and N respectively represent the number of rows and columns of pixels of the sub-image, and MN is the number of pixel points in the sub-image. L represents the number of gray scales in the sub-image. j represents the index of the gray scale. n j represents the number of pixel points corresponding to the gray scale j. x represents the gray scale value of the pixel point in the sub-image before the histogram equalization processing. k represents the index of the gray scale corresponding to the gray scale value x. is the total number of pixel points corresponding to the target gray scale k and each gray scale lower than the target gray scale.

[0077] The derivation process of the histogram equalization function is as follows:

[0078] The distribution of pixel gray levels in the image before and after the histogram equalization processing is regarded as F(x) and F(y), the random variable x is the value of the gray value before the histogram equalization processing, and the random variable y is the value of the gray value after the histogram equalization processing. Solving the histogram equalization function is to solve the function conversion relationship y=T(x) between x and y. That is, given the probability density functions f(x) and f(y), f(x)=n k / MN, and f(y)=1 / (L-1), solve T(x). Wherein, M and N are the number of pixels in the row and column of the sub-image, n k is the number of pixels corresponding to the gray level k in the sub-image, and L is the number of gray levels in the sub-image. According to the above known conditions, the following derivation is performed:

[0079]

[0080] Wherein, T -1 (y) is the inverse function of T(x). Taking the derivative of both sides of the above formula with respect to y, we get:

[0081]

[0082] Substituting the above known conditions into the above formula, we get:

[0083]

[0084] That is,

[0085] Taking the integral of both sides of the above formula with respect to x, we get That is the histogram equalization function.

[0086] In the above embodiment, the number of gray levels in the sub-image and the number of pixels corresponding to each gray level are determined, the target gray level to which the gray value of each pixel in the sub-image belongs is determined, the total number of pixels corresponding to the target gray level and each gray level lower than the target gray level is determined, for each pixel in the sub-image, the proportion of the total number of pixels corresponding to the pixel to the number of pixels in the sub-image is determined, and the gray value of the pixel is compressed according to the product of the proportion and the number of gray levels to obtain a preliminary gray value of the pixel. The histogram equalization processing of each sub-image can be efficiently and accurately performed to realize the global dynamic range compression of the sub-image and realize the global tone mapping of the high dynamic range image.

[0087] In some embodiments, the display device adjusts the gray scale values of the pixels in each sub-image according to the preliminary gray scale values of the pixels in the target sub-images within a preset range around each pixel in each sub-image, and obtains the first image based on the adjusted gray scale values of the pixels in each sub-image, including: taking each pixel in each sub-image as a pixel to be adjusted, respectively, and determining each target sub-image within a preset range around the pixel to be adjusted; determining the distance between the pixel to be adjusted and each target sub-image; determining the weight corresponding to each target sub-image according to the distance; and performing weighted fusion on the preliminary gray scale values of the pixels in each target sub-image according to the weight corresponding to each target sub-image, to obtain the adjusted gray scale value corresponding to the pixel to be adjusted, and obtaining the first image based on the adjusted gray scale values of the pixels to be adjusted in each sub-image.

[0088] In some embodiments, the display device can determine the distance between the pixel to be adjusted and the center point of the target sub-image as the distance between the pixel to be adjusted and the target sub-image.

[0089] In some embodiments, the weight and the distance are positively correlated. The greater the distance, the greater the weight; the smaller the distance, the smaller the weight.

[0090] In some embodiments, the weight and the distance are linearly positively correlated.

[0091] In some embodiments, the sum of the weights corresponding to each target sub-image corresponding to the same pixel to be adjusted is 1.

[0092] In some embodiments, the display device can perform weighted summation on the mean of the preliminary gray scale values of the pixels in each target sub-image according to the weight corresponding to each target sub-image, to obtain the adjusted gray scale value corresponding to the pixel to be adjusted.

[0093] For example: for the pixel to be adjusted 402 in Figure 4 , since there is only one corresponding target sub-image, the mean of the preliminary gray scale values corresponding to the target sub-image is directly determined as the adjusted gray scale value corresponding to the pixel to be adjusted 402. For the pixel to be adjusted 404 in Figure 4 , according to the distances between the pixel to be adjusted 404 and the two target sub-images, the weights corresponding to the two target sub-images are determined as c1 and 1-c1, respectively, and the means of the preliminary gray scale values corresponding to the two target sub-images are b1 and b2, respectively, so the adjusted gray scale value corresponding to the pixel to be adjusted 404 is b1*c1+b2*(1-c1). For the pixel to be adjusted 406 in Figure 4The distance between the pixel point to be adjusted 406 and each target sub-image is determined, the weight corresponding to each target sub-image is determined according to the distance, the preliminary gray value of the pixel point of each target sub-image is weighted and fused according to the weight corresponding to each target sub-image, so that the adjusted gray value can fully consider the gray value in the adjacent target sub-image, and the distance is considered to adjust, the accuracy of the adjusted gray value is improved, the first image obtained after adjustment is smoother, and the image quality is higher.

[0094] In the above embodiment, the distance between the pixel point to be adjusted and each target sub-image is determined, the weight corresponding to each target sub-image is determined according to the distance, the preliminary gray value of the pixel point of each target sub-image is weighted and fused according to the weight corresponding to each target sub-image, so that the adjusted gray value can fully consider the gray value in the adjacent target sub-image, and the distance is considered to adjust, the accuracy of the adjusted gray value is improved, the first image obtained after adjustment is smoother, and the image quality is higher.

[0095] In some embodiments, determining the global brightness mean value of the second image in the brightness channel, and performing global dynamic range compression on the brightness value of the second image in the brightness channel according to the global brightness mean value to obtain the third image includes: determining the global brightness mean value of the second image in the brightness channel; and respectively compressing the brightness value of each pixel point in the second image in the brightness channel according to the global brightness mean value to obtain the third image.

[0096] In some embodiments, the display device can determine the compressed brightness value corresponding to each pixel point according to the ratio between the brightness value of each pixel point in the second image in the brightness channel and the global brightness mean value, and obtain the third image based on the compressed brightness value corresponding to each pixel point.

[0097] In some embodiments, the display device can determine the product of the ratio between the brightness value of each pixel point in the second image in the brightness channel and the global brightness mean value and the brightness proportion constant as the compressed brightness value corresponding to each pixel point, and the specific formula is as follows:

[0098]

[0099] Wherein, a represents the brightness proportion constant, L w (x,y) represents the brightness value of the pixel point in the second image in the brightness channel, represents the global brightness mean value, and L(x,y) represents the compressed brightness value corresponding to the pixel point.

[0100] In some embodiments, the value of the luminance proportion constant can determine the size of the luminance of the third image. The value of the luminance proportion constant can be 0.18, or other values, without limitation. When the value of the luminance proportion constant is 0.18, the neutral gray in the image can be mapped to 18% gray on the display device, and at this time, the human eye feels that the brightness of the displayed image is just between black and white (i.e., the luminance is 50%), which can make the high dynamic image get a good overall compression effect.

[0101] In the above embodiments, the global luminance mean of the second image in the luminance channel is determined, and the luminance value of each pixel point in the second image in the luminance channel is compressed according to the global luminance mean to obtain the third image, which can realize efficient global dynamic range compression of the luminance value of the image.

[0102] In some embodiments, determining the global luminance mean of the second image in the luminance channel includes: determining the sum of the logarithmic values of the luminance values of the pixel points in the second image in the luminance channel; performing exponential transformation on the sum of the logarithmic values to obtain an exponential result; and determining the global luminance mean of the second image in the luminance channel according to the ratio of the exponential result to the number of pixel points in the second image.

[0103] In some embodiments, the display device can add a correction value to the luminance value of each pixel point in the luminance channel to obtain a corrected luminance value, then calculate the logarithm of the corrected luminance value of each pixel point, add the logarithms corresponding to each pixel point to obtain the sum of the logarithmic values, perform exponential transformation on the sum of the logarithmic values to obtain an exponential result, and finally determine the global luminance mean of the second image in the luminance channel according to the ratio of the exponential result to the number of pixel points in the second image. The specific formula is as follows:

[0104]

[0105] wherein, L w (x, y) represents the luminance value of the pixel point in the second image in the luminance channel. δ represents the correction value. N represents the number of pixel points in the second image. represents the global luminance mean of the second image in the luminance channel.

[0106] In the above embodiments, the sum of the logarithmic values of the luminance values of the pixel points in the second image in the luminance channel is determined, the exponential transformation is performed on the sum of the logarithmic values to obtain an exponential result, and the global luminance mean of the second image in the luminance channel can be accurately and efficiently determined according to the ratio of the exponential result to the number of pixel points in the second image.

[0107] In some embodiments, for each pixel point in the third image, determining the target neighborhood range around the pixel point comprises: for each pixel point in the third image, performing filtering processing on the luminance value at the pixel point using a Gaussian filter to obtain a luminance response corresponding to the pixel point; the luminance response is used to represent the average luminance within the scale range of the Gaussian filter around the pixel point; in the case that the luminance response is less than or equal to a preset threshold, iteratively increasing the scale of the Gaussian filter, and returning to perform the step of performing filtering processing on the luminance value at the pixel point using the Gaussian filter to obtain the luminance response corresponding to the pixel point and subsequent steps to obtain the target neighborhood range around the pixel point; wherein the radius of the target neighborhood range is the maximum value of the scale of the Gaussian filter determined in the case that the luminance response is less than or equal to the preset threshold.

[0108] In some embodiments, the display device can multiply the luminance value of each pixel point in the third image by a Gaussian filtering function to obtain the luminance response corresponding to the pixel point, which can be represented by the following formula:

[0109]

[0110] Wherein L(x, y) represents the luminance value of the pixel point (x, y) in the third image. R(x, y, s) represents the Gaussian filtering function, and s represents the scale of the Gaussian filter. V(x, y, s) represents the luminance response corresponding to the pixel point (x, y). The Gaussian filtering function R(x, y, s) can be represented by the following formula:

[0111]

[0112] Wherein s represents the scale of the Gaussian filter, x and y represent the coordinate values of the pixel point, and a represents the luminance proportion constant.

[0113] In some embodiments, for each pixel point in the third image, the display device can first perform filtering processing on the luminance value at the pixel point using a Gaussian filter with the smallest scale to obtain the luminance response corresponding to the pixel point, and then in the case that the luminance response is less than or equal to a preset threshold, iteratively increase the scale of the Gaussian filter to iteratively perform filtering processing on the luminance value at the pixel point using the Gaussian filter with the new scale to obtain the luminance response corresponding to the pixel point, until the luminance response is greater than the preset threshold, to obtain the target neighborhood range around the pixel point. That is, the maximum value s of s obtained when V(x, y, s) ≤ ε is the radius of the target neighborhood range. max That is, the maximum value s of s obtained when V(x, y, s) ≤ ε is the radius of the target neighborhood range.

[0114] In the above embodiment, the luminance value at the pixel point is filtered using a Gaussian filter to obtain a luminance response corresponding to the pixel point, the scale of the Gaussian filter is iteratively increased in a case where the luminance response is less than or equal to a preset threshold, and a maximum value of the scale of the Gaussian filter determined in the case where the luminance response is less than or equal to the preset threshold is taken as a radius of the target neighborhood range, so that the target neighborhood range with a gently changing luminance value can be accurately determined, and then the local tone mapping of the image can be accurately performed according to the accurate target neighborhood range.

[0115] In some embodiments, the luminance value at the pixel point is compressed according to the local luminance mean value in the target neighborhood range to obtain the target image after tone mapping of the high dynamic range image, including: for each pixel point in the third image, taking the luminance response of the target neighborhood range at the scale corresponding to the pixel point as the local luminance mean value in the target neighborhood range; and compressing the luminance value at the pixel point according to the local luminance mean value to obtain the target image after tone mapping of the high dynamic range image.

[0116] In some embodiments, the display device can determine the compressed luminance value corresponding to each pixel point according to the ratio between the luminance value at each pixel point in the third image and the luminance response at the scale of the corresponding target neighborhood range, and obtain the target image based on the compressed luminance value corresponding to each pixel point.

[0117] In some embodiments, the display device can add the luminance response at the scale of the target neighborhood range corresponding to each pixel point to 1 to obtain a compression ratio, and then determine the compressed luminance value corresponding to each pixel point according to the ratio between the luminance value at each pixel point in the third image and the corresponding compression ratio. The specific formula is as follows:

[0118]

[0119] wherein, L d (x,y) represents the compressed luminance value corresponding to the pixel point (x,y). L(x,y) represents the luminance value before compression corresponding to the pixel point (x,y), V1(x,y,s max (x,y)) represents the luminance response at the scale of the target neighborhood range corresponding to the pixel point. s max (x,y) represents the radius of the target neighborhood range corresponding to the pixel point.

[0120] In the above embodiment, the local luminance mean value in the range with a gently changing luminance around the pixel point is used to compress the luminance value of the pixel point, so that the local tone mapping of the image is accurately realized.

[0121] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.

[0122] Based on the same inventive concept, the embodiments of the present application also provide a tone mapping device for implementing the above-mentioned tone mapping method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more tone mapping device embodiments provided below can refer to the limitations of the tone mapping method in the above text, and will not be repeated here.

[0123] In some embodiments, as shown in Figure 5 A tone mapping device 500 is provided, including a preliminary equalization module 502, a gray value adjustment module 504, a global brightness compression module 506, and a local brightness compression module 508, wherein:

[0124] The preliminary equalization module 502 is configured to divide the gray image of the high dynamic range image to be tone mapped into a plurality of sub-images; and perform histogram equalization processing on each sub-image to obtain a preliminary gray value of each pixel point in the sub-image.

[0125] The gray value adjustment module 504 is configured to adjust the gray value of each pixel point in each sub-image according to the preliminary gray value of the pixel point of the target sub-image within a predetermined range around each pixel point in each sub-image, and obtain a first image based on the adjusted gray value of each pixel point in each sub-image.

[0126] The global brightness compression module 506 is configured to convert the first image into a color image containing a brightness channel to obtain a second image; determine a global brightness mean value of the second image in the brightness channel, and perform global dynamic range compression on the brightness value of the second image in the brightness channel according to the global brightness mean value to obtain a third image.

[0127] The local brightness compression module 508 is configured to determine a target neighborhood range around each pixel point in the third image, and compress the brightness value at the pixel point according to a local brightness mean value in the target neighborhood range, to obtain a target image after tone mapping of the high dynamic range image.

[0128] In some embodiments, the preliminary equalization module 502 is further configured to determine a gray scale histogram corresponding to each sub-image respectively; determine a target gray scale level in each gray scale histogram, where the gray scale value is greater than or equal to a preset threshold value, and average the gray scale values of the target gray scale level to each gray scale level in the gray scale histogram, to obtain an adjusted gray scale histogram; and perform histogram equalization processing on the adjusted gray scale histogram corresponding to each sub-image respectively, to obtain a preliminary gray scale value of each pixel point in each sub-image.

[0129] In some embodiments, the gray scale value adjustment module 504 is further configured to take each pixel point in each sub-image as a pixel point to be adjusted respectively, and determine each target sub-image within a preset range around the pixel point to be adjusted; determine the distance between the pixel point to be adjusted and each target sub-image; determine a weight corresponding to each target sub-image according to the distance; and perform weighted fusion on the preliminary gray scale values of the pixel points in each target sub-image according to the weight corresponding to each target sub-image respectively, to obtain an adjusted gray scale value corresponding to the pixel point to be adjusted, and obtain the first image based on the adjusted gray scale values of each pixel point to be adjusted in each sub-image.

[0130] In some embodiments, the global brightness compression module 506 is further configured to determine a global brightness mean value of the second image in the brightness channel; and compress the brightness value of each pixel point in the second image in the brightness channel according to the global brightness mean value, to obtain the third image.

[0131] In some embodiments, the local brightness compression module 508 is further configured to, for each pixel point in the third image, perform filtering processing on the brightness value at the pixel point using a Gaussian filter, to obtain a brightness response corresponding to the pixel point; the brightness response is used to represent a brightness mean value within a scale range of the Gaussian filter around the pixel point; in a case where the brightness response is less than or equal to a preset threshold value, iteratively increase the scale of the Gaussian filter, and return to perform the step of performing filtering processing on the brightness value at the pixel point using the Gaussian filter, to obtain the brightness response corresponding to the pixel point, and subsequent steps, to obtain a target neighborhood range around the pixel point; wherein the radius of the target neighborhood range is the maximum value of the scale of the Gaussian filter determined in the case where the brightness response is less than or equal to the preset threshold value.

[0132] In some embodiments, the local brightness compression module 508 is further configured to, for each pixel point in the third image, take the brightness response of the target neighborhood range corresponding to the pixel point as a local brightness mean value in the target neighborhood range; and compress the brightness value at the pixel point according to the local brightness mean value to obtain the target image after tone mapping corresponding to the high dynamic range image.

[0133] The tone mapping device divides the gray image of the high dynamic range image to be tone mapped into a plurality of sub-images, respectively processes the histogram equalization of each sub-image to obtain the preliminary gray value of the pixel point in each sub-image, realizes global tone mapping, then respectively adjusts the gray value of the pixel point in each sub-image according to the preliminary gray value of the pixel point of the target sub-image within a preset range around the pixel point in each sub-image, obtains the first image based on the adjusted gray value of each pixel point in each sub-image, can consider the gray value of the adjacent region, improves the quality of the image after global tone mapping, converts the first image into a color image containing a brightness channel to obtain a second image, determines the global brightness mean value of the second image in the brightness channel, and performs global dynamic range compression on the brightness value of the second image in the brightness channel according to the global brightness mean value to obtain a third image, determines, for each pixel point in the third image, a target neighborhood range in which the brightness value around the pixel point changes gently, and compresses the brightness value at the pixel point according to the local brightness mean value in the target neighborhood range to obtain the target image after tone mapping corresponding to the high dynamic range image, realizes local tone mapping of the image, performs local tone mapping on the basis of high-quality global tone mapping, avoids loss of local details, and further improves the image quality.

[0134] Each module in the tone mapping device can be realized by software, hardware, and a combination thereof in whole or in part. Each module can be embedded in or independent of the processor in the display device in hardware form, or can be stored in the memory in the display device in software form, so as to be called and executed by the processor to perform the operation corresponding to each module.

[0135] In one embodiment, a display device is provided, and its internal structure diagram can be as shown in Figure 6As shown in the figure. The display device includes a processor, a memory, a communication interface, a display unit and an input device connected through a system bus. Among them, the processor of the display device is used to provide computing and control capabilities. The memory of the display device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the display device is used for wired or wireless communication with external terminals. Wireless communication can be achieved through WIFI, mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by the processor to implement a tone mapping method. The display unit of the display device can be a liquid crystal display screen or an electronic ink display screen, or a projection device. The input device of the display device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the display device, or an external keyboard, touchpad or mouse, etc.

[0136] In some embodiments, the display device includes a projection device. The projection device can project an image onto a projection surface for display.

[0137] In other embodiments, the display device can also include a display screen or a display device.

[0138] Those skilled in the art can understand that, Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the display device to which the scheme of the present application is applied. The specific display device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0139] In one embodiment, a display device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the above method embodiments.

[0140] In one embodiment, a computer readable storage medium is provided, storing a computer program, which is executed by a processor to implement the steps in the above method embodiments.

[0141] In one embodiment, a computer program product is provided, including a computer program, which is executed by a processor to implement the steps in the above method embodiments.

[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0143] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0144] The technical features of the above embodiments can be combined in any way. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present disclosure.

[0145] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A tone mapping method, characterized in that, The method includes: Divide the grayscale image of the high dynamic range image to be tone mapped into multiple sub-images; Histogram equalization is performed on each of the sub-images to obtain the preliminary grayscale values ​​of the pixels in each sub-image. Based on the initial grayscale values ​​of the pixels in the target sub-image within a preset range surrounding each pixel in the sub-image, the grayscale values ​​of the pixels in each sub-image are adjusted, and a first image is obtained based on the adjusted grayscale values ​​of the pixels in each sub-image. The first image is converted into a color image including a luminance channel to obtain the second image; Determine the global average brightness value of the second image in the brightness channel, and perform global dynamic range compression on the brightness value of the second image in the brightness channel based on the global average brightness value to obtain the third image; For each pixel in the third image, a target neighborhood range around the pixel is determined, and the brightness value at the pixel is compressed based on the local brightness average value in the target neighborhood range to obtain the target image after tone mapping corresponding to the high dynamic range image; the brightness value changes gradually within the target neighborhood range.

2. The method according to claim 1, characterized in that, The step of performing histogram equalization on each of the sub-images to obtain the preliminary grayscale values ​​of the pixels in each of the sub-images includes: Determine the grayscale histogram corresponding to each of the sub-images; Determine the target gray level in each gray level histogram whose gray level is greater than or equal to a preset threshold, and distribute the gray level of the target gray level evenly to each gray level in the gray level histogram to obtain the adjusted gray level histogram. Histogram equalization is performed on the adjusted grayscale histograms corresponding to each of the sub-images to obtain the preliminary grayscale values ​​of the pixels in each sub-image.

3. The method according to claim 1, characterized in that, The step of adjusting the grayscale values ​​of pixels in each sub-image based on the preliminary grayscale values ​​of pixels in the target sub-image within a preset range surrounding each pixel in the sub-image, and obtaining the first image based on the adjusted grayscale values ​​of each pixel in each sub-image, includes: Each pixel in each of the sub-images is taken as a pixel to be adjusted, and each target sub-image within a preset range around the pixel to be adjusted is determined. Determine the distance between the pixel to be adjusted and each of the target sub-images; Based on the distances mentioned, determine the weights corresponding to each of the target sub-images; Based on the weights corresponding to each of the target sub-images, the initial grayscale values ​​of the pixels in each target sub-image are weighted and fused to obtain the adjusted grayscale values ​​corresponding to the pixels to be adjusted. Based on the adjusted grayscale values ​​of each pixel to be adjusted in each sub-image, a first image is obtained.

4. The method according to claim 1, characterized in that, The step of determining the global average brightness value of the second image in the brightness channel, and performing global dynamic range compression on the brightness value of the second image in the brightness channel based on the global average brightness value to obtain the third image includes: Determine the global average brightness of the second image in the brightness channel; Based on the global average brightness, the brightness value of each pixel in the second image under the brightness channel is compressed to obtain the third image.

5. The method according to claim 1, characterized in that, Determining the target neighborhood range around each pixel in the third image includes: For each pixel in the third image, a Gaussian filter is used to filter the brightness value at the pixel to obtain the brightness response corresponding to the pixel; the brightness response is used to characterize the average brightness value within the scale range of the Gaussian filter around the pixel. If the brightness response is less than or equal to a preset threshold, the scale of the Gaussian filter is iteratively increased, and the process of using the Gaussian filter to filter the brightness value at the pixel to obtain the brightness response corresponding to the pixel and subsequent steps are performed to obtain the target neighborhood range around the pixel. The radius of the target neighborhood is the maximum value of the scale of the Gaussian filter determined when the brightness response is less than or equal to a preset threshold.

6. The method according to claim 5, characterized in that, The step of compressing the brightness value at the pixel point based on the local brightness mean in the target neighborhood range to obtain the tone-mapped target image corresponding to the high dynamic range image includes: For each pixel in the third image, the brightness response at the scale of the target neighborhood corresponding to the pixel is taken as the local brightness mean in the target neighborhood. Based on the local average brightness, the brightness value at the pixel is compressed to obtain the target image after tone mapping corresponding to the high dynamic range image.

7. A tone mapping device, characterized in that, The device includes: The preliminary equalization module is used to divide the grayscale image of the high dynamic range image to be tone mapped into multiple sub-images; and to perform histogram equalization processing on each sub-image to obtain the preliminary grayscale value of the pixels in each sub-image. The grayscale adjustment module is used to adjust the grayscale value of the pixels in each sub-image according to the initial grayscale value of the pixels in the target sub-image within a preset range around the pixels in each sub-image, and to obtain a first image based on the adjusted grayscale value of each pixel in each sub-image. A global brightness compression module is used to convert the first image into a color image containing a brightness channel to obtain a second image; determine the global brightness average value of the second image under the brightness channel, and perform global dynamic range compression on the brightness value of the second image under the brightness channel according to the global brightness average value to obtain a third image; The local brightness compression module is used to determine the target neighborhood range around each pixel in the third image, and compress the brightness value at the pixel according to the local brightness mean in the target neighborhood range to obtain the target image after tone mapping corresponding to the high dynamic range image; the brightness value changes gradually in the target neighborhood range.

8. A display device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. The display device according to claim 8, wherein the display device includes a projection device.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image compression method, electronic equipment and computer readable storage medium

    CN114708157A

  • Infrared image compression method and device, storage medium and electronic equipment

    CN116152272A