Dynamic image display method and device, electronic equipment, storage medium and program product

By rendering the video segments in the dynamic image to make them consistent with the static image format, the problem of inconsistent display effects of dynamic image is solved, and the consistency of display effects and user experience are improved.

CN120238702APending Publication Date: 2025-07-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510451555.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

In the prior art, the display effects of dynamic images are inconsistent, which affects the user's viewing experience.

Method used

By obtaining the initial dynamic image, synthesize the static image and video segments, rendering and processing each video frame in the video segment based on the target rendering method, generating the target video segment, and displaying the format consistent with the static image.

Benefits of technology

Improve the consistency of the display effect of dynamic images, ensure the consistent image format of the still images and video segments, and improve the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120238702A_ABST
    Figure CN120238702A_ABST
Patent Text Reader

Abstract

The invention relates to a dynamic image display method and device, electronic equipment, a storage medium and a program product. The method comprises the following steps: acquiring an initial dynamic image, wherein the initial dynamic image is obtained by synthesizing a static image and a video segment; performing rendering processing on each video frame in the video segment based on the target rendering mode to obtain a target video segment; and displaying the target dynamic image based on the static image and the target video segment. By adopting the method, the consistency of dynamic image display effects can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing, and particularly to a method, apparatus, electronic device, storage medium, and program product for dynamic image display. Background Art

[0002] In order to pursue the fun of taking pictures, more and more users use dynamic images to record their lives. Usually, the overall display effect of the dynamic image should be completely consistent. However, in related technologies, in some display scenarios, there is a problem of inconsistent display effects of dynamic images, which may affect the user's viewing of the content of the dynamic image. Summary of the Invention

[0003] Based on this, in view of the above technical problems, it is necessary to provide a method, apparatus, electronic device, storage medium, and program product for dynamic image display that can improve the consistency of dynamic image display effects.

[0004] In a first aspect, the present application provides a method for dynamic image display. The method includes:

[0005] Obtaining an initial dynamic image, which is synthesized from a static image and a video segment;

[0006] Performing rendering processing on each video frame in the video segment based on a target rendering method to obtain a target video segment;

[0007] Displaying a target dynamic image based on the static image and the target video segment.

[0008] In a second aspect, the present application further provides a device for dynamic image display. The device includes:

[0009] An obtaining module, configured to obtain an initial dynamic image, which is synthesized from a static image and a video segment;

[0010] A processing module, configured to perform rendering processing on each video frame in the video segment based on a target rendering method to obtain a target video segment;

[0011] A display module, configured to display a target dynamic image based on the static image and the target video segment.

[0012] In a third aspect, the present application further provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps described in the first aspect when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program implements the steps of the method described in the first aspect when executed by a processor.

[0014] In a fifth aspect, the present application also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of the method described in the first aspect above.

[0015] For the above dynamic image display method, device, electronic device, storage medium and program product, an initial dynamic image is obtained, and the initial dynamic image is synthesized from a static image and a video segment; each video frame in the video segment is rendered based on a target rendering method to obtain a target video segment; and the target dynamic image is displayed based on the static image and the target video segment. In this way, by rendering the video segment, a target video segment with the same image format as the static image is obtained. Therefore, the static image and the target video segment in the displayed target dynamic image have the same image format, improving the consistency of the display effects of the two. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 It is a flowchart of the dynamic image display method in an embodiment;

[0018] Figure 2 It is a flowchart of obtaining a target video segment based on a target rendering method in an embodiment;

[0019] Figure 3 It is a flowchart of obtaining a first SDR image and a first gain image in an embodiment;

[0020] Figure 4 It is a flowchart of generating a second image according to the first image in an embodiment;

[0021] Figure 5 It is a flowchart of rendering to obtain multiple target video frames in an embodiment;

[0022] Figure 6 It is a flowchart of performing gamut matching processing in an embodiment;

[0023] Figure 7 It is a structural block diagram of the dynamic image display device in an embodiment;

[0024] Figure 8 It is an internal structure diagram of an electronic device in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0026] An embodiment of the present application provides a method, device, electronic device, storage medium and program product for displaying dynamic images. In this dynamic image display method, an initial dynamic image can be obtained, and the initial dynamic image is synthesized from a static image and a video segment; each video frame in the video segment is rendered based on a target rendering method to obtain a target video segment; the target dynamic image is displayed based on the static image and the target video segment. In this way, by rendering the video segment, a target video segment with the same image format as the static image is obtained. Therefore, the static image and the target video segment in the displayed target dynamic image have the same image format, improving the consistency of the display effects of the two.

[0027] In an exemplary embodiment, as Figure 1 shown, a method for displaying dynamic images is provided. Taking the application of this method to an electronic device as an example, the electronic device can be a device with image processing functions. On this basis, the electronic device can also be a device with image shooting functions. Optionally, the electronic device can be a laptop computer, a smart phone, a tablet computer, an Internet of Things device, a portable wearable device, etc. Among them, the Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle-mounted device, a projection device, etc., and the portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, a smart glasses, etc. As Figure 1 shown, the dynamic image display method can include the following steps:

