Method and device for generating dynamic image
AssigneeBeijing Dajia Internet Information Technology Co., Ltd.
InventorKe Gao
Life of this patent
Estimating the term…
Abstract
Embodiments of the disclosure provide a method for generating a dynamic image, an electronic device for the same and a storage medium for the same. The electronic device obtains a video based on a trigger operation. The electronic device obtains images of the video by separating the images an audio data of the video. The images include first images and second images. The electronic device obtains target images by processing the first images. Each of the target images does not contain the target object. The electronic device generates the dynamic image based on the images and the target images.
Claims9
A method for generating a dynamic image, comprising:
- obtaining an initial video based on a trigger operation;
- obtaining initial images of the video by separating the initial images and audio data of the initial video, wherein the initial images comprise first images and second images, each first image contains a target object, and each second image does not contain the target object, wherein the target object comprises any object with a predetermined image feature;
- obtaining target images by processing the first images, wherein each target image does not contain the target object;
- and
- generating the dynamic image based on the initial images and the target images;
- wherein said processing the first image comprises:
- removing image content within a target region from the first image, wherein the target object is located within the target region;
- determining a pixel value of each pixel within the target region based on a weighted average of pixel values of neighboring pixels;
- and
- determining a boundary of the target region based on an image fusion manner;
- wherein said generating the dynamic image comprises:
- generating a first video from the target images and a plurality of images in the second images based on a playback sequence of the initial images;
- selecting an image from the second images as a static image;
- and
- generating the dynamic image based on the static image and the first video;
- wherein the dynamic image is used to display content of the static image and the first video;
- the static image is a frame of image selected from the plurality of images in the second images.
An electronic device, comprising:
- one or more processors and one or more memories storing computer instructions that when executed by one or more processor to perform operations comprising:
- obtaining an initial video based on a trigger operation;
- obtaining initial images of the video by separating the initial images and audio data of the initial video, wherein the initial images comprise first images and second images, each first image contains a target object, each second image does not contain the target object, wherein the target object comprises any object with a predetermined image feature;
- obtaining target images by processing the first images, wherein each target image does not contain the target object;
- and
- generating the dynamic image based on the initial images and the target images;
- wherein said processing the first image comprises:
- removing image content within a target region from the first image, wherein the target object is located within the target region;
- determining a pixel value of each pixel within the target region based on a weighted average of pixel values of neighboring pixels;
- and
- determining a boundary of the target region based on an image fusion manner;
- wherein said generating the dynamic image comprises:
- generating a first video from the target images and a plurality of images in the second images based on a playback sequence of the initial images;
- selecting an image from the second images as a static image;
- and
- generating the dynamic image based on the static image and the first video;
- wherein the dynamic image is used to display content of the static image and the first video;
- the static image is a frame of image selected from the plurality of images in the second images.
A non-transitory computer readable storage medium, having instructions executable by a processor, wherein when the instructions are executed by the processor, a method for generating a dynamic image is implemented, the method comprising:
- obtaining an initial video based on a trigger operation;
- obtaining initial images of the video by separating the initial images and audio data of the initial video, wherein the initial images comprise first images and second images, each first image contains a target object, each second image does not contain the target object, wherein the target object comprises any object with a predetermined image feature;
- obtaining target images by processing the first images, wherein each target image does not contain the target object;
- and
- generating the dynamic image based on the initial images and the target images;
- wherein said processing the first image comprises:
- removing image content within a target region from the first image, wherein the target object is located within the target region;
- determining a pixel value of each pixel within the target region based on a weighted average of pixel values of neighboring pixels;
- and
- determining a boundary of the target region based on an image fusion manner;
- wherein said generating the dynamic image comprises:
- generating a first video from the target images and a plurality of images in the second images based on a playback sequence of the initial images;
- selecting an image from the second images as a static image;
- and
- generating the dynamic image based on the static image and the first video;
- wherein the dynamic image is used to display content of the static image and the first video;
- the static image is a frame of image selected from the plurality of images in the second images.
Dependencies are inferred from the claim text.