CN108111748B - Method and device for generating dynamic image - Google Patents

Method and device for generating dynamic image Download PDF

Info

Publication number
CN108111748B
CN108111748B CN201711241039.2A CN201711241039A CN108111748B CN 108111748 B CN108111748 B CN 108111748B CN 201711241039 A CN201711241039 A CN 201711241039A CN 108111748 B CN108111748 B CN 108111748B
Authority
CN
China
Prior art keywords
image
images
camera
main body
mobile terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711241039.2A
Other languages
Chinese (zh)
Other versions
CN108111748A (en
Inventor
王兆丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201711241039.2A priority Critical patent/CN108111748B/en
Publication of CN108111748A publication Critical patent/CN108111748A/en
Application granted granted Critical
Publication of CN108111748B publication Critical patent/CN108111748B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/32Image data format

Abstract

The embodiment of the invention provides a method and a device for generating a dynamic image, wherein the method and the device are applied to a mobile terminal, and the mobile terminal is provided with a first camera and a second camera; the method comprises the following steps: when the mobile terminal enters a dynamic image shooting mode, controlling a first camera to shoot a first image and controlling a second camera to shoot a plurality of second images; determining a first main body area and a first background area in a first image, and determining a second main body area and a second background area in a plurality of second images respectively; overlapping the image layer corresponding to the first main body area with the image layer corresponding to the second background area in each second image respectively to generate a plurality of third images; and generating a first dynamic image by adopting a plurality of third images. In the embodiment of the invention, the user can generate the dynamic image without special dynamic image making software or a network in the process of using the mobile terminal to take the photo.

Description

Method and device for generating dynamic image
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for generating a dynamic image.
Background
When a specific set of static images (e.g. geometric figures) is switched at a specific frequency, a certain dynamic picture effect is generated, which is a dynamic picture. The motion picture format is currently only a multi-frame motion picture formed by combining a plurality of jpg or bmp in the form of gif as a suffix name.
The GIF (graphics Interchange format) has the original meaning of an image Interchange format, a plurality of color images can be stored in the GIF format, and if a plurality of image data stored in a file are read out one by one and displayed on a screen, the simplest animation can be formed.
In the prior art, a user can use third-party software, such as Firworks, photoshop and the like, to make a group of static images into dynamic images; for example, on a certain website, a user uploads a group of static images required for making a dynamic image, a server of the website makes the dynamic image and then provides the user with download, and the user can obtain the made dynamic image. However, the user cannot create a moving image without third-party software or without being able to connect to a network.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide a method for generating a moving image and a corresponding apparatus for generating a moving image, so as to solve the problem that a user cannot make a moving image without third-party software or without being connected to a network.
In order to solve the above problem, an embodiment of the present invention discloses a method for generating a dynamic image, where the method is applied to a mobile terminal, and the mobile terminal has a first camera and a second camera; the method comprises the following steps:
when the mobile terminal enters a dynamic image shooting mode, controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images;
determining a first main body area and a first background area in the first image, and determining a second main body area and a second background area in the plurality of second images respectively;
superposing the image layer corresponding to the first main body area with the image layer corresponding to the second background area in each second image to generate a plurality of third images;
and generating a first dynamic image by adopting the plurality of third images.
The embodiment of the invention also discloses a method for generating the dynamic image, which is applied to a mobile terminal, wherein the mobile terminal is provided with a first camera and a second camera; the method comprises the following steps:
when the mobile terminal enters a dynamic image shooting mode, controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images;
determining a first main body area and a first background area in the first image, and determining a second main body area and a second background area in the plurality of second images respectively;
superposing the image layer corresponding to the first background area with the image layer corresponding to the second main body area in each second image to generate a plurality of fourth images;
and generating a second dynamic image by adopting the plurality of fourth images.
Correspondingly, the embodiment of the invention discloses a device for generating dynamic images, which is applied to a mobile terminal, wherein the mobile terminal is provided with a first camera and a second camera; the device comprises:
the first control module is used for controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images when the mobile terminal enters a dynamic image shooting mode;
a first region determining module, configured to determine a first main body region and a first background region in the first image, and determine a second main body region and a second background region in the plurality of second images, respectively;
the first generation module is used for superposing the image layer corresponding to the first main body area with the image layer corresponding to the second background area in each second image to generate a plurality of third images;
and the second generation module is used for generating a first dynamic image by adopting the plurality of third images.
Correspondingly, the embodiment of the invention also discloses a device for generating the dynamic image, which is applied to a mobile terminal, wherein the mobile terminal is provided with a first camera and a second camera; the device comprises:
the second control module is used for controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images when the mobile terminal enters a dynamic image shooting mode;
a second region module, configured to determine a first main body region and a first background region in the first image, and determine a second main body region and a second background region in the plurality of second images, respectively;
the third generation module is used for superposing the image layer corresponding to the first background area with the image layer corresponding to the second main body area in each second image to generate a plurality of fourth images;
and the fourth generation module is used for generating a second dynamic image by adopting the plurality of fourth images.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, when the mobile terminal is in a dynamic image shooting mode, a user presses a shooting button, a first camera collects a first image, a second camera collects a plurality of second images, then a first main body area is obtained from the first image, a second background area is obtained from the plurality of second images, then the image layer containing the first main body area is superposed with the plurality of image layers containing the second background area respectively to generate a plurality of third images, then the playing time interval information of each third image is set, and finally the plurality of third images and the playing time interval information are stored as the first dynamic image. Therefore, when a user uses the mobile terminal to shoot a photo, the dynamic image can be generated without special dynamic image making software or a network, the operation is simple and quick, and the user experience is improved.
Drawings
FIG. 1 is a flowchart illustrating first steps of an embodiment of a method for generating a dynamic image according to the present invention;
FIG. 2 is a flowchart illustrating the steps of an embodiment of a method for generating a dynamic image;
FIG. 3 is a block diagram illustrating an embodiment of an apparatus for generating a moving picture according to the present invention;
fig. 4 is a block diagram of a second embodiment of the apparatus for generating a moving image according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flow chart illustrating the steps of an embodiment of a method for generating a dynamic image according to the present invention, which is applied to a mobile terminal;
in the present application, the mobile terminal may have the following characteristics:
(1) on a hardware architecture, a device has a central processing unit, a memory, an input unit and an output unit, that is, the device is often a microcomputer device having a communication function. In addition, various input modes such as a keyboard, a mouse, a touch screen, a microphone, a camera and the like can be provided, and input can be adjusted as required. Meanwhile, the equipment often has a plurality of output modes, such as a telephone receiver, a display screen and the like, and can be adjusted according to needs;
(2) on a software system, the device must have an operating system, such as Windows Mobile, Symbian, Palm, Android, iOS, and the like. Meanwhile, the operating systems are more and more open, and personalized application programs developed based on the open operating system platforms are infinite, such as a communication book, a schedule, a notebook, a calculator, various games and the like, so that the requirements of personalized users are met to a great extent;
(3) in terms of communication capacity, the device has flexible access mode and high-bandwidth communication performance, and can automatically adjust the selected communication mode according to the selected service and the environment, thereby being convenient for users to use. The equipment can support GSM, WCDMA, CDMA2000, TDSCDMA, Wi-Fi, WiMAX and the like, thereby being suitable for various systems of networks, not only supporting voice services, but also supporting various wireless data services;
(4) in the aspect of function use, the equipment focuses more on humanization, individuation and multi-functionalization. With the development of computer technology, devices enter a human-centered mode from a device-centered mode, and the embedded computing, control technology, artificial intelligence technology, biometric authentication technology and the like are integrated, so that the human-oriented purpose is fully embodied. Due to the development of software technology, the equipment can be adjusted and set according to individual requirements, and is more personalized. Meanwhile, the device integrates a plurality of software and hardware, and the function is more and more powerful.
In addition, in this application, the mobile terminal has a first camera and a second camera. The first camera and the second camera are located on the same plane, for example, on the back of the mobile terminal at the same time. However, which camera is the first camera and which camera is the second camera is not limited in this application, and for example, the mobile terminal has A, B two cameras, and a may be the first camera and B may be the second camera, or a may be the second camera and B may be the first camera.
The method specifically comprises the following steps:
step 101, when the mobile terminal enters a dynamic image shooting mode, controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images;
in the embodiment of the invention, the user can enter the shooting mode through the entity key of the mobile terminal and also can enter the shooting mode through the application program of the mobile terminal. The mobile terminal has other shooting modes besides the dynamic image shooting mode, and after the mobile terminal enters the shooting mode, the user can select the dynamic image shooting mode. Of course, the user may also set that the mobile terminal can directly enter the dynamic image shooting mode.
When the mobile terminal is in the dynamic image shooting mode, the user can shoot through a physical button of the mobile terminal, such as a shooting button, or through a virtual button, such as a shooting button on a screen.
After the user presses the shooting button, the central processing unit of the mobile terminal can simultaneously send a shooting instruction to the first camera and the second camera, the first camera can shoot a first image after receiving the shooting instruction, the second camera can shoot a plurality of second images after receiving the shooting instruction, and as for the number of the second images, the user can set the number of the second images by himself according to the requirements, for example, 10 or 20 images can be selected. In addition, the order of shooting by the first camera and the second camera may be that the first camera shoots first, and the second camera shoots second after shooting is completed, or the first camera and the second camera shoot simultaneously, or the second camera shoots first, and the first camera shoots second after shooting is completed, which is not limited in the embodiment of the present invention.
In a preferred embodiment of the present invention, when the mobile terminal enters a dynamic image capturing mode, the first camera captures a plurality of images;
and taking any one of the plurality of images as a first image.
Specifically, the number of shots taken by the first camera may be the same as the number of shots taken by the second camera, in this case, the first camera and the second camera take shots simultaneously, and after the shooting is completed, one image is selected from the multiple shot images as the first image; the number of the first camera and the number of the second camera may be different, and only one of the plurality of images shot by the first camera is reserved, so that the first camera may not need to shoot so many images, in this case, the order of the first camera and the second camera may be that the first camera shoots first and the second camera shoots second after shooting is completed, or that the first camera and the second camera shoot simultaneously, or that the second camera shoots first and the first camera shoots second after shooting is completed.
Certainly, the user can also manually shoot a plurality of second images, when the mobile terminal is in a dynamic image shooting mode, the user presses the shooting button for the first time, the first camera shoots the first image, the second camera shoots the second image at the same time, the user presses the shooting button for the second time, the first camera does not shoot, the second camera continues to shoot the second image, and so on; the user may also press the shooting button each time, the first camera and the second camera perform shooting at the same time, after the shooting is completed, one image is selected from the multiple images shot by the first camera as the first image, and which image is selected as the first image may be selected by the central processing unit or manually selected by the user, which is not limited in the embodiment of the present invention.
Step 102, determining a first main body area and a first background area in the first image, and determining a second main body area and a second background area in the plurality of second images respectively;
because the mobile terminal is provided with two cameras which are positioned on the same plane and have a certain distance, the two cameras and the shot object form a triangle, so that the depth of field of the first image and the depth of field of the second image can be calculated through the triangle, and then the main body area and the background area in the first image and the main body area and the background area in the second image are determined according to the depth of field.
103, overlapping the layer corresponding to the first main body area with the layer corresponding to the second background area in each second image respectively to generate a plurality of third images;
specifically, after the first body region in the first image is determined, images other than the body region need to be removed, for example, the first body region can be scratched from the first image in a scratching manner, so that an image layer including the first body region is obtained, and the region in the image layer other than the first body region is transparent; correspondingly, the layer of each second image including the second background area may also be obtained in the same manner, and the area in the layer except for the second background area is also transparent. And then, overlapping the image layer containing the first main body area with a plurality of image layers containing the second background area respectively to generate a plurality of third images. For example, there are 1 layer including the first main area, 20 layers including the second background area, and the layer including the first main area is superimposed with the 20 layers including the second background area, respectively, to generate 20 third images.
And 104, generating a first dynamic image by adopting the plurality of third images.
In a preferred embodiment of the present invention, the step of generating the first moving image using the plurality of third images includes:
setting the playing time interval information of each third image;
and storing the playing time interval information and the plurality of third images as a first dynamic image.
Since the moving picture is a group of specific still pictures switched at a specific frequency, after a plurality of third pictures exist, the playing time interval of each third picture needs to be set, for example, the setting time interval is 0.5 seconds, which means that the switching is performed after the first third picture is displayed for 0.5 seconds, the second third picture is displayed, and so on. After the setting is finished, the plurality of third images and the playing time interval information are stored in a file in a GIF format to generate a first dynamic image.
In the embodiment of the invention, when the mobile terminal is in a dynamic image shooting mode, a user presses a shooting button, a first camera collects a first image, a second camera collects a plurality of second images, then a first main body area is obtained from the first image, a second background area is obtained from the plurality of second images, then the image layer containing the first main body area is superposed with the plurality of image layers containing the second background area respectively to generate a plurality of third images, then the playing time interval information of each third image is set, and finally the plurality of third images and the playing time interval information are stored as the first dynamic image. Therefore, when a user uses the mobile terminal to shoot a photo, the dynamic image can be generated without special dynamic image making software or a network, the operation is simple and quick, and the user experience is improved.
Referring to fig. 2, a flowchart illustrating a second step of an embodiment of a method for generating a dynamic image according to the present invention is shown, wherein the method is applied to a mobile terminal, and the mobile terminal has a first camera and a second camera;
the method specifically comprises the following steps:
step 201, when the mobile terminal enters a dynamic image shooting mode, controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images;
in a preferred embodiment of the present invention, when the mobile terminal enters a dynamic image capturing mode, the first camera captures a plurality of images;
and taking any one of the plurality of images as a first image.
Step 202, determining a first main body area and a first background area in the first image, and determining a second main body area and a second background area in the plurality of second images respectively;
step 203, superposing the layer corresponding to the first background area with the layer corresponding to the second main body area in each second image to generate a plurality of fourth images;
specifically, after the first background area in the first image is determined, the image outside the main body area needs to be removed, for example, the first background area can be scratched from the first image in a scratching mode, so that an image layer containing the first background area is obtained, and the area in the image layer except the first background area is transparent; correspondingly, a layer of each second image including the second main body region may also be obtained in the same manner, and regions in the layer other than the second main body region are also transparent. And then, overlapping the image layer containing the first background area with a plurality of image layers containing the second main body area respectively to generate a plurality of fourth images. For example, there are 1 layer including the first background region, 20 layers including the second main body region, and the layer including the first background region is superimposed with the 20 layers including the second main body region, respectively, to generate 20 fourth images.
And step 204, generating a second dynamic image by using the plurality of fourth images.
In a preferred embodiment of the present invention, the step of generating the second moving image using the plurality of fourth images includes:
setting the playing time interval information of each fourth image;
and storing the playing time interval information and the plurality of fourth images as a second dynamic image.
It should be noted that the difference between the embodiment of the present invention and the first embodiment is that the moving image obtained in the first embodiment is a subject-unchanged background change, whereas the subject-unchanged background does not change in the embodiment of the present invention.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, there is shown a first block diagram of an embodiment of an apparatus for generating a dynamic image according to the present invention, the apparatus is applied to a mobile terminal, and the mobile terminal has a first camera and a second camera;
the device may specifically include the following modules:
a first control module 301, configured to control the first camera to shoot a first image and control the second camera to shoot multiple second images when the mobile terminal enters a dynamic image shooting mode;
a first region determining module 302, configured to determine a first main body region and a first background region in the first image, and determine a second main body region and a second background region in the plurality of second images, respectively;
a first generating module 303, configured to superimpose the layer corresponding to the first main body region with the layer corresponding to the second background region in each second image, respectively, so as to generate multiple third images;
a second generating module 304, configured to generate a first dynamic image by using the plurality of third images.
In a preferred embodiment of the present invention, the apparatus further comprises:
the first shooting module is used for shooting a plurality of images by the first camera when the mobile terminal enters a dynamic image shooting mode;
and the selection module is used for taking any one of the plurality of images as a first image.
In a preferred embodiment of the present invention, the second generating module includes:
the first setting submodule is used for setting the playing time interval information of each third image;
and the first storage submodule is used for storing the playing time interval information and the third images into a first dynamic image.
Referring to fig. 4, there is shown a block diagram of a second embodiment of the apparatus for generating a dynamic image according to the present invention, which is applied to a mobile terminal having a first camera and a second camera;
the device may specifically include the following modules:
a second control module 401, configured to control the first camera to shoot a first image and control the second camera to shoot multiple second images when the mobile terminal enters a dynamic image shooting mode;
a second region module 402, configured to determine a first main body region and a first background region in the first image, and determine a second main body region and a second background region in the plurality of second images, respectively;
a third generating module 403, configured to superimpose the layer corresponding to the first background region with the layer corresponding to the second main body region in each second image, respectively, so as to generate multiple fourth images;
a fourth generating module 404, configured to generate a second dynamic image by using the plurality of fourth images.
In a preferred embodiment of the present invention, the third generating module includes:
the second setting submodule is used for setting the playing time interval information of each fourth image;
and the second storage submodule is used for storing the playing time interval information and the plurality of fourth images as a second dynamic image.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method for generating a dynamic image and the apparatus for generating a dynamic image provided by the present invention are described in detail above, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the description of the above embodiments is only used to help understand the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A method for generating dynamic images is characterized in that the method is applied to a mobile terminal, and the mobile terminal is provided with a first camera and a second camera; the method comprises the following steps:
when the mobile terminal enters a dynamic image shooting mode, controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images;
determining a first main body area and a first background area in the first image, and determining a second main body area and a second background area in the plurality of second images respectively;
superposing the image layer corresponding to the first main body area with the image layer corresponding to the second background area in each second image to generate a plurality of third images;
generating a first dynamic image by adopting the plurality of third images;
the step of determining a first main body area and a first background area in the first image, and determining a second main body area and a second background area in the plurality of second images respectively comprises:
calculating the depth of field of the first image and the second image;
determining a first main body area and a first background area of the first image, and a second main body area and a second background area of the second image according to the depth of field;
wherein, still include:
when the mobile terminal enters a dynamic image shooting mode, the first camera shoots a plurality of images;
taking any one of the plurality of images as a first image;
the number of the second images is set by a user according to the requirement;
further comprising:
when the number of shots of the first camera is the same as that of the shots of the second camera, the first camera and the second camera shoot simultaneously.
2. The method according to claim 1, wherein the step of generating the first moving image using the plurality of third images comprises:
setting the playing time interval information of each third image;
and storing the playing time interval information and the plurality of third images as a first dynamic image.
3. A method for generating dynamic images is characterized in that the method is applied to a mobile terminal, and the mobile terminal is provided with a first camera and a second camera; the method comprises the following steps:
when the mobile terminal enters a dynamic image shooting mode, controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images;
determining a first main body area and a first background area in the first image, and determining a second main body area and a second background area in the plurality of second images respectively;
superposing the image layer corresponding to the first background area with the image layer corresponding to the second main body area in each second image to generate a plurality of fourth images;
generating a second dynamic image by adopting the plurality of fourth images;
the step of determining a first main body area and a first background area in the first image, and determining a second main body area and a second background area in the plurality of second images respectively comprises:
calculating the depth of field of the first image and the second image;
determining a first main body area and a first background area of the first image, and a second main body area and a second background area of the second image according to the depth of field;
wherein, still include:
when the mobile terminal enters a dynamic image shooting mode, the first camera shoots a plurality of images;
taking any one of the plurality of images as a first image;
the number of the second images is set by a user according to the requirement;
further comprising:
when the number of shots of the first camera is the same as that of the shots of the second camera, the first camera and the second camera shoot simultaneously.
4. The method according to claim 3, wherein the step of generating a second dynamic image using the plurality of fourth images comprises:
setting the playing time interval information of each fourth image;
and storing the playing time interval information and the plurality of fourth images as a second dynamic image.
5. The device for generating the dynamic image is characterized in that the device is applied to a mobile terminal, and the mobile terminal is provided with a first camera and a second camera; the device comprises:
the first control module is used for controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images when the mobile terminal enters a dynamic image shooting mode;
a first region determining module, configured to determine a first main body region and a first background region in the first image, and determine a second main body region and a second background region in the plurality of second images, respectively;
the first generation module is used for superposing the image layer corresponding to the first main body area with the image layer corresponding to the second background area in each second image to generate a plurality of third images;
the second generation module is used for generating a first dynamic image by adopting the plurality of third images;
wherein the first region determining module comprises:
calculating the depth of field of the first image and the second image;
determining a first main body area and a first background area of the first image, and a second main body area and a second background area of the second image according to the depth of field;
wherein, still include:
the first shooting module is used for shooting a plurality of images by the first camera when the mobile terminal enters a dynamic image shooting mode;
a selection module configured to take any one of the plurality of images as a first image;
the number of the second images is set by a user according to the requirement;
further comprising:
when the number of shots of the first camera is the same as that of the shots of the second camera, the first camera and the second camera shoot simultaneously.
6. The apparatus of claim 5, wherein the second generating module comprises:
the first setting submodule is used for setting the playing time interval information of each third image;
and the first storage submodule is used for storing the playing time interval information and the third images into a first dynamic image.
7. The device for generating the dynamic image is characterized in that the device is applied to a mobile terminal, and the mobile terminal is provided with a first camera and a second camera; the device comprises:
the second control module is used for controlling the first camera to shoot a first image and controlling the second camera to shoot a plurality of second images when the mobile terminal enters a dynamic image shooting mode;
a second region module, configured to determine a first main body region and a first background region in the first image, and determine a second main body region and a second background region in the plurality of second images, respectively;
the third generation module is used for superposing the image layer corresponding to the first background area with the image layer corresponding to the second main body area in each second image to generate a plurality of fourth images;
a fourth generating module, configured to generate a second dynamic image by using the plurality of fourth images;
wherein the second region determination module comprises:
calculating the depth of field of the first image and the second image;
determining a first main body area and a first background area of the first image, and a second main body area and a second background area of the second image according to the depth of field;
wherein, still include:
the first shooting module is used for shooting a plurality of images by the first camera when the mobile terminal enters a dynamic image shooting mode;
a selection module configured to take any one of the plurality of images as a first image;
the number of the second images is set by a user according to the requirement;
further comprising:
when the number of shots of the first camera is the same as that of the shots of the second camera, the first camera and the second camera shoot simultaneously.
8. The apparatus of claim 7, wherein the third generating module comprises:
the second setting submodule is used for setting the playing time interval information of each fourth image;
and the second storage submodule is used for storing the playing time interval information and the plurality of fourth images as a second dynamic image.
CN201711241039.2A 2017-11-30 2017-11-30 Method and device for generating dynamic image Active CN108111748B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711241039.2A CN108111748B (en) 2017-11-30 2017-11-30 Method and device for generating dynamic image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711241039.2A CN108111748B (en) 2017-11-30 2017-11-30 Method and device for generating dynamic image

Publications (2)

Publication Number Publication Date
CN108111748A CN108111748A (en) 2018-06-01
CN108111748B true CN108111748B (en) 2021-01-08

Family

ID=62208169

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711241039.2A Active CN108111748B (en) 2017-11-30 2017-11-30 Method and device for generating dynamic image

Country Status (1)

Country Link
CN (1) CN108111748B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110012229B (en) * 2019-04-12 2021-01-08 维沃移动通信有限公司 Image processing method and terminal
CN111182211B (en) * 2019-12-31 2021-09-24 维沃移动通信有限公司 Shooting method, image processing method and electronic equipment
CN114584704A (en) * 2022-02-08 2022-06-03 维沃移动通信有限公司 Shooting method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105227837A (en) * 2015-09-24 2016-01-06 努比亚技术有限公司 A kind of image combining method and device
CN106791380A (en) * 2016-12-06 2017-05-31 周民 The image pickup method and device of a kind of vivid photograph
CN106993134A (en) * 2017-03-31 2017-07-28 努比亚技术有限公司 A kind of video generation device and method, terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6370146B2 (en) * 2014-07-28 2018-08-08 キヤノン株式会社 Image processing apparatus and control method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105227837A (en) * 2015-09-24 2016-01-06 努比亚技术有限公司 A kind of image combining method and device
CN106791380A (en) * 2016-12-06 2017-05-31 周民 The image pickup method and device of a kind of vivid photograph
CN106993134A (en) * 2017-03-31 2017-07-28 努比亚技术有限公司 A kind of video generation device and method, terminal

Also Published As

Publication number Publication date
CN108111748A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
RU2639651C2 (en) Image identification and organization according to model without user intervention
CN107944409B (en) Video analysis method and device capable of distinguishing key actions
CN103944963B (en) Method of data synchronization, device, equipment and system
CN106331504B (en) Shooting method and device
RU2628494C1 (en) Method and device for generating image filter
CN108174082B (en) Image shooting method and mobile terminal
CN104156149A (en) Method and device for adjusting photographing parameters
CN105739935A (en) Multi-terminal combined display method, apparatus and system
CN111464761A (en) Video processing method and device, electronic equipment and computer readable storage medium
CN108111748B (en) Method and device for generating dynamic image
CN105488145B (en) Display methods, device and the terminal of web page contents
CN106407365A (en) Picture sharing method and apparatus
CN103927165A (en) Wallpaper picture processing method and device
CN104092749A (en) Method and device for synchronizing photos
US20190295300A1 (en) Method and Apparatus for Generating Image by Using Multi-Sticker
CN113490010B (en) Interaction method, device and equipment based on live video and storage medium
CN106534649A (en) Composing method and device for double rotary cameras and mobile terminal
CN108986117B (en) Video image segmentation method and device
CN108156366A (en) A kind of image capturing method and mobile device based on dual camera
JP2017162371A (en) Image processing device, image processing method and program
CN108629814B (en) Camera adjusting method and device
EP3799415A2 (en) Method and device for processing videos, and medium
KR102031284B1 (en) Apparatas and method for composing a image of continuous shooting in an electronic device
CN116347060A (en) Camera performance evaluation method, device, readable storage medium and system
CN112825544A (en) Picture processing method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant