Abstract:
A method, system, and device for processing video shooting are described. The method includes: shooting a subject in a background sample, the background sample, and a target background respectively, to generate a first video recording the subject and the background sample, a second video recording the background sample, and a third video recording the target background respectively, the shooting time lengths of the first video and the second video being smaller than the shooting time length of the third video; and comparing the first video and the second video, extracting images of the subject from the first video, generating a subject image frame sequence with a transparent background, sequentially superimposing each subject image frame in the subject image frame sequence to the third video, and generating a video file recording the subject and the target background.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
       [0001]    This application is the U.S. national phase of PCT Application No. PCT/CN2015/073507 filed Mar. 2, 2015, which claims priority to Chinese Application No. 201410587144.1 filed Oct. 28, 2014, the disclosures of which are incorporated in their entirety by reference herein. 
     
    
     TECHNICAL FIELD 
       [0002]    The present disclosure relates to the field of video shooting technologies, and in particularly, to a method, system and apparatus for processing video shooting. 
       BACKGROUND 
       [0003]    Shooting of a mobile phone is a very important function. Taking pictures and videos with the mobile phone is very frequent during the daily use of the current mobile phone. A user who takes pictures and videos with the mobile phone is not satisfied with ordinary results. Various special effects of photography of the mobile phone can enhance the appeal of photography and suit sharing and communication between users. At present, beautifying photography effects for the mobile phone has becoming a trend in development, and the speed of its development has exceeded that of card cameras. 
         [0004]    A main principle of a motion video, i.e., shooting a formerly slowly changing object into an object that changes faster, is to lengthen the time between sample video frames (e.g., by 1 frame per second) during shooting and play the video at a normal frame rate (e.g., 30 frames per second) during playing. For example, a playback effect of the shot cloud movement in the sky is to form cloud changing fast in the sky. As another example, a fast changing sunset and a fast moving nebula can be formed. Such effects can give people a feeling of great momentum. 
         [0005]    However, it has been found in the process of shooting a motion video that it is very difficult to shoot portraits using the motion video. This is because that the duration of shooting the motion video is longer, typically several minutes or even several hours are taken for shooting, but if a user is asked to hold in front of a camera by a photographer for several minutes or several hours to shoot the motion video, it is hard for the user to endure, greatly affecting the user&#39;s fun of shooting the motion video. 
         [0006]    Therefore, there is a need for an appropriate solution to deal with the problem of portrait shooting in motion videos. 
       SUMMARY 
       [0007]    A technique problem to be solved by embodiments of the present disclosure is to provide a method, system and apparatus for processing motion video shooting so as to shorten the time for a subject to appear in front of a camera during long motion video shooting, thereby improving user experience. 
         [0008]    In order to solve the technique problem described above, an embodiment of the present disclosure provides a method for processing video shooting including: 
         [0009]    shooting a subject in a background sample, the background sample and a target background respectively, generating a first video recording the subject and the background sample, a second video recording the background sample and a third video recording the target background respectively, herein shooting durations of the first video and the second video are less than a shooting duration of the third video; and 
         [0010]    comparing the first video with the second video, extracting a subject image from the first video to generate a subject image frame sequence of which a background is transparent, and superimposing in turn each frame subject image in the subject image frame sequence onto the third video to generate a video file recording the subject and the target background. 
         [0011]    In an exemplary embodiment, shooting a subject in a background sample, the background sample and a target background respectively, generating a first video recording the subject and the background sample, a second video recording the background sample and a third video recording the target background respectively includes: 
         [0012]    shooting the subject in the background sample at a first shooting sample rate after an instruction for shooting the subject is received, and generating the first video after an instruction for stopping the shooting is received; 
         [0013]    shooting the background sample at the first shooting sample rate after an instruction for shooting the background sample is received, and generating the second video after an instruction for stopping the shooting is received; and 
         [0014]    shooting the target background at a second shooting sample rate after an instruction for shooting the target background is received, and generating the third video after an instruction for stopping the shooting is received, 
         [0015]    herein the first shooting sample rate is greater than the second shooting sample rate. 
         [0016]    In an exemplary embodiment, comparing the first video with the second video, extracting a subject image from the first video to generate a subject image frame sequence of which a background is transparent includes: 
         [0017]    extracting a frame image from the second video as a background sample image; and 
         [0018]    comparing each frame image in the first video with the background sample image, removing the background sample image from each frame image in the first video and only retaining the subject image to generate a subject image frame sequence of which the background is transparent, except for the subject. 
         [0019]    In an exemplary embodiment, inserting in turn each frame subject image in the subject image frame sequence onto the third video includes: 
         [0020]    inserting each frame subject image in the subject image frame sequence into a bit stream of the third video, and if the bit stream of the third video has not reached a last frame, then using circularly the subject image frame sequence for image superposition. 
         [0021]    In an exemplary embodiment, the video file recording the subject and the target background is played circularly by a player. 
         [0022]    An embodiment of the present disclosure further provides a system for processing video shooting including: 
         [0023]    a shooting module configured to shoot a subject in a background sample, the background sample and a target background respectively, generate a first video recording the subject and the background sample, a second video recording the background sample and a third video recording the target background respectively, herein shooting durations of the first video and the second video are less than a shooting duration of the third video; and 
         [0024]    a video processing module configured to compare the first video with the second video, extract a subject image from the first video to generate a subject image frame sequence of which a background is transparent, and superimpose in turn each frame subject image in the subject image frame sequence onto the third video to generate a video file recording the subject and the target background. 
         [0025]    In an exemplary embodiment, the shooting module is configured to: 
         [0026]    shoot the subject in the background sample at a first shooting sample rate after an instruction for shooting the subject is received, and generate the first video after an instruction for stopping the shooting is received; 
         [0027]    shoot the background sample at the first shooting sample rate after an instruction for shooting the background sample is received, and generate the second video after an instruction for stopping the shooting is received; and 
         [0028]    shoot the target background at a second shooting sample rate after an instruction for shooting the target background is received, and generate the third video after an instruction for stopping the shooting is received, 
         [0029]    herein the first shooting sample rate is greater than the second shooting sample rate. 
         [0030]    In an exemplary embodiment, the video processing module is configured to compare the first video with the second video and extract a subject image from the first video to generate a subject image frame sequence of which the background is transparent by: 
         [0031]    extracting a frame image from the second video as a background sample image; and 
         [0032]    comparing each frame image in the first video with the background sample image, removing the background sample image from each frame image in the first video and only retaining the subject image to generate a subject image frame sequence of which the background is transparent, except for the subject. 
         [0033]    In an exemplary embodiment, the video processing module is configured to insert in turn each frame subject image in the subject image frame sequence onto the third video by: 
         [0034]    inserting each frame subject image in the subject image frame sequence into a bit stream of the third video, and if the bit stream of the third video has not reached a last frame, then using circularly the subject image frame sequence for image superposition. 
         [0035]    In an exemplary embodiment, the video file recording the subject and the target background is played circularly by a player. 
         [0036]    An embodiment of the present disclosure provides an apparatus for shooting a video including a camera and a processor, herein the camera is configured to, under control of the processor, shoot a subject in a background sample, the background sample and a target background respectively, generate a first video recording the subject and the background sample, a second video recording the background sample and a third video recording the target background respectively, herein shooting duration of the first video and the second video are less than a shooting duration of the third video; and 
         [0037]    the processor is configured to control the camera to shoot, compare the first video with the second video, extract a subject image from the first video to generate a subject image frame sequence of which a background is transparent, and superimpose in turn each frame subject image in the subject image frame sequence onto the third video to generate a video file recording the subject and the target background. 
         [0038]    In an exemplary embodiment, the camera is configured to: 
         [0039]    shoot the subject in the background sample at a first shooting sample rate after an instruction for shooting the subject is received, and generate the first video after an instruction for stopping the shooting is received; 
         [0040]    shoot the background sample at the first shooting sample rate after an instruction for shooting the background sample is received, and generate the second video after an instruction for stopping the shooting is received; and 
         [0041]    shoot the target background at a second shooting sample rate after an instruction for shooting the target background is received, and generate the third video after an instruction for stopping the shooting is received, 
         [0042]    herein the first shooting sample rate is greater than the second shooting sample rate. 
         [0043]    In an exemplary embodiment, the processor is configured to compare the first video with the second video and extract a subject image from the first video to generate a subject image frame sequence of which the background is transparent by: 
         [0044]    extracting a frame image from the second video as a background sample image; and 
         [0045]    comparing each frame image in the first video with the background sample image, removing the background sample image from each frame image in the first video and only retaining the subject image to generate a subject image frame sequence of which the background is transparent, except for the subject. 
         [0046]    In an exemplary embodiment, the processor is configured to insert in turn each frame subject image in the subject image frame sequence onto the third video by: 
         [0047]    inserting each frame subject image in the subject image frame sequence into a bit stream of the third video, and if the bit stream of the third video has not reached a last frame, then using circularly the subject image frame sequence for image superposition. 
         [0048]    In an exemplary embodiment, the apparatus further includes: 
         [0049]    a display screen, herein the processor is further configured to control the video file recording the subject and the target background to be played circularly on the display screen. 
         [0050]    An embodiment of the present disclosure further provides a computer readable storage medium, storing program instructions, when the program instructions are executed, the method described above is performed. 
         [0051]    Compared with the existing technology, the method and system provided by the embodiments of the present disclosure can process a short video of a subject into a subject image frame sequence of which a background is transparent by shooting the short video of the subject, a short video of a background sample and a long video of a target background respectively, and superimpose the subject image frame sequence of which the background is transparent onto the long video of the target background to generate a motion video file of the subject in the target background, so as to shorten the time for the subject to appear in front of a camera during long motion video shooting, thereby improving user experience. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0052]      FIG. 1  is a flow chart of a method for processing video shooting in according to an embodiment of the present disclosure; 
           [0053]      FIG. 2  is a schematic diagram of a system for processing video shooting in according to an embodiment of the present disclosure; 
           [0054]      FIG. 3  is a schematic diagram of an apparatus for shoot a video in according to an embodiment of the present disclosure; and 
           [0055]      FIG. 4  is a flow chart of a method for processing motion video shooting in according to an application example of the present disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0056]    Embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. It should be noted that the embodiments of the present application and features in the embodiments can be combined with each other arbitrarily without conflict. 
         [0057]    As shown in  FIG. 1 , an embodiment of the present disclosure provides a method for processing video shooting including steps S 10 -S 20 . 
         [0058]    In step S 10 : shoot a subject in a background sample, the background sample and a target background respectively, generate a first video recording the subject and the background sample, a second video recording the background sample and a third video recording the target background respectively; and 
         [0059]    In step S 20 : compare the first video with the second video, and extract a subject image from the first video to generate a subject image frame sequence of which a background is transparent, and superimpose in turn each frame subject image in the subject image frame sequence onto the third video to generate a video file recording the subject and the target background. 
         [0060]    Herein, the subject in the background sample and the background sample may be shot in a short time and the target background may be shot at a low speed in a long time. 
         [0061]    The method further includes the following characteristics. 
         [0062]    Herein, Shoot the subject in the background sample, the background sample and the target background respectively, generate the first video recording the subject and the background sample, the second video recording the background sample and the third video recording the target background respectively in following way. 
         [0063]    Shoot the subject in the background sample at a first shooting sample rate after an instruction for shooting the subject is received, and generate the first video after an instruction for stopping the shooting is received. 
         [0064]    Shoot the background sample at the first shooting sample rate after an instruction for shooting the background sample is received, and generate the second video after an instruction for stopping the shooting is received. 
         [0065]    Shoot the target background at a second shooting sample rate after an instruction for shooting the target background is received, and generate the third video after an instruction for stopping the shooting is received. 
         [0066]    Herein the first shooting sample rate is greater than the second shooting sample rate. 
         [0067]    Compare the first video with the second video and extract the subject image from the first video to generate the subject image frame sequence of which the background is transparent includes following way. 
         [0068]    Extract an frame image from the second video as a background sample image. 
         [0069]    Compare each frame image in the first video with the background sample image, remove the background sample image from each frame image in the first video and retaining only the subject image to generate the subject image frame sequence of which the background is transparent, except for the subject. 
         [0070]    Herein the subject image frame sequence includes one or more frame subject images. 
         [0071]    Superimpose in turn each subject frame image in the subject image frame sequence onto the third video in following way. 
         [0072]    insert each frame subject image in the subject image frame sequence into a bit stream of the third video, and if the bit stream of the third video has not reached the last frame, then use circularly the subject image frame sequence for image superposition. 
         [0073]    The motion video file recording the subject and the target background is played circularly by a player. 
         [0074]    As shown in  FIG. 2 , an embodiment of the present disclosure further provides a system for processing video shooting including a shooting module and a video processing module. 
         [0075]    The shooting module is configured to shoot a subject in a background sample, the background sample and a target background respectively, generate a first video recording the subject and the background sample, a second video recording the background sample and a third video recording the target background respectively, herein shooting durations of the first video and the second video are less than a shooting duration of the third video. 
         [0076]    The video processing module is configured to compare the first video with the second video, extract a subject image from the first video to generate a subject image frame sequence of which a background is transparent, and superimpose in turn each subject frame image in the subject image frame sequence onto the third video to generate a video file recording the subject and the target background. 
         [0077]    The shooting module is configured to shoot the subject in the background sample at a first shooting sample rate after an instruction for shooting the object is received, and generate the first video after an instruction for stopping the shooting is received, shoot the background sample at the first shooting sample rate after an instruction for shooting the background sample is received, and generate the second video after an instruction for stopping the shooting is received, and shoot the target background at a second shooting sample rate after an instruction for shooting the target background is received, and generate the third video after an instruction for stopping the shooting is received. 
         [0078]    Herein the first shooting sample rate is greater than the second shooting sample rate. 
         [0079]    The video processing module is configured to compare the first video with the second video and extract the subject image from the first video to generate the subject image frame sequence of which the background is transparent in following way. 
         [0080]    The video processing module extracts a frame image from the second video as a background sample image, compares each frame image in the first video with the background sample image, removes the background sample image from each frame image in the first video and retains only the subject image to generate the subject image frame sequence of which the background is transparent, except for the subject. 
         [0081]    The video processing module is configured to superimpose in turn each subject frame image in the subject image frame sequence onto the third video in following way. 
         [0082]    The video processing module insert each frame subject image in the subject image frame sequence into a bit stream of the third video, and if the bit stream of the third video has not reached the last frame yet, then use circularly the subject image frame sequence for image superposition. 
         [0083]    The motion video file recording the subject and the target background is played circularly by a player. 
         [0084]    As shown in  FIG. 3 , an embodiment of the present disclosure provides an apparatus for shooting a video including a camera and a processor. Herein the camera is configured to, under control of the processor, shoot a subject in a background sample, the background sample and a target background respectively, generate a first video recording the subject and the background sample, a second video recording the background sample and a third video recording the target background respectively. Herein shooting durations of the first video and the second video are less than a shooting duration of the third video. 
         [0085]    The processor is configured to control the camera to shoot, compare the first video with the second video, extract a subject image from the first video to generate a subject image frame sequence of which a background is transparent, and superimpose in turn each subject frame image in the subject image frame sequence onto the third video to generate a video file recording the subject and the target background. 
         [0086]    The camera is configured to shoot the subject in the background sample at a first shooting sample rate after an instruction for shooting the object is received, and generate the first video after an instruction for stopping the shooting is received, shoot the background sample at the first shooting sample rate after an instruction for shooting the background sample is received, and generate the second video after an instruction for stopping the shooting is received, and shoot the target background at a second shooting sample rate after an instruction for shooting the target background is received, and generate the third video after an instruction for stopping the shooting is received, 
         [0087]    Herein the first shooting sample rate is greater than the second shooting sample rate. 
         [0088]    The processor is configured to compare the first video with the second video and extract the subject image from the first video to generate the subject image frame sequence of which the background is transparent in following way. 
         [0089]    The processor extracts a frame image from the second video as a background sample image, compares each frame image in the first video with the background sample image, removes the background sample image from each frame image in the first video and retains only the subject image to generate the subject image frame sequence of which the background is transparent, except for the subject. 
         [0090]    The processor is configured to insert in turn each subject frame image in the subject image frame sequence onto the third video in following way. 
         [0091]    The processor inserts each frame subject image in the subject image frame sequence into a bit stream of the third video, and if the bit stream of the third video has not reached the last frame yet, then uses circularly the subject image frame sequence for image superposition. 
         [0092]    The apparatus further includes a display screen, herein the processor is further configured to control the video file recording the subject and the target background to be played circularly on the display screen. 
       Application Example 
       [0093]    As shown in  FIG. 4 , a process of shooting a portrait motion video by a mobile phone is provided which includes the following steps. 
         [0094]    In step S 101 : preset shooting parameters and wait for a user to start motion video shooting. 
         [0095]    The shooting parameters may include one or more of the following parameters: a low speed shooting sample rate of shooting a target background, a shooting duration of a portrait in a background sample and a shooting duration of the target background. 
         [0096]    In step S 102 : detect that the user starts the motion video shooting. 
         [0097]    In step S 103 : detect an instruction for shooting the portrait to shoot a portrait video clip, and stop the shooting of the portrait after an instruction for stopping the shooting is received, or stop the shooting of the portrait when the preset shooting duration is reached, to generate a short portrait video. 
         [0098]    For example, a person in a viewing frame is shot at a normal shooting sample rate (e.g., 30 frames per second) in succession for 3 seconds. That is, when the user is detected to press a stop button or the preset shooting duration (e.g., 3 seconds) is reached, the shooting of the portrait is stopped and the portrait video clip is generated. Prompt information of completion of the shooting of the portrait may be further displayed to the user after the completion of the shooting. 
         [0099]    The background sample in the viewing frame may be the same as or different from the target background. 
         [0100]    In step S 104 : detect an instruction for shooting the background sample to shoot a background sample video clip, and stop the shooting of the background sample after an instruction for stopping the shooting is received, or stop the shooting of the background sample when the preset shooting duration is reached, generate a short background sample video. 
         [0101]    For example, the background sample in a viewing frame is shot at a normal shooting sample rate (e.g., 30 frames per second) in succession for 1 second. That is, when the user is detected to press a stop button or the preset shooting duration (e.g., 1 second) is reached, the shooting of the background sample is stopped and the background sample video clip is generated. Prompt information of completion of the shooting of the background sample may be further displayed to the user after the completion of the shooting. 
         [0102]    In step S 105 : detect an instruction for shooting the target background to shoot the target background at a low speed, and stop the shooting of the target background after an instruction for stopping the shooting is received, or stop the shooting of the target background when the preset shooting duration is reached, generate a target background video. 
         [0103]    For example, the target background is shot at a low speed shooting sample rate (e.g., 1 frame per second) lower than a normal shooting sample rate in succession for 3 minutes (180 seconds). That is, when the user is detected to press a stop button or the preset shooting duration (e.g., 3 minutes) is reached, the shooting of the target background is stopped and a long target background video is generated. Prompt information of completion of the shooting of the target background may be further displayed to the user after the completion of the shooting. 
         [0104]    Herein, the low speed shooting refers to 1 frame per 0.2-60 seconds, and 1 frame per 1-5 seconds is frequently used. 
         [0105]    In step S 106 : compare the short portrait video with the short background sample video to generate a subject image frame sequence of which the background is transparent, except for the shot subject (portrait). 
         [0106]    In step S 107 : sample the target background video to obtain a sequence of frames and superimpose in turn the portrait frame sequence of which the background is transparent onto the target background sampling frame to generate the superimposed motion video file of the portrait. 
         [0107]    In step S 108 : play the motion video file at a normal playing speed (e.g., 30 frames per second). 
         [0108]    A player may play the motion video file circularly. 
         [0109]    Herein, the sample of the target background is set to 1 frame per second, so 180 target background frames may be shot in 3 minutes. Therefore, 180 target background frames are contained in a bit stream of the motion video superimposed with the portrait. When the played frame frequency of the player is 30 frames per second, 180 frames can be played in 6 seconds. That is, the playing of a video of 3 minutes (180 seconds) will be completed in 6 seconds, so the time is accelerated by a factor of 30, thereby implementing a special effect of fast movement of the portrait and the target background (e.g., clouds, sun or ships). 
         [0110]    In the case that the technique scheme of the present disclosure is not used, the shot subject (e.g., person) has to hold for 3 minutes in front of a camera, which can not be accepted by most of users. Therefore, using the motion video shooting scheme described above can greatly decrease the time for the shot subject (e.g., person) to appear in front of the camera to implement the special effect of causing a slowly moving object to move fast, bring a new surprise experience to the camera of the mobile phone. 
         [0111]    The method and system for processing motion video shooting provided by the embodiments of the present disclosure can process a short video of a subject into a subject image frame sequence of which a background is transparent by shooting the short video of the subject, a short video of a background sample and a long video of a target background respectively, and superimpose the subject image frame sequence of which the background is transparent onto the long video of the target background to generate a motion video file of the subject in the target background, so as to shorten the time for the subject to appear in front of a camera during long motion video shooting, thereby improving user experience. 
         [0112]    Those skilled in the art may understand that all or part of steps in the embodiment described above can be carried out using computer program flows. The computer program may be stored in a computer readable medium and executed on a corresponding hardware platform (such as system, device, apparatus, appliance, etc.). When the computer program is executed, one of the steps or a combination thereof in the method embodiment may be executed. 
         [0113]    In an exemplary embodiment, all or part of the steps in the embodiment described above may also be implemented using integrated circuits. These steps may be fabricated into separated integrated circuit modules respectively, or a plurality of modules or steps of them may be fabricated into a single integrated circuit module. 
         [0114]    Various apparatus/functional modules/functional units in the embodiment described above may be implemented using general-purpose computing apparatuses, or they may be centralized on a single computing apparatus or may be distributed in a network composed of a plurality of computing apparatuses. 
         [0115]    When various apparatus/functional modules/functional units in the embodiment described above are implemented in a form of software function module or sold or used as independent products, they can be stored in a computer readable storage medium. The computer readable storage medium mentioned above may be a read only memory, a magnetic disk or optical disk. 
       INDUSTRIAL APPLICABILITY 
       [0116]    The embodiments of the present disclosure can shorten the time for a subject to appear in front of a camera during long motion video shooting, thereby improving user experience.