Image data processing method and apparatus, and related product
Patent Information
- Application Number
- PCT/CN2025/146003
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-02-21
- Filing Date
- 2025-12-26
- Publication Date
- 2026-08-27
Smart Images

Figure CN2025146003_27082026_PF_FP_ABST
Abstract
Description
Image data processing methods, apparatus and related products
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510199296.2, filed on February 21, 2025, the disclosure of which is incorporated herein by reference in its entirety. Technical Field
[0003] At least one embodiment of this disclosure relates to an image data processing method, apparatus, and related products. Background Technology
[0004] A moving photo is a new type of photo that differs from a still photo. A moving photo can include a still image of the scene at the moment of shooting and multiple video frames of the scene within a short time range before and after the moment of shooting. The still image corresponds to a specific video frame among the multiple video frames and records the same image content as that frame.
[0005] Currently, the image quality of the aforementioned static image can be set to be higher than the image quality of the aforementioned multiple video frames, and the static image can be displayed as the cover image of the animated photo. When the user plays the animated photo by long-pressing or other methods, the aforementioned multiple video frames can be played. Thus, the static image in the animated photo satisfies the user's needs for recording and browsing static scenes, while the multiple video frames in the animated photo satisfy the user's needs for recording and browsing dynamic scenes.
[0006] However, when editing animated photos, such as adding stickers, only the cover image can be edited, and the multiple video frames mentioned above cannot be edited, resulting in poor animation editing effects. Summary of the Invention
[0007] At least one embodiment of this disclosure provides an image data processing method, apparatus, and related product that can edit moving photos according to editing needs and improve the editing effect of moving photos.
[0008] In a first aspect, at least one embodiment of this disclosure provides an image data processing method, comprising:
[0009] Acquire at least one animated photo and editing instructions for the animated photo; the animated photo comprises multiple frames.
[0010] According to the editing instructions, a main data track is created to carry at least one frame of the dynamic photo, and the at least one frame of the photo is displayed based on the main data track;
[0011] According to the editing instructions, the editing elements to be added to the dynamic photo are determined, an auxiliary data track is created to carry the editing elements, and the editing elements are presented based on the auxiliary data track; the hierarchy of the auxiliary data track is above the hierarchy of the main data track; the presented editing elements are superimposed on one or more frames of images displayed in the dynamic photo.
[0012] Secondly, at least one embodiment of this disclosure provides an image data processing apparatus, comprising:
[0013] A data acquisition unit is used to acquire at least one dynamic photo and editing instructions for the dynamic photo; the dynamic photo includes multiple frames of images;
[0014] An image display unit is configured to create a main data track for carrying at least one frame of the dynamic photo according to the editing instructions, and display the at least one frame of the photo based on the main data track;
[0015] An element presentation unit is used to determine the editing element to be added to the dynamic photo according to the editing instructions, create an auxiliary data track to carry the editing element, and present the editing element based on the auxiliary data track; the hierarchy of the auxiliary data track is above the hierarchy of the main data track; the presented editing element is superimposed on one or more frames of the image displayed by the dynamic photo.
[0016] Thirdly, at least one embodiment of this disclosure provides an electronic device, including: a processor; and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the steps of the method described in the first aspect above.
[0017] Fourthly, at least one embodiment of this disclosure provides a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the steps of the method described in the first aspect above.
[0018] Fifthly, at least one embodiment of this disclosure provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in one or more embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 is a schematic flowchart of an image data processing method provided in an embodiment of this disclosure;
[0021] Figure 2 is a schematic diagram of uploading dynamic photos provided in an embodiment of this disclosure;
[0022] Figure 3 is a schematic diagram of a track for a dynamic photograph provided in an embodiment of this disclosure;
[0023] Figure 4 is a schematic diagram of editing a dynamic photograph provided in an embodiment of this disclosure;
[0024] Figure 5 is a schematic diagram of uploading dynamic photos according to another embodiment of this disclosure;
[0025] Figure 6 is a schematic diagram of a track for a dynamic photograph provided in another embodiment of this disclosure;
[0026] Figure 7 is a schematic diagram of editing a dynamic photograph provided in another embodiment of this disclosure;
[0027] Figure 8 is a schematic diagram of the structure of an image data processing apparatus provided in an embodiment of the present disclosure; and
[0028] Figure 9 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0029] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this disclosure, the technical solutions in one or more embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of the embodiments. Based on one or more embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this disclosure.
[0030] It is understood that before using the technical solutions disclosed in the embodiments of this disclosure, relevant parties should be informed of the type, scope of use, and usage scenarios of the information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and authorization from the relevant parties should be obtained.
[0031] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0032] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0033] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0034] At least one embodiment of this disclosure provides an image data processing method capable of editing multiple frames of images in a dynamic photograph, thereby improving the editing effect of the dynamic photograph. This image data processing method can be applied to a terminal device and executed by the terminal device, or it can be applied to a server and executed by the server. The terminal device includes, but is not limited to, personal terminals such as mobile phones, computers, tablets, laptops, in-vehicle computers, and wearable devices. This personal terminal has a specified application installed, such as a short video application or an image editing application, through which the image data processing method of this embodiment is implemented. The server can be a single server or a server cluster; no limitation is made here.
[0035] The various embodiments disclosed herein relate to the processing of moving images. For ease of understanding, moving images will be explained first here.
[0036] A moving photo is a new type of photograph, distinct from a still photo, and can be captured using a mobile phone or other camera device. The principle behind its generation can be simply summarized as follows: when a user presses the shutter button, the camera captures a still image of the scene at the moment of capture, and also captures multiple video frames within a time range from a point before the capture to a point after the capture. These video frames are arranged in order of their timestamps. A moving photo comprises both the still image and the multiple video frames.
[0037] In the above process, the capturing device uses a specific synchronous acquisition mechanism to acquire the aforementioned still image and multiple video frames, so that the still image can correspond to a specific video frame among the multiple video frames, recording the same image content as that frame. Based on this, the data of the moving photos stored by the capturing device, in addition to the aforementioned still image and multiple video frames, can also store the position information of the aforementioned still image within the aforementioned multiple video frames. In some solutions, the data of the moving photos stored by the capturing device can also include the audio information corresponding to the aforementioned multiple video frames.
[0038] Currently, the aforementioned static image can be used as the cover image for animated photos. However, when editing animated photos, such as adding stickers, only the cover image can be edited; the multiple video frames within the animated photo cannot be edited, resulting in poor animation editing effects.
[0039] Figure 1 is a schematic flowchart of an image data processing method provided in an embodiment of this disclosure. As shown in Figure 1, the process includes:
[0040] Step S102: Obtain at least one dynamic photo and editing instructions for the dynamic photo; the dynamic photo includes multiple frames of images;
[0041] Step S104: According to the editing instructions, create a main data track to carry at least one frame of the image in the dynamic photo, and display the at least one frame of the image based on the main data track;
[0042] Step S106: According to the editing instructions, determine the editing elements to be added to the dynamic photo, create an auxiliary data track to carry the editing elements, and present the editing elements based on the auxiliary data track; the level of the auxiliary data track is above the level of the main data track; the presented editing elements are superimposed on one or more frames of images displayed in the dynamic photo.
[0043] In this embodiment, firstly, at least one dynamic photo and editing instructions for the dynamic photo are acquired. The dynamic photo includes multiple frames of images. Then, according to the editing instructions, a main data track is created to carry at least one frame of the dynamic photo. The at least one frame of the image is displayed based on the main data track. Finally, according to the editing instructions, editing elements to be added to the dynamic photo are determined, and auxiliary data tracks are created to carry the editing elements. The editing elements are presented based on the auxiliary data tracks. The hierarchy of the auxiliary data tracks is above the hierarchy of the main data tracks. The presented editing elements are superimposed on one or more frames of the dynamic photo. As can be seen, this embodiment enables the creation of a main data track for animated photos, which carries at least one frame of an image in the animated photo and displays that at least one frame of an image in the animated photo. Additionally, it enables the creation of auxiliary data tracks for editing elements in the animated photo, which carry and display the editing elements. Since the auxiliary data track is located above the main data track, the displayed editing elements can be superimposed on one or more frames of an image displayed in the animated photo. This achieves the goal of displaying and editing animated photos according to editing needs, avoiding the limitation of only being able to edit the cover image in the animated photo, and improving the editing effect of the animated photo.
[0044] In step S102 above, at least one dynamic photo is acquired. One or more dynamic photos uploaded by the user to a specified application on the terminal device can be acquired. Each dynamic photo includes multiple frames. For each dynamic photo, the multiple frames include a still image and multiple video frames. The still image is a still image of the shooting scene captured by the dynamic photo's camera at the moment of shooting, and the multiple video frames are multiple video frames of the shooting scene captured by the dynamic photo's camera within a time range from a point before the shooting time to a point after the shooting time. The still image can be displayed as the cover image of the dynamic photo. For each dynamic photo, the still image corresponds to a specific video frame among its multiple video frames, and the still image and the specific video frame record the same image content.
[0045] In step S102 above, editing instructions for one or more animated photos are also obtained. For example, after the user uploads various animated photos to a designated application, the designated application determines that the animated photos have entered the editing state and generates editing instructions. In one embodiment, editing instructions can also be generated based on any editing operation performed by the user on the animated photos, such as generating corresponding editing instructions based on the user's actions of adding stickers, adding filters, or adding music.
[0046] In step S104 above, a main data track is created according to the editing instructions to carry at least one frame of an image in a dynamic photo. In this embodiment, the main data track is used to carry at least one frame of an image in a dynamic photo. In one example, the main data track can carry all the images in a dynamic photo, including a still image and all video frames. In another example, the main data track can carry some of the images in a dynamic photo, such as a still image and some video frames.
[0047] In step S106 above, the editing elements to be added to the animated photo are determined according to the editing instructions. These editing elements include, but are not limited to, at least one of the following: materials, filters, effects, stickers, text, and audio. For example, if the editing instruction is a material addition instruction, the material specified in the editing instruction will be used as the editing element. Similarly, if the editing instruction is a filter addition instruction, the filter specified in the editing instruction will be used as the editing element. Furthermore, if the editing instruction is an effect addition instruction, the effect specified in the editing instruction will be used as the editing element.
[0048] Furthermore, based on the editing instructions, auxiliary data tracks are created to carry the edited elements, and the edited elements are presented based on these auxiliary data tracks. The auxiliary data tracks are positioned above the main data tracks, and the presented edited elements are overlaid on one or more frames of the animated photo; for example, the presented edited elements are overlaid on each frame of the animated photo.
[0049] As can be seen, through this embodiment, since the auxiliary data track is located above the main data track, the presented editing elements can be superimposed on one or more frames of the dynamic photo, thereby achieving the purpose of displaying and editing the dynamic photo according to the editing needs, and improving the editing effect of the dynamic photo.
[0050] In one embodiment, after acquiring at least one moving image, the method further includes:
[0051] Obtain information about the device used to capture the dynamic photos;
[0052] Based on the shooting equipment information and the stored dynamic photo parsing rules corresponding to each shooting equipment, determine the target parsing rules corresponding to the dynamic photos;
[0053] Based on the target parsing rules, the dynamic photo is parsed to obtain the images of each frame of the dynamic photo.
[0054] In this embodiment, firstly, the capturing device information for each dynamic photo is obtained, including the identification information of the device that captured each dynamic photo. In this embodiment, multiple dynamic photo parsing rules corresponding to different capturing devices are pre-stored. These dynamic photo parsing rules are used to parse the dynamic photos captured by the corresponding capturing devices. Therefore, based on the captured device information for each dynamic photo and the stored dynamic photo parsing rules corresponding to each capturing device, a target parsing rule corresponding to each captured dynamic photo is determined by looking up the corresponding relationship. Each dynamic photo has a corresponding target parsing rule, and the dynamic photo can be parsed using the corresponding target parsing rule. Finally, according to each target parsing rule, the corresponding dynamic photo is parsed to obtain the frames of that dynamic photo.
[0055] Taking any animated photo as an example, in one instance, after obtaining the animated photo and its capturing device information, the pre-stored animated photo parsing rules corresponding to each capturing device are searched to determine the target parsing rule for the animated photo. Based on the target parsing rule, the last N bytes (N is a positive integer) of data for the animated photo are obtained. These last N bytes are numbered sequentially from 1 to N, from the end of the data to the beginning. Next, according to the target parsing rule, bytes numbered 1 to n1 in these last N bytes represent the total data size of multiple video frames and the version number of the animated photo, and also represent the photo's feature identifier. When the feature identifier is a feature value, it indicates that the photo is an animated photo. Bytes numbered n1+1 to n2 represent the position information of the static image within the multiple video frames of the animated photo. Bytes numbered n2+1 to 60 represent the version number of the animated photo, which is 60-n2 bytes in size. Here, N, n1, and n2 are all positive integers.
[0056] It should be noted that in storing dynamic photos, the static image of the dynamic photo and multiple video frames of the dynamic photo are stored separately. The position information of the static image in the dynamic photo in the multiple video frames of the dynamic photo is not used to locate the static image, but to locate the video frame in the multiple video frames that corresponds to the static image.
[0057] Based on the target parsing rules, it is determined that number 1 to number n2 consists of a total of n2 bytes. Starting from the end of the data of the dynamic photo, subtracting n2 bytes and then subtracting the total data size mentioned above, the first frame position of multiple video frames in the dynamic photo can be located. Starting from the first frame position, adding the total data size mentioned above, the end position of the version number of the dynamic photo can be located. Thus, the multiple video frames and the version number in the dynamic photo are located as a whole. The version number serves as the end marker of multiple video frames and does not affect the extraction and playback of multiple video frames.
[0058] Furthermore, based on target parsing rules, the static image within the dynamic photo is located. Typically, the first frame of a dynamic photo is a static image, thus parsing the dynamic photo yields the static image and multiple video frames. After parsing the dynamic photo to obtain the static image and multiple video frames, in this embodiment, the static image and multiple video frames are extracted from the dynamic photo and decoded. The decoded data is then edited using steps S104 and S106 described above, achieving dynamic photo editing. After dynamic photo editing, the editing result is encoded to obtain the edited dynamic photo. The format of the edited dynamic photo can be a specified encoding / decoding format, and the edited dynamic photo can be published to a specified application or stored on a terminal device.
[0059] As can be seen, this embodiment can store dynamic photo parsing rules corresponding to different shooting devices, thereby parsing each acquired dynamic photo to obtain each frame of the dynamic photo.
[0060] As previously mentioned, a multi-frame image in a motion picture includes a still image and multiple video frames, with the still image corresponding to a specific video frame among the multiple video frames. In one embodiment, the number of motion pictures is one, and the above-mentioned creation of a master data track for carrying at least one frame of the motion picture, according to editing instructions, includes:
[0061] Based on the editing instructions, create the first, second, or third sub-track as the master data track;
[0062] The first sub-track is used to carry static images in the dynamic photos; the static images in the first sub-track are played continuously as the playback objects;
[0063] The second sub-track is used to carry multiple video frames in the dynamic photo; the multiple video frames in the second sub-track are played in a loop multiple times as the playback object.
[0064] The third sub-track is used to carry still images and multiple video frames in a dynamic photo; the still images and multiple video frames in the third sub-track are played together as the playback object and looped multiple times.
[0065] In this embodiment, when a dynamic image exists, the editing mode of the dynamic photo carried by the editing command can be identified. The editing modes include three types: still image mode, animated image mode, and loop mode. Users can trigger the corresponding controls on the screen to select or switch to the corresponding editing mode.
[0066] When the editing mode is in still image mode, a first sub-track can be created as the main data track according to the editing instructions. The first sub-track is used to hold still images in the dynamic photo, and the still images in the first sub-track play continuously as the playback object. The playback duration of the still images in the first sub-track is equal to the duration of the first sub-track. In one embodiment, the duration of the first sub-track is a preset recommended duration.
[0067] When the editing mode is in loop mode, a second sub-track can be created as the main data track according to the editing instructions. The second sub-track is used to carry the various video frames in the dynamic image. Each video frame in the second sub-track is played repeatedly as the playback object. For example, each video frame is played once according to its arrangement order in the dynamic image, and then repeated one or more times to achieve the loop playback effect. The total playback duration of all video frames in the second sub-track is equal to the duration of the second sub-track. The duration of the second sub-track can be determined first, and then the number of loop playbacks for each video frame can be determined based on the duration of the second sub-track and the duration of each video frame playing once. In one embodiment, the duration of the second sub-track is a preset recommended duration.
[0068] When the editing mode is animated, a third sub-track can be created as the main data track according to the editing instructions. The third sub-track is used to carry the static images and video frames in the animated photo. The static images and video frames in the third sub-track are played together as the playback objects multiple times. For example, the static images and video frames are played once according to their arrangement in the animated photo, and then repeated one or more times to achieve a loop playback effect. The total playback duration of the static images and video frames in the third sub-track is equal to the duration of the third sub-track. The duration of the third sub-track can be determined first, and then the number of loop playbacks of the static images and video frames can be determined based on the duration of the third sub-track and the duration of the static images and video frames playing together once. In one embodiment, the duration of the third sub-track is a preset recommended duration.
[0069] In the third sub-track, still images can be played either before or after each video frame. Each time the transition occurs from a still image to a video frame or vice versa, a smooth transition using special effects or other transition methods can be used between the still image and the adjacent video frame.
[0070] As can be seen, through this embodiment, in the case of a dynamic photo, a first sub-track, a second sub-track, or a third sub-track can be created according to editing instructions as the main data track to carry at least one frame of the dynamic photo, thereby achieving precise creation of the main data track.
[0071] In one embodiment, the number of moving photos is one, in which case at least one frame of image is displayed based on the main data track, including:
[0072] If the main data track is the first sub-track, then the static image will be continuously played as the playback object based on the first sub-track;
[0073] If the main data track is the second sub-track, then multiple video frames will be played repeatedly as playback objects based on the second sub-track.
[0074] If the main data track is the third sub-track, then multiple video frames from both static images and dynamic photos will be played in a loop multiple times based on the third sub-track.
[0075] Based on the previous description, if a first sub-track is created as the main data track, then static images will be continuously played based on the first sub-track. The playback duration of the static images in the first sub-track is equal to the duration of the first sub-track. In one embodiment, the duration of the first sub-track is a preset recommended duration.
[0076] Based on the previous description, if a second sub-track is created as the main data track, then each video frame in the dynamic image will be played repeatedly based on the second sub-track. For example, each video frame can be played once according to its arrangement order in the dynamic image, and then repeated once or multiple times to achieve a loop playback effect. The total playback duration of each video frame in the second sub-track is equal to the duration of the second sub-track. The duration of the second sub-track can be determined first, and then the number of loop playbacks for each video frame can be determined based on the duration of the second sub-track and the duration of each video frame playing once. In one embodiment, the duration of the second sub-track is a preset recommended duration.
[0077] Based on the previous description, if a third sub-track is created as the main data track, then the still images and video frames from the animated photos will be played in a loop multiple times based on the third sub-track. For example, the still images and video frames will be played once according to their order in the animated photos, and then repeated one or more times to achieve a loop playback effect. The total playback duration of the still images and video frames in the third sub-track is equal to the duration of the third sub-track. The duration of the third sub-track can be determined first, and then the number of loop playbacks of the still images and video frames can be determined based on the duration of the third sub-track and the duration of playing the still images and video frames together once. In one embodiment, the duration of the third sub-track is a preset recommended duration.
[0078] As can be seen, this embodiment enables the display of at least one frame of a moving photo based on the main data track, even when a moving photo exists, thus achieving different display scenarios for the moving photo. Typically, all frames of a moving photo carried on the main data track can be displayed based on the main data track.
[0079] In one embodiment, the number of dynamic photos is one. In this case, step S106 above, creating an auxiliary data track to carry the editing elements, includes:
[0080] Create a secondary data track for each editable element to be added to the dynamic photo; the secondary data track is used to carry the corresponding editable element.
[0081] In this embodiment, after determining the various editing elements to be added to the animated photo, an auxiliary data track is created for each editing element, and each auxiliary data track is used to carry the corresponding editing element. For example, if the editing elements include two stickers and an audio clip, then an auxiliary data track is created for each sticker, and an auxiliary data track is created for the audio clip.
[0082] As can be seen, this embodiment can create an auxiliary data track for each editing element to be added to the dynamic photo. The auxiliary data track carries the corresponding editing element. By creating an independent auxiliary data track for each editing element, the management of each editing element can be made more convenient and flexible, and users can easily adjust each editing element individually.
[0083] In one embodiment, when the number of dynamic photos is one, step S106 above, presenting editing elements based on auxiliary data tracks, includes:
[0084] The editing elements carried by each auxiliary data track are presented according to the duration of each auxiliary data track; the duration of the auxiliary data track matches the duration of the main data track.
[0085] In this embodiment, after creating an auxiliary data track for each editing element to be added to the animated photo, the editing elements carried by each auxiliary data track can be presented according to the duration of each auxiliary data track. The length and start / end time of the auxiliary data track can be set to be the same as the length and start / end time of the main data track by default. That is, the duration of each auxiliary data track is matched with the duration of the main data track by default, so that the editing elements carried by each auxiliary data track can be superimposed on each frame of the animated photo.
[0086] Of course, the length and start / end times of the auxiliary data track can also be set by the user. For example, editing instructions can be generated based on the user's editing operations. According to these instructions, the start time of the auxiliary data track can be set to 30 milliseconds after the start time of the main data track, and the end time can be set to 30 milliseconds before the end time of the main data track. It's understandable that the duration of the auxiliary data track can be at most equal to the duration of the main data track. By setting the length and start / end times of the auxiliary data track, editable elements can be overlaid on one or more frames of a dynamic photo display as needed.
[0087] As can be seen, through this embodiment, the editing elements carried by each auxiliary data track can be presented according to the duration of each auxiliary data track. By setting the duration of the auxiliary data track to match the duration of the main data track, the editing elements carried by each auxiliary data track can be superimposed on each frame of the dynamic photo, thereby realizing the editing of the dynamic photo and improving the editing effect of the dynamic photo.
[0088] Figure 2 is a schematic diagram of uploading a dynamic photo according to an embodiment of this disclosure. As shown in Figure 2, a user can upload a dynamic photo to a designated application on a terminal device. This designated application provides various editing elements such as stickers, audio, text, effects, and filters for the user to choose from. The user can trigger the corresponding controls to select the appropriate editing element. As shown in Figure 2, the designated application also has a "mode" control. After the dynamic photo is imported into the designated application, it defaults to animated mode. The user can trigger this control to cycle through three modes: still mode, animated mode, and loop mode. As previously shown, in still mode, a first sub-track is created as the main data track for the dynamic photo, and the dynamic photo is displayed based on the first sub-track. In loop mode, a second sub-track is created as the main data track for the dynamic photo, and the dynamic photo is displayed based on the second sub-track. In animated mode, a third sub-track is created as the main data track for the dynamic photo, and the dynamic photo is displayed based on the third sub-track. In the scenario of Figure 2, an auxiliary data track is also created for each editing element added to the dynamic photo, and the corresponding editing element is carried and presented through the auxiliary data track.
[0089] Figure 3 is a schematic diagram of a track for a dynamic photo provided in an embodiment of the present disclosure. Figure 3 shows the first sub-track, the second sub-track, and the third sub-track created by a specified application for the dynamic photo. The first sub-track can realize the continuous playback of static images, the second sub-track can realize the loop playback of each video frame multiple times, and the third sub-track can realize the loop playback of static images and each video frame as a whole multiple times.
[0090] Figure 4 is a schematic diagram of editing a dynamic photo according to an embodiment of this disclosure. Taking the user adding stickers, text, and audio to the dynamic photo as an example, and taking the user selecting to enter the animated GIF mode as an example, Figure 4 illustrates the third sub-track and three auxiliary data tracks created by the specified application for the dynamic photo. It can be seen that the sticker track and the text track are both located above the main data track, thus enabling stickers and text to be superimposed on one or more frames of the image displayed in the dynamic photo, thereby achieving the purpose of displaying and editing the dynamic photo according to editing needs. Since audio is a playback element rather than a display element, the audio track can be located below or above the main data track without affecting the audio playback effect.
[0091] In the scenarios shown in Figures 2 to 4, after a dynamic photo is imported into a specified application for editing, the application recommends a default audio for the dynamic photo and sets the duration of this default audio as the recommended duration. A main data track is created for the dynamic photo based on this recommended duration, and an auxiliary data track is also created based on this recommended duration to carry the default audio. Users can change the audio using editing commands. When a user changes the audio, the duration of the main data track automatically changes to the duration of the changed audio, and an auxiliary data track is automatically created to carry the changed audio.
[0092] In the scenarios shown in Figures 2 to 4, after the user selects editing elements including audio, the application automatically creates auxiliary data tracks. The duration of the auxiliary data tracks is the same as the duration of the main data tracks by default. However, the appearance time of each editing element can be adjusted according to the user's needs. For example, editing instructions can be generated based on the user's editing operations, and the duration and start and end times of each auxiliary data track can be set according to the editing instructions. For instance, the duration of the audio track can be set to be the same as the duration of the main data track, while the durations of the sticker track and text track can be set to be different from the duration of the main data track. By setting the duration and start and end times of each auxiliary data track according to the editing instructions, the effect of editing dynamic photos according to the user's needs can be achieved.
[0093] As can be seen from Figures 2 to 4, in the scenario of editing a dynamic photo, dynamic photos can be displayed according to user needs, and editing elements can be added to the dynamic photos to improve the editing effect.
[0094] The following describes the editing process for animated photos when there are multiple animated photos.
[0095] As mentioned above, a multi-frame image of a dynamic photograph includes one still image and multiple video frames, with the still image corresponding to a specific video frame among the multiple video frames. In one embodiment, the number of dynamic photographs acquired in step S102 is multiple, and the creation of a main data track to carry at least one frame of the dynamic photograph according to editing instructions includes:
[0096] For each animated photo, a fourth, fifth, or sixth sub-track is created as the main data track according to the editing instructions;
[0097] The fourth sub-track is used to carry static images in the dynamic photos; the static images in the fourth sub-track are played continuously as the playback objects;
[0098] The fifth sub-track is used to carry multiple video frames from the dynamic photo; the multiple video frames in the fifth sub-track are played in a loop as the playback object for a first specified number of times;
[0099] The sixth sub-track is used to carry multiple video frames from the dynamic photo; these multiple video frames in the sixth sub-track are played in a loop for a second specified number of times. The first specified number of times and the second specified number of times are different.
[0100] In this embodiment, when multiple dynamic images exist, each dynamic photo can be processed separately. Based on the editing instructions, a corresponding main data track is created for each dynamic photo. Editing instructions for each dynamic photo can be obtained separately, and the editing mode of the dynamic photo carried by the editing instructions can be identified. Editing modes include three types: still image mode, animated image mode, and loop mode. Users can trigger corresponding controls on the screen to select or switch to the corresponding editing mode.
[0101] For each animated photo, when the editing mode is set to still image mode, a fourth sub-track can be created as the main data track based on the editing instructions. This fourth sub-track is used to hold the still images within the animated photo, and these still images play continuously as the playback object. The duration of the fourth sub-track can be a preset duration, such as 2 seconds, during which the still images play continuously.
[0102] For each animated photo, when the editing mode is loop mode, a fifth sub-track can be created as the main data track according to the editing instructions. The fifth sub-track carries the various video frames in the animated photo. Each video frame in the fifth sub-track is played in a loop a first specified number of times. For example, each video frame is played once according to its order in the animated image, and then repeated once more; in this case, the first specified number of times is 2. The first specified number of times can be determined first, and then the duration of the loop for each video frame for that first specified number of times can be used as the duration of the fifth sub-track.
[0103] For each animated photo, when the editing mode is animated, a sixth sub-track can be created as the main data track according to the editing instructions. The sixth sub-track carries multiple video frames from the animated photo. These video frames are played in a loop a second specified number of times. For example, if each video frame plays once according to its order in the animated image, the second specified number of times is 1. The second specified number of times can be determined first, and then the duration of the loop for that second specified number of times can be used as the duration of the sixth sub-track. The first specified number of times and the second specified number of times are different.
[0104] As can be seen, this embodiment enables the creation of a fourth, fifth, or sixth sub-track for each dynamic photo based on editing instructions, in the case of multiple dynamic photos, as the main data track carrying at least one frame of the dynamic photo, thus achieving precise creation of the main data track.
[0105] Furthermore, when multiple moving images exist, at least one frame from the moving images is displayed based on the main data track, including:
[0106] For each animated photo, if the main data track of the animated photo is the fourth sub-track, then the static image will be continuously played as the playback object based on the fourth sub-track.
[0107] For each dynamic photo, if the main data track of the dynamic photo is the fifth sub-track, then multiple video frames are played in a loop as playback objects based on the fifth sub-track for a first specified number of times.
[0108] For each dynamic photo, if the main data track of the dynamic photo is the sixth sub-track, then multiple video frames are played in a loop as playback objects for a second specified number of times based on the sixth sub-track.
[0109] In this embodiment, each dynamic photo is processed separately. A corresponding main data track can be created for each dynamic photo according to editing instructions. Based on this, for each dynamic photo, if the main data track of that dynamic photo is the fourth sub-track, the static image is continuously played based on the fourth sub-track. The duration of the fourth sub-track can be a preset duration, such as 2 seconds, during which the static image plays continuously.
[0110] Furthermore, for each animated photo, if the main data track of that animated photo is the fifth sub-track, then multiple video frames are looped and played a first specified number of times based on the fifth sub-track. For example, each video frame is played once according to its arrangement in the animated image, and then repeated once more; in this case, the first specified number of times is 2. The first specified number of times can be determined first, and then the duration of looping each video frame for the first specified number of times can be used as the duration of the fifth sub-track.
[0111] Furthermore, for each animated photo, if the main data track of that animated photo is the sixth sub-track, then multiple video frames are looped and played a second specified number of times based on the sixth sub-track. For example, each video frame is played once according to its arrangement in the animated image, in which case the second specified number of times is 1. The second specified number of times can be determined first, and then the duration of looping each video frame for the second specified number of times can be used as the duration of the sixth sub-track. The first specified number of times and the second specified number of times are different.
[0112] As can be seen, this embodiment enables the display of at least one frame of a dynamic photo based on the main data track when multiple dynamic photos exist, thus achieving separate display of each dynamic photo. Typically, for each dynamic photo, all frames of that dynamic photo carried in its main data track can be displayed based on the main data track.
[0113] In one embodiment, there are multiple moving photos. In this case, step S106 above, creating an auxiliary data track to carry editing elements, includes:
[0114] For each animated photo, create at least one Class I auxiliary data track for that animated photo; each Class I auxiliary data track is used to carry one of the remaining editing elements, excluding audio, to be added to that animated photo;
[0115] For each animated photo, create a second type of auxiliary data track; the second type of auxiliary data track is used to carry the audio to be added to each animated photo; each animated photo is used to add the same audio.
[0116] In this embodiment, when there are multiple dynamic images, each dynamic photo can be processed separately, and one or more auxiliary data tracks can be created for each dynamic photo according to the editing instructions.
[0117] For each animated photo, at least one first-class auxiliary data track is created for that animated photo. Each first-class auxiliary data track is used to carry one editing element other than audio to be added to that animated photo. For example, for any animated photo, if there are three editing elements to be added to the animated photo, namely two stickers and one audio, then two first-class auxiliary data tracks are created for that animated photo, and each first-class auxiliary data track is used to carry one of the aforementioned stickers.
[0118] In this embodiment, if the same audio is added to each animated photo, a common second-type auxiliary data track is created for each animated photo. This second-type auxiliary data track is used to carry the audio to be added to each animated photo. In the previous example, a second-type auxiliary data track was also created to carry the aforementioned audio, and this audio was added to each animated photo.
[0119] As can be seen, this embodiment allows the addition of the same audio to each animated photo, thereby improving the correlation between the animated photos. Furthermore, creating a separate second-type auxiliary data track for the audio facilitates audio management. Additionally, for each animated photo, a first-type auxiliary data track is created for each editing element other than the audio, enabling each editing element of each animated photo to be managed individually based on the first-type auxiliary data track, improving the convenience of editing element management.
[0120] In one embodiment, when there are multiple moving photos, step S106 above, which presents editing elements based on auxiliary data tracks, includes:
[0121] For each animated photo, the editing elements carried by the first type of auxiliary data track are presented according to the duration of the first type of auxiliary data track of the animated photo; the duration of the first type of auxiliary data track matches the duration of the main data track of the animated photo.
[0122] For each dynamic photo, the audio carried by the second type of auxiliary data track is presented according to the duration of the second type of auxiliary data track; wherein, the duration of the second type of auxiliary data track matches the total duration of the main data track of each dynamic photo, and the audio is continuously presented based on the second type of auxiliary data track when switching between displaying each dynamic photo.
[0123] In this embodiment, after creating one or more corresponding auxiliary data tracks for each dynamic photo, the editing elements carried by the first type of auxiliary data track are presented according to the duration of the first type of auxiliary data track for each dynamic photo. The length and start and end times of each first type of auxiliary data track of the dynamic photo are, by default, the same as the length and start and end times of the main data track of the dynamic photo. That is, the duration of each first type of auxiliary data track of the dynamic photo matches the duration of the main data track of the dynamic photo, so that each editing element of the dynamic photo, except for audio, can be superimposed on each frame of the image displayed in the dynamic photo.
[0124] Of course, the length and start / end times of the first type of auxiliary data track can also be set by the user. For example, an editing instruction can be generated based on the user's editing operation. According to the editing instruction, the start time of the first type of auxiliary data track can be set to 30 milliseconds after the start time of the main data track, and the end time of the first type of auxiliary data track can be set to 30 milliseconds before the end time of the main data track. It can be understood that the duration of the first type of auxiliary data track can be at most equal to the duration of the corresponding main data track. By setting the length and start / end times of the first type of auxiliary data track, editing elements can be superimposed on one or more frames of the dynamic photo display as needed.
[0125] In this embodiment, since the same audio is superimposed on each animated photo, the audio carried by the second type of auxiliary data track is presented according to the duration of the second type of auxiliary data track. The duration of the second type of auxiliary data track is the same as the total duration of the main data track of each animated photo. This ensures that the audio is continuously presented based on the second type of auxiliary data track when the user switches between animated photos, maintaining continuous playback of the audio between the animated photos. If the original duration of the audio selected by the user is less than the total duration of the main data track of each animated photo, the duration of the second type of auxiliary data track can be made the same as the total duration of the main data track of each animated photo by looping the audio playback. Of course, the duration of the second type of auxiliary data track can also be adjusted by the user, so that the audio can be superimposed on one or more frames of the animated photo display as needed.
[0126] As can be seen, through this embodiment, for each animated photo, the editing elements carried by the first type of auxiliary data track can be presented according to the duration of the first type of auxiliary data track of that animated photo. By setting the duration of the first type of auxiliary data track to match the duration of the main data track of the animated photo, the editing elements carried by each first type of auxiliary data track are superimposed on each frame of the animated photo, thereby realizing the editing of the animated photo and improving the editing effect. Furthermore, for each animated photo, the audio carried by the second type of auxiliary data track can also be presented according to the duration of the second type of auxiliary data track. The duration of the second type of auxiliary data track matches the total duration of the main data track of each animated photo. When switching between animated photos, the audio is continuously presented based on the second type of auxiliary data track, thereby maintaining continuous playback of audio between animated photos.
[0127] Figure 5 is a schematic diagram of uploading dynamic photos according to another embodiment of this disclosure. As shown in Figure 5, a user can upload multiple dynamic photos to a designated application on a terminal device. The designated application displays one dynamic photo at a time, and the user can switch between displaying different dynamic photos by swiping. For the displayed dynamic photos, the designated application provides various editing elements such as stickers, audio, text, effects, and filters for the user to choose from. The user can trigger the corresponding controls to select the corresponding editing element. As shown in Figure 5, the designated application also has a "mode" control. After each dynamic photo is imported into the designated application, the displayed dynamic photo defaults to animated GIF mode. The user can trigger this control to cycle through three modes: still image mode, animated GIF mode, and loop mode. As previously shown, in still image mode, a fourth sub-track is created as the main data track for the dynamic photo, and the dynamic photo is displayed based on the fourth sub-track. In loop mode, a fifth sub-track is created as the main data track for the dynamic photo, and the dynamic photo is displayed based on the fifth sub-track. In animated GIF mode, a sixth sub-track is created as the main data track for the dynamic photo, and the dynamic photo is displayed based on the sixth sub-track. In the scenario shown in Figure 5, for the displayed dynamic photo, an auxiliary data track is also created for the editing elements added to the dynamic photo. The corresponding editing elements are carried and presented through the auxiliary data track.
[0128] Figure 6 is a schematic diagram of a track for a dynamic photo provided in another embodiment of this disclosure. Figure 6 uses three dynamic photos as an example to illustrate the fourth, fifth, and sixth sub-tracks created by a specified application for the dynamic photos. The fourth sub-track can realize the continuous playback of static images. The fifth sub-track can realize the loop playback of each video frame in the dynamic photo for a first specified number of times, such as twice. The sixth sub-track can realize the loop playback of each video frame in the dynamic photo for a second specified number of times, such as once.
[0129] Figure 7 is a schematic diagram of editing a dynamic photo according to another embodiment of this disclosure. Taking three dynamic photos as an example, assuming the user adds stickers, text, and audio to the currently displayed dynamic photo, and the user selects to enter loop mode, Figure 7 illustrates the fifth sub-track and three auxiliary data tracks created by the specified application for the currently displayed dynamic photo. It can be seen that the sticker track and text track are both located above the main data track, thus allowing stickers and text to be superimposed on one or more frames of the dynamic photo, thereby achieving the purpose of displaying and editing the dynamic photo according to editing needs. It can be seen that the length of the audio track is greater than the length of the currently displayed main data track. This audio track is shared by all dynamic photos, and its length is equal to the total duration of the main data tracks of all dynamic photos. If the original duration of the audio selected by the user is less than the total duration of the main data tracks of all dynamic photos, the duration of the audio track can be made the same as the total duration of the main data tracks of all dynamic photos by looping the audio playback. Since audio is a playback element rather than a display element, the audio track can be located below or above the main data track without affecting the audio playback effect.
[0130] In the scenarios shown in Figures 5 to 7, after each animated photo is imported into a designated application for editing, the application first displays the first animated photo. Users can switch between other animated photos by swiping. The application recommends a default audio for the displayed animated photos and creates a main data track for each animated photo based on the user's selected editing mode. It also creates an auxiliary data track to carry the default audio, which is shared by all animated photos. Users can change the audio using editing commands. When a user changes the audio, the duration of the main data track for the displayed animated photo remains unchanged, and an auxiliary data track to carry the changed audio is automatically created.
[0131] In the scenarios shown in Figures 5 to 7, after the user selects editing elements (excluding audio) for the displayed dynamic photo, the application automatically creates auxiliary data tracks. The duration of the auxiliary data tracks is the same as the duration of the main data track by default. However, the appearance time of each editing element can be adjusted according to the user's needs. For example, editing instructions can be generated based on the user's editing operations, and the duration and start and end times of each auxiliary data track can be set according to the editing instructions. For instance, the duration of the sticker track and the text track can be set to be different from the duration of the main data track. By setting the duration and start and end times of each auxiliary data track according to the editing instructions, the effect of editing the displayed dynamic photo according to the user's needs can be achieved.
[0132] As can be seen from Figures 5 to 7, in the scenario of editing multiple animated photos, each animated photo can be displayed sequentially according to the user's swiping operation. For the displayed animated photos, one or more frames of images can be displayed according to the user's needs, and editing elements can be added to the displayed images to improve the editing effect of the animated photos.
[0133] In this embodiment, for one or more dynamic photos, if there are multiple auxiliary data tracks, each auxiliary data track can be located above the level of the main data track, or the auxiliary data track carrying editing elements other than audio can be located above the level of the main data track. The hierarchical relationship between the auxiliary data tracks can be set by the user.
[0134] Furthermore, the method in this embodiment also includes merging the images of each frame displayed in the dynamic photo and the presented editing elements to obtain the editing result of the dynamic photo.
[0135] When one or more animated photos are available, the images displayed in each frame of the animated photo and the presented editing elements can be merged to obtain an edited animated photo. For example, the main data track and each auxiliary data track of the animated photo can be merged to obtain an edited animated photo. The edited animated photo can be published to a specified application or stored locally on the terminal device.
[0136] As can be seen, this embodiment also enables the merging of each frame of the animated photo and the presented editing elements to obtain the edited result of the animated photo, making it convenient for users to publish or save the edited animated photo.
[0137] Furthermore, when multiple moving images exist, the method in this embodiment also includes:
[0138] For each animated photo, the images of each frame displayed in the animated photo and the editing elements carried by each first-class auxiliary data track of the animated photo are merged to obtain the initial editing result of the animated photo;
[0139] Based on the initial editing results of each animated photo, determine the final editing result of each animated photo, or merge the initial editing results of each animated photo with the audio carried in the second type of auxiliary data track to obtain the final editing result of each animated photo.
[0140] In this embodiment, when there are multiple dynamic photos, for each dynamic photo, the images of each frame displayed in the dynamic photo and the editing elements carried by each first type of auxiliary data track of the dynamic photo are merged to obtain the initial editing result of the dynamic photo.
[0141] Next, based on the initial editing results of each animated photo, the final editing result of each animated photo is determined. For example, the initial editing result of each animated photo is used as the final editing result for each animated photo. In this case, each animated photo has a final editing result, and the user can save the final editing result of each animated photo locally on the terminal device.
[0142] Alternatively, the initial edits of each animated photo can be merged with the audio carried in the second type of auxiliary data track to obtain the final edited result for each animated photo. In this case, all animated photos have a single final edited result, which displays the effect of the initial edits of each animated photo overlaid with the audio. The initial edits of each animated photo are played sequentially according to the audio playback order. Users can then publish this single final edited result to the application.
[0143] As can be seen, through this embodiment, even when there are multiple animated photos, the initial editing result of each animated photo or the final editing result of each animated photo can be obtained, making it convenient for users to obtain different editing results for storage or publication.
[0144] In summary, the image data processing method in this embodiment can create a main data track for a dynamic photo, which carries at least one frame of the dynamic photo and displays that at least one frame of the dynamic photo. It can also create auxiliary data tracks for editing elements in the dynamic photo, which carry the editing elements and present them. Since the auxiliary data track is at a higher level than the main data track, the presented editing elements can be superimposed on one or more frames of the dynamic photo, thereby achieving the purpose of displaying and editing the dynamic photo according to editing needs and improving the editing effect of the dynamic photo.
[0145] Furthermore, in this embodiment, by designing independent tracks for editing elements and dynamic photos, when the main data track plays static images and multiple video frames in a dynamic photo, users can simultaneously apply editing elements to static images and multiple video frames. It also supports users applying multiple different editing elements, further improving the editing effect of dynamic photos.
[0146] Figure 8 is a schematic diagram of the structure of an image data processing apparatus provided in an embodiment of the present disclosure. As shown in Figure 8, the apparatus includes:
[0147] The data acquisition unit 81 is used to acquire at least one dynamic photo and editing instructions for the dynamic photo; the dynamic photo includes multiple frames of images;
[0148] The image display unit 82 is configured to create a main data track for carrying at least one frame of the dynamic photo according to the editing instructions, and display the at least one frame of the photo based on the main data track;
[0149] The element presentation unit 83 is used to determine the editing element to be added to the dynamic photo according to the editing instruction, create an auxiliary data track for carrying the editing element, and present the editing element based on the auxiliary data track; the level of the auxiliary data track is above the level of the main data track; the presented editing element is superimposed on one or more frames of images displayed by the dynamic photo.
[0150] Optionally, it further includes a parsing unit, configured to: after acquiring at least one dynamic photo, acquire the shooting device information of the dynamic photo; determine the target parsing rule corresponding to the dynamic photo based on the shooting device information and the stored dynamic photo parsing rules corresponding to each shooting device; and parse the dynamic photo based on the target parsing rule to obtain each frame image of the dynamic photo.
[0151] Optionally, the multi-frame image includes a still image and multiple video frames; the still image corresponds to a specific video frame among the multiple video frames; the number of dynamic photos is one; the image display unit is specifically used to: create a first sub-track, a second sub-track, or a third sub-track as the main data track according to the editing instructions; wherein, the first sub-track is used to carry the still image in the dynamic photo; the still image in the first sub-track is continuously played as the playback object; the second sub-track is used to carry the multiple video frames in the dynamic photo; the multiple video frames in the second sub-track are played in a loop multiple times as the playback object; the third sub-track is used to carry the still image and the multiple video frames in the dynamic photo; the still image and the multiple video frames in the third sub-track are played in a loop multiple times as the playback object.
[0152] Optionally, the image display unit is further configured to: if the main data track is the first sub-track, continuously play the static image as the playback object based on the first sub-track; if the main data track is the second sub-track, loop the multiple video frames as the playback object multiple times based on the second sub-track; if the main data track is the third sub-track, loop the static image and the multiple video frames together as the playback object multiple times based on the third sub-track.
[0153] Optionally, the number of animated photos is one; the element presentation unit is specifically used to: create an auxiliary data track for each edit element to be added to the animated photo; the auxiliary data track is used to carry the corresponding edit element.
[0154] Optionally, the element presentation unit is further configured to: present the editing elements carried by each of the auxiliary data tracks according to the duration of each of the auxiliary data tracks; the duration of the auxiliary data tracks is matched with the duration of the main data track.
[0155] Optionally, the multi-frame image includes a still image and multiple video frames; the still image corresponds to a specific video frame among the multiple video frames; the number of dynamic photos is multiple; the image display unit is specifically used to: for each dynamic photo, according to the editing instructions, create a fourth sub-track, a fifth sub-track, or a sixth sub-track as the main data track; wherein, the fourth sub-track is used to carry the still image in the dynamic photo; the still image in the fourth sub-track is continuously played as the playback object; the fifth sub-track is used to carry the multiple video frames in the dynamic photo; the multiple video frames in the fifth sub-track are played in a loop a first specified number of times as the playback object; the sixth sub-track is used to carry the multiple video frames in the dynamic photo; the multiple video frames in the sixth sub-track are played in a loop a second specified number of times as the playback object.
[0156] Optionally, the image display unit is further configured to: for each of the dynamic photos, if the main data track of the dynamic photo is the fourth sub-track, then continuously play the static image as the playback object based on the fourth sub-track; for each of the dynamic photos, if the main data track of the dynamic photo is the fifth sub-track, then loop the plurality of video frames as the playback object a first specified number of times based on the fifth sub-track; for each of the dynamic photos, if the main data track of the dynamic photo is the sixth sub-track, then loop the plurality of video frames as the playback object a second specified number of times based on the sixth sub-track.
[0157] Optionally, the number of animated photos is multiple; the element presentation unit is specifically used for: creating at least one first type of auxiliary data track for each animated photo; each first type of auxiliary data track is used to carry an editing element other than audio to be added to the animated photo; creating a second type of auxiliary data track for each animated photo; the second type of auxiliary data track is used to carry the audio to be added to each animated photo; each animated photo is used to add the same audio.
[0158] Optionally, the element presentation unit is further configured to: for each of the dynamic photos, present the editing elements carried by the first type of auxiliary data track according to the duration of the first type of auxiliary data track of the dynamic photo; the duration of the first type of auxiliary data track matches the duration of the main data track of the dynamic photo; for each of the dynamic photos, present the audio carried by the second type of auxiliary data track according to the duration of the second type of auxiliary data track; wherein the duration of the second type of auxiliary data track matches the total duration of the main data track of each of the dynamic photos, and the audio is continuously presented based on the second type of auxiliary data track when switching between displaying each of the dynamic photos.
[0159] Optionally, it further includes a first merging unit, used to merge the frames of images displayed in the dynamic photo and the presented editing elements to obtain the editing result of the dynamic photo.
[0160] Optionally, it further includes a second merging unit, configured to: for each of the dynamic photos, merge the images of each frame displayed in the dynamic photo and the editing elements carried in each of the first type of auxiliary data tracks of the dynamic photo to obtain an initial editing result of the dynamic photo; determine the final editing result of each of the dynamic photos based on the initial editing result of each of the dynamic photos, or merge the initial editing result of each of the dynamic photos and the audio carried in the second type of auxiliary data tracks to obtain the final editing result of each of the dynamic photos.
[0161] The image data processing apparatus in at least one embodiment of this disclosure can implement the various processes of the above-described image data processing method embodiments and achieve the same effects and functions, which will not be repeated here.
[0162] This disclosure also provides an electronic device according to an embodiment. Figure 9 is a schematic diagram of the structure of the electronic device provided in an embodiment of this disclosure. As shown in Figure 9, the electronic device can vary considerably due to different configurations or performance. It may include one or more processors 901 and memory 902. The memory 902 may store one or more application programs or data. The memory 902 may be temporary or persistent storage. The application programs stored in the memory 902 may include one or more modules (not shown in the figure), and each module may include a series of computer-executable instructions in the electronic device. Furthermore, the processor 901 may be configured to communicate with the memory 902 and execute the series of computer-executable instructions in the memory 902 on the electronic device. The electronic device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input or output interfaces 905, one or more keyboards 906, etc.
[0163] In one specific embodiment, the electronic device includes a processor; and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the following process:
[0164] Acquire at least one animated photo and editing instructions for the animated photo; the animated photo comprises multiple frames.
[0165] According to the editing instructions, a main data track is created to carry at least one frame of the dynamic photo, and the at least one frame of the photo is displayed based on the main data track;
[0166] According to the editing instructions, the editing elements to be added to the dynamic photo are determined, an auxiliary data track is created to carry the editing elements, and the editing elements are presented based on the auxiliary data track; the hierarchy of the auxiliary data track is above the hierarchy of the main data track; the presented editing elements are superimposed on one or more frames of images displayed in the dynamic photo.
[0167] The electronic device in at least one embodiment of this disclosure can implement the various processes of the above-described image data processing method embodiments and achieve the same effects and functions, which will not be repeated here.
[0168] Another embodiment of this disclosure also provides a computer-readable storage medium for storing computer-executable instructions that, when executed by a processor, implement the following process:
[0169] Acquire at least one animated photo and editing instructions for the animated photo; the animated photo comprises multiple frames.
[0170] According to the editing instructions, a main data track is created to carry at least one frame of the dynamic photo, and the at least one frame of the photo is displayed based on the main data track;
[0171] According to the editing instructions, the editing elements to be added to the dynamic photo are determined, an auxiliary data track is created to carry the editing elements, and the editing elements are presented based on the auxiliary data track; the hierarchy of the auxiliary data track is above the hierarchy of the main data track; the presented editing elements are superimposed on one or more frames of images displayed in the dynamic photo.
[0172] The computer-readable storage medium in at least one embodiment of this disclosure can implement the various processes of the above-described image data processing method embodiments and achieve the same effects and functions, which will not be repeated here.
[0173] Another embodiment of this disclosure also provides a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the following process:
[0174] Acquire at least one animated photo and editing instructions for the animated photo; the animated photo comprises multiple frames.
[0175] According to the editing instructions, a main data track is created to carry at least one frame of the dynamic photo, and the at least one frame of the photo is displayed based on the main data track;
[0176] According to the editing instructions, the editing elements to be added to the dynamic photo are determined, an auxiliary data track is created to carry the editing elements, and the editing elements are presented based on the auxiliary data track; the hierarchy of the auxiliary data track is above the hierarchy of the main data track; the presented editing elements are superimposed on one or more frames of images displayed in the dynamic photo.
[0177] The computer program product in at least one embodiment of this disclosure can implement the various processes of the above-described image data processing method embodiments and achieve the same effects and functions, which will not be repeated here.
[0178] In various embodiments of this disclosure, the computer-readable storage medium includes read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.
[0179] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0180] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0181] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products having certain functions. For example, the implementing device is a computer. Specifically, the computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0182] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing at least one embodiment of this disclosure, the functions of each unit can be implemented in one or more software and / or hardware.
[0183] Those skilled in the art will understand that one or more embodiments of this disclosure can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0184] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to at least one embodiment of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.
[0185] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0186] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0187] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0188] One or more embodiments of this disclosure can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a particular task or implement a particular abstract data type. One or more embodiments of this disclosure can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside in local and remote computer storage media, including storage devices.
[0189] The various embodiments in this disclosure are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0190] The above description is merely an embodiment of this disclosure and is not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.
Claims
1. An image data processing method, comprising: Acquire at least one animated photo and editing instructions for the animated photo; the animated photo comprises multiple frames. According to the editing instructions, a main data track is created to carry at least one frame of the dynamic photo, and the at least one frame of the photo is displayed based on the main data track; According to the editing instructions, the editing elements to be added to the dynamic photo are determined, an auxiliary data track is created to carry the editing elements, and the editing elements are presented based on the auxiliary data track; the hierarchy of the auxiliary data track is above the hierarchy of the main data track; the presented editing elements are superimposed on one or more frames of images displayed in the dynamic photo.
2. The method according to claim 1, wherein, After acquiring at least one dynamic photo, the method further includes: Obtain the information of the device used to capture the dynamic photos; Based on the shooting device information and the stored dynamic photo parsing rules corresponding to each shooting device, the target parsing rule corresponding to the dynamic photo is determined; Based on the target parsing rules, the dynamic photo is parsed to obtain each frame of the dynamic photo.
3. The method according to claim 1 or 2, wherein, The multi-frame image includes a still image and multiple video frames; the still image corresponds to a specific video frame among the multiple video frames; the number of dynamic photos is one; the step of creating a main data track to carry at least one frame of the dynamic photos according to the editing instructions includes: According to the editing instructions, create a first sub-track, a second sub-track, or a third sub-track as the main data track; The first sub-track is used to carry the static image in the dynamic photo; the static image in the first sub-track is played continuously as the playback object; The second sub-track is used to carry the multiple video frames in the dynamic photo; the multiple video frames in the second sub-track are played in a loop multiple times as the playback object; The third sub-track is used to carry the static image and the multiple video frames in the dynamic photo; the static image and the multiple video frames in the third sub-track are played in a loop multiple times as the playback object.
4. The method according to claim 3, wherein, Displaying the at least one frame of image based on the master data track includes: If the main data track is the first sub-track, then the static image will be continuously played as the playback object based on the first sub-track; If the main data track is the second sub-track, then the multiple video frames will be played repeatedly as playback objects based on the second sub-track; If the main data track is the third sub-track, then the static image and the multiple video frames are played in a loop multiple times based on the third sub-track.
5. The method according to any one of claims 1-4, wherein, The number of animated photos is one; The creation of the auxiliary data track for carrying the edited element includes: Create an auxiliary data track for each of the edit elements to be added to the animated photo; The auxiliary data track is used to carry the corresponding editing element.
6. The method according to claim 5, wherein, The presentation of the edit element based on the auxiliary data track includes: The editing elements carried by each of the auxiliary data tracks are presented according to their duration; the duration of each auxiliary data track matches the duration of the main data track.
7. The method according to claim 1 or 2, wherein, The multi-frame image includes a still image and multiple video frames; the still image corresponds to a specific video frame among the multiple video frames; the number of dynamic photos is multiple; the step of creating a main data track to carry at least one frame of the dynamic photos according to the editing instructions includes: For each of the aforementioned dynamic photos, a fourth, fifth, or sixth sub-track is created according to the editing instructions, serving as the main data track; The fourth sub-track is used to carry the static image in the dynamic photo; the static image in the fourth sub-track is played continuously as the playback object; The fifth sub-track is used to carry the multiple video frames in the dynamic photo; the multiple video frames in the fifth sub-track are played in a loop as playback objects for a first specified number of times; The sixth sub-track is used to carry the multiple video frames in the dynamic photo; the multiple video frames in the sixth sub-track are played in a loop as playback objects for a second specified number of times.
8. The method according to claim 7, wherein, Displaying the at least one frame of image based on the master data track includes: For each of the dynamic photos, if the main data track of the dynamic photo is the fourth sub-track, then the static image is continuously played as the playback object based on the fourth sub-track; For each of the dynamic photos, if the main data track of the dynamic photo is the fifth sub-track, then the multiple video frames are played in a loop as playback objects for a first specified number of times based on the fifth sub-track; For each of the dynamic photos, if the main data track of the dynamic photo is the sixth sub-track, then the multiple video frames are played in a loop as playback objects for a second specified number of times based on the sixth sub-track.
9. The method according to claim 1 or 2, wherein, The number of animated photos is multiple; the creation of auxiliary data tracks to carry the edited elements includes: For each of the animated photos, at least one first-type auxiliary data track is created for the animated photo; each first-type auxiliary data track is used to carry one of the editing elements other than audio to be added to the animated photo; For each of the aforementioned animated photos, a second type of auxiliary data track is created for each of the aforementioned animated photos; the second type of auxiliary data track is used to carry the audio to be added to each of the aforementioned animated photos; each of the aforementioned animated photos is used to add the same audio.
10. The method according to claim 9, wherein, The presentation of the edit element based on the auxiliary data track includes: For each of the animated photos, the editing elements carried by the first type of auxiliary data track are presented according to the duration of the first type of auxiliary data track of the animated photo; the duration of the first type of auxiliary data track is matched with the duration of the main data track of the animated photo. For each of the aforementioned dynamic photos, the audio carried by the second type of auxiliary data track is presented according to the duration of the second type of auxiliary data track; wherein, the duration of the second type of auxiliary data track matches the total duration of the main data track of each of the aforementioned dynamic photos, and the audio is continuously presented based on the second type of auxiliary data track when switching between displaying the various dynamic photos.
11. The method according to any one of claims 1-10, further comprising: The images of each frame displayed in the animated photo and the presented editing elements are merged to obtain the editing result of the animated photo.
12. The method according to any one of claims 9-11, further comprising: For each of the animated photos, the images of each frame displayed in the animated photo and the editing elements carried by each of the first type of auxiliary data tracks of the animated photo are merged to obtain the initial editing result of the animated photo; Based on the initial editing results of each of the animated photos, the final editing results of each of the animated photos are determined; or, the initial editing results of each of the animated photos and the audio carried in the second type of auxiliary data track are merged to obtain the final editing results of each of the animated photos.
13. An image data processing apparatus, comprising: The data acquisition unit is configured to acquire at least one dynamic photo and editing instructions for the dynamic photo; the dynamic photo includes multiple frames of images; The image display unit is configured to create a main data track for carrying at least one frame of the dynamic photo according to the editing instructions, and to display the at least one frame of the photo based on the main data track; The element presentation unit is configured to determine the editing element to be added to the dynamic photo according to the editing instructions, create an auxiliary data track to carry the editing element, and present the editing element based on the auxiliary data track; the hierarchy of the auxiliary data track is above the hierarchy of the main data track; the presented editing element is superimposed on one or more frames of the image displayed by the dynamic photo.
14. An electronic device, comprising: processor; as well as, A memory configured to store computer-executable instructions, wherein, when executed, the computer-executable instructions cause the processor to implement the image data processing method according to any one of claims 1-12.
15. A computer-readable storage medium storing computer-executable instructions, wherein, The computer-executable instructions, when executed by a processor, implement the image data processing method according to any one of claims 1-12.
16. A computer program product comprising a computer program, wherein, When the computer program is executed by the processor, it implements the image data processing method according to any one of claims 1-12.