Electronic equipment, motion track photo synthesis method and device thereof and embedded deviceTechnical Field
The invention relates to the technical field of video image processing, in particular to electronic equipment, a motion track photo synthesis method and device thereof and an embedded device.
Background
With the improvement of science and technology and the improvement of living standard, people pursue entertainment more and more, and sharing of own interesting photos on a social network gradually becomes daily. Therefore, the requirement of people on photographing is higher and higher, various special effect pictures are diversified, and a motion trail picture is a cool and dazzling picture and brings a novel visual effect to people. The motion track picture specifically refers to shooting a small section of video, and synthesizing a motion target in a video picture into a picture to form a track when a main body target moves. The actual operation mode of motion trajectory synthesis is to shoot a section of video by using a camera at a fixed position, move a main object in the picture to a certain degree in the shooting process, select a key frame image and extract a motion object from the shot video, and then automatically synthesize the motion object to generate a motion trajectory picture with motion sense.
In the prior art, a plurality of pictures are often obtained by continuously photographing at preset equal time intervals, and then the plurality of pictures are combined into one picture through a related algorithm; or acquiring a section of shot video, decoding the shot video, and selecting a plurality of frame images as key frames to synthesize a picture. In the prior art, no matter a continuous shooting mode or a video shooting mode is adopted to synthesize a motion trail picture, the motion trail picture can be synthesized after the complete picture to be spliced or the video is obtained, the process needs to separately occupy the shooting time of the video or the picture, and then the shot video or the picture is screened and synthesized by occupying special time.
Therefore, how to reduce the waiting time of motion trajectory picture synthesis becomes an urgent technical problem to be solved.
Disclosure of Invention
The present invention provides an electronic device, a motion trajectory picture synthesis method, a motion trajectory picture synthesis device, and an embedded device thereof, aiming at the above-mentioned defects in the prior art, and overcomes the defect of motion trajectory picture synthesis efficiency in the prior art.
Therefore, according to a first aspect, an embodiment of the present invention discloses a motion trajectory picture synthesis method, including:
screening a collected source image frame set to obtain a reference frame image in the video image collecting process, wherein a source image is an image collected by an image collecting device and before being coded to form a video file; screening a plurality of key frame images from an acquired source image frame set in the video image acquisition process, wherein each key frame image in the plurality of key frame images at least comprises a moving target image; and synthesizing the moving target images of the key frame images to the reference frame image to obtain a moving track picture of the moving target.
According to a second aspect, the embodiment of the invention discloses a motion trajectory photo synthesis method, which comprises the following steps:
acquiring a trigger event for starting a synthetic track photo; performing video recording operation on a moving target in the camera view in response to a trigger event; synthesizing a plurality of images obtained by shooting in the video shooting process to obtain a motion track picture of a motion target; the plurality of images are images before being coded to form a video file, and each frame image at least comprises a moving object image.
According to a third aspect, an embodiment of the present invention discloses a motion trajectory photo synthesis apparatus, including:
the reference frame screening module is used for screening a collected source image frame in a centralized manner to obtain a reference frame image in the video image collecting process, and the source image is the image collected by the image collecting device and before the encoded video file is formed; the key frame screening module is used for screening a plurality of key frame images from the collected source image frame set in the video image collecting process, and each key frame image in the plurality of key frame images at least comprises a moving target image; and the motion synthesis module is used for synthesizing the motion target images of the key frame images into the reference frame image to obtain a motion track picture of the motion target.
According to a fourth aspect, the present invention provides an embedded device comprising a processor for executing a computer program stored in a memory to implement the method of any of the first or second aspects described above.
According to a fifth aspect, an embodiment of the present invention provides an electronic device, including:
the video image collector is used for collecting external video image data; a controller for implementing the method of any one of the first or second aspects above.
According to a sixth aspect, embodiments of the present invention provide a computer-readable storage medium having stored thereon a computer program, the computer program stored in the storage medium being for being executed to implement the method of any one of the first or second aspects described above.
According to a seventh aspect, an embodiment of the present invention provides a server, on which a data resource is stored, the data resource being configured to execute a method implementing any one of the first or second aspects.
According to an eighth aspect, an embodiment of the present invention provides a data resource service platform, including:
the request acquisition module is used for acquiring a resource request sent by a user terminal; a resource issuing module, configured to provide a data resource or an index of the data resource to the user terminal according to the resource request, where the data resource is configured to perform a method for implementing any one of the first and second aspects.
The invention has the beneficial effects that:
the embodiment of the invention discloses an electronic device and a motion track photo synthesis method and a motion track photo synthesis device thereof.A reference frame image and a plurality of key frame images are obtained by screening collected source image frames in a centralized manner in the video image collection process, wherein a source image is an image collected by an image collection device and is coded to form a video file, and each key frame image at least comprises a motion target image; and then, synthesizing the moving target images of the key frame images to the reference frame image to obtain a moving track picture of the moving target. Compared with the prior art, the method needs to decode the shot video and select a plurality of frame images as the key frames to synthesize a picture, the scheme provided by the embodiment of the invention can synthesize the moving targets of the key frames in the shooting process to obtain the moving track picture, and the operation of synthesizing the moving track picture is crossed in the video image acquisition link, so that the waiting time of synthesis is shortened, the special time is saved for screening and synthesizing, and the overall synthesis efficiency of the moving track picture is improved. In addition, a reference frame image and a key frame image are obtained by screening the collected source image frame set, and the synthesis efficiency is further improved by the process of decoding the coded images.
As an optional technical scheme, the data format of the source image is a YUV format, so that the processes of encoding YUV data into a video file, reading the video file, decoding and selecting frames, decoding again to obtain key frames are omitted, and the time length for synthesizing the motion track photos is reduced.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flow chart of a method for synthesizing a motion trajectory picture according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for synthesizing a key frame image into a reference frame image according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another key frame image synthesized into a reference frame image according to an embodiment of the present invention;
FIG. 4 is a flow chart of another method for synthesizing a motion trail picture according to the embodiment of the present invention;
FIG. 5 is a flowchart of a method for synthesizing a motion trajectory picture according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a motion trajectory picture synthesis apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data resource service platform according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Referring to fig. 1, a flowchart of a motion trajectory picture synthesis method disclosed in this embodiment is shown, where the motion trajectory picture synthesis method includes:
step S101, screening the collected source image frames to obtain a reference frame image in the video image collecting process. In this embodiment, the source image is an image that is acquired by the image acquisition device and is encoded before forming a video file. Generally, in the field of video image processing, source image data is usually acquired by a camera, and the image adopts a source data format (such as YUV format) based on pixel point original information storage; then, the source data format stored based on the original information of the pixel points is encoded and compressed to form a video file (for example, MP4 format) for storage. In this embodiment, the reference frame image is an image used for synthesizing the moving object image. In a particular embodiment, a frame of video image frame may be selected as a reference frame image at a previous stage in the video image capture process. Specifically, the reference frame image may be a video image with higher definition, and the reference frame image may be obtained by screening through a preset frame selection algorithm in the video image acquisition process. It should be noted that, in the implementation process, the specific position of the reference frame image in the video image time domain is not limited. It should be noted that, in this embodiment, the number of image frames in the source image frame set is not limited, and the number of image frames in the source image frame set gradually increases with the acquisition of the camera.
Step S102, a plurality of key frame images are obtained by screening the collected source image frame set in the video image collecting process. In this embodiment, each of the plurality of key frame images at least includes a moving target image, and the target image in each key frame image is synthesized to a target position specified in the reference frame image. In this embodiment, the moving object may be a human being, an animal, or other moving objects. The moving targets can move along the same direction or along different directions; the moving object can be in uniform motion or non-uniform motion. In a preferred embodiment, several frame key frame images lag behind the reference frame image in time sequence. In general, the last key frame image of several key frames in time sequence may be before or after the last frame of the video image. In this embodiment, the key frame image may be a video image with higher definition, and the key frame image may be obtained by screening through a preset frame selection algorithm in the video image acquisition process. It should be noted that, in the implementation process, the specific positions of these key frame images in the video image time domain are not limited.
In an embodiment, the number of the key frame images may be preset empirically, or may be received through an input/output device. The specific number of key frame images is not limited in this embodiment.
In an alternative embodiment, in the step S102, the screening the plurality of key frame images in the video image capturing process includes: and sequentially screening in time sequence to obtain a plurality of key frame images. Namely, a plurality of key frame images are sequentially obtained by screening according to the time sequence in the video images obtained by shooting.
It should be noted that in other embodiments, the reference frame image may also be one of several key frame images, and usually, the first frame of these key frame images may be selected as the reference frame image.
Step S103, synthesizing the moving target images of the key frame images into the reference frame image to obtain a moving track picture of the moving target. In a specific embodiment, in the video image acquisition process, the moving target images in the plurality of key frame images may be sequentially synthesized into the reference frame image frame by frame, or the moving target images in the plurality of key frame images may be synthesized into the reference frame image at preset intervals.
It should be noted that, as a specific example, when a last key frame image in the plurality of key frame images is a last key frame image in the video image, the moving target image of the last key frame image may be synthesized into the reference frame image after the video image is completely captured. In this embodiment, the video image acquisition completion refers to the completion of the acquisition of the last frame of video image in the process of shooting the video image, and the preparation of encoding each video image.
In order to quickly perform the synthesis processing on the selected key frame image and the reference frame image, in an alternative embodiment, when step S101 and step S102 are performed, the data format of the acquired reference frame image and key frame image may be YUV format, that is: the data format of the reference frame image is YUV format, and the data format of each key frame image in the plurality of key frame images is YUV format. Generally speaking, in the process of shooting a video image, acquired image data is in a YUV format, and after the video image acquisition is completed, each acquired frame image is encoded to obtain an output video. In the embodiment, when the video image is shot, the reference frame image and the key frame image are obtained by screening from the image data in the YUV format, and then the subsequent synthesis processing is performed on the reference frame image and the key frame image in the YUV format, so that the process of encoding, decoding and frame selection of the video image can be omitted, the time for synthesizing the motion track picture is shortened, and the synthesis efficiency of the motion track picture is improved.
In an embodiment, please refer to fig. 2, which is a flowchart of a method for synthesizing a key frame image into a reference frame image disclosed in this embodiment, and when step S103 is executed, synthesizing a moving object image of each key frame image into the reference frame image to obtain a moving track picture of a moving object includes:
step S201, determining a target position in the reference frame image according to the to-be-synthesized moving target image in the specified key frame image. In a specific embodiment, when video images of a moving object are taken, generally speaking, the background part between different frame video images is relatively fixed, the relative position of the moving object is changed, and the background part and the foreground part in each frame video image can be determined by using an existing algorithm. In this embodiment, the moving target image is a foreground portion, and therefore, for a specified key frame image, a foreground portion and a background portion in the specified key frame image can be determined, so that in a specific implementation process, a coordinate region of the foreground portion of the specified key frame image can be obtained, and the coordinate region is mapped to a reference image, so that a target position for representing a position of the moving target image to be synthesized in the reference image can be determined. It should be noted that, in some embodiments, because the same video collector is used to collect the video image, the size of the outline of each key frame is the same as the size of the outline of the reference frame, and therefore, the coordinate system of each key frame may coincide with the coordinate system of the reference frame, that is, the coordinates corresponding to the coordinate area of the foreground portion of the specified key frame image may be directly used as the target position in the reference image.
In step S202, the moving object image in the designated key frame image is extracted. In a specific embodiment, after determining the background portion and the foreground portion of the specified key frame, pixels of the foreground portion may be directly extracted to obtain a moving target image in the specified key frame image. In some embodiments, the background portion of the specified key frame may also be subtracted to obtain the foreground portion of the specified key frame.
It should be noted that, in this embodiment, the execution sequence between step S201 and step S202 is not limited.
In step S203, the extracted moving target image is synthesized to the target position. In this embodiment, after the moving target video is extracted, the moving target video of the specified key frame may be synthesized to the target position corresponding to the specified key frame in the reference frame image. In some embodiments, after the target position in the reference frame image is determined, binarization processing may be performed on pixels of the target position, and then the moving target image of the key frame may be synthesized to the target position.
In this embodiment, after the key frame images of each frame are operated according to the above steps S201, S202, and S203, the moving target images of each key frame can be synthesized to the respective corresponding target positions, and then the synthesis of the moving target images of each key frame image in the key frame images of several frames to the reference frame image is completed to obtain the moving track picture of the moving target.
In an alternative embodiment, after performing step S203, the method may further include: and denoising the moving target image synthesized to the target position. Specifically, the denoising process may include performing a certain degree of erosion and/or expansion on the target image to filter the target image noise and make the contour of the moving target clearer, and of course, the target image may also be subjected to a gaussian smoothing process to make the pixel value of the target image more uniform. Of course, in other alternative embodiments, other denoising processing methods may be used to filter noise from the moving object image.
In order to reduce the image shaking effect caused by shaking in the video image capturing process, in an alternative embodiment, before performing step S103, the method may further include: correcting the key frame image based on the reference image to obtain a corrected key frame image; synthesizing the moving target images of the key frame images into the reference frame image to obtain a moving track picture of the moving target, wherein the moving track picture comprises the following steps: and synthesizing the motion target image of the corrected key frame image into a reference frame image to obtain a motion track picture of the motion target.
In an alternative embodiment, please refer to fig. 1, after step S103 is executed, the method may further include: and displaying the motion track picture of the moving object in a visual mode.
In another embodiment, please refer to fig. 3, which is a flowchart of a method for synthesizing a key frame image into a reference frame image disclosed in this embodiment, and when step S103 is executed, synthesizing a moving object image of each key frame image into the reference frame image to obtain a moving track picture of a moving object includes:
in step S301, a moving target image in each key frame image is extracted. In this embodiment, after each key frame is determined, a moving target image in each key frame image may be extracted. For a specific extraction manner, please refer to the description of step S202, which is not described herein again.
In step S302, each moving target image is synthesized to each preset target position in the reference frame image. In this embodiment, the target position of the target image to be synthesized in the reference frame image may be determined in advance, and when the target image needs to be synthesized, each preset target position is directly extracted. Specifically, the preset target position may be randomly generated by the system, may also be determined according to the selection of the user, and may also be fixedly set with a plurality of preset target positions. It should be noted that, when the preset target position is determined according to the selection of the user, the target position may be located through touch time, or may be determined through reading coordinates.
In the specific implementation process, each moving target image is synthesized to each preset target position in the reference frame image:
each moving target image may be synthesized to each preset target position in the reference frame image according to the time sequence of each key frame image, that is, after a key frame is determined, the target images in the determined key frame may be sequentially synthesized to the preset target positions;
or, each moving target image may be synthesized to each preset target position in the reference frame image according to a preset rule. In this embodiment, the preset rule may be a random function, a bilateral symmetry rule, a top-bottom symmetry rule, or a combination of any rules, and for example, after determining each moving target image, the target images may be synthesized in a bilateral symmetry manner according to the preset target position, for example, the ith moving target image is placed on the leftmost side of the preset target position, and the (i + 1) th moving target image is placed on the rightmost side of the preset target position; the (i + 2) th moving target image is placed on the second leftmost side of the preset target position. In this embodiment, each moving target image is synthesized to each preset target position in the reference frame image according to a preset rule, so that the interestingness of the synthesized image can be provided.
In an alternative embodiment, the sequentially screening the plurality of key frame images in time sequence includes: in the video image acquisition process, a current frame key frame image is obtained by screening from an acquired source image frame set. In step S103, synthesizing the moving object image of each key frame image into the reference frame image to obtain a motion trajectory picture of the moving object includes: and synthesizing the moving target image of the current frame key frame image to the reference frame image to obtain a current moving track picture of the moving target. Specifically, please refer to fig. 4, which is a flowchart of another motion trajectory photo synthesis method disclosed in this embodiment, the motion trajectory photo synthesis method includes:
step S401, a reference frame image is obtained through screening in the video image acquisition process. Specifically, reference may be made to the description of step S101 in the above embodiment, which is not described herein again.
Step S402, screening the collected source image frame set to obtain the current frame key frame image in the video image collecting process. In this embodiment, the key frame image at least includes a moving target image, and the target image in the current key frame image is synthesized to a specified position in the reference frame image. In this embodiment, the moving object may be a human being, an animal, or other moving objects. The moving targets can move along the same direction or along different directions; the moving object can be in uniform motion or non-uniform motion. In a particular embodiment, the current frame key frame image lags the reference frame image in time sequence. In a specific embodiment, the key frame image may be a video image with higher definition, and the current frame key frame image may be obtained by screening through a frame selection algorithm from a plurality of consecutive frame video images.
In other embodiments, the first frame key frame image may be used as the reference frame image.
In step S403, the moving object image of the current frame key frame image is synthesized into the reference frame image to obtain the current moving track picture of the moving object. In a specific embodiment, after the current frame key frame image is obtained by screening, the moving target image in the current frame key frame image may be synthesized to the reference frame image to obtain the current motion trajectory picture of the moving target. In this embodiment, the current motion trajectory picture of the moving object is a picture obtained by synthesizing the moving object images in the current frame and the key frame image before the current frame into the reference frame image. It should be noted that, when the current frame key frame image is the last frame image in the video image, the moving target image of the current frame key frame image may be synthesized into the reference frame image after the video image is completely captured. In this embodiment, the video image acquisition completion refers to the completion of the acquisition of the last frame of video image in the process of shooting the video image, and the preparation of encoding each video image.
It should be noted that, when the above steps are performed, the image may also be corrected and denoised, which is not described herein again.
In an alternative embodiment, after performing step S403, the method may further include:
and S404, screening the collected source image frame set to obtain a next frame key frame image of the current frame key frame image. After the synthesis of the moving target image of the current frame key frame image is completed, a next frame key frame image can be obtained by screening from the video image lagging behind the current frame image in time sequence, and the specific screening mode can refer to step S402, which is not described herein again; then, the next frame key frame image is used as the current frame key frame image, and the step S403 is executed again, that is: and synthesizing the moving target image of the current frame key frame image into the reference frame image to obtain the current moving track picture of the moving target.
In an optional embodiment, referring to fig. 4, the method for synthesizing a motion trajectory photo disclosed in this embodiment may further include:
step S405, acquiring a target key frame number used for representing the number of key frame images of the motion trail photo to be synthesized. In a specific embodiment, the number of key frame images may be preset empirically; the user-set number may also be received through an input/output device. As an example of an application scenario, the number of target key frames may be preset, for example, the number of selectable target key frames may be m1, m2, m3 … …, where m1, m2, m3 … … are positive integers greater than or equal to 2, and the number of acquired target key frames is determined to be m1, m2, m3, and the like according to a trigger event of a user, where it should be noted that the specific number of selectable options is not limited in this embodiment. As another example of the application scenario, the target key frame number may be obtained according to a value input by the user on a physical key and/or a value input by the user on a touch device. It should be noted that the specific number of key frame images is not limited in this embodiment.
Before performing step S404, the method may further include:
in step S406, it is determined whether the number of frames of the key frame image synthesized to the reference frame image reaches the target key frame number. In a specific implementation process, after each frame of key frame image is synthesized, the number of key frame images that have been synthesized can be counted, and thus, it can be determined whether the number of frames of key frame images synthesized to the reference frame image reaches the target number of key frames. In a specific embodiment, step S406 may be performed between step S402 and step S403, or may be performed after step S403. If the number of frames of the key frame images synthesized to the reference frame image does not reach the target key frame number, step S404 is performed, and if the number of frames of the key frame images synthesized to the reference frame image reaches the target key frame number, the screening of the next frame key frame image may be stopped.
In an alternative embodiment, please refer to fig. 4, after step S403 is executed, the method may further include:
step S407, a picture of the motion trajectory of the moving object is displayed in a visualized manner. In the implementation process, after determining that the number of frames of the key frame images synthesized into the reference frame image reaches the target key frame number in step S406, the motion trail picture of the moving object may be visually displayed. In some embodiments, when the number of frames of the key frame image does not reach the target key frame number, it may not be necessary to display the motion trail picture of the moving object in a visual manner.
In an alternative embodiment, after the key frame screening is completed, the moving target images of the key frames are synthesized to the reference frame image to obtain a moving track picture of the moving target. Specifically, the method comprises the following steps:
the method for sequentially screening a plurality of key frame images in time sequence comprises the following steps: screening a plurality of key frame images from an acquired source image frame set in the video image acquisition process, wherein the key frame images lag behind a reference frame image in time sequence, and at least comprise moving target images;
synthesizing the moving target images of the key frame images into the reference frame image to obtain a moving track picture of the moving target, wherein the moving track picture comprises the following steps: and after the number of the key frames obtained by screening reaches a preset frame number, synthesizing the moving target images of the key frame images to the reference frame image to obtain a moving track picture of the moving target.
The present embodiment also discloses a motion trajectory picture synthesis method, please refer to fig. 5, which is a flowchart of the motion trajectory picture synthesis method disclosed in the present embodiment, and the motion trajectory picture synthesis method includes:
step S501, a trigger event for starting the synthetic track photo is acquired. In a specific embodiment, the trigger event may be obtained by a touch manner, or may be obtained by a physical key.
And step S502, responding to the trigger event to carry out video recording operation on the moving target in the camera view field.
And S503, synthesizing a plurality of images obtained by shooting in the video shooting process to obtain a motion track photo of the motion target. In this embodiment, the plurality of images are images before being encoded to form the video file, and each frame of image at least includes a moving object image.
To better present the recorded video and motion track photographs, in an alternative embodiment, video recording a moving object within the field of view of the camera in response to a triggering event comprises: displaying the video data obtained by shooting in a first display area in a visual mode; the method for synthesizing a plurality of images at least containing moving target images in the video recording process comprises the following steps: and successively presenting the motion trail photos in a visual mode in the second display area. In this embodiment, the first display area and the second display area may be located on the same display screen, or may be displayed on different display screens. In a specific embodiment, when the second display area sequentially presents the motion trail picture in a visual manner, the synthesized motion trail picture can be displayed every time one frame is synthesized.
The present embodiment further discloses a motion trajectory picture synthesis apparatus, please refer to fig. 6, which is a schematic structural diagram of the motion trajectory picture synthesis apparatus disclosed in the present embodiment, and the motion trajectory picture synthesis apparatus includes: a reference frame filter module 601, a key frame filter module 602, and a motion synthesis module 603, wherein:
the reference frame screening module 601 is used for screening a collected source image frame set to obtain a reference frame image in the video image collecting process, and the source image is an image which is collected by the image collecting device and is coded to form a video file; the key frame screening module 602 is configured to screen a plurality of key frame images from a collected source image frame set in a video image collection process, where each key frame image in the plurality of key frame images at least includes a moving target image; the motion synthesis module 603 is configured to synthesize the motion target image of each key frame image into the reference frame image to obtain a motion trajectory picture of the motion target.
In addition, the embodiment also discloses an embedded device, which includes a processor, and the processor is used for executing the computer program stored in the memory to implement the following method:
screening a collected source image frame set to obtain a reference frame image in the video image collecting process, wherein a source image is an image collected by an image collecting device and before being coded to form a video file; screening a plurality of key frame images from an acquired source image frame set in the video image acquisition process, wherein each key frame image in the plurality of key frame images at least comprises a moving target image; and synthesizing the moving target images of the key frame images to the reference frame image to obtain a moving track picture of the moving target.
In an alternative embodiment, the source image data format is YUV, CMYK, BMP or RGB format.
In an alternative embodiment, synthesizing the moving object image of each key frame image into the reference frame image to obtain the motion trail picture of the moving object includes: determining a target position in a reference frame image according to a to-be-synthesized moving target image in a specified key frame image; extracting a moving target image in the appointed key frame image; and synthesizing the extracted moving target image to a target position.
In an alternative embodiment, synthesizing the moving object image of each key frame image into the reference frame image to obtain the motion trail picture of the moving object includes: extracting a moving target image in each key frame image; and synthesizing each moving target image to each preset target position in the reference frame image.
In an alternative embodiment, the synthesizing each moving target image to each preset target position in the reference frame image includes: synthesizing each moving target image to each preset target position in the reference frame image according to the time sequence of each key frame image; or, synthesizing each moving target image to each preset target position in the reference frame image according to a preset rule.
In an alternative embodiment, the filtering the acquired source image frame set to obtain a plurality of key frame images in the video image acquisition process includes: and sequentially screening in time sequence to obtain a plurality of key frame images.
In an alternative embodiment, the sequentially screening the plurality of key frame images in time sequence includes: screening a current frame key frame image from an acquired source image frame set in the video image acquisition process, wherein the key frame image lags behind a reference frame image in time sequence, and the key frame image at least comprises a moving target image; synthesizing the moving target images of the key frame images into the reference frame image to obtain a moving track picture of the moving target, wherein the moving track picture comprises the following steps: and synthesizing the moving target image of the current frame key frame image to the reference frame image to obtain a current moving track picture of the moving target.
In an optional embodiment, after synthesizing the moving object image of the current frame key frame image to the reference frame image to obtain the current moving track picture of the moving object, the method further includes: screening the collected source image frame set to obtain a next frame key frame image of the current frame key frame image; and taking the next frame of key frame image as the current frame of key frame image, and executing the operation of synthesizing the moving target image of the current frame of key frame image to the reference frame image to obtain the current moving track picture of the moving target.
In an optional embodiment, the method further comprises: acquiring a target key frame number used for representing the number of key frame images of a motion trail photo to be synthesized; before the next frame key frame image of the current frame key frame image is obtained by screening from the collected source image frame set, the method further comprises the following steps: judging whether the frame number of the key frame image synthesized to the reference frame image reaches the target key frame number; and if the frame number of the key frame image synthesized to the reference frame image does not reach the target key frame number, screening to obtain the next key frame image of the current frame key frame image.
In an alternative embodiment, the sequentially screening the plurality of key frame images in time sequence includes: screening a plurality of key frame images from an acquired source image frame set in the video image acquisition process, wherein the key frame images lag behind a reference frame image in time sequence, and at least comprise moving target images; synthesizing the moving target images of the key frame images into the reference frame image to obtain a moving track picture of the moving target, wherein the moving track picture comprises the following steps: and after the number of the key frames obtained by screening reaches a preset frame number, synthesizing the moving target images of the key frame images to the reference frame image to obtain a moving track picture of the moving target.
In addition, the embodiment also discloses another embedded device, which includes a processor, and the processor is used for executing the computer program stored in the memory to implement the following method:
acquiring a trigger event for starting a synthetic track photo; performing video recording operation on a moving target in the camera view in response to a trigger event; synthesizing a plurality of images obtained by shooting in the video shooting process to obtain a motion track picture of a motion target; the plurality of images are images before being coded to form a video file, and each frame image at least comprises a moving object image.
In an alternative embodiment, video recording of moving objects within a camera field of view in response to a triggering event includes: displaying the video data obtained by shooting in a first display area in a visual mode; the method for synthesizing a plurality of images at least containing moving target images in the video recording process comprises the following steps: and successively presenting the motion trail photos in a visual mode in the second display area.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. The computer processor is used to execute a computer program stored in a storage medium to implement the following method:
screening a collected source image frame set to obtain a reference frame image in the video image collecting process, wherein a source image is an image collected by an image collecting device and before being coded to form a video file; screening a plurality of key frame images from an acquired source image frame set in the video image acquisition process, wherein each key frame image in the plurality of key frame images at least comprises a moving target image; and synthesizing the moving target images of the key frame images to the reference frame image to obtain a moving track picture of the moving target.
In an alternative embodiment, the source image data format is YUV, CMYK, BMP or RGB format.
In an alternative embodiment, synthesizing the moving object image of each key frame image into the reference frame image to obtain the motion trail picture of the moving object includes: determining a target position in a reference frame image according to a to-be-synthesized moving target image in a specified key frame image; extracting a moving target image in the appointed key frame image; and synthesizing the extracted moving target image to a target position.
In an alternative embodiment, synthesizing the moving object image of each key frame image into the reference frame image to obtain the motion trail picture of the moving object includes: extracting a moving target image in each key frame image; and synthesizing each moving target image to each preset target position in the reference frame image.
In an alternative embodiment, the synthesizing each moving target image to each preset target position in the reference frame image includes: synthesizing each moving target image to each preset target position in the reference frame image according to the time sequence of each key frame image; or, synthesizing each moving target image to each preset target position in the reference frame image according to a preset rule.
In an alternative embodiment, the filtering the acquired source image frame set to obtain a plurality of key frame images in the video image acquisition process includes: and sequentially screening in time sequence to obtain a plurality of key frame images.
In an alternative embodiment, the sequentially screening the plurality of key frame images in time sequence includes: screening a current frame key frame image from an acquired source image frame set in the video image acquisition process, wherein the key frame image lags behind a reference frame image in time sequence, and the key frame image at least comprises a moving target image; synthesizing the moving target images of the key frame images into the reference frame image to obtain a moving track picture of the moving target, wherein the moving track picture comprises the following steps: and synthesizing the moving target image of the current frame key frame image to the reference frame image to obtain a current moving track picture of the moving target.
In an optional embodiment, after synthesizing the moving object image of the current frame key frame image to the reference frame image to obtain the current moving track picture of the moving object, the method further includes: screening the collected source image frame set to obtain a next frame key frame image of the current frame key frame image; and taking the next frame of key frame image as the current frame of key frame image, and executing the operation of synthesizing the moving target image of the current frame of key frame image to the reference frame image to obtain the current moving track picture of the moving target.
In an optional embodiment, the method further comprises: acquiring a target key frame number used for representing the number of key frame images of a motion trail photo to be synthesized; before the next frame key frame image of the current frame key frame image is obtained by screening from the collected source image frame set, the method further comprises the following steps: judging whether the frame number of the key frame image synthesized to the reference frame image reaches the target key frame number; and if the frame number of the key frame image synthesized to the reference frame image does not reach the target key frame number, screening to obtain the next key frame image of the current frame key frame image.
In an alternative embodiment, the sequentially screening the plurality of key frame images in time sequence includes: screening a plurality of key frame images from an acquired source image frame set in the video image acquisition process, wherein the key frame images lag behind a reference frame image in time sequence, and at least comprise moving target images; synthesizing the moving target images of the key frame images into the reference frame image to obtain a moving track picture of the moving target, wherein the moving track picture comprises the following steps: and after the number of the key frames obtained by screening reaches a preset frame number, synthesizing the moving target images of the key frame images to the reference frame image to obtain a moving track picture of the moving target.
The embodiment also discloses an electronic device having an image processing capability and an image capturing capability, specifically, the electronic device includes: the video image collector is used for collecting external video image data; and the controller is used for realizing the motion trail photo synthesis method disclosed by each embodiment. In a specific embodiment, the electronic device may be any one of a mobile terminal (e.g., a mobile phone, a tablet computer, a game console, etc.), an electronic book reader, a camera, a video camera, etc., and may also be a computer with a camera function. In a specific embodiment, the video image collector and the controller can be connected in a wired manner or in a wireless manner.
In this embodiment, the server may be a dedicated storage server, or may be a server with a storage function of another computer. In a specific embodiment, the server stores data resources, and the data resources are configured to implement the motion trajectory photo synthesis method disclosed in each of the above embodiments.
The embodiment also discloses a data resource service platform, which is used for providing data resources for a third party. Please refer to fig. 7, which is a schematic structural diagram of a data resource service platform disclosed in this embodiment, the data resource service platform includes: a request obtaining module 701, a resource storing module 702 and a resource issuing module 703, wherein:
the request obtaining module 701 is configured to obtain a resource request sent by a user equipment. In this embodiment, the user terminal may be a mobile terminal such as a mobile phone, a PDA, a tablet, or other devices with data processing capability, and specifically, the user terminal may be capable of loading and operating data resources provided by the data resource service platform. In this embodiment, the request obtaining module 701 may obtain, through network connection, a resource request sent by a user terminal. In a specific embodiment, data interaction can be performed between the user terminal and the data resource service platform through a wired network or a wireless network; the data interaction channel between the user terminal and the data resource service platform can be a dedicated channel, and can also be data interaction by means of a third-party communication tool. In a specific embodiment, the request obtaining module 701 may present the data resource for selection to the user terminal, or may present the data resource through the user terminal when performing the keyword search.
The resource storage module 702 is configured to store data resources or indexes of the data resources, where the data resources are configured to implement the motion trajectory picture synthesis method disclosed in the foregoing embodiments. In this embodiment, the data resource or the index of the data resource may be stored in the cloud of the platform (server or server of a third party); the index of the data resource refers to a network link for pointing to a download address of the data resource. It should be noted that, in a specific implementation process, the resource storage module 702 may be provided by a memory of the data resource service platform, and may also be implemented by a third-party memory.
The resource issuing module 703 is configured to provide data resources or indexes of the data resources to the user terminal according to the resource request. It should be noted that, when providing the data resource or the index of the data resource, the resource issuing module 703 may determine the software version according to an operating system of the user terminal (e.g., Android, iOS, Windows, etc.), specifically, the operating system adapted to the user terminal may be identified by the request obtaining module 701, or the operating system adapted to the user terminal may be determined by the selection of the user.
It should be noted that, in some embodiments, when the third-party communication tool itself has a resource request entry through which the user terminal initiates a resource request and the third-party communication tool provides the data resource or the index of the data resource to the user terminal, the third-party communication tool should be regarded as a data resource service platform.
In the electronic equipment and the motion track photo synthesis method and device thereof disclosed by the embodiment, a reference frame image and a plurality of key frame images are obtained by screening from a collected source image frame set in the video image collection process, wherein a source image is an image collected by an image collection device and before a video file is formed by coding, and each key frame image at least comprises a motion target image; and then, synthesizing the moving target images of the key frame images to the reference frame image to obtain a moving track picture of the moving target. Compared with the prior art, the method needs to decode the shot video and select a plurality of frame images as the key frames to synthesize a picture, the scheme provided by the embodiment of the invention can synthesize the moving targets of the key frames in the shooting process to obtain the moving track picture, and the operation of synthesizing the moving track picture is crossed in the video image acquisition link, so that the waiting time of synthesis is shortened, the special time is saved for screening and synthesizing, and the overall synthesis efficiency of the moving track picture is improved. In addition, a reference frame image and a key frame image are obtained by screening the collected source image frame set, and the synthesis efficiency is further improved by the process of decoding the coded images.
It should be understood that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same, and those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some technical features; and all such modifications and alterations are intended to fall within the scope of the appended claims.