Image generation method and apparatus, terminal device, and storage medium
By automatically recognizing and generating dynamic effect images that adapt to the movement and posture of the target object through terminal devices, the problem of time-consuming manual recognition of human figures' outlines is solved, and the convenience and fun of video production are improved.
Patent Information
- Application Number
- CN202011594972.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2040-12-28
AI Technical Summary
When processing photos or videos using terminal devices, users need to manually identify or segment the outlines of people, which involves many operations and is time-consuming.
The terminal device automatically identifies the target object in the object to be processed and generates a dynamic effect image that adapts to the movement and posture of the target object in response to user operation, reducing manual operation by the user.
It improves the convenience and fun of the video production process by automatically recognizing and generating dynamic effect images, reducing user operation steps and time.
Smart Images

Figure CN114758037B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of terminals, and more particularly to an image generation method, apparatus, terminal device, and storage medium. Background Technology
[0002] Mobile phones and other terminal devices are indispensable communication tools in people's lives. In the process of using mobile phones and other terminal devices, people are no longer just pursuing practicality, but are gradually having higher requirements for the functions and user experience of terminal devices.
[0003] In related technologies, users can customize photos using their terminal devices. For example, they can use applications on their terminal devices to cut out the background of single-person or group photos, thereby changing the background of the photo.
[0004] The relevant technologies have at least the following technical problems: when processing photos or videos using terminal devices, users need to manually identify or segment the outlines of people in the photos, which requires a lot of user operation and takes a long time. Summary of the Invention
[0005] To overcome the problems existing in related technologies, this disclosure provides an image generation method, apparatus, terminal device, and storage medium.
[0006] According to a first aspect of the present disclosure, an image generation method is proposed, comprising:
[0007] Identify target objects in the object to be processed, wherein the object to be processed includes an image or video to be processed;
[0008] In response to the first operation, determine the dynamic effect image;
[0009] The dynamic effect image is displayed in a preset area of the target object, and a target image is generated; wherein the dynamic effect image is adapted to the movement and posture of the target object.
[0010] Optionally, when the object to be processed is a video to be processed;
[0011] The method further includes: acquiring the video to be processed, or determining the video to be processed according to the user's selection; wherein the video to be processed includes multiple video frames;
[0012] The identification of target objects in the object to be processed includes:
[0013] Identify the target object in each video frame.
[0014] Optionally, the dynamic effect image includes multiple effect frames, and each effect frame corresponds one-to-one with a video frame;
[0015] The process of displaying the dynamic effect image in a preset area of the target object and generating a target image includes:
[0016] The corresponding effect frame is displayed in the preset area of each video frame, and a target frame is generated;
[0017] The target image is generated based on the target frame.
[0018] Optionally, the method further includes:
[0019] The preset area is determined based on the dynamic effect image.
[0020] Optionally, when the dynamic effect image adapts to the outline shape of the target object, the preset region is determined to include the outline of the target object;
[0021] Displaying the dynamic effect image in the preset area includes:
[0022] The dynamic effect image can be controlled to be displayed at the outline, or the dynamic effect image can be controlled to be displayed locally at the outline.
[0023] Optionally, when the dynamic effect image includes text or an image related to the key points of the target object, the preset area is determined to be: an area that includes the key points of the target object;
[0024] Displaying the dynamic effect image in the preset area includes:
[0025] The dynamic effect image is controlled to be displayed in an area that corresponds to the key points of the target object.
[0026] Optionally, when the dynamic effect image is adapted to the size of the target object, the preset area is determined to be: an area adapted to the action posture of the target object;
[0027] Displaying the dynamic effect image in the preset area includes:
[0028] The dynamic effect image is controlled to be displayed in an area that is adapted to the movement and posture of the target object.
[0029] Optionally, the method further includes:
[0030] The display color of the dynamic effect image is adjusted according to the posture changes of the target object in the video to be processed.
[0031] According to a second aspect of the present disclosure, an image generation apparatus is provided, comprising:
[0032] The recognition module is used to identify target objects in the object to be processed, wherein the object to be processed includes an image or video to be processed.
[0033] The determination module is used to determine the dynamic effect image in response to the first operation;
[0034] A generation module is used to display the dynamic effect image in a preset area of the target object and generate a target image; wherein the dynamic effect image is adapted to the movement and posture of the target object.
[0035] Optionally, when the object to be processed is a video to be processed;
[0036] The device further includes: a acquisition module for acquiring the video to be processed, or the determination module specifically for determining the video to be processed based on the user's selection; wherein the video to be processed includes multiple video frames;
[0037] The identification module is specifically used for:
[0038] Identify the target object in each video frame.
[0039] Optionally, the dynamic effect image includes multiple effect frames, and each effect frame corresponds one-to-one with a video frame;
[0040] The generation module is specifically used for:
[0041] The corresponding effect frame is displayed in the preset area of each video frame, and a target frame is generated;
[0042] The target image is generated based on the target frame.
[0043] Optionally, the determining module is further configured to: determine the preset area based on the dynamic effect image.
[0044] Optionally, when the dynamic effect image adapts to the outline shape of the target object, the preset region is determined to include the outline of the target object;
[0045] The generation module is also used for:
[0046] The dynamic effect image can be controlled to be displayed at the outline, or the dynamic effect image can be controlled to be displayed locally at the outline.
[0047] Optionally, when the dynamic effect image includes text or an image related to the key points of the target object, the preset area is determined to be: an area that includes the key points of the target object;
[0048] The generation module is also used for:
[0049] The dynamic effect image is controlled to be displayed in an area that corresponds to the key points of the target object.
[0050] Optionally, when the dynamic effect image is adapted to the size of the target object, the preset area is determined to be: an area adapted to the action posture of the target object;
[0051] The generation module is also used for:
[0052] The dynamic effect image is controlled to be displayed in an area that is adapted to the movement and posture of the target object.
[0053] Optionally, the device further includes:
[0054] An adjustment module is used to adjust the display color of the dynamic effect image according to the posture changes of the target object in the video to be processed.
[0055] According to a third aspect of the embodiments of this disclosure, a terminal device is provided, comprising:
[0056] processor;
[0057] Memory used to store the processor's executable instructions;
[0058] The processor is configured to execute the image generation method as described in any of the preceding claims.
[0059] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, which, when the instructions in the storage medium are executed by a processor of a terminal device, enables the terminal device to perform the image generation method as described in any of the preceding claims.
[0060] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: Using the method of this disclosure, the terminal device can automatically identify and determine the target object, and the user only needs to select their preferred effect image, and the terminal device can generate a video with dynamic effect images. This reduces user operations and effectively enhances the fun and convenience of the video production process.
[0061] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0062] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0063] Figure 1 This is a flowchart illustrating a method according to an exemplary embodiment.
[0064] Figure 2 This is a flowchart illustrating a method according to an exemplary embodiment.
[0065] Figure 3 This is a flowchart illustrating a method according to an exemplary embodiment.
[0066] Figure 4 This is a schematic diagram of an interface according to an exemplary embodiment.
[0067] Figure 5 This is a schematic diagram of an interface according to an exemplary embodiment.
[0068] Figure 6 This is a schematic diagram of an interface according to an exemplary embodiment.
[0069] Figure 7 This is a schematic diagram of an interface according to an exemplary embodiment.
[0070] Figure 8 This is a schematic diagram of an interface according to an exemplary embodiment.
[0071] Figure 9 This is a schematic diagram of an interface according to an exemplary embodiment.
[0072] Figure 10 This is a schematic diagram of an interface according to an exemplary embodiment.
[0073] Figure 11 This is a schematic diagram of an interface according to an exemplary embodiment.
[0074] Figure 12 This is a schematic diagram of an interface according to an exemplary embodiment.
[0075] Figure 13 This is a schematic diagram of an interface according to an exemplary embodiment.
[0076] Figure 14 This is a schematic diagram of an interface according to an exemplary embodiment.
[0077] Figure 15 This is a schematic diagram of an interface according to an exemplary embodiment.
[0078] Figure 16 This is a block diagram of an apparatus according to an exemplary embodiment.
[0079] Figure 17 This is a block diagram of a terminal device according to an exemplary embodiment. Detailed Implementation
[0080] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0081] Mobile phones and other terminal devices are indispensable communication tools in people's lives. In the process of using mobile phones and other terminal devices, people are no longer just pursuing practicality, but are gradually having higher requirements for the functions and user experience of terminal devices.
[0082] In related technologies, users can customize photos using their devices. For example, they can use applications on their devices to cut out backgrounds from single or group photos, change the background, blur the background, create ID photos, add special effects, and enhance the functionality and appeal of the device. Users can also use their devices to create videos and add custom effects.
[0083] However, the relevant technologies have at least the following technical problems: when processing photos or videos using terminal devices, users need to manually identify or segment the outlines of people in the photos, which involves a lot of user interaction. Custom photo processing is not convenient enough and is time-consuming.
[0084] To address the technical problems in the aforementioned related technologies, this disclosure proposes an image generation method, comprising: identifying a target object in an object to be processed, wherein the object to be processed includes an image to be processed or a video to be processed. In response to a first operation, determining a dynamic effect image. Displaying the dynamic effect image in a preset area of the target object and generating a target image; wherein the dynamic effect image is adapted to the movement and posture of the target object. Using the method of this disclosure, the terminal device can automatically identify and determine the target object, and the user only needs to select their preferred effect image, and the terminal device can generate a video with a dynamic effect image. This reduces user operations and effectively enhances the fun and convenience of the video production process.
[0085] In one exemplary embodiment, the image generation method of this embodiment is applied to a terminal device. The terminal device may be an electronic device equipped with a camera component, such as a mobile phone, laptop, tablet, or smartwatch. In this embodiment, the operating system of the terminal device may have a built-in camera application.
[0086] When the camera app is opened, the terminal device's CPU or underlying driver layer loads the algorithm resources required for taking pictures. Understandably, the terminal device's operating system integrates a large number of image processing algorithms, such as algorithms related to image data conversion, and algorithms related to image effect processing (beautification, blurring, watermarking, etc.). Different image processing algorithms can be integrated together through pipelines, and different processing algorithms can be integrated into different pipelines. All pipelines required for the current mode need to be created when the camera app starts or before shooting. In this embodiment, the algorithm resources include at least image recognition algorithms, image segmentation algorithms, image matting algorithms, and image fusion algorithms.
[0087] like Figure 1 As shown, the method in this embodiment specifically includes the following steps:
[0088] S110. Identify the target object in the object to be processed.
[0089] S120, in response to the first operation, determine the dynamic effect image.
[0090] S130. Display a dynamic effect image in a preset area of the target object and generate a target image.
[0091] In step S110, the object to be processed includes an image or video to be processed. The image to be processed can be either a static image or a dynamic image. The target object can be, for example, a person, building, or landmark within the object to be processed. In this embodiment, the target object is a person by default. Before each video production, the user can preset the attributes of the target object in the camera program.
[0092] The processor of the terminal device can identify target objects, such as key human features (e.g., facial features, joints). The processor determines the outline region of the target object based on the identification results.
[0093] In step S120, a list of effect images can be displayed within the camera application's interface for the user to select from. The first operation can be, for example, a user's touch operation, voice operation, or gesture operation. For instance, the processor determines the dynamic effect image selected by the user based on the user's touch operation. Touch operations can include, for example, clicking, swiping, and dragging.
[0094] In step S130, the preset area is the display area of the dynamic effect image. The preset area can vary depending on the type of dynamic effect image. The specific shape and size of the preset area can be adapted to the specific dynamic effect image, and the dynamic effect image can be adapted to the action posture of the target object, which can be standing, sitting, moving, etc.
[0095] For example, when the user is standing, the dynamic effect image is a linear dynamic image, and the preset area can be the outline of the target object. Another example is a silhouette-type dynamic effect image, where the preset area can be the area near the outline, or an area that corresponds to the key points of the target object.
[0096] The processor generates a target image containing the user-selected dynamic effect image and a preset area corresponding to the dynamic effect image. The target image can be a dynamic image or a dynamic video. This embodiment can effectively save users' operation costs and time, and can add video effects with one click according to user operation, enhancing the entertainment value.
[0097] In an exemplary embodiment, when the object to be processed is a video, such as Figure 2 As shown, the method in this embodiment further includes:
[0098] S100: Acquire the video to be processed, or determine the video to be processed based on the user's selection.
[0099] In this embodiment, dynamic effect images can be added during the shooting process. For example, according to the user's operation, the video is shot. The processor can execute steps S110 to S130 during the video capture process.
[0100] It can also add dynamic effects to a selected, already recorded video. For example, based on the user's operation, a video already downloaded to the local album can be selected. After selection, the processor can execute steps S110 to S130 for the local video.
[0101] In this embodiment, step S110 may include:
[0102] S1101. Identify the target object in each video frame.
[0103] In step S1101, the video to be processed may include multiple video frames.
[0104] In one example, the processor can identify objects in each video frame, accurately determining the dynamics of objects within the video.
[0105] In another example, the processor can also identify targets only in a subset of video frames. In some scenarios, during frame-by-frame preprocessing, if the processor determines that the characters in the video to be processed exhibit few changes in movement and many static poses, then it can identify only a subset of the video frames. For example, identifying targets in adjacent video frames. Unidentified video frames can be determined based on adjacent identified video frames.
[0106] Furthermore, the target object in the video to be processed can be either a single person or multiple people. If the video to be processed is a single-person video, the outline region of the single person in the video frame can be identified and determined. If the video to be processed is a multi-person video, the outline region of each person in the video frame can be identified and determined.
[0107] In one example, after step S1101, step S110 may further include:
[0108] S1102. Extract the target object from each video frame.
[0109] In step S1102, after recognizing the contour region of the target object, the processor can extract the target object for each frame. During the extraction process of the video frame, the processor can set a mask, perform calculations with the video frame to be extracted, retain the image of the contour region of the target object in the video frame, and complete the extraction of the target object, so as to facilitate the quick fusion processing with the dynamic effect image in subsequent steps.
[0110] In one exemplary embodiment, the dynamic effect image includes multiple effect frames, each corresponding one-to-one with a video frame. For example... Figure 3 As shown, in this embodiment, step S130 specifically includes the following steps:
[0111] S1301. Display the corresponding effect frame in the preset area of each video frame to generate the target frame.
[0112] S1302. Generate the target image based on the target frame.
[0113] In step S1301, depending on the type of dynamic effect image, it may include static effect frames of different shapes or forms to create dynamic special effects in the final video. For example, such as Figure 10 As shown, when the dynamic effect image is a flapping wing, one of the effect frames can be the wing pattern in the first state.
[0114] Each effect frame can be composited with a corresponding video frame. For example, after outlining each video frame, the corresponding effect frame is displayed in a preset area of the target object in the corresponding video frame, thereby generating the target frame.
[0115] In step S1302, multiple target frames can be generated based on the one-to-one correspondence between video frames and effect frames. Based on the multiple target frames, a target image with dynamic effects can be generated.
[0116] In one exemplary embodiment, the method further includes: determining a preset area based on the dynamic effect image.
[0117] The processor determines the preset region based on the type of dynamic effect image selected by the user. For example, if the dynamic effect image is adapted to the facial features of the human body, the preset region could be the head or face of the target object. Or, if the dynamic effect image is adapted to the outline of the human body, the preset region could be the outline of the target object.
[0118] In one exemplary embodiment, when the dynamic effect image adapts to the shape of the outline, a preset region is determined to include the outline of the target object.
[0119] In this embodiment, step S130 specifically includes: controlling the dynamic effect image to be displayed at the outline, or controlling the dynamic effect image to be displayed locally at the outline.
[0120] The dynamic effect images include effect frames that adapt to the shape of the outline.
[0121] In one example, the processor can control the display of dynamic effect images along the outline.
[0122] An effect frame can be, for example, a line effect image with the same shape as the outline in a first state. Adjacent effect frames can be, for example, line effect images with the same shape as the outline in a second state. Multiple effect frames can generate a dynamic effect image that flashes along the outline.
[0123] Line effects images can be either solid or dashed. When the line effect image is solid, the first and second states can refer to different line thicknesses or colors. When the line effect image is dashed, the first and second states can refer to different positions of the dashed points within the dashed line.
[0124] In another example, the controller can control the display of dynamic effect images on a localized portion of the outline.
[0125] An effect frame can be, for example, a small line pattern in a first position. Adjacent effect frames can be, for example, line patterns in a second position. Multiple effect frames can generate a dynamic effect image that moves along a contour trajectory.
[0126] The following are some specific examples to illustrate this embodiment:
[0127] Example 1:
[0128] like Figure 4 As shown, the effect frames of the dynamic effect image include solid line patterns that conform to the shape of the person's outline, with each effect frame having a different color. The video to be processed may include target objects (people) in different poses. After identifying the person in each video frame, the processor inserts the corresponding effect frames to synthesize the target image.
[0129] The dynamic effect image in the target image is displayed at the outline, and the color of the dynamic effect image changes rhythmically at the outline as the person's posture changes, achieving a light flow effect of color outlining the person in the video.
[0130] Example 2:
[0131] like Figure 5 As shown, the effect frames of the dynamic effect image include solid line patterns that conform to the shape of the person's outline, with different brightness levels in each effect frame. The video to be processed may include target objects (people) in different poses. After identifying the person in each video frame, the processor inserts the corresponding effect frames to synthesize the target image.
[0132] The dynamic effect image in the target image is displayed at the outline, and the brightness of the dynamic effect image flashes rhythmically at the outline as the person's posture changes, achieving the light flow effect of outlining the person in the video with fluorescent lights.
[0133] Example 3:
[0134] like Figure 6 As shown, the effect frames of the dynamic effect image include a pair of symmetrical small line patterns, with the positions of the line patterns differing in each effect frame. The video to be processed may include target objects (people) in different poses. After identifying the person in each video frame, the processor inserts the corresponding effect frame to synthesize the target image.
[0135] The dynamic effect image in the target image is displayed locally along the outline, for example, initially on both sides of the waistline of the person. As the person's posture changes, the dynamic effect image moves along this outline, and the pair of linear patterns in the dynamic effect image always remain symmetrical. This achieves the effect of adding symmetrical current to the person in the video.
[0136] Example 4:
[0137] like Figure 7 As shown, the effect frames of the dynamic effect image include a small-sized line pattern, with the position and / or color of the line pattern differing in each effect frame. The video to be processed may include target objects (people) in different poses. After identifying the people in each video frame, the processor inserts the corresponding effect frames to synthesize the target image.
[0138] The dynamic effect image in the target image is displayed locally along the outline, such as initially displaying it on one side of the waistline of a person. As the person's posture changes, the dynamic effect image moves along the outline or the trajectory of the side half of the person's outline, and produces color changes. This achieves the effect of adding colored lines to a person in a video.
[0139] Example 5:
[0140] like Figure 8 As shown, the effect frames of the dynamic effect image include: a white dashed line pattern adapted to the shape of the person's outline, with the position of the white dashed line dots varying in each effect frame. The size of the dashed line dots in each effect frame can also differ. The video to be processed can include target objects (people) in different poses. After identifying the person in each video frame, the processor inserts the corresponding effect frames to synthesize the target image.
[0141] The dynamic effect image in the target image is displayed at the outline, and the dotted pattern of the dynamic effect image rotates rhythmically at the outline as the person's posture changes, producing the effect of white dotted dots rolling at the outline, thus achieving the light flow effect of dotted outline of the person in the video.
[0142] In this embodiment, the processor can also identify the distance between the person and the terminal device. When the distance is far, the size of the pattern in the dynamic effect image can be reduced; when the distance is close, the size of the pattern in the dynamic effect image can be increased.
[0143] In an exemplary embodiment, when the dynamic effect image is adapted to the contour region of the target object, the preset region is determined to include the contour region of the target object.
[0144] In this embodiment, the processor controls the dynamic effect image to be displayed directly on the target object.
[0145] For example, such as Figure 9 As shown, the effect frame of the dynamic effect image includes: a strip pattern extending in the horizontal direction, the strip pattern can have preset brightness and color, and the position of the strip pattern in the vertical direction is different in each effect frame.
[0146] The video to be processed can include target objects (people) in different poses. After the processor identifies the people in each video frame, it inserts the corresponding effect frames to synthesize the target image.
[0147] The dynamic effect image in the target image is displayed at different positions of the target object. As the person's posture changes, the striped pattern in the dynamic effect image moves along the human body, producing the effect of radio wave lines sweeping across the human body from top to bottom.
[0148] In an exemplary embodiment, when the dynamic effect image includes text or an image related to key points of the target object, the preset region is determined to include a region that is adapted to the key points of the target object.
[0149] In this embodiment, step S130 specifically includes: controlling the display of the dynamic effect image in an area that is adapted to the key points of the target object.
[0150] The dynamic effects images include text or effect frames related to key points. Key points include human body key points such as the eyes, shoulders, elbows, or hands of the target object. Images related to key points can be images that complement the key points.
[0151] Text-based effect frames can be patterns designed based on different text content or layouts.
[0152] Images related to key points of the target object can be of preset shapes, including effect frames of preset shapes. Effect frames of preset shapes can be patterns of different shapes that are related to key points of the human body, such as wing patterns related to shoulders, eyeglass patterns related to eyes, and hat patterns related to the head.
[0153] When the key point is the shoulder of the target object, the processor can locate this key point and determine the display of the dynamic effect image in a preset area near the shoulder. The dynamic effect image in this case could be, for example, wings.
[0154] When the key point is the elbow or hand of the target object, the processor can locate the elbow or hand as the key point and control the display of the dynamic effect image in a preset area near the elbow or hand.
[0155] The following are some specific examples to illustrate this embodiment:
[0156] Example 1:
[0157] like Figure 10 As shown in Figure 11, the effect frames of the dynamic effect image include: wing patterns, with different wing colors and different positions of the wing tips in each effect frame. The video to be processed may include target objects (people) in different poses. After the processor identifies the person in each video frame, it inserts the corresponding effect frame to synthesize the target image.
[0158] The dynamic effect image in the target image is displayed at the person's shoulders, and the color of the wings in the dynamic effect image changes with the person's posture, with the wing pattern flapping rhythmically in response to the posture. In this example, the processor can also adaptively adjust the size of the wing pattern based on the person's distance from the camera.
[0159] Example 2:
[0160] like Figure 12 As shown, the effect frames of the dynamic effect image include: patterns in the form of text content, with different colors or sizes of text in each effect frame. The video to be processed may include target objects (people) in different poses. After the processor identifies the people in each video frame, it inserts the corresponding effect frames to synthesize the target image.
[0161] The dynamic effect image in the target image is displayed at the person's shoulder, and the color or size of the text in the dynamic effect image changes with the person's posture. For example, the text pattern flashes, or enlarges or shrinks as the person's posture changes. In this example, the processor can also adaptively adjust the size of the text pattern based on the person's distance from the camera.
[0162] Example 3:
[0163] like Figure 13 As shown, the effect frames of the dynamic effect image include: a dispersed particle pattern, with different particle densities, positions, or colors in each effect frame. The video to be processed may include target objects (people) in different poses. After identifying the people in each video frame, the processor inserts the corresponding effect frames to synthesize the target image.
[0164] The dynamic effect image in the target image is displayed on the elbow or hand of the person, and the color or density of the particle pattern in the dynamic effect image changes with the person's posture. For example, the density of the particle pattern changes with the person's posture, and it moves around the person along a path that includes the elbow or hand.
[0165] In an exemplary embodiment, when the dynamic effect image is adapted to the size of the target object, a preset area is determined as: an area adapted to the motion posture of the target object.
[0166] In this embodiment, step S130 specifically includes: controlling the display of the dynamic effect image in an area that adapts to the action posture of the target object.
[0167] The dynamic effect image includes effect frames adapted to the size of the target object. The region adapted to the target object's posture or movement can be, for example, the region corresponding to the target object's current movement trend, such as the side view region when the target object is standing, or the front or back view region when the target object is rotating, standing sideways, or turning away.
[0168] In one example, such as Figure 14 As shown, the effect frames of the dynamic effect image include colored bar patterns adapted to the vertical dimensions of the target object. The colors of the colored bar patterns differ in each effect frame, and their horizontal positions also vary. The video to be processed may include target objects (people) in different poses. After identifying the person in each video frame, the processor inserts the corresponding effect frame to synthesize the target image.
[0169] As the person's posture changes, the colored stripes in the dynamic effect image drag along the side of the body, creating a colored trailing effect.
[0170] In another example, such as Figure 15As shown, the effect frames of the dynamic effect image include: a rendered portrait pattern adapted to the size of the target object. The position, color, rendering intensity, and area of the rendered portrait differ in each effect frame. The video to be processed may include target objects (people) in different poses. After identifying the person in each video frame, the processor inserts the corresponding effect frame to synthesize the target image.
[0171] As the subject's posture changes, the rendered portrait pattern in the dynamic effect image drags across the area behind the subject, creating a colored trailing effect. The farther away from the subject, the lighter the rendered color of the trailing image.
[0172] In one exemplary embodiment, this disclosure provides an image generation apparatus, such as... Figure 16 As shown, the apparatus in this embodiment includes: an identification module 110, a determination module 120, and a generation module 130. The apparatus in this embodiment is used to implement the following: Figure 1 The method is illustrated. The recognition module 110 identifies a target object within the object to be processed, where the object includes an image or video to be processed. The determination module 120 determines a dynamic effect image in response to a first operation. The generation module 130 displays the dynamic effect image in a preset area of the target object and generates a target image. The dynamic effect image is adapted to the movement and posture of the target object.
[0173] In an exemplary embodiment, when the object to be processed is a video to be processed, the apparatus of this embodiment further includes: an acquisition module, used to acquire the video to be processed, or a determination module specifically used to determine the video to be processed based on the user's selection; wherein, the video to be processed includes multiple video frames. In this embodiment, the identification module is specifically used to: identify the target object in each video frame respectively; and extract the target object in each video frame respectively.
[0174] In one exemplary embodiment, reference is still made to... Figure 16 The dynamic effect image includes multiple effect frames, each corresponding to a video frame. The generation module 130 is specifically used to: display the corresponding effect frame in a preset area of each video frame and generate a target frame; and generate a target image based on the target frame.
[0175] In one exemplary embodiment, reference is still made to... Figure 16 The determining module 120 is further configured to: determine the preset region based on the dynamic effect image. In this embodiment, when the dynamic effect image is adapted to the outline shape of the target object, the preset region is determined to include the outline of the target object. The generating module 130 is further configured to: control the display of the dynamic effect image at the outline, or control the display of the dynamic effect image in a partial area of the outline.
[0176] In one exemplary embodiment, reference is still made to... Figure 16When the dynamic effect image includes text or an image related to key points of the target object, the preset area is defined as: an area that corresponds to the key points of the target object, including the target object's shoulder, elbow, or hand. The generation module 130 is also used to: control the display of the dynamic effect image in the area that corresponds to the key points of the target object.
[0177] In one exemplary embodiment, reference is still made to... Figure 16 When the dynamic effect image is adapted to the size of the target object, a preset area is determined as the area adapted to the movement and posture of the target object. The generation module 130 is also used to control the display of the dynamic effect image in the area adapted to the movement and posture of the target object. In this embodiment, the device further includes an adjustment module, used to adjust the display color of the dynamic effect image according to the posture changes of the target object in the video to be processed.
[0178] like Figure 17 The diagram shown is a block diagram of a terminal device. This disclosure also provides a terminal device, such as a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0179] Device 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input / output (I / O) interface 512, sensor component 514, and communication component 516.
[0180] Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0181] Memory 504 is configured to store various types of data to support the operation of device 500. Examples of this data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, etc. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0182] The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 500.
[0183] Multimedia component 508 includes a screen that provides an output interface between device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When device 500 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0184] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when device 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.
[0185] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0186] Sensor assembly 514 includes one or more sensors for providing state assessments of various aspects of device 500. For example, sensor assembly 514 may detect the on / off state of device 500, the relative positioning of components such as the display and keypad of device 500, changes in the position of device 500 or a component of device 500, the presence or absence of user contact with device 500, the orientation or acceleration / deceleration of device 500, and temperature changes of device 500. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0187] Communication component 516 is configured to facilitate wired or wireless communication between device 500 and other devices. Device 500 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0188] In an exemplary embodiment, device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0189] Another exemplary embodiment of this disclosure provides a non-transitory computer-readable storage medium, such as a memory 504 including instructions that can be executed by a processor 520 of a device 500 to perform the described method. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device. When the instructions in the storage medium are executed by the processor of a terminal device, the terminal device is able to perform the described method.
[0190] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0191] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. An image generation method, characterized in that, include: Identify target objects in the object to be processed, wherein the object to be processed includes the video to be processed; In response to the first operation, determine the dynamic effect image; The dynamic effect image is displayed in a preset area of the target object, and a target image is generated; wherein the dynamic effect image is adapted to the movement and posture of the target object; The video to be processed includes multiple video frames; The identification of target objects in the object to be processed includes: Identify the target object in each video frame; The dynamic effect image includes multiple effect frames, and each effect frame corresponds one-to-one with a video frame. The process of displaying the dynamic effect image in a preset area of the target object and generating a target image includes: The corresponding effect frame is displayed in the preset area of each video frame, and a target frame is generated; The target image is generated based on the target frame; The method further includes: The preset area is determined based on the dynamic effect image; The step of determining the preset region based on the dynamic effect image includes: determining the preset region based on the type of dynamic effect image selected by the user; When the dynamic effect image adapts to the outline shape of the target object, the preset area is determined to include the outline of the target object; Displaying the dynamic effect image in the preset area includes: The dynamic effect image can be controlled to be displayed at the outline, or the dynamic effect image can be controlled to be displayed locally at the outline.
2. The image generation method according to claim 1, characterized in that, When the object to be processed is a video to be processed; The method further includes: acquiring the video to be processed, or determining the video to be processed based on the user's selection.
3. The image generation method according to claim 2, characterized in that, When the dynamic effect image includes text or an image related to the key points of the target object, the preset area is determined to be: an area that is adapted to the key points of the target object; Displaying the dynamic effect image in the preset area includes: The dynamic effect image is controlled to be displayed in an area that corresponds to the key points of the target object.
4. The image generation method according to claim 2, characterized in that, When the dynamic effect image is adapted to the size of the target object, the preset area is determined to be: the area adapted to the action posture of the target object; Displaying the dynamic effect image in the preset area includes: The dynamic effect image is controlled to be displayed in an area that is adapted to the movement and posture of the target object.
5. The image generation method according to any one of claims 2 to 4, characterized in that, The method further includes: The display color of the dynamic effect image is adjusted according to the posture changes of the target object in the video to be processed.
6. An image generation apparatus, characterized in that, include: The recognition module is used to identify target objects in the object to be processed, wherein the object to be processed includes the video to be processed; The determination module is used to determine the dynamic effect image in response to the first operation; A generation module is used to display the dynamic effect image in a preset area of the target object and generate a target image; wherein the dynamic effect image is adapted to the movement and posture of the target object; The video to be processed includes multiple video frames; The identification module is specifically used for: Identify the target object in each video frame; The dynamic effect image includes multiple effect frames, and each effect frame corresponds one-to-one with a video frame. The generation module is specifically used for: The corresponding effect frame is displayed in the preset area of each video frame, and a target frame is generated; The target image is generated based on the target frame; The determining module is further configured to: determine the preset area based on the dynamic effect image; The step of determining the preset region based on the dynamic effect image includes: determining the preset region based on the type of dynamic effect image selected by the user; When the dynamic effect image adapts to the outline shape of the target object, the preset area is determined to include the outline of the target object; the generation module is further configured to control the display of the dynamic effect image at the outline, or control the display of the dynamic effect image in a local area of the outline.
7. The image generation apparatus according to claim 6, characterized in that, When the object to be processed is a video to be processed; The device further includes: a acquisition module for acquiring the video to be processed, or the determination module specifically for determining the video to be processed based on the user's selection.
8. The image generation apparatus according to claim 7, characterized in that, When the dynamic effect image includes text or an image related to the key points of the target object, the preset area is determined to be: an area that is adapted to the key points of the target object; The generation module is also used for: The dynamic effect image is controlled to be displayed in an area that corresponds to the key points of the target object.
9. The image generation apparatus according to claim 7, characterized in that, When the dynamic effect image is adapted to the size of the target object, the preset area is determined to be: the area adapted to the action posture of the target object; The generation module is also used for: The dynamic effect image is controlled to be displayed in an area that is adapted to the movement and posture of the target object.
10. The image generating apparatus according to any one of claims 7 to 9, characterized in that, The device further includes: An adjustment module is used to adjust the display color of the dynamic effect image according to the posture changes of the target object in the video to be processed.
11. A terminal device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to perform the image generation method as described in any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the terminal device, the terminal device is able to perform the image generation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Video processing method, video processing device, and storage medium
US20190132642A1