[0028] Step 101, obtain an initial dynamic image.

[0029] Among them, the initial dynamic image is synthesized from a static image and a video segment.

[0030] In an alternative embodiment of the present application, the initial dynamic image can be captured by the electronic device, or sent to the electronic device by other devices. Optionally, it can be captured by the electronic device in real time, or captured and stored in the electronic device by the electronic device in the past. For example, if the electronic device is a smart phone with a shooting function, the electronic device can capture the initial dynamic image and execute this dynamic image display method; or, if the electronic device is a smart TV, other devices can send the initial dynamic image or mirror the initial dynamic image to the smart TV, and the smart TV executes this dynamic image display method.

[0031] In a possible implementation, when the shooting component of the electronic device is turned on and the Live Photo function is enabled, when the user presses the camera shutter, the shooting component automatically saves a static picture and records the dynamic pictures for the first duration before and after the static picture. The dynamic pictures are used as video segments. In this way, a static image and a video segment can be obtained, and the two can be combined to obtain an initial dynamic image. For example, the shooting component obtains the key frame when the camera shutter is pressed as the static picture, and obtains the first dynamic video lasting for 1.5 seconds before the camera shutter is pressed (before the key frame) and the second dynamic video lasting for 1.5 seconds after the camera shutter is pressed (after the key frame). The first dynamic video and the second dynamic video constitute the video segment. Furthermore, the static image and the video segment together constitute the initial dynamic image.

[0032] In another possible implementation, when the shooting component of the electronic device is turned on and the Live Photo function is enabled, when the user presses the camera shutter, the shooting component automatically saves a static picture and records the dynamic picture lasting for the first duration before the static picture or records the dynamic picture lasting for the first duration after the static picture. The dynamic picture is used as the video segment. In this way, a static image and a video segment can be obtained, and the two can be combined to obtain the initial dynamic image. For example, the shooting component obtains the key frame when the camera shutter is pressed as the static picture, and obtains the first dynamic video lasting for 3 seconds before the camera shutter is pressed as the video segment. Furthermore, the static image and the video segment together constitute the initial dynamic image.

[0033] It can be understood that the first duration can be 1.5 seconds, 3 seconds, etc. as in the above examples, and no specific limitation is made here.

[0034] In an optional embodiment of the present application, when the electronic device detects a viewing operation on the initial dynamic image, it determines that the user needs to view the initial dynamic image. At this time, the initial dynamic image can be obtained to display the initial dynamic image. For example, the user triggers a viewing operation on the initial dynamic image based on the album application of the electronic device, or the user triggers a viewing operation on the initial dynamic image based on the image display interface of other applications, etc. The embodiments of the present application do not make specific limitations on this.

[0035] Step 102: Render each video frame in the video segment based on the target rendering method to obtain a target video segment.

[0036] Since the image format of the static image and the video format of the video segment may be different, resulting in inconsistent display effects of the static image and the video segment when directly displaying the initial dynamic image. For example, there are differences in the display color and brightness between the static image and the video segment. Therefore, in the embodiments of the present application, the video segment is adjusted based on the display logic of the static image to obtain a target video segment with the same display logic as the static image, thereby ensuring consistent display effects. That is, each video frame in the video segment is rendered based on the target rendering method to obtain the target video segment, where the target rendering method is a rendering method that matches the static image determined based on the image format of the static image.

[0037] In a possible implementation, the image format of the static image is a double-layer image format, including a first-layer image and a second-layer image. The display formats of the first-layer image and the second-layer image are different from the display format of the video segment. For example, the display format of the first-layer image is the SDR (Standard Dynamic Range) format, and the display format of the second-layer image is the gain map format. Then, for each video frame of the video segment, a corresponding first-layer video image and a second-layer video image of each video frame need to be generated. The first-layer video image has the same display format as the first-layer image, for example, both are SDR images; the second-layer video image has the same display format as the second-layer image, for example, both are gain images. Furthermore, the target video segment can be generated according to the first-layer video image and the second-layer video image corresponding to each video frame.

[0038] In another possible implementation, the image format of the static image is a single-layer image format. For example, the static image includes an SDR image, and the display format of the video segment is the HDR (High Dynamic Range) format, that is, an HDR video. Therefore, for each video frame of the video segment, a corresponding SDR video image of each video frame needs to be generated, and then the target video segment can be generated based on the SDR video images.

[0039] Therefore, in the optional embodiments of the present application, the image format of the static image can be at least used to describe the number of image layers included in the static image and the display format of each layer of the image, etc., which are not fully exemplified here.

[0040] Step 103: Display the target dynamic image based on the static image and the target video segment.

[0041] That is, when it is necessary to view the initial dynamic image, the target video segment is determined based on the target rendering method, thereby displaying the target dynamic image composed of the static image and the target video segment. It can be understood that due to the processing by the target rendering method, the overall display effect consistency of the target dynamic image is higher than the overall display effect consistency of the initial dynamic image.

[0042] The dynamic image display method provided in this embodiment obtains an initial dynamic image synthesized from a static image and a video segment; performs rendering processing on each video frame in the video segment based on a target rendering method to obtain a target video segment; and displays the target dynamic image based on the static image and the target video segment. In this way, the target video segment is rendered according to the image format of the static image, and a target video segment with the same image format as the static image is obtained. Therefore, the static image and the target video segment in the displayed target dynamic image have the same image format, improving the consistency of the display effects of the two.

[0043] Please refer to Figure 2 , in an alternative embodiment of the present application, an alternative technical process for performing rendering processing on each video frame in the video segment based on a target rendering method to obtain a target video segment is provided, as Figure 2 shown. This technical process includes the following steps:

[0044] Step 201: For each video frame in the video segment, perform image data extraction processing on the video frame to obtain target image data corresponding to the video frame.

[0045] Among them, the data format of the target image data corresponding to the video frame is determined based on the image format of the static image. For example, as described above, the image format of the static image can be used to describe at least the number of image layers included in the static image and the display format of each layer of the image. Correspondingly, the data format of the target image data corresponding to the video frame can describe the number of image layers of the video frame and the display format of each layer of the image, so as to ensure that the image format of each video frame of the target video segment is the same as the image format of the static image.

[0046] In an alternative embodiment of the present application, image data extraction processing can be performed on each of the video frames simultaneously to obtain target image data corresponding to each video frame; or, image data extraction processing can be performed on each video frame sequentially to obtain target image data corresponding to each video frame.

[0047] In one possible implementation, the target image data of each video frame is included in the video segment, so the target image data corresponding to each video frame can be extracted from the video segment.

[0048] In another possible implementation, the display effect parameters of the static image can be determined, and the display effect parameters are applied to the video frame to perform image data extraction processing on the video frame, so as to obtain the target image data corresponding to the video frame.

[0049] Step 202: Render multiple target video frames based on the target image data corresponding to each video frame, and obtain a target video segment based on the multiple target video frames.

[0050] The target image data corresponding to each video frame is independent. After rendering, continuous target video frames are obtained, and thus a target video segment is formed based on each target video frame. Furthermore, the static image and the target video segment form a target dynamic image.

[0051] In the embodiments of the present application, by performing image data extraction processing on each video frame, the target image data corresponding to each video frame is obtained, and thus multiple target video frames are rendered to form a target video segment, avoiding the loss of video frames in the video segment, and making the display effect of the target video segment consistent with that of the static image on the basis of ensuring that the target video segment and the video content included in the video segment are the same.

[0052] As described above, the static image can be in a double-layer image format. For example, the image format of the static image is the UHDR format, and the video segment is an HDR video. Among them, the UHDR picture is an image format that meets double-layer HDR, including but not limited to JPG, HEIF (High Efficiency Image File Format), AVIF (AV1 Image File Format), etc. The common image format of the UHDR image is a double-layer image format of an SDR image and a Gain map (enhanced image).

[0053] Taking the image format of the static image as the UHDR format and the video segment as an HDR video as an example, when the screen of the electronic device completely does not meet the conditions for enabling HDR rendering, it is rendered in the SDR format and displayed on the screen of the electronic device; when the screen brightness meets the conditions for enabling HDR, it is converted to an HDR image in the format conversion method specified in the metadata of the SDR image and rendered on the screen of the electronic device for display. The HDR video is a video format that meets the HDR standard, including but not limited to Dolby, HDR10+, HLG (Hybrid Log-Gamma), HDRvivid, etc.

[0054] Based on this, it can be known that when the screen brightness completely does not meet the conditions for enabling HDR rendering, the UHDR image is rendered in the SDR format, and the HDR video is rendered in the HDR format. The different rendering methods will result in inconsistent display effects when they are displayed on the screen, such as colors, tones, etc. being inconsistent. Similarly, there are similar problems with dynamic images in other formats. Therefore, in the embodiments of the present application, the display logic of the video segment is made the same as that of the static image, and a new target video segment is rendered.

[0055] The following takes the initial dynamic image including a static image in the HDR format and a video segment in the HDR format as an example to illustrate the process of generating the target image data corresponding to each video frame.

[0056] In an exemplary embodiment, image data extraction processing is performed on a video frame to obtain target image data corresponding to the video frame, including: performing image data extraction processing on the video frame to obtain a first SDR image and a first gain image corresponding to the video frame.

[0057] That is, the target image data includes the first SDR image and the first gain image. In this way, the image format of the target video segment rendered based on the target image data is consistent with that of a static image.

[0058] Please refer to Figure 3 , in an alternative embodiment of the present application, an alternative technical process for obtaining the first SDR image and the first gain image is provided. As Figure 3 shown, the technical process includes the following steps:

[0059] Step 301: Perform image data extraction processing on the video frame to obtain a first image.

[0060] Step 302: Generate a second image according to the first image.

[0061] Wherein, the first image is one of the first SDR image and the first gain image. The second image is the other of the first SDR image and the first gain image.

[0062] In a possible implementation manner, the first image is the first SDR image, the second image is the first gain image; and the video segment is in HDR format.

[0063] Based on this, performing image data extraction processing on the video frame to obtain the first image includes one of the following implementation manners:

[0064] 1. Determine a luminance mapping curve according to a second SDR image corresponding to a static image and a reference HDR image. The luminance mapping curve is used to characterize the luminance ratio relationship between the second SDR image and the reference HDR image. Process the video frame according to the luminance mapping curve to obtain the first SDR image corresponding to the video frame.

[0065] In an alternative embodiment of the present application, the static image includes a second SDR image and a second gain image, and a reference HDR image can be generated based on the second SDR image in the static image. For example, perform format conversion on the second SDR image according to the image format conversion method included in the metadata of the static image to obtain the reference HDR image.

[0066] In a possible implementation, the first luminance curve of the second SDR image can be determined according to the second SDR image, and the second luminance curve of the reference HDR image can be determined according to the reference HDR image. According to the proportional relationship between the first luminance curve and the second luminance curve, a luminance mapping curve for characterizing the luminance proportional relationship between the second SDR image and the reference HDR image is fitted.

[0067] In another possible implementation, a first AI (Artificial Intelligence) model is preset in the electronic device. The second SDR image and the reference HDR image are input into the first AI model, and the first AI model recognizes the two images and outputs a luminance mapping curve. In this way, the flexibility of the electronic device to obtain the luminance mapping curve is improved.

[0068] The luminance mapping curve is applied to each video frame, and each video frame is subjected to luminance adjustment processing to obtain a first SDR image.

[0069] 2. According to a preset format conversion method, the video frame in HDR format is converted into a video frame in SDR format to obtain a first SDR image corresponding to the video frame.

[0070] In an alternative embodiment of the present application, according to the format conversion method for converting an image in HDR format into an image in SDR format, the video frame in HDR format is converted into a video frame in SDR format, thereby obtaining a first SDR image corresponding to the video frame. Optionally, the format conversion method is included in the metadata of the static image, and the electronic device can read the format conversion method from the metadata and execute it. Optionally, the format conversion method can be characterized by a curve, a guide map, a format conversion function, etc., and is not fully exemplified herein.

[0071] In an alternative embodiment of the present application, according to the format conversion method specified in the video format specification, the video frame in HDR format is converted into a video frame in SDR format to obtain a first SDR image corresponding to the video frame.

[0072] 3. Extract the first SDR image corresponding to the video frame from the video segment; wherein, the first SDR image is pre-embedded in the video segment.

[0073] In an alternative embodiment of the present application, the first SDR image corresponding to the video frame can be extracted from the metadata of the video segment. Exemplarily, during the process of shooting the video segment, each video frame is subjected to format conversion to obtain the first SDR image corresponding to each video frame, and the first SDR image is embedded in the metadata of the video frame. In this way, when the initial dynamic image needs to be displayed, it is only necessary to decode the video segment and directly read the first SDR image corresponding to each video frame from it to render the target video frame, effectively reducing the real-time processing load during the process of the electronic device determining the target video segment and improving the rendering efficiency of the target video segment.

[0074] In another possible implementation, the first image is the first gain image, the second image is the first SDR image, and the video segment is in HDR format.

[0075] Based on this, performing image data extraction processing on the video frame to obtain the first image includes: extracting the first gain image corresponding to the video frame from the video segment; wherein, the first gain image is pre-embedded in the video segment.

[0076] Among them, the first gain image corresponding to the video frame can be extracted from the metadata of the video segment. Exemplarily, during the process of shooting the video segment, the first gain image corresponding to each video frame is generated, and the first SDR image is embedded in the metadata of the video frame. In this way, when the initial dynamic image needs to be displayed, it is only necessary to decode the video segment and directly read the first gain image corresponding to each video frame from the metadata to render the target video frame, effectively reducing the real-time processing load during the process of the electronic device determining the target video segment and improving the rendering efficiency of the target video segment.

[0077] In the embodiments of the present application, through processing methods such as global brightness mapping curves, format conversion methods, or pre-embedded metadata, the diverse processing requirements of the video stream are covered, enabling the electronic device to flexibly obtain the first image of the video frame.

[0078] It can be understood that in an alternative embodiment of the present application, if the first SDR image and the first gain image corresponding to each video frame are pre-embedded, the first SDR image and the first gain image corresponding to each video frame can be extracted from the video segment.

[0079] If only the first image is obtained by performing image data extraction processing on the video frame, for example, only the first SDR image or the first gain image is obtained, then the second image can be generated using the first image based on the generation relationship between the first image and the second image.

[0080] Please refer to Figure 4 , in an alternative embodiment of the present application, an alternative technical process for generating the second image based on the first image is provided, as Figure 4As shown, the technical process includes the following steps:

[0081] Step 401: Determine a reference brightness parameter according to the reference white brightness level of the video segment and the reference white brightness level of the static image.

[0082] In an alternative embodiment of the present application, the reference white brightness level of the static image can be read from the metadata of the static image. For example, if the static image includes a second SDR image and the reference white brightness level of the second SDR image included in the metadata is 203 nits (i.e., the SDR reference white is 203 nits), then the reference white brightness level of the static image is 203 nits.

[0083] In an alternative embodiment of the present application, the reference white brightness level of the video segment can be read from the metadata of the video segment. For example, the reference white brightness level of the video segment is 1000 nits (i.e., the HDR reference white is 1000 nits).

[0084] In a possible implementation, the ratio of the reference white brightness level of the video segment to the reference white brightness level of the static image is used as the reference brightness parameter. For example, the reference brightness parameter is 1000 / 203.

[0085] Step 402: Apply the first image, the video frame, and the reference brightness parameter to a first transfer function to obtain a second image output by the first transfer function.

[0086] In a possible implementation, the first image is a first SDR image and the second image is a first gain image. The first gain image is obtained according to the following formula:

[0087] First gain image = f(generate)(HDR(in), SDR, 1000 / 203).

[0088] Where f(generate) is the first transfer function, HDR(in) is the video frame, SDR is the first SDR image corresponding to the video frame, and 1000 / 203 is the reference brightness parameter. Thus, in the case of obtaining the first SDR image, the first SDR image, the video frame, and the reference brightness parameter are input into the first transfer function to obtain a second image output by the first transfer function, that is, the first gain image is obtained.

[0089] In another possible implementation, the first image is a first gain image and the second image is a first SDR image. The first SDR image is obtained according to the following formula:

[0090] First SDR image = f(generate)(HDR(in), Gain Map, 1000 / 203).

[0091] Among them, f(generate) is the first conversion function, HDR(in) is the video frame, Gain Map is the first gain image corresponding to the video frame, and 1000 / 203 is the reference brightness parameter. It can be seen from this that in the case of obtaining the first gain image, the first gain image, the video frame, and the reference brightness parameter are input into the first conversion function to obtain the second image output by the first conversion function, that is, the first SDR image is obtained.

[0092] In this way, based on the above method, the first SDR image and the first gain image corresponding to each video frame can be obtained, and then multiple target video frames can be rendered.

[0093] Please refer to Figure 5 , in an alternative embodiment of the present application, an alternative technical process for rendering multiple target video frames is provided, as Figure 5 shown, the technical process includes the following steps:

[0094] Step 501, obtain the screen brightening multiple of the electronic device.

[0095] In display technology, the Scale brightening multiple refers to the ratio of the maximum brightness that the screen can reach when displaying high dynamic range (HDR) content to the brightness of standard dynamic range (SDR) content. This concept is used to describe the brightness enhancement ability of the screen when displaying HDR content. For example, if the Scale brightening multiple of the screen is 2, it means that in HDR mode, the maximum brightness of the screen can reach twice that in SDR mode. This brightness enhancement helps to better display details in high-contrast scenes, especially in the detail performance of bright and dark parts.

[0096] Based on this, according to the tone mapping rule of the image, the first SDR image and the first gain image corresponding to each video frame of the video segment need to be converted into HDR content that conforms to the screen brightening multiple. In this way, since the second SDR image and the second gain image of the static image can be converted into HDR content that conforms to the screen brightening multiple, by also converting the first SDR image and the first gain image corresponding to each video frame of the video segment into HDR content that conforms to the screen brightening multiple, the composed target video segment, like the static image, conforms to the screen brightening multiple during display, ensuring the consistency of tone display between the two.

[0097] Optionally, in different application scenarios, the screen brightening multiple of the electronic device will change. Here, the obtained is the screen brightening multiple of the current electronic device.

[0098] Step 502, apply the target image data corresponding to each video frame and the screen brightening multiple to the second conversion function to obtain multiple target video frames output by the second conversion function.

[0099] In an alternative embodiment of the present application, the target video frame is determined based on the following formula:

[0100] HDR(out) = f(rendering)(SDR, Gain Map, Scale).

[0101] Wherein, f(rendering) is the second conversion function, SDR is the first SDR image, Gain Map is the first gain image, Scale is the brightening multiple, and HDR(out) is the target video frame. Optionally, the target video frames corresponding to each video frame can be output one by one using the second conversion function to obtain multiple target video frames; alternatively, the first SDR images and the first gain images of each video frame can be input into the second conversion function to obtain multiple target video frames output by the second conversion function.

[0102] Taking the reference luminance parameter as 1000 / 203 as an example, when Scale = 1000 / 203, HDR(out) should be equivalent to HDR(in).

[0103] In the embodiment of the present application, for the dynamic images of UHDR images and HDR videos, based on the Gain map mechanism of UHDR images, the HDR rendering process of videos is unified, thereby promoting cross-format standardization between static images and video segments, and improving the consistency of the display effects of target dynamic images.

[0104] In an exemplary embodiment, the first conversion function and the second conversion function are inverse functions of each other.

[0105] That is to say, f(generation) and f(rendering) are inverse processes of each other.

[0106] Through function reverse design, bidirectional lossless conversion between HDR images and SDR images can be achieved. In this way, the video content of the target video frame generated based on the first SDR image is consistent with the video content of the original HDR video frame, avoiding loss of video content. Furthermore, the video content of the obtained target video segment is consistent with the video content of the video segment, ensuring the integrity of content display.

[0107] To ensure consistent display effects, in addition to performing the above processing to ensure that the tones of the static image and the target video segment are consistent and their brightnesses are the same, the color gamut matching process can also be used to ensure that their color gamuts are consistent and match the screen of the electronic device, further ensuring the consistency of the display effects.

[0108] In an exemplary embodiment, before rendering each video frame in the video segment based on the target rendering method to obtain the target video segment, the method further includes: performing color gamut matching processing on the static image and the video segment according to the first color gamut range of the static image and the second color gamut range of the video segment, to obtain a static image and a video segment that match the third color gamut range of the screen of the electronic device.

[0109] Among them, the color gamut range of an image refers to the set of all colors contained in the image, and these colors can be described by a specific color space. Different color spaces have different color gamut ranges, and common color spaces include sRGB, Adobe RGB, DCI-P3, BT.2020, etc.

[0110] In an alternative embodiment of the present application, the first color gamut range can be read from the metadata of the static image, and the second color gamut range can be read from the metadata of the video segment. Through color gamut matching processing, the color gamut ranges of the static image and each video frame of the video segment are both converted to match the color gamut range of the screen, so as to ensure color consistency at the display layer.

[0111] Please refer to Figure 6 , in an alternative embodiment of the present application, an alternative technical process for performing color gamut matching processing is provided. As Figure 6 shown, this technical process includes the following steps:

[0112] Step 601, determine whether the first color gamut range and the second color gamut range are the same.

[0113] Step 602, if not, perform color gamut scaling processing on one of the static image and the video segment, and convert the color gamut ranges of the static image and the video segment after the scaling processing to the third color gamut range.

[0114] Among them, if the first color gamut range and the second color gamut range are not the same, perform color gamut scaling processing according to the smaller color gamut range, and then match it to the color gamut range of the screen.

[0115] In an alternative embodiment of the present application, if the first color gamut range is smaller than the second color gamut range, perform color gamut scaling processing on the video segment according to the first color gamut range. For example, convert the video segment with the second color gamut range to a video segment with the second color gamut range.

[0116] In an alternative embodiment of the present application, if the second color gamut range is smaller than the first color gamut range, perform color gamut scaling processing on the static image according to the second color gamut range. For example, convert the static image with the first color gamut range to a static image with the second color gamut range.

[0117] When the color gamut ranges of the static image and the video segment are the same, the color gamut ranges of both can be converted to a third color gamut range. It should be noted that after the static image and the video segment with different color gamut ranges are converted to the third color gamut range, there are still differences in the colors when they are displayed. In the embodiments of the present application, the color gamut ranges of both are scaled to be the same, and then converted to the third color gamut range. At this time, it is ensured that the colors of the converted static image and video segment are highly consistent when displayed.

[0118] Step 603: If so, convert the color gamut ranges of the static image and the video segment to a third color gamut range.

[0119] If the first color gamut range and the second color gamut range are the same, the color gamut ranges of the static image and the video segment can be directly matched to the color gamut range of the screen.

[0120] In the embodiments of the present application, a dynamic color gamut adaptation mechanism is adopted. On the one hand, based on the principle of minimizing color gamut matching, when the color gamut ranges of the video segment and the static image are different, the smaller color gamut is preferentially scaled, so as to avoid distortion caused by overflow. On the other hand, based on multi-level color gamut mapping, combined with the screen display capabilities of the electronic device, the color gamut ranges of the static image and the video segment are dynamically adjusted to match the screen, ensuring color fidelity under different screen brightnesses.

[0121] In an optional embodiment of the present application, after obtaining the initial dynamic image, the color gamut matching process can be performed on the static image and the video segment according to the first color gamut range of the static image and the second color gamut range of the video segment, so as to obtain the static image and the video segment that match the third color gamut range of the screen of the electronic device; then, based on the target rendering method, each video frame in the video segment obtained after the color gamut matching process is rendered to obtain the target video segment, and the target dynamic image is displayed based on the static image and the target video segment after the color gamut matching process. Based on this, the color and tone consistency of the static image and the target video segment in the displayed target dynamic image can be improved.

[0122] In an optional embodiment of the present application, a second AI model is preset in the electronic device. The static image and the video segment are input into the second AI model. The second AI model automatically predicts the best color gamut scaling ratio between the two, and converts the color gamut ranges of the static image and the video segment to be the same, and outputs the static image and the video segment with the same color gamut range. Then, the electronic device converts the color gamut ranges of the static image and the video segment to a third color gamut range. In this way, the flexibility and intelligence of color gamut conversion can be improved.

[0123] For ease of understanding, the following uses a complete embodiment to illustrate the dynamic video display method provided by the embodiments of the present application.

[0124] Obtain an initial dynamic image synthesized from a static image in UHDR format and a video segment in HDR format.

[0125] Perform color gamut matching processing on the static image and the video segment according to the first color gamut range of the static image and the second color gamut range of the video segment to obtain a static image and a video segment that match the third color gamut range of the screen of the electronic device.

[0126] For each video frame in the video segment, perform image data extraction processing on the video frame to obtain a first SDR image corresponding to the video frame; apply the first SDR image, the video frame, and a reference brightness parameter to a first transfer function to obtain a first gain image output by the first transfer function. Alternatively, perform image data extraction processing on the video frame to obtain a first gain image corresponding to the video frame; apply the first gain image, the video frame, and a reference brightness parameter to a first transfer function to obtain a first SDR image output by the first transfer function.

[0127] Obtain the screen brightening multiple of the electronic device; apply the first SDR image, the first gain image corresponding to each video frame, and the screen brightening multiple to a second transfer function to obtain multiple target video frames output by the second transfer function, and obtain a target video segment based on the multiple target video frames.

[0128] Display a target dynamic image based on the static image and the target video segment.

[0129] In the embodiments of the present application, by unifying the rendering logic of the video segment and the rendering logic of the UHDR image, the problem of the display effect difference between the HDR video and the UHDR picture when the screen brightness is insufficient is solved. For example, in a low-brightness scene, the color gamut and tone of the video and the photo can achieve a seamless connection visual effect after dynamic adaptation. Moreover, a color gamut scaling and a dynamic generation mechanism of the gain image are adopted to reduce redundant calculations and improve the efficiency and integrity of generating the target dynamic image.

[0130] It should be understood that although the steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps in other steps.

[0131] Based on the same inventive concept, an embodiment of the present application further provides a dynamic image display device for implementing the dynamic image display method involved above. The implementation solution provided by this device to solve the problem is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the dynamic image display device provided below can refer to the limitations on the dynamic image display method in the above text, and will not be elaborated here.

[0132] In an exemplary embodiment, as Figure 7 shown, a dynamic image display device 700 is provided, including: an acquisition module 701, a processing module 702, and a display module 703, where:

[0133] The acquisition module 701 is configured to acquire an initial dynamic image, which is obtained by synthesizing a static image and a video segment;

[0134] The processing module 702 is configured to perform rendering processing on each video frame in the video segment based on a target rendering method to obtain a target video segment;

[0135] The display module 703 is configured to display a target dynamic image based on the static image and the target video segment.

[0136] In an alternative embodiment of the present application, the processing module is specifically configured to: for each video frame in the video segment, perform image data extraction processing on the video frame to obtain target image data corresponding to the video frame; based on the target image data corresponding to each video frame, render to obtain a plurality of target video frames, and obtain a target video segment based on the plurality of target video frames.

[0137] In an alternative embodiment of the present application, the processing module 702 is specifically configured to: perform image data extraction processing on the video frame to obtain a first SDR image and a first gain image corresponding to the video frame.

[0138] In an alternative embodiment of the present application, the processing module is specifically configured to: perform image data extraction processing on the video frame to obtain a first image; the first image is one of the first SDR image and the first gain image; generate a second image according to the first image; the second image is the other of the first SDR image and the first gain image.

[0139] In an alternative embodiment of the present application, the processing module 702 is specifically configured to perform one of the following:

[0140] Determine a luminance mapping curve according to the second SDR image corresponding to the static image and a reference HDR image, where the luminance mapping curve is used to represent the luminance ratio relationship between the second SDR image and the reference HDR image; process the video frame according to the luminance mapping curve to obtain a first SDR image corresponding to the video frame;

[0141] Convert the video frame in HDR format into a video frame in SDR format according to a preset format conversion method, and obtain a first SDR image corresponding to the video frame;

[0142] Extract the first SDR image corresponding to the video frame from the video segment; wherein, the first SDR image is pre-embedded in the video segment.

[0143] In an alternative embodiment of the present application, the processing module 702 is specifically configured to: extract a first gain image corresponding to the video frame from the video segment; wherein, the first gain image is pre-embedded in the video segment.

[0144] In an alternative embodiment of the present application, the processing module is specifically configured to: determine a reference brightness parameter according to the reference white brightness level of the video segment and the reference white brightness level of the static image; apply the first image, the video frame, and the reference brightness parameter to a first conversion function to obtain a second image output by the first conversion function.

[0145] In an alternative embodiment of the present application, the processing module 702 is specifically configured to: obtain the screen brightening multiple of the electronic device; apply the target image data corresponding to each video frame and the screen brightening multiple to a second conversion function to obtain multiple target video frames output by the second conversion function.

[0146] In an alternative embodiment of the present application, the first conversion function and the second conversion function are inverse functions of each other.

[0147] In an alternative embodiment of the present application, the device further includes a matching module, configured to: perform color gamut matching processing on the static image and the video segment according to the first color gamut range of the static image and the second color gamut range of the video segment, to obtain a static image and a video segment that match the third color gamut range of the screen of the electronic device.

[0148] In an alternative embodiment of the present application, the matching module is specifically configured to: determine whether the first color gamut range and the second color gamut range are consistent; if not, perform color gamut scaling processing on one of the static image and the video segment, and convert the color gamut ranges of the scaled static image and video segment into the third color gamut range; if so, convert the color gamut ranges of the static image and the video segment into the third color gamut range.

[0149] In an alternative embodiment of the present application, the matching module is specifically configured to: if the first color gamut range is smaller than the second color gamut range, perform color gamut scaling processing on the video segment according to the first color gamut range; if the second color gamut range is smaller than the first color gamut range, perform color gamut scaling processing on the static image according to the second color gamut range.

[0150] Each module in the above dynamic image display device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0151] In an exemplary embodiment, an electronic device is provided, and its internal structural diagram can be as Figure 8 shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used for the processor to exchange information with external devices. The communication interface of the electronic device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a dynamic image display method. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the electronic device, or an external keyboard, touchpad, or mouse, etc.

[0152] Those skilled in the art can understand that Figure 8 the structure shown in

[0153] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0154] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0155] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0156] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0157] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0158] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A method for displaying a dynamic image, characterized in that: The method comprises: Acquire an initial dynamic image, where the initial dynamic image is synthesized from a static image and a video segment; Rendering each video frame in the video segment based on a target rendering method to obtain a target video segment; Based on the static image and the target video segment, a target dynamic image is displayed.

2. The method according to claim 1, characterized in that: The rendering process is performed on each video frame in the video segment based on the target rendering mode to obtain the target video segment, including: For each video frame in the video segment, performing image data extraction processing on the video frame to obtain target image data corresponding to the video frame; Based on the target image data corresponding to each of the video frames, multiple target video frames are rendered, and a target video segment is obtained based on the multiple target video frames.

3. The method according to claim 2, characterized in that The image format of the static image is UHDR format; the image data extraction process is performed on the video frame to obtain the target image data corresponding to the video frame, including: Perform image data extraction processing on the video frame to obtain a first SDR image and a first gain image corresponding to the video frame.

4. The method according to claim 3, characterized in that The performing image data extraction processing on the video frame to obtain a first SDR image and a first gain image corresponding to the video frame includes: Performing image data extraction processing on the video frame to obtain a first image; the first image is one of a first SDR image and a first gain image; A second image is generated according to the first image; the second image is the other of the first SDR image and the first gain image.

5. The method according to claim 4, characterized in that The first image is a first SDR image, and the second image is the first gain image; the video segment is in HDR format; and the image data extraction process is performed on the video frame to obtain the first image, including one of the following: Determine a brightness mapping curve according to a second SDR image and a reference HDR image corresponding to the static image, wherein the brightness mapping curve is used to characterize a brightness ratio relationship between the second SDR image and the reference HDR image; process the video frame according to the brightness mapping curve to obtain a first SDR image corresponding to the video frame; According to a preset format conversion method, the video frame in HDR format is converted into a video frame in SDR format to obtain a first SDR image corresponding to the video frame; A first SDR image corresponding to the video frame is extracted from the video segment; wherein the first SDR image is pre-embedded in the video segment.

6. The method according to claim 4, characterized in that The first image is a first gain image, and the second image is the first SDR image; and the step of performing image data extraction processing on the video frame to obtain the first image includes: A first gain image corresponding to the video frame is extracted from the video segment; wherein the first gain image is pre-embedded in the video segment.

7. The method according to claim 4, characterized in that Generating a second image according to the first image includes: Determining a reference brightness parameter according to a reference white brightness level of the video segment and a reference white brightness level of the static image; The first image, the video frame and the reference brightness parameter are applied to a first conversion function to obtain the second image output by the first conversion function.

8. The method according to claim 7, characterized in that The rendering to obtain a plurality of target video frames based on the target image data corresponding to each of the video frames includes: Get the screen brightness multiple of the electronic device; The target image data corresponding to each of the video frames and the screen brightening multiple are applied to a second conversion function to obtain a plurality of the target video frames output by the second conversion function.

9. The method according to claim 8, characterized in that The first conversion function and the second conversion function are inverse functions of each other.

10. The method according to any one of claims 1 to 9, characterized in that: Before rendering each video frame in the video segment based on the target rendering mode to obtain the target video segment, the method further includes: According to the first color gamut range of the static image and the second color gamut range of the video segment, color gamut matching processing is performed on the static image and the video segment to obtain a static image and a video segment that match a third color gamut range of the screen of the electronic device.

11. The method according to claim 10, characterized in that The performing color gamut matching processing on the static image and the video segment according to the first color gamut range of the static image and the second color gamut range of the video segment includes: Determine whether the first color gamut range is consistent with the second color gamut range; If not, performing color gamut scaling processing on one of the static image and the video segment, and converting the color gamut range of the static image and the video segment after the scaling processing into the third color gamut range; If yes, the color gamut range of the static image and the video segment is converted into the third color gamut range.

12. The method according to claim 11, characterized in that The performing color gamut scaling processing on one of the static image and the video segment includes: If the first color gamut range is smaller than the second color gamut range, performing color gamut scaling processing on the video segment according to the first color gamut range; If the second color gamut range is smaller than the first color gamut range, color gamut scaling is performed on the static image according to the second color gamut range.

13. A dynamic image display device, characterized in that: The device comprises: An acquisition module, used for acquiring an initial dynamic image, wherein the initial dynamic image is synthesized from a static image and a video segment; A processing module, configured to perform rendering processing on each video frame in the video segment based on a target rendering mode to obtain a target video segment; wherein the target rendering mode is a rendering mode matched with the static image and determined based on an image format of the static image; The display module is used to display a target dynamic image based on the static image and the target video segment.

14. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.

15. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.