High dynamic range image generation method, device, intelligent terminal and storage medium
By dynamically obtaining the target brightness mapping curve, HDR image generation is optimized for specific scenes, which solves the problem of details loss caused by static mapping curves in the prior art, and improves the quality of HDR images.
Patent Information
- Application Number
- CN202110346566.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-03-31
AI Technical Summary
In the prior art, the brightness in the HDR signal is mapped through static brightness mapping curves, and the effect cannot be optimized for specific scenes, which can easily lead to the loss of details of dark fields and/or highlight scenes, affecting the quality of the generated HDR image.
By acquiring the brightness data in the target signal, the target brightness mapping curve for a specific scene is dynamically obtained, and a high dynamic range image is generated based on the curve.
The effect optimization is achieved for specific scenes, avoiding the loss of details in different scenes, and improving the quality of the generated HDR images.
Smart Images

Figure CN113096035B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, intelligent terminal and storage medium for generating high dynamic range images. Background Art
[0002] With the rapid development of science and technology, high dynamic range (HDR) imaging (HDRI) technology has been used more and more widely. The images obtained by high dynamic range imaging technology have a larger brightness value range than ordinary RGB format images, which can bring better experience to users, and therefore have received more and more attention. At present, each display device usually obtains HDR format signals, generates corresponding HDR images based on the HDR format signals, and outputs them. However, the brightness used when encoding HDR format signals is relatively high, and it is usually difficult for the display device used by the user to directly output the corresponding brightness. Therefore, the brightness needs to be adjusted to adapt to the user's display device so that the display device can smoothly output HDR images.
[0003] In the prior art, a brightness mapping curve is usually set for the user's display device. When the display device receives a signal in HDR format, the brightness in the HDR signal is mapped to a range that the display device can achieve through the brightness mapping curve, thereby achieving the generation and output of the corresponding HDR image. The problem with the prior art is that the mapping is based on a static brightness mapping curve, and the effect cannot be optimized for a specific scene, which easily leads to the loss of details in dark scenes and / or highlight scenes, affecting the quality of the generated HDR image.
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide a high dynamic range image generation method, device, intelligent terminal and storage medium, aiming to solve the problem that when the brightness in the HDR signal is mapped by a static brightness mapping curve in the prior art, the effect cannot be optimized for a specific scene, which easily leads to the loss of details of the dark field and / or highlight scene, affecting the quality of the generated HDR image.
[0006] In order to achieve the above object, the present invention provides a method for generating a high dynamic range image in a first aspect, wherein the method comprises:
[0007] Acquire a target signal, wherein the target signal is a signal in a high dynamic range format;
[0008] Acquire brightness data based on the target signal;
[0009] Acquire a target brightness mapping curve based on the above brightness data;
[0010] A high dynamic range image is generated based on the target signal and the target brightness mapping curve.
[0011] Optionally, the acquiring brightness data based on the target signal includes:
[0012] Decode the target signal to obtain the brightness value corresponding to each pixel;
[0013] The brightness data is obtained based on the brightness value corresponding to each of the above pixel points.
[0014] Optionally, the step of obtaining brightness data based on the brightness value corresponding to each of the above pixel points includes:
[0015] Get the brightness range;
[0016] Based on the brightness value range corresponding to each of the brightness intervals and the brightness value corresponding to each of the pixel points, the brightness probability value corresponding to each of the brightness intervals is obtained as the brightness data.
[0017] Optionally, the acquiring a target brightness mapping curve based on the brightness data includes:
[0018] Obtain the probability threshold corresponding to each of the above brightness intervals;
[0019] Obtaining a brightness interval whose brightness probability value is greater than a corresponding probability threshold as a target brightness interval;
[0020] The target brightness mapping curve is obtained based on the target brightness range.
[0021] Optionally, the step of obtaining the target brightness mapping curve based on the target brightness interval includes:
[0022] When there is only one target brightness interval, obtaining a brightness mapping curve corresponding to the target brightness interval as the target brightness mapping curve;
[0023] When there are multiple target brightness intervals, a brightness mapping curve corresponding to a maximum probability interval is obtained as the target brightness mapping curve, wherein the maximum probability interval is a target brightness interval having the largest corresponding brightness probability value among the target brightness intervals.
[0024] Optionally, the acquiring the target brightness mapping curve based on the target brightness interval further includes:
[0025] When the above target brightness interval does not exist, respectively obtain the mixing ratio value and the brightness mapping curve corresponding to each of the above brightness intervals;
[0026] A target brightness mapping curve is acquired based on the above-mentioned mixing ratio values and the above-mentioned brightness mapping curves.
[0027] Optionally, the step of obtaining the target brightness mapping curve based on the target brightness interval includes:
[0028] Acquire a segmented brightness mapping curve, wherein each of the brightness intervals corresponds to at least one segment of the segmented brightness mapping curve;
[0029] Obtaining the adjustment coefficient corresponding to each of the above target brightness intervals;
[0030] The segments corresponding to the target brightness intervals are adjusted based on the adjustment coefficients, and the adjusted segment brightness mapping curves are used as the target brightness mapping curves.
[0031] A second aspect of the present invention provides a high dynamic range image generation device, wherein the device comprises:
[0032] A target signal acquisition module, used to acquire a target signal, wherein the target signal is a signal in a high dynamic range format;
[0033] A brightness data acquisition module, used to acquire brightness data based on the target signal;
[0034] A target brightness mapping curve acquisition module is used to acquire a target brightness mapping curve based on the brightness data;
[0035] An image generation module is used to generate a high dynamic range image based on the target signal and the target brightness mapping curve.
[0036] A third aspect of the present invention provides an intelligent terminal, comprising a memory, a processor, and a high dynamic range image generation program stored in the memory and executable on the processor, wherein the high dynamic range image generation program implements any one of the steps of the high dynamic range image generation method when executed by the processor.
[0037] A fourth aspect of the present invention provides a computer-readable storage medium, on which a high dynamic range image generation program is stored. When the high dynamic range image generation program is executed by a processor, the step of any one of the high dynamic range image generation methods is implemented.
[0038] As can be seen from the above, in the scheme of the present invention, a target signal is obtained, wherein the target signal is a signal in a high dynamic range format; brightness data is obtained based on the target signal; a target brightness mapping curve is obtained based on the brightness data; and a high dynamic range image is generated based on the target signal and the target brightness mapping curve. Compared with the prior art, the scheme of the present invention can dynamically obtain the corresponding target brightness mapping curve according to the brightness data in the target signal. For different specific scenes, the brightness data is different, so different target brightness mapping curves for specific scenes can be obtained, so as to optimize the effect for specific scenes, which is beneficial to avoid the loss of details in different scenes and improve the quality of the generated HDR image. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0040] Figure 1 It is a flowchart of a method for generating a high dynamic range image provided by an embodiment of the present invention;
[0041] Figure 2 Embodiment of the present invention Figure 1 Specific flow diagram of step S200;
[0042] Figure 3 Embodiment of the present invention Figure 2 Specific flow diagram of step S202;
[0043] Figure 4 Embodiment of the present invention Figure 1 Specific flow diagram of step S300;
[0044] Figure 5 Embodiment of the present invention Figure 4 Specific flow diagram of step S303;
[0045] Figure 6 is a schematic diagram of a process for obtaining a target brightness mapping curve provided by an embodiment of the present invention;
[0046] Figure 7 Embodiment of the present invention Figure 4 Specific flow diagram of step S303;
[0047] Figure 8 is a schematic diagram of a process for obtaining a target brightness mapping curve provided by an embodiment of the present invention;
[0048] Fig. 9 is a structural schematic diagram of a high dynamic range image generation device provided by an embodiment of the present invention;
[0049] Fig.10 It is a block diagram of the internal structure principle of an intelligent terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0051] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0052] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0053] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0054] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0055] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0057] With the rapid development of science and technology, high dynamic range (HDR) imaging (HDRI) technology has been more and more widely used. The images obtained by high dynamic range imaging technology have a larger brightness value range than ordinary RGB format images, which can bring better experience to users, and therefore have received more and more attention. As a result, different HDR signal formats have also appeared, among which HDR 10 is the most widely used HDR signal format. Static metadata is used when encoding HDR 10 signals. When transmitted to the display terminal, the display terminal generates and outputs the corresponding HDR image according to its own display capability. However, the brightness used when encoding HDR format signals is relatively high. For example, the brightness used when encoding HDR 10 format signals is usually above 1000nit. The user's display device (i.e., display terminal) usually cannot reach this brightness, so the corresponding brightness cannot be directly output. The brightness needs to be adjusted and mapped to adapt to the user's display device so that the display device can smoothly output HDR images.
[0058] In the prior art, a brightness mapping curve is usually set for the user's display device. When the display device receives a signal in HDR format, the brightness in the HDR signal is mapped to a range that the display device can achieve through the brightness mapping curve, thereby achieving the generation and output of the corresponding HDR image. The problem with the prior art is that the brightness mapping curve is a static brightness mapping curve, which cannot reasonably optimize the effect for a specific scene, and easily leads to the loss of details of dark scenes and / or highlight scenes, such as dark scenes being too dark and highlight scenes being overexposed, resulting in the loss of some details of the generated HDR image, affecting the quality of the generated HDR image.
[0059] In order to solve the problems of the prior art, the present invention provides a method for generating a high dynamic range image. In an embodiment of the present invention, a target signal is obtained, wherein the target signal is a signal in a high dynamic range format; brightness data is obtained based on the target signal; a target brightness mapping curve is obtained based on the brightness data; and a high dynamic range image is generated based on the target signal and the target brightness mapping curve. Compared with the prior art, the scheme of the present invention can dynamically obtain a corresponding target brightness mapping curve according to the brightness data in the target signal. For different specific scenes, the brightness data is different, so different target brightness mapping curves for specific scenes can be obtained, so as to optimize the effect for specific scenes, which is beneficial to avoid the loss of details in different scenes and improve the quality of the generated HDR image.
[0060] Exemplary Methods
[0061] like Figure 1 As shown, an embodiment of the present invention provides a method for generating a high dynamic range image. Specifically, the method comprises the following steps:
[0062] Step S100: acquiring a target signal, wherein the target signal is a signal in a high dynamic range format.
[0063] Specifically, after receiving the target signal in the high dynamic range format, the display device generates a corresponding high dynamic range format image based on the target signal. In this embodiment, the target signal is specifically a signal in the HDR 10 format.
[0064] Step S200: Acquire brightness data based on the target signal.
[0065] The brightness data includes the probability of each pixel corresponding to the target signal appearing in each brightness interval. Specifically, by decoding the target signal, the brightness value information of each pixel corresponding to the target signal can be extracted, thereby obtaining the probability of each pixel appearing in each brightness interval.
[0066] Step S300: acquiring a target brightness mapping curve based on the brightness data.
[0067] Step S400: generating a high dynamic range image based on the target signal and the target brightness mapping curve.
[0068] The target brightness mapping curve is a curve used to map the brightness in the target signal. Specifically, the corresponding target brightness mapping curve is obtained based on the probability of each pixel appearing in each brightness interval, so that the display device can map the brightness in the target signal to the brightness value range that the display device can achieve based on the target brightness mapping curve, thereby completing the generation and output of the HDR image.
[0069] As can be seen from the above, the high dynamic range image generation method provided by the embodiment of the present invention obtains a target signal, wherein the target signal is a signal in a high dynamic range format; obtains brightness data based on the target signal; obtains a target brightness mapping curve based on the brightness data; and generates a high dynamic range image based on the target signal and the target brightness mapping curve. Compared with the prior art, the scheme of the present invention can dynamically obtain the corresponding target brightness mapping curve according to the brightness data in the target signal. For different specific scenes, the brightness data is different, so different target brightness mapping curves for specific scenes can be obtained, so as to optimize the effect for specific scenes, which is conducive to avoiding the loss of details in different scenes and improving the quality of the generated HDR image.
[0070] Specifically, in this embodiment, Figure 2 As shown, the above step S200 includes:
[0071] Step S201: decode the target signal to obtain the brightness value corresponding to each pixel.
[0072] Step S202: Acquire brightness data based on the brightness value corresponding to each of the above pixel points.
[0073] Specifically, the target signal is decoded accordingly based on the specific encoding format of the target signal to obtain the brightness value corresponding to each pixel included in the target signal. In this embodiment, the target signal is a signal in HDR 10 format, so the target signal is decoded accordingly based on the encoding format of the HDR 10 signal. Further, after obtaining the brightness value corresponding to each pixel, the probability of each pixel of the current target signal appearing in each brightness interval can be analyzed.
[0074] Specifically, in this embodiment, Figure 3 As shown, the above step S202 includes:
[0075] Step S2021, obtaining the brightness range.
[0076] Specifically, the brightness intervals can be pre-divided and set, or generated according to the interval range or interval threshold input by the user in real time. The specific number of brightness intervals and the range corresponding to the brightness interval can be set and adjusted according to actual needs, and are not specifically limited here. Optionally, each of the above brightness intervals can correspond to a brightness scene, so as to achieve specific optimization for different brightness scenes required by the user and generate corresponding HDR images.
[0077] Step S2022: Based on the brightness value range corresponding to each of the brightness intervals and the brightness value corresponding to each of the pixel points, a brightness probability value corresponding to each of the brightness intervals is obtained as the brightness data.
[0078] Specifically, the ratio of the number of pixels falling into each brightness interval to the total number of pixels, that is, the probability value of the pixel falling into the corresponding brightness interval, is calculated as the brightness probability value corresponding to the brightness interval.
[0079] This embodiment also provides a method for calculating the brightness probability value in a specific application scenario. In this application scenario, it is assumed that the maximum encoded brightness of the target signal (HDR 10 signal) is 4000nit, and three brightness intervals are preset, such as a high brightness interval, a medium brightness interval, and a low brightness interval, corresponding to high, medium, and low brightness scenes, respectively. Optionally, the user can input or pre-set the maximum brightness threshold corresponding to each brightness interval. For example, the maximum brightness thresholds corresponding to the high brightness interval, the medium brightness interval, and the low brightness interval can be set to width(h), width(m), and width(l), respectively. Then, the low brightness interval range is 0 to width(l)nit, the medium brightness interval range is width(l+1) to width(m)nit, and the high brightness interval range is width(m+1) to width(h)nit. Specifically, in this embodiment, the above width (h) = 4000, width (m) = 1000, width (l) = 100, the corresponding brightness range of the low brightness scene is 0-100 nit, the corresponding brightness range of the medium brightness scene is 101-1000 nit, and the corresponding brightness range of the high brightness scene is 1001-4000 nit. Of course, the specific brightness range and the number of brightness scenes and their corresponding specific ranges can be adjusted according to actual needs, and are not specifically limited here.
[0080] For a certain pixel, let the probability of it falling into the low brightness interval be p(l), the probability of it falling into the medium brightness interval be p(m), and the probability of it falling into the high brightness interval be p(h), then:
[0081]
[0082]
[0083]
[0084] Where n(i) represents the number of pixels with brightness equal to i, and N is the total number of pixels. According to the above formulas (1) to (3), the probability of a pixel falling into each brightness interval can be obtained, that is, the brightness probability value corresponding to each brightness interval (brightness scene).
[0085] Specifically, in this embodiment, Figure 4 As shown, the above step S300 includes:
[0086] Step S301, obtaining the probability threshold corresponding to each of the above brightness intervals.
[0087] The above probability threshold is a threshold used to determine the probability of a pixel falling into a corresponding brightness interval, and can be set and adjusted according to actual needs. For a certain brightness interval, when the corresponding probability threshold is greater than the probability threshold, it means that the pixel is more likely to fall into the brightness interval.
[0088] Step S302: obtaining a brightness interval whose brightness probability value is greater than a corresponding probability threshold as a target brightness interval.
[0089] Step S303: acquiring the target brightness mapping curve based on the target brightness interval.
[0090] When the brightness probability value of a certain brightness interval exceeds the corresponding probability threshold, it means that the probability of the pixel falling into the brightness interval is relatively high, and the brightness interval can be used as the target brightness interval, so as to obtain the corresponding target brightness mapping curve based on the target brightness interval.
[0091] In an application scenario, for each brightness range (or brightness scene), a corresponding brightness mapping curve can be pre-set, or the user can input the corresponding brightness mapping curve data according to actual needs. The corresponding brightness mapping curve can also be adjusted according to actual needs, which is not specifically limited here.
[0092] Optional, such as Figure 5 As shown, the above step S303 includes:
[0093] Step S3031, when there is only one target brightness interval, obtaining a brightness mapping curve corresponding to the target brightness interval as the target brightness mapping curve.
[0094] Step S3032, when there are multiple target brightness intervals, obtain a brightness mapping curve corresponding to a maximum probability interval as the target brightness mapping curve, wherein the maximum probability interval is a target brightness interval having the largest corresponding brightness probability value among the target brightness intervals.
[0095] Optionally, the step S303 further includes: when the target brightness interval does not exist, respectively obtaining the mixing ratio value and the brightness mapping curve corresponding to each of the brightness intervals; and obtaining the target brightness mapping curve based on each of the mixing ratio values and the brightness mapping curves.
[0096] Specifically, for the application scenario of setting three brightness intervals provided in this embodiment, the probability thresholds corresponding to the three brightness intervals of high, medium and low are set to be a, b and c respectively. When p(h) is greater than a, the high brightness interval can be used as the target brightness interval, when p(m) is greater than b, the medium brightness interval can be used as the target brightness interval, and when p(l) is greater than c, the low brightness interval can be used as the target brightness interval. The above target brightness interval can be one or more brightness intervals (the brightness probability values corresponding to one or more brightness intervals exceed the probability threshold), or there may be no target brightness interval. Among them, the probability thresholds of the above brightness intervals can be set and adjusted according to actual needs, and the probability thresholds can be equal or unequal. For example, a=0.2, b=0.3, and c=0.5 can be set. Figure 6 FIG. 1 is a flow chart of obtaining a target brightness mapping curve provided by an embodiment of the present invention. Figure 6 As shown, when there is only one target brightness interval, for example, when only the brightness probability value of the high brightness interval exceeds the probability threshold, the brightness mapping curve corresponding to the target brightness interval is obtained as the target brightness mapping curve. Among them, the brightness mapping curve corresponding to each brightness interval can be preset, or it can be generated after obtaining the brightness mapping curve data input by the user. In this embodiment, the brightness mapping curve corresponding to each brightness interval is pre-set as an example for specific description. When there are multiple target brightness intervals, the target brightness interval with the largest corresponding brightness probability value in the target brightness interval is obtained as the maximum probability interval, and the brightness mapping curve corresponding to the maximum probability interval is used as the target brightness mapping curve. For example, when the brightness probability values corresponding to the high brightness interval and the low brightness interval exceed a and c respectively, the brightness probability values corresponding to the high brightness interval and the low brightness interval are compared. When the brightness probability value corresponding to the high brightness interval is larger, the brightness mapping curve corresponding to the high brightness interval is used as the target brightness mapping curve. Further, when the above-mentioned target brightness interval does not exist, the mixing ratio value and the brightness mapping curve corresponding to each brightness interval are obtained, and each brightness mapping curve is mixed in proportion based on the mixing ratio value to obtain the target brightness mapping curve. The brightness value information includes the brightness value corresponding to each pixel point. The above-mentioned mixing ratio value can be preset, input by the user, or adjusted according to actual needs, which is not specifically limited here.
[0097] In another application scenario, for all brightness intervals (or brightness scenes), a corresponding segmented brightness mapping curve can be preset, or the user can input the corresponding segmented brightness mapping curve data according to actual needs, and the corresponding segmented brightness mapping curve can also be adjusted according to actual needs, which is not specifically limited here. Among them, each brightness interval corresponds to at least one segment of the segmented brightness mapping curve. In this embodiment, the correspondence between each brightness interval and a segment of the segmented brightness mapping curve is taken as an example for specific description.
[0098] Optional, such as Figure 7 As shown, the above step S303 includes:
[0099] A3031, obtaining a segmented brightness mapping curve, wherein each of the brightness intervals corresponds to at least one segment of the segmented brightness mapping curve.
[0100] A3032, obtain the adjustment coefficient corresponding to each of the above target brightness intervals.
[0101] A3033: adjusting the segments corresponding to each of the target brightness intervals based on the adjustment coefficients, and using the adjusted segmented brightness mapping curve as the target brightness mapping curve.
[0102] Among them, the above adjustment coefficients can be pre-set, can be input by the user, and can be adjusted according to actual needs, which is not specifically limited here. Optionally, the probability thresholds corresponding to the three brightness intervals of high, medium and low can be set to d, e and f respectively, and the values of d, e, f can be equal to or unequal to the corresponding values of a, b, c, which is not specifically limited here. Specifically, a brightness mapping curve is divided into multiple segments as a segmented brightness mapping curve, and a corresponding adjustment coefficient is set for each segment. For example, taking the high brightness interval, medium brightness interval and low brightness interval as examples (corresponding to the highlight scene, medium brightness scene and dark scene respectively), the corresponding adjustment coefficients are pre-set to Kh, Km and Kl respectively. Figure 8 FIG. 1 is a flow chart of obtaining a target brightness mapping curve provided by an embodiment of the present invention. Figure 8As shown, the display device obtains a segmented brightness mapping curve, and determines whether the brightness interval is a target brightness interval based on the brightness probability value of each brightness interval and the corresponding probability threshold. For each target brightness interval, a corresponding adjustment coefficient is obtained, and the segment corresponding to the segmented brightness mapping curve is adjusted based on the adjustment coefficient. For example, when the brightness probability value p(h) of the high brightness interval is greater than the corresponding probability threshold d, the adjustment coefficient Kh of the high brightness interval is obtained, and the corresponding segment is adjusted based on Kh. Optionally, the segment corresponding to the high brightness interval can be added or multiplied by the corresponding adjustment coefficient Kh, and there can be other adjustment methods, which are not specifically limited here. In this way, changing the brightness mapping curve segment of the corresponding target interval can change the image effect corresponding to the interval, and a more reasonable brightness mapping curve can be used for scenes of different brightness to display more image details and improve image quality. When there are multiple target brightness intervals, the segments corresponding to all target brightness intervals are adjusted. When there is no target brightness interval (that is, the brightness probability values of all brightness intervals do not exceed the corresponding brightness threshold), the segmented brightness mapping curve is not adjusted, and the original segmented brightness mapping curve is directly used as the target brightness mapping curve.
[0103] Exemplary Devices
[0104] like Fig. 9 As shown, corresponding to the above-mentioned high dynamic range image generation method, an embodiment of the present invention further provides a high dynamic range image generation device, and the above-mentioned high dynamic range image generation device includes:
[0105] The target signal acquisition module 510 is used to acquire a target signal, wherein the target signal is a signal in a high dynamic range format.
[0106] Optionally, the high dynamic range image generating device may be a user's display device, which generates a corresponding high dynamic range format image based on the target signal after receiving the target signal in the high dynamic range format. In this embodiment, the target signal is specifically a signal in the HDR 10 format.
[0107] The brightness data acquisition module 520 is used to acquire brightness data based on the target signal.
[0108] The brightness data includes the probability of each pixel corresponding to the target signal appearing in each brightness interval. Specifically, by decoding the target signal, the brightness value information of each pixel corresponding to the target signal can be extracted, thereby obtaining the probability of each pixel appearing in each brightness interval.
[0109] The target brightness mapping curve acquisition module 530 is used to acquire a target brightness mapping curve based on the brightness data.
[0110] The image generation module 540 is used to generate a high dynamic range image based on the target signal and the target brightness mapping curve.
[0111] The target brightness mapping curve is a curve used to map the brightness in the target signal. Specifically, the corresponding target brightness mapping curve is obtained based on the probability of each pixel appearing in each brightness interval, so that the display device can map the brightness in the target signal to the brightness value range that the display device can achieve based on the target brightness mapping curve, thereby completing the generation and output of the HDR image.
[0112] As can be seen from the above, the high dynamic range image generation device provided by the embodiment of the present invention obtains the target signal through the target signal acquisition module 510, wherein the above target signal is a signal in the high dynamic range format; obtains brightness data based on the above target signal through the brightness data acquisition module 520; obtains the target brightness mapping curve based on the above brightness data through the target brightness mapping curve acquisition module 530; and generates a high dynamic range image based on the above target signal and the above target brightness mapping curve through the image generation module 540. Compared with the prior art, the scheme of the present invention can dynamically obtain the corresponding target brightness mapping curve according to the brightness data in the target signal. For different specific scenes, the brightness data is different, so different target brightness mapping curves for specific scenes can be obtained, so as to achieve effect optimization for specific scenes, which is conducive to avoiding detail loss in different scenes and improving the quality of the generated HDR image.
[0113] Optionally, the brightness data acquisition module 520 is specifically used to: decode the target signal to obtain the brightness value corresponding to each pixel; and obtain brightness data based on the brightness value corresponding to each pixel.
[0114] Specifically, the target signal is decoded accordingly based on the specific encoding format of the target signal to obtain the brightness value corresponding to each pixel included in the target signal. In this embodiment, the target signal is a signal in HDR 10 format, so the target signal is decoded accordingly based on the encoding format of the HDR 10 signal. Further, after obtaining the brightness value corresponding to each pixel, the probability of each pixel of the current target signal appearing in each brightness interval can be analyzed.
[0115] Optionally, the brightness data acquisition module 520 is further specifically used to: acquire brightness intervals; based on the brightness value range corresponding to each brightness interval and the brightness value corresponding to each pixel point, acquire the brightness probability value corresponding to each brightness interval as the brightness data.
[0116] Specifically, the brightness intervals can be pre-divided and set, or generated according to the interval range or interval threshold input by the user in real time. The specific number of brightness intervals and the range corresponding to the brightness interval can be set and adjusted according to actual needs, and are not specifically limited here. Optionally, each of the above brightness intervals can correspond to a brightness scene, so as to achieve specific optimization for different brightness scenes required by the user and generate corresponding HDR images.
[0117] Specifically, the ratio of the number of pixels falling into each brightness interval to the total number of pixels is calculated, that is, the probability value of the pixel falling into the corresponding brightness interval is used as the brightness probability value corresponding to the brightness interval. The specific method of calculating the brightness probability value corresponding to each brightness interval can be referred to the description in the method embodiment, which will not be repeated here.
[0118] Optionally, the target brightness mapping curve acquisition module 530 is specifically used to: obtain the probability threshold corresponding to each of the above brightness intervals; obtain the brightness interval whose brightness probability value is greater than the corresponding probability threshold as the target brightness interval; and obtain the target brightness mapping curve based on the target brightness interval.
[0119] The above probability threshold is a threshold used to determine the probability of a pixel falling into a corresponding brightness interval, and can be set and adjusted according to actual needs. For a certain brightness interval, when the corresponding probability threshold is greater than the probability threshold, it means that the pixel is more likely to fall into the brightness interval, and the brightness interval can be used as the target brightness interval, thereby obtaining the corresponding target brightness mapping curve based on the target brightness interval.
[0120] In an application scenario, for each brightness range (or brightness scene), a corresponding brightness mapping curve can be pre-set, or the user can input the corresponding brightness mapping curve data according to actual needs. The corresponding brightness mapping curve can also be adjusted according to actual needs, which is not specifically limited here.
[0121] Optionally, the target brightness mapping curve acquisition module 530 is also specifically used for: when there is only one target brightness interval, obtaining the brightness mapping curve corresponding to the target brightness interval as the target brightness mapping curve; when there are multiple target brightness intervals, obtaining the brightness mapping curve corresponding to the maximum probability interval as the target brightness mapping curve, wherein the maximum probability interval is the target brightness interval with the largest corresponding brightness probability value in the target brightness interval.
[0122] Furthermore, the target brightness mapping curve acquisition module 530 is also specifically used to: when the target brightness interval does not exist, respectively obtain the mixing ratio value and the brightness mapping curve corresponding to each of the above brightness intervals; and obtain the target brightness mapping curve based on each of the above mixing ratio values and each of the above brightness mapping curves.
[0123] The specific process of obtaining the corresponding target brightness mapping curve can refer to the description in the method embodiment, which will not be repeated here.
[0124] In another application scenario, for all brightness intervals (or brightness scenes), a corresponding segmented brightness mapping curve can be preset, or the user can input the corresponding segmented brightness mapping curve data according to actual needs, and the corresponding segmented brightness mapping curve can also be adjusted according to actual needs, which is not specifically limited here. Among them, each brightness interval corresponds to at least one segment of the segmented brightness mapping curve. In this embodiment, the correspondence between each brightness interval and a segment of the segmented brightness mapping curve is taken as an example for specific description.
[0125] In this application scenario, the target brightness mapping curve acquisition module 530 is specifically used to: obtain a segmented brightness mapping curve, wherein each of the brightness intervals corresponds to at least one segment of the segmented brightness mapping curve; obtain an adjustment coefficient corresponding to each of the target brightness intervals; adjust the segments corresponding to each of the target brightness intervals based on the adjustment coefficient, and use the adjusted segmented brightness mapping curve as the target brightness mapping curve.
[0126] The above adjustment coefficient can be preset, input by the user, or adjusted according to actual needs, which is not specifically limited here. The specific process of adjusting the segmented brightness mapping curve and obtaining the corresponding target brightness mapping curve can refer to the description in the method embodiment, which will not be repeated here.
[0127] Based on the above embodiments, the present invention further provides an intelligent terminal, whose principle block diagram can be shown as follows: Fig.10 As shown. The above-mentioned intelligent terminal includes a processor, a memory, a network interface and a display screen connected through a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a high dynamic range image generation program. The internal memory provides an environment for the operation of the operating system and the high dynamic range image generation program in the non-volatile storage medium. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection. When the high dynamic range image generation program is executed by the processor, the steps of any one of the above-mentioned high dynamic range image generation methods are implemented. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen.
[0128] Those skilled in the art will understand that Fig.10 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the smart terminal to which the scheme of the present invention is applied. The specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0129] In one embodiment, a smart terminal is provided, the smart terminal comprising a memory, a processor, and a high dynamic range image generation program stored in the memory and executable on the processor, wherein the high dynamic range image generation program performs the following operation instructions when executed by the processor:
[0130] Acquire a target signal, wherein the target signal is a signal in a high dynamic range format;
[0131] Acquire brightness data based on the target signal;
[0132] Acquire a target brightness mapping curve based on the above brightness data;
[0133] A high dynamic range image is generated based on the target signal and the target brightness mapping curve.
[0134] An embodiment of the present invention further provides a computer-readable storage medium, on which a high dynamic range image generation program is stored. When the high dynamic range image generation program is executed by a processor, the steps of any one of the high dynamic range image generation methods provided in the embodiments of the present invention are implemented.
[0135] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0136] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0138] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0139] In the embodiments provided by the present invention, it should be understood that the disclosed apparatus / terminal equipment and method can be implemented in other ways. For example, the apparatus / terminal equipment embodiments described above are only illustrative, for example, the division of the above modules or units is only a logical function division, and in actual implementation, other division methods can be used, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0140] If the above-mentioned integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0141] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features therein may be replaced by equivalents. However, these modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A method for generating a high dynamic range image, characterized in that: The method comprises: Acquire a target signal, wherein the target signal is a signal in a high dynamic range format; Acquire brightness data based on the target signal; Acquire a target brightness mapping curve based on the brightness data; The acquiring a target brightness mapping curve based on the brightness data includes: Get the probability threshold corresponding to each brightness interval; Obtain the brightness interval whose brightness probability value is greater than the corresponding probability threshold as the target brightness interval; Acquire the target brightness mapping curve based on the target brightness interval; generating a high dynamic range image based on the target signal and the target brightness mapping curve; The acquiring the target brightness mapping curve based on the target brightness interval includes: Acquire a segmented brightness mapping curve, wherein each of the brightness intervals corresponds to at least one segment of the segmented brightness mapping curve; Obtaining the adjustment coefficient corresponding to each of the target brightness intervals; Adjusting the segments corresponding to each of the target brightness intervals based on the adjustment coefficient, and using the adjusted segment brightness mapping curve as the target brightness mapping curve; Add or multiply the corresponding adjustment coefficient to the segment corresponding to each brightness interval to adjust the corresponding segment.
2. The method for generating a high dynamic range image according to claim 1, characterized in that: The acquiring brightness data based on the target signal comprises: Decoding the target signal to obtain the brightness value corresponding to each pixel; Brightness data is obtained based on the brightness value corresponding to each of the pixel points.
3. The method for generating a high dynamic range image according to claim 2, characterized in that: The obtaining of brightness data based on the brightness value corresponding to each pixel point includes: Get the brightness range; Based on the brightness value range corresponding to each of the brightness intervals and the brightness value corresponding to each of the pixel points, a brightness probability value corresponding to each of the brightness intervals is obtained as the brightness data.
4. The method for generating a high dynamic range image according to claim 1, wherein: The acquiring the target brightness mapping curve based on the target brightness interval includes: When there is only one target brightness interval, obtaining a brightness mapping curve corresponding to the target brightness interval as the target brightness mapping curve; When there are multiple target brightness intervals, a brightness mapping curve corresponding to a maximum probability interval is obtained as the target brightness mapping curve, wherein the maximum probability interval is a target brightness interval having a maximum corresponding brightness probability value among the target brightness intervals.
5. The method for generating a high dynamic range image according to claim 4, characterized in that: The acquiring the target brightness mapping curve based on the target brightness interval further includes: When the target brightness interval does not exist, respectively obtaining a mixing ratio value and a brightness mapping curve corresponding to each brightness interval; A target brightness mapping curve is acquired based on each of the mixing ratio values and each of the brightness mapping curves.
6. A high dynamic range image generation device, used to implement the high dynamic range image generation method according to any one of claims 1 to 5, characterized in that: The device comprises: A target signal acquisition module, used to acquire a target signal, wherein the target signal is a signal in a high dynamic range format; A brightness data acquisition module, used to acquire brightness data based on the target signal; A target brightness mapping curve acquisition module, used to acquire a target brightness mapping curve based on the brightness data; An image generation module is used to generate a high dynamic range image based on the target signal and the target brightness mapping curve.
7. An intelligent terminal, characterized in that: The intelligent terminal includes a memory, a processor, and a high dynamic range image generation program stored in the memory and executable on the processor. When the high dynamic range image generation program is executed by the processor, the steps of the high dynamic range image generation method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a high dynamic range image generation program, and when the high dynamic range image generation program is executed by a processor, the steps of the high dynamic range image generation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Dynamic contrast enhancement device and method
CN102231264A
Image recording device and image operation method
CN110891147A