CN116739936A - Tone mapping method, tone mapping device, display device and storage medium - Google Patents

Tone mapping method, tone mapping device, display device and storage medium Download PDF

Info

Publication number
CN116739936A
CN116739936A CN202310789191.3A CN202310789191A CN116739936A CN 116739936 A CN116739936 A CN 116739936A CN 202310789191 A CN202310789191 A CN 202310789191A CN 116739936 A CN116739936 A CN 116739936A
Authority
CN
China
Prior art keywords
image
brightness
value
pixel point
global
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310789191.3A
Other languages
Chinese (zh)
Inventor
王豪庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fengmi Beijing Technology Co ltd
Original Assignee
Fengmi Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fengmi Beijing Technology Co ltd filed Critical Fengmi Beijing Technology Co ltd
Priority to CN202310789191.3A priority Critical patent/CN116739936A/en
Publication of CN116739936A publication Critical patent/CN116739936A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The application relates to a tone mapping method, a tone mapping device, a display device and a storage medium. The method comprises the following steps: converting the high dynamic range image to be tone mapped into a gray scale image; performing histogram equalization on the gray level image to perform global dynamic range compression on gray level values of all pixel points in the gray level image to obtain a first image; converting the first image into a color image containing brightness channels to obtain a second image; determining a global brightness average value of the second image under the brightness channel, and compressing the global dynamic range of the brightness value of the second image under the brightness channel according to the global brightness average value to obtain a third image; and determining a target neighborhood range with gentle brightness value change around each pixel point in the third image, and compressing the brightness value at the pixel point according to the local brightness average value in the target neighborhood range to obtain a tone-mapped target image corresponding to the high dynamic range image. The method can improve the image quality after tone mapping.

Description

Tone mapping method, tone mapping device, display device and storage medium
Technical Field
The present application relates to the field of display technologies and image processing technologies, and in particular, to a tone mapping method, a tone mapping apparatus, a display device, and a storage medium.
Background
HDR (high dynamic range) technology has been developed at a high speed in recent years, and has become the mainstream in the image and video fields. Compared with a common image, the HDR image can provide more dynamic range and image details, greatly improves the brightness contrast of the picture details, and better reflects the visual effect in the real environment. However, HDR images cannot be displayed on some lower performance display devices because of higher brightness, deeper depth, and wider color gamut. Currently, some LCD displays typically discretize color channels to 8-bit, and the chromaticity interval is only 255 levels, so that HDR images cannot be displayed on these display devices, for example, some middle-low-end LCD projection devices cannot directly display HDR images like high-end projection devices. Therefore, tone mapping of the HDR image is required to enable the HDR image to adapt to the display of the LDR display device.
In the conventional method, mapping processing is generally performed on each pixel point in the HDR image in a unified manner, so as to map chromaticity, brightness, dynamic range and the like of the HDR image into the labeling range of the LDR display device. However, this method tends to result in some loss of local detail in the image, resulting in poor image quality after tone mapping.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a tone mapping method, apparatus, display device, computer-readable storage medium, and computer program product that can improve image quality.
In a first aspect, the present application provides a tone mapping method. The method comprises the following steps:
converting the high dynamic range image to be tone mapped into a gray scale image;
performing histogram equalization processing on the gray level image to perform global dynamic range compression on gray level values of all pixel points in the gray level image 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 average value of the second image under the brightness channel, and performing 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;
determining a target neighborhood range around each pixel point in the third image, and compressing the brightness value at the pixel point according to the local brightness average value in the target neighborhood range to obtain a tone-mapped target image corresponding to the high dynamic range image; and the brightness value in the target neighborhood range changes smoothly.
In a second aspect, the present application further provides a tone mapping apparatus. The device comprises:
the histogram equalization module is used for converting the high dynamic range image to be tone mapped into a gray level image; performing histogram equalization processing on the gray level image to perform global dynamic range compression on gray level values of all pixel points in the gray level image to obtain a first image;
the global brightness compression module is used for converting the first image into a color image containing a brightness channel to obtain a second image; determining a global brightness average value of the second image under the brightness channel, and performing 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 for determining a target neighborhood range around each pixel point in the third image, and compressing brightness values at the pixel points according to local brightness average values in the target neighborhood range to obtain a tone-mapped target image corresponding to the high dynamic range image; and the brightness value in the target neighborhood range changes smoothly.
In one embodiment, the histogram equalization module is further configured to determine the number of gray levels in the gray level image and the number of pixel points corresponding to each gray level respectively; determining a target gray level of gray values of all pixel points in the gray image, and determining the total number of the pixel points corresponding to the target gray level and the gray levels lower than the target gray level; for each pixel point in the gray level image, determining the proportion of the total number corresponding to the pixel points to the number of the pixel points in the gray level image, and compressing the gray level value of the pixel points according to the product of the proportion and the number of the gray level to obtain a first image.
In one embodiment, the global luminance compression module is further configured to determine a global luminance average of the second image under the luminance channel; and respectively compressing the brightness value of each pixel point in the second image under the brightness channel according to the global brightness average value to obtain a third image.
In one embodiment, the global brightness compression module is further configured to determine a sum of logarithmic values of brightness values of each pixel point in the second image under the brightness channel; performing index transformation on the sum of the logarithmic values to obtain an index result; and determining the global brightness average value of the second image under the brightness channel according to the ratio of the index result to the number of pixel points in the second image.
In one embodiment, the local luminance compression module is further configured to perform filtering processing on a luminance value at the pixel point by using a gaussian filter for each pixel point in the third image, so as to obtain a luminance response corresponding to the pixel point; the brightness response is used for representing the brightness average value in the scale range of the Gaussian filter around the pixel point; iteratively increasing the scale of the Gaussian filter under the condition that the brightness response is smaller than or equal to a preset threshold value, and returning to execute the step of filtering the brightness value at the pixel point by using the Gaussian filter to obtain the brightness response corresponding to the pixel point and the subsequent steps to obtain a target neighborhood range around the pixel point; and the radius of the target neighborhood range is the maximum value of the scale of the Gaussian filter, which is determined under the condition that the brightness response is smaller than or equal to a preset threshold value.
In one embodiment, the local luminance compression module is further configured to, for each pixel point in the third image, use the luminance response under the scale of the target neighborhood range corresponding to the pixel point as a local luminance average value in the target neighborhood range; and compressing the brightness value at the pixel point according to the local brightness average value to obtain a tone mapped target image corresponding to the high dynamic range image.
In a third aspect, the present application also provides a display apparatus. The display device includes a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of the tone mapping method according to the embodiments of the present application.
In a fourth aspect, the present application also 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 in the tone mapping method according to the embodiments of the present application.
In a fifth aspect, the present application also 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 the embodiments of the present application.
According to the tone mapping method, the device, the display equipment, the storage medium and the computer program product, firstly, the gray level image of the high dynamic range image is subjected to histogram equalization processing, the gray level value of each pixel point in the gray level image is subjected to global dynamic range compression, so that a first image is obtained, global tone mapping is achieved, then the first image is converted into a color image containing a brightness channel to obtain a second image, the global brightness average value of the second image under the brightness channel is determined, the brightness value of the second image under the brightness channel is subjected to global dynamic range compression according to the global brightness average value to obtain a third image, then the target neighborhood range around the pixel point is determined for each pixel point in the third image, the brightness value at the pixel point is compressed according to the local brightness average value in the target neighborhood range with gentle brightness value change, local tone mapping is achieved, local tone mapping is carried out on the basis of global tone mapping, local detail loss is avoided, and image quality is improved.
Drawings
FIG. 1 is a diagram of an application environment for a tone mapping method in one embodiment;
FIG. 2 is a flow diagram of a tone mapping method in one embodiment;
FIG. 3 is a graph comparing gray level histograms before and after a histogram equalization process in one embodiment;
FIG. 4 is a block diagram of the architecture of a tone mapping apparatus in one embodiment;
fig. 5 is an internal structural view of the display device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The tone mapping method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the display terminal 102 communicates with the computer device 104 via a network. The computer device 104 may send the image to be displayed to the display terminal 102, and if the image to be displayed is a high dynamic range image, the display terminal 102 may execute the tone mapping method in the embodiments of the present application to tone map the high dynamic range image to obtain the target image, and the display device 102 may display the target image. Wherein the display device 102 may be, but is not limited to, any of a projection device, a display, a screen, or the like. The computer device 104 may be a terminal or a server, the terminal may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car devices and the like, and the portable wearable devices may be smart watches, smart bracelets, head-mounted devices and the like. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In some embodiments, as shown in fig. 2, a tone mapping method is provided, and the method is applied to the display device 102 in fig. 1 for illustration, and includes the following steps:
step 202, converting the high dynamic range image to be tone mapped into a gray scale image.
Among them, a high dynamic range image (HDR image, high Dynamic Range Image) refers to an image having higher dynamic range of luminance and color depth than a conventional image. For example: while the pixel value of each pixel in a conventional image is only 8 bits deep, an HDR image may have a higher depth, e.g., 16 bits, 32 bits, or even higher, to more accurately represent the luminance and color details in the scene.
In some embodiments, the display device may obtain the image to be displayed from a computer device or from local to the display device. In some embodiments, if the image to be displayed is a high dynamic range image, the display device may perform step 202 and subsequent steps.
Step 204, performing histogram equalization processing on the gray image to perform global dynamic range compression on the gray value of each pixel point in the gray image, so as to obtain a first image.
The histogram equalization process is a process of converting the distribution of the gradation histogram of the image into a more uniform distribution. It can be appreciated that global dynamic range compression of gray values of a gray image can be achieved by performing histogram equalization processing on the gray image. As shown in fig. 3, the gray distribution in the gray histogram before the histogram equalization processing is very unbalanced, and the gray distribution in the gray histogram after the histogram equalization processing is more balanced, so that the global dynamic range compression of the gray value in the image is realized.
In some embodiments, the display device may determine a gray level histogram of the gray level image, then determine a histogram equalization function from the gray level histogram, and map gray level values of respective pixels in the gray level image to new gray level values according to the histogram equalization function to obtain the first image.
Step 206, converting the first image into a color image containing brightness channels, and obtaining a second image.
The pixel value of the pixel point in the second image under the brightness channel is the brightness value.
In some embodiments, the display device may convert the first image into a color image of an RGB color space and then convert the color image of the RGB color space into a color image of an XYZ color space, resulting in the second image. Wherein 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 the pixel point in the color image of the XYZ color space under the Y channel (i.e., luminance channel) is the luminance value.
In some embodiments, the display device may multiply the pixel values of the pixels in the color image of the RGB color space by the transformation matrix to obtain the pixel values of the pixels in the color image of the XYZ color space, i.e. to obtain the second image. Wherein the transformation matrix is a transformation matrix transformed from an RGB color space to an XYZ color space.
In some embodiments, the transformation matrix is:
step 208, determining a global brightness average value of the second image under the brightness channel, and performing 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 global brightness average value is used for representing the average value of brightness values of all pixel points in the second image under the brightness channel.
In some embodiments, the global luminance average may be any one of an average logarithmic value, an arithmetic average value, a geometric average value, or the like of luminance values of respective pixel points in the second image under the luminance channel.
In some embodiments, when the average logarithmic value is used, the display device may determine a sum of logarithmic values of luminance values of each pixel point in the second image under the luminance channel, perform exponential transformation on the sum of logarithmic values to obtain an exponential result, and determine a global luminance average value of the second image under the luminance channel according to a ratio of the exponential result to the number of pixel points in the second image.
Step 210, for each pixel point in the third image, determining a target neighborhood range around the pixel point, and compressing the brightness value at the pixel point according to the local brightness average value in the target neighborhood range to obtain a tone-mapped target image corresponding to the high dynamic range image; the brightness value in the target neighborhood range changes smoothly.
The local luminance average value in the target neighborhood range refers to an average value of luminance values of each pixel point in the target neighborhood range under a luminance channel, that is, a luminance average value in the local range used for representing the target neighborhood range.
In some embodiments, the display device may determine a target neighborhood range of each pixel point, determine a local luminance average value in the target neighborhood range by using an average value of luminance values of each pixel point in the target neighborhood range under the luminance channel, and compress the luminance values at the pixel points according to the local luminance average value in the target neighborhood range to obtain the target image.
In some embodiments, the display device may determine, for each pixel, a maximum neighborhood range in which the brightness value around the pixel changes smoothly, to obtain the target neighborhood range.
In other embodiments, the target neighborhood range may be not the maximum neighborhood range with a gentle change of the brightness value, but the preset neighborhood range is determined as the target neighborhood range when the brightness value in the preset neighborhood range around the pixel point changes smoothly; and under the condition that the brightness value change in the preset neighborhood range around the pixel point is not smooth, determining the maximum neighborhood range with smooth brightness value change around the pixel point as a target neighborhood range.
In some embodiments, the display device may determine compressed luminance values corresponding to the respective pixels according to a ratio between the luminance value at the respective pixel in the third image and the local luminance average value in the corresponding target neighborhood range, and obtain the target image based on the compressed luminance values corresponding to the respective pixels.
In some embodiments, the display device may add the local luminance average value in 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.
According to the tone mapping method, firstly, the gray level image of the high dynamic range image is subjected to histogram equalization processing, the gray level value of each pixel point in the gray level image is subjected to global dynamic range compression to obtain the first image, so that global tone mapping is achieved, then the first image is converted into a color image containing a brightness channel to obtain the second image, the global brightness average value of the second image under the brightness channel is determined, the global dynamic range compression of the brightness value of the second image under the brightness channel is carried out according to the global brightness average value to obtain the third image, then the target neighborhood range around the pixel point is determined for each pixel point in the third image, the brightness value at the pixel point is compressed according to the local brightness average value in the target neighborhood range with gentle brightness value change, the local tone mapping of the image is achieved, the dynamic range is properly increased for important areas in the image, the dynamic range is properly reduced for unimportant parts, the detail display effect is enhanced, detail loss is avoided, and image quality is improved.
In some embodiments, performing histogram equalization processing on the gray image to perform global dynamic range compression on gray values of each pixel point in the gray image, and obtaining the first image includes: determining the number of gray levels in a gray level image and the number of pixel points corresponding to each gray level respectively; determining a target gray level of gray values of all pixel points in the gray image, and determining the total number of the pixel points corresponding to the target gray level and all gray levels lower than the target gray level; for each pixel point in the gray level image, determining the proportion of the total number corresponding to the pixel points to the number of the pixel points in the gray level image, and compressing the gray level value of the pixel points according to the product of the proportion and the number of the gray level to obtain a first image.
In some embodiments, the display device may calculate a gray level histogram of the gray level image to determine the number of gray levels in the gray level image and the number of pixel points to which each gray level corresponds, respectively.
In some embodiments, the display device may multiply the gray value of the pixel point by a product between the ratio and the number of gray levels to obtain compressed gray values corresponding to the pixel point, and obtain the first image based on the compressed gray values corresponding to the respective pixel points.
In some embodiments, the display device may determine a histogram equalization function according to the gray histogram, map the gray value of each pixel point in the gray image to a new gray value according to the histogram equalization function, and obtain the first image, where the histogram equalization function may be represented by the following formula:
wherein M and N represent the number of pixels in the rows and columns of the gray scale image, respectively, and MN is the number of pixels in the gray scale image. L represents the number of gray levels in the gray image. j represents an index of gray level. n is n j The number of pixel points corresponding to the gray level j is represented. x represents the gray value of the pixel point in the gray image before the histogram equalization process. k represents an index of a gray level corresponding to the gray value x.I.e. the total number of pixel points corresponding to the target gray level k and each gray level lower than the target gray level.
The derivation process of the histogram equalization function is as follows:
dividing pixel gray levels in images before and after histogram equalizationThe cloth is taken as F (x) and F (y), the random variable x is the gray value before the histogram equalization treatment, the random variable y is the gray value after the histogram equalization treatment, and the histogram equalization function is solved, namely the function conversion relation y=T (x) between x and y is solved. Corresponding to: the known conditions are probability density functions f (x) and f (y), f (x) =n k MN, f (y) =1/(L-1), solving for T (x). Wherein M and N are the number of pixels of the rows and columns in the gray scale image, N k For the number of pixels corresponding to the gray level k in the gray image, L is the number of gray levels in the gray image. The following derivation is performed according to the above known conditions:
wherein T is -1 (y) is an inverse function of T (x). Simultaneously deriving y from the two sides of the model to obtain:
substituting the above known conditions into the above formula to obtain:
that is to say,
integrating the two sides of the matrix at the same time to obtainI.e. as a histogram equalization function.
In the above embodiment, the number of gray levels in the gray level image and the number of pixels corresponding to each gray level are determined, the target gray level where the gray value of each pixel in the gray level image is located is determined, the total number of pixels corresponding to each gray level lower than the target gray level is determined, for each pixel in the gray level image, the proportion of the total number of pixels corresponding to the pixel to the number of pixels in the gray level image is determined, the gray value of the pixel is compressed according to the product between the proportion and the number of gray levels, so as to obtain the first image, and histogram equalization processing can be efficiently and accurately performed on the gray level image, so as to realize the overall dynamic range compression of the gray level image and the overall tone mapping of the image.
In some embodiments, determining a global luminance average of the second image under the luminance channel, and performing global dynamic range compression on the luminance value of the second image under the luminance channel according to the global luminance average, to obtain the third image includes: determining a global brightness average value of the second image under the brightness channel; and respectively compressing the brightness value of each pixel point in the second image under the brightness channel according to the global brightness average value to obtain a third image.
In some embodiments, the display device may determine the compressed luminance values corresponding to the pixels respectively according to a ratio between the luminance value of each pixel in the second image under the luminance channel and the global luminance average value, and obtain the third image based on the compressed luminance values corresponding to the pixels respectively.
In some embodiments, the display device may determine, as the compressed luminance value corresponding to each pixel point, a product between a ratio of a luminance value of each pixel point in the second image under the luminance channel and the global luminance average value and a luminance proportionality constant, a specific formula is as follows:
wherein α represents a luminance proportionality constant, L w (x, y) represents the luminance value of the pixel point in the second image under the luminance channel, And (3) representing the global brightness average value, and L (x, y) representing the compressed brightness value corresponding to the pixel point.
In some embodiments, the value of the luminance proportionality constant can determine the magnitude of the luminance of the third image. The value of the luminance proportionality constant may be 0.18 or other values, and is not limited. When the value of the brightness proportionality constant is 0.18, neutral gray in the image can be mapped to 18% gray on the display device, and at the moment, the human eyes feel gray with brightness of the displayed image just between black and white (namely, the brightness is 50%), so that the high-dynamic image can be compressed well on the whole.
In the above embodiment, the global luminance average value of the second image under the luminance channel is determined, and the luminance value of each pixel point in the second image under the luminance channel is compressed according to the global luminance average value to obtain the third image, so that efficient global dynamic range compression of the luminance value of the image can be realized.
In some embodiments, determining the global luminance mean of the second image under the luminance channel comprises: determining the sum of the logarithmic values of the brightness values of all pixel points in the second image under the brightness channel; performing index transformation on the sum of the logarithmic values to obtain an index result; and determining the global brightness average value of the second image under the brightness channel according to the ratio of the index result to the number of the pixel points in the second image.
In some embodiments, the display device may add a correction value to the luminance value of each pixel under the luminance channel to obtain a corrected luminance value, then calculate the logarithm of the corrected luminance value of each pixel, add the logarithms corresponding to each pixel to obtain a sum of logarithmic values, perform exponential transformation on the sum of logarithmic values to obtain an exponential result, and finally determine the global luminance average of the second image under the luminance channel according to the ratio of the exponential result to the number of pixels in the second image. The specific formula is as follows:
wherein L is w (x, y) represents the brightness of the pixel point in the second image under the brightness channelValues. Delta represents a correction value. N represents the number of pixels in the second image.Representing the global luminance mean of the second image under the luminance channel.
In the above embodiment, the sum of the logarithmic values of the brightness values of each pixel point in the second image under the brightness channel is determined, the sum of the logarithmic values is subjected to exponential transformation to obtain an exponential result, and the global brightness average value of the second image under the brightness channel can be accurately and efficiently determined according to the ratio of the exponential result to the number of the pixel points in the second image.
In some embodiments, for each pixel in the third image, determining the target neighborhood range around the pixel comprises: for each pixel point in the third image, filtering the brightness value at the pixel point by using a Gaussian filter to obtain a brightness response corresponding to the pixel point; a luminance response characterizing a luminance mean value within a scale range of the gaussian filter around the pixel point; iteratively increasing the scale of the Gaussian filter under the condition that the brightness response is smaller than or equal to a preset threshold value, and returning to execute the step of filtering the brightness value at the pixel point by using the Gaussian filter to obtain the brightness response corresponding to the pixel point and the subsequent step to obtain a target neighborhood range around the pixel point; the radius of the target neighborhood range is the maximum value of the scale of the Gaussian filter determined under the condition that the brightness response is smaller than or equal to a preset threshold value.
In some embodiments, the display device may multiply the brightness value of each pixel point in the third image by the gaussian filter function to obtain the brightness response corresponding to the pixel point, which may be expressed by the following formula:
where L (x, y) represents the luminance value of the pixel point (x, y) in the third image. R (x, y, s) represents a gaussian filter 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 filter function R (x, y, s) can be expressed by the following formula:
where s represents the scale of the gaussian filter, x and y represent coordinate values of pixel points, and α represents a luminance proportionality constant.
In some embodiments, the display device may perform filtering processing on the luminance value at the pixel point by using a gaussian filter with a minimum scale for each pixel point in the third image to obtain a luminance response corresponding to the pixel point, and then iteratively increase the scale of the gaussian filter when the luminance response is less than or equal to a preset threshold, so as to iteratively perform filtering processing on the luminance value at the pixel point by using the gaussian filter with a new scale to obtain a luminance response corresponding to the pixel point until the luminance response is greater than the preset threshold, and obtain the target neighborhood range around the pixel point. That is, the maximum value s of s obtained when V (x, y, s). Ltoreq.ε max I.e. the radius of the target neighborhood range.
In the above embodiment, the luminance value at the pixel point is filtered by using the gaussian filter, so as to obtain the luminance response corresponding to the pixel point, and under the condition that the luminance response is less than or equal to the preset threshold, the scale of the gaussian filter is iteratively increased, so as to obtain the maximum value of the scale of the gaussian filter determined under the condition that the luminance response is less than or equal to the preset threshold as the radius of the target neighborhood range, thereby accurately determining the target neighborhood range with gentle luminance value variation, and further accurately performing local tone mapping on the image according to the accurate target neighborhood range.
In some embodiments, compressing the luminance value at the pixel point according to the local luminance average value in the target neighborhood range to obtain the tone-mapped target image corresponding to the high dynamic range image includes: for each pixel point in the third image, taking the brightness response of the pixel point under the scale of the target neighborhood range as the local brightness average value in the target neighborhood range; and compressing the brightness value at the pixel point according to the local brightness average value to obtain a tone mapped target image corresponding to the high dynamic range image.
In some embodiments, the display device may determine compressed luminance values corresponding to the respective pixels according to a ratio between the luminance value at the respective pixel in the third image and the luminance response under the scale of the corresponding target neighborhood range, and determine the target image based on the compressed luminance values corresponding to the respective pixels.
In some embodiments, the display device may add the luminance response of 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 and the corresponding compression ratio in the third image. The specific formula is as follows:
wherein L is 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), V 1 (x,y,s max (x, y)) represents the luminance response at the scale of the target neighborhood range to which the pixel point corresponds. s is(s) max And (x, y) represents the radius of the target neighborhood range corresponding to the pixel point.
In the above embodiment, the luminance values of the pixels are compressed by using the local luminance average value in the range where the luminance change around the pixels is gentle, so that accurate local tone mapping of the image is realized.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the present application also provides a tone mapping apparatus for implementing the tone mapping method mentioned above. The implementation of the solution provided by the device is similar to that described in the above method, so specific limitations in one or more embodiments of the tone mapping device provided below may be referred to above for limitations of the tone mapping method, and will not be repeated here.
In some embodiments, as shown in fig. 4, there is provided a tone mapping apparatus comprising: a histogram equalization module 402, a global luminance compression module 404, and a local luminance compression module 406, wherein:
a histogram equalization module 402 for converting the high dynamic range image to be tone mapped into a gray scale image; and carrying out histogram equalization processing on the gray level image so as to carry out global dynamic range compression on gray level values of all pixel points in the gray level image, and obtaining a first image.
A global brightness compression module 404, configured to convert the first image into a color image containing brightness channels, so as to obtain a second image; and determining a global brightness average value of the second image under the brightness channel, and carrying out 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 406 is configured to determine, for each pixel point in the third image, a target neighborhood range around the pixel point, and compress, according to a local brightness average value in the target neighborhood range, a brightness value at the pixel point, to obtain a tone-mapped target image corresponding to the high dynamic range image; the brightness value in the target neighborhood range changes smoothly.
In some embodiments, the histogram equalization module 402 is further configured to determine the number of gray levels in the gray image and the number of pixels corresponding to each gray level respectively; determining a target gray level of gray values of all pixel points in the gray image, and determining the total number of the pixel points corresponding to the target gray level and all gray levels lower than the target gray level; for each pixel point in the gray level image, determining the proportion of the total number corresponding to the pixel points to the number of the pixel points in the gray level image, and compressing the gray level value of the pixel points according to the product of the proportion and the number of the gray level to obtain a first image.
In some embodiments, the global luminance compression module 404 is further configured to determine a global luminance average of the second image under the luminance channel; and respectively compressing the brightness value of each pixel point in the second image under the brightness channel according to the global brightness average value to obtain a third image.
In some embodiments, the global luminance compression module 404 is further configured to determine a sum of logarithmic values of luminance values of each pixel point in the second image under the luminance channel; performing index transformation on the sum of the logarithmic values to obtain an index result; and determining the global brightness average value of the second image under the brightness channel according to the ratio of the index result to the number of the pixel points in the second image.
In some embodiments, the local luminance compression module 406 is further configured to perform, for each pixel point in the third image, filtering processing on a luminance value at the pixel point by using a gaussian filter, to obtain a luminance response corresponding to the pixel point; a luminance response characterizing a luminance mean value within a scale range of the gaussian filter around the pixel point; iteratively increasing the scale of the Gaussian filter under the condition that the brightness response is smaller than or equal to a preset threshold value, and returning to execute the step of filtering the brightness value at the pixel point by using the Gaussian filter to obtain the brightness response corresponding to the pixel point and the subsequent step to obtain a target neighborhood range around the pixel point; the radius of the target neighborhood range is the maximum value of the scale of the Gaussian filter determined under the condition that the brightness response is smaller than or equal to a preset threshold value.
In some embodiments, the local luminance compression module 406 is further configured to, for each pixel point in the third image, take, as a local luminance average value in the target neighborhood range, a luminance response under the scale of the target neighborhood range corresponding to the pixel point; and compressing the brightness value at the pixel point according to the local brightness average value to obtain a tone mapped target image corresponding to the high dynamic range image.
According to the tone mapping device, firstly, the gray level image of the high dynamic range image is subjected to histogram equalization processing, the gray level value of each pixel point in the gray level image is subjected to global dynamic range compression to obtain the first image, global tone mapping is achieved, then the first image is converted into a color image containing a brightness channel to obtain the second image, the global brightness average value of the second image under the brightness channel is determined, the global dynamic range compression of the brightness value of the second image under the brightness channel is carried out according to the global brightness average value to obtain the third image, then the target neighborhood range around the pixel point is determined for each pixel point in the third image, the brightness value at the pixel point is compressed according to the local brightness average value in the target neighborhood range with gentle brightness value change, and therefore local detail loss is avoided, and image quality is improved.
The various modules in the tone mapping apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the display device, or may be stored in software in a memory in the display device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a display device is provided, the internal structure of which may be as shown in fig. 5. The display device comprises a processor, a memory, a communication interface, a display unit and an input means connected by a system bus. Wherein the processor of the display device is configured to provide computing and control capabilities. The memory of the display device includes a nonvolatile storage medium, an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the display device is used for conducting wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a 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, a projection device, an input device of the display device can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the display device, an external keyboard, a touch pad or a mouse and the like.
In some embodiments, the display device comprises a projection device. The projection device may project an image onto a projection surface for display.
In other embodiments, the display device may also include a display screen or display device.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the display device to which the present inventive arrangements are applied, and that a particular display device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, a display device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
The user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase ChangeMemory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as Static Random access memory (Static Random access memory AccessMemory, SRAM) or dynamic Random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A tone mapping method, the method comprising:
converting the high dynamic range image to be tone mapped into a gray scale image;
performing histogram equalization processing on the gray level image to perform global dynamic range compression on gray level values of all pixel points in the gray level image 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 average value of the second image under the brightness channel, and performing 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;
determining a target neighborhood range around each pixel point in the third image, and compressing the brightness value at the pixel point according to the local brightness average value in the target neighborhood range to obtain a tone-mapped target image corresponding to the high dynamic range image; and the brightness value in the target neighborhood range changes smoothly.
2. The method of claim 1, wherein performing histogram equalization on the gray scale image to perform global dynamic range compression on gray scale values of each pixel in the gray scale image to obtain a first image comprises:
determining the number of gray levels in the gray level image and the number of pixel points corresponding to the gray levels respectively;
determining a target gray level of gray values of all pixel points in the gray image, and determining the total number of the pixel points corresponding to the target gray level and the gray levels lower than the target gray level;
For each pixel point in the gray level image, determining the proportion of the total number corresponding to the pixel points to the number of the pixel points in the gray level image, and compressing the gray level value of the pixel points according to the product of the proportion and the number of the gray level to obtain a first image.
3. The method of claim 1, wherein the determining a global luminance average of the second image under the luminance channel and the performing global dynamic range compression on the luminance value of the second image under the luminance channel according to the global luminance average, to obtain the third image comprises:
determining a global luminance mean value of the second image under the luminance channel;
and respectively compressing the brightness value of each pixel point in the second image under the brightness channel according to the global brightness average value to obtain a third image.
4. A method according to claim 3, wherein said determining a global luminance mean of said second image under said luminance channel comprises:
determining the sum of logarithmic values of brightness values of all pixel points in the second image under the brightness channel;
Performing index transformation on the sum of the logarithmic values to obtain an index result;
and determining the global brightness average value of the second image under the brightness channel according to the ratio of the index result to the number of pixel points in the second image.
5. The method of claim 1, wherein the determining, for each pixel in the third image, a target neighborhood range around the pixel comprises:
for each pixel point in the third image, filtering the brightness value at the pixel point by using a Gaussian filter to obtain a brightness response corresponding to the pixel point; the brightness response is used for representing the brightness average value in the scale range of the Gaussian filter around the pixel point;
iteratively increasing the scale of the Gaussian filter under the condition that the brightness response is smaller than or equal to a preset threshold value, and returning to execute the step of filtering the brightness value at the pixel point by using the Gaussian filter to obtain the brightness response corresponding to the pixel point and the subsequent steps to obtain a target neighborhood range around the pixel point;
and the radius of the target neighborhood range is the maximum value of the scale of the Gaussian filter, which is determined under the condition that the brightness response is smaller than or equal to a preset threshold value.
6. The method of claim 5, wherein compressing the luminance values at the pixels according to the local luminance average in the target neighborhood range to obtain the tone-mapped target image corresponding to the high dynamic range image comprises:
for each pixel point in the third image, taking the brightness response of the pixel point corresponding to the scale of the target neighborhood range as a local brightness average value in the target neighborhood range;
and compressing the brightness value at the pixel point according to the local brightness average value to obtain a tone mapped target image corresponding to the high dynamic range image.
7. A tone mapping apparatus, said apparatus comprising:
the histogram equalization module is used for converting the high dynamic range image to be tone mapped into a gray level image; performing histogram equalization processing on the gray level image to perform global dynamic range compression on gray level values of all pixel points in the gray level image to obtain a first image;
the global brightness compression module is used for converting the first image into a color image containing a brightness channel to obtain a second image; determining a global brightness average value of the second image under the brightness channel, and performing 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 for determining a target neighborhood range around each pixel point in the third image, and compressing brightness values at the pixel points according to local brightness average values in the target neighborhood range to obtain a tone-mapped target image corresponding to the high dynamic range image; and the brightness value in the target neighborhood range changes smoothly.
8. A display device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. The display device of claim 8, the display device comprising a projection device.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310789191.3A 2023-06-29 2023-06-29 Tone mapping method, tone mapping device, display device and storage medium Pending CN116739936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310789191.3A CN116739936A (en) 2023-06-29 2023-06-29 Tone mapping method, tone mapping device, display device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310789191.3A CN116739936A (en) 2023-06-29 2023-06-29 Tone mapping method, tone mapping device, display device and storage medium

Publications (1)

Publication Number Publication Date
CN116739936A true CN116739936A (en) 2023-09-12

Family

ID=87909658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310789191.3A Pending CN116739936A (en) 2023-06-29 2023-06-29 Tone mapping method, tone mapping device, display device and storage medium

Country Status (1)

Country Link
CN (1) CN116739936A (en)

Similar Documents

Publication Publication Date Title
CN109686342B (en) Image processing method and device
CN115115554B (en) Image processing method and device based on enhanced image and computer equipment
CN112950640A (en) Video portrait segmentation method and device, electronic equipment and storage medium
CN116843566A (en) Tone mapping method, tone mapping device, display device and storage medium
Zhang et al. Multi-scale-based joint super-resolution and inverse tone-mapping with data synthesis for UHD HDR video
CN115293994B (en) Image processing method, image processing device, computer equipment and storage medium
CN110599394A (en) Method and device for processing pictures in online presentation, storage medium and equipment
CN116012841A (en) Open set image scene matching method and device based on deep learning
CN116739936A (en) Tone mapping method, tone mapping device, display device and storage medium
CN116739937A (en) Tone mapping method, tone mapping device, display device and storage medium
CN116805292A (en) Tone mapping method and device and display equipment
CN115082345A (en) Image shadow removing method and device, computer equipment and storage medium
CN116739938A (en) Tone mapping method and device and display equipment
CN116977154B (en) Visible light image and infrared image fusion storage method, device, equipment and medium
CN116932118B (en) Color adjustment method and device for graphic primitive, computer equipment and storage medium
CN115082357B (en) Video denoising data set generation method and device, computer equipment and storage medium
CN118015102A (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN110647898A (en) Image processing method, image processing device, electronic equipment and computer storage medium
CN113194267B (en) Image processing method and device and photographing method and device
CN117994179A (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN116883257A (en) Image defogging method, device, computer equipment and storage medium
CN115063333A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN117541525A (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN116645428A (en) Image display method, device, computer equipment and storage medium
CN114549351A (en) Color correction method, apparatus, computer device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination