Summary of the invention
In order to solve the problem of prior art, the embodiment of the present invention provides a kind of method and apparatus of taking and storing photograph, to improve, carries out the efficiency that context information is obtained.Described technical scheme is as follows:
On the one hand, provide a kind of method of taking and storing photograph, described method comprises:
Start video capture;
In the process of described video capture, when receiving photograph shooting instruction, carry out photograph shooting; And when default trigger event occurs, finish described video capture;
Corresponding the storing of video by the photograph of shooting with shooting.
Preferably, described startup video capture, is specially:
When opening for finding a view during display window of taking, start video capture; Or,
When receiving pre-shooting instruction, start video capture.
Preferably, also comprise:
In the process of described video capture, obtain the duration of the video of shooting;
When the duration getting surpasses the first default duration, from video starting point, the duration of the video of current shooting is deleted to described the first duration.
Preferably, described default trigger event, is specially: the photograph of preset times is taken and is finished, or the photograph of preset times take be finished after through the second default duration.
Preferably, described corresponding the storing of video with shooting by the photograph of shooting, is specially:
When described video capture finishes, corresponding the storing of video by the photograph of shooting with shooting.
Preferably, described corresponding the storing of video with shooting by the photograph of shooting, is specially:
In the video of described shooting, obtain video-frequency band, wherein, the duration of described video-frequency band is the 3rd default duration, and the end point of the end point of the described video-frequency band video that is described shooting;
By the photograph of described shooting and corresponding the storing of described video-frequency band of obtaining.
Preferably, described corresponding the storing of video with shooting by the photograph of shooting, is specially:
The video of the photograph of described shooting and described shooting is encoded into a media file to be stored.
On the other hand, provide a kind of device of taking and storing photograph, described device comprises:
Start module, for starting video capture;
Taking module, for the process at described video capture, when receiving photograph shooting instruction, carries out photograph shooting; And when default trigger event occurs, finish described video capture;
Memory module, for corresponding the storing of video with shooting by the photograph of shooting.
Preferably, described startup module, specifically for:
When opening for finding a view during display window of taking, start video capture; Or,
When receiving pre-shooting instruction, start video capture.
Preferably, shown in taking module, also for:
In the process of described video capture, obtain the duration of the video of shooting;
When the duration getting surpasses the first default duration, from video starting point, the duration of the video of current shooting is deleted to described the first duration.
Preferably, described default trigger event, is specially: the photograph of preset times is taken and is finished, or the photograph of preset times take be finished after through the second default duration.
Preferably, described memory module, specifically for:
When described video capture finishes, corresponding the storing of video by the photograph of shooting with shooting.
Preferably, described memory module, specifically for:
In the video of described shooting, obtain video-frequency band, wherein, the duration of described video-frequency band is the 3rd default duration, and the end point of the end point of the described video-frequency band video that is described shooting;
By the photograph of described shooting and corresponding the storing of described video-frequency band of obtaining.
Preferably, described memory module, specifically for:
The video of the photograph of described shooting and described shooting is encoded into a media file to be stored.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
In the embodiment of the present invention, start video capture, and in the process of video capture, when receiving photograph shooting instruction, carry out photograph shooting, and when default trigger event occurs, finish video capture, then, corresponding the storing of video by the photograph of shooting with shooting, like this, in storage photograph, also corresponding storage the video of shooting during photograph, wherein comprised more context information more fully more comprehensively, thereby, can improve and carry out the efficiency that context information is obtained.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment mono-
The embodiment of the present invention provides a kind of method of taking and storing photograph, and as shown in Figure 1, the handling process of the method can comprise the following steps:
Step 101, starts video capture.
Step 102, in the process of video capture, when receiving photograph shooting instruction, carries out photograph shooting; And when default trigger event occurs, finish video capture.
Step 103, corresponding the storing of video by the photograph of shooting with shooting.
In the embodiment of the present invention, start video capture, and in the process of video capture, when receiving photograph shooting instruction, carry out photograph shooting, and when default trigger event occurs, finish video capture, then, corresponding the storing of video by the photograph of shooting with shooting, like this, in storage photograph, also corresponding storage the video of the sight of shooting during photograph, wherein comprised more more fully context information, thereby, can improve and carry out the efficiency that context information is obtained.
Embodiment bis-
The embodiment of the present invention provides a kind of method of taking and storing photograph, and the executive agent of the method can be the electronic equipment with the shoot function of photograph and video, as mobile phone, panel computer, digital camera etc.
Below in conjunction with concrete processing mode, the handling process shown in Fig. 1 is described in detail, particular content can be as follows.
Step 101, starts video capture.
In the embodiment of the present invention, first start before video capture (can be called pre-shooting) carrying out photograph shooting (taking pictures), the video data of shooting can be stored in certain spatial cache setting in advance constantly.
Concrete, can work as and open for finding a view during display window of taking, startup video capture.The display window of finding a view is the window that the image for camera lens is got shows, by learning from else's experience, display window can carry out preview to the image of taking.For example, while on mobile phone, opening the application program of " camera ", the display window of finding a view can be opened, startup video capture can be triggered at this moment.
Preferably, corresponding application program, the method providing for realizing the embodiment of the present invention can be installed in electronic equipment (as mobile phone).Can shoot function button be set in the homepage of this application program, after user clicks shoot function button, can open shoot function interface, in shoot function interface, can comprise the display window of finding a view, at this moment, can trigger startup video capture.
Concrete, also can work as while receiving pre-shooting instruction, start video capture.Under this processing mode, when display window is found a view in unlatching, can not start video capture, but trigger the pre-instruction of taking by user's operation, to start video capture.The pre-i.e. triggering command of capture video in advance before taking photograph of instruction of taking.
Preferably, above-mentioned, for realizing the application program of the method that the embodiment of the present invention provides, can in the shoot function interface of opening, arrange and start the pre-button of taking, after user clicks this button, trigger the pre-instruction of taking.
In the embodiment of the present invention, after starting video capture, can also comprise following processing: in the process of video capture, obtain the duration (this obtains operation and can carry out according to the default cycle) of the video of shooting; When the duration getting surpasses the first default duration, from video starting point, the duration of the video of current shooting is deleted to described the first duration.After starting video capture, the video data of shooting can be stored in certain spatial cache setting in advance constantly.In this case, if do not stop the process of this video capture, the video data of buffer memory can get more and more, and if at this time also do not carry out photograph shooting, the video data of storage does not have too large value yet too early.So, can be in the video data of storage, time data are early deleted processing, and keeping the duration of the video of buffer memory is the first duration.
Step 102, in the process of video capture, when receiving photograph shooting instruction, carries out photograph shooting; And when default trigger event occurs, finish video capture.
In the process of video capture, can only carry out a photograph and take, the video of taking and the photograph of shooting are corresponding, certainly, also can carry out repeatedly photograph and take, take multiple photographs, like this, the video of shooting is corresponding with these multiple photographs (one group of photograph).
Concrete, when receiving the process of carrying out photograph shooting when photograph is taken instruction, can be the general process of normally taking pictures, photograph be taken instruction and can be triggered by the operation of clicking shutter (or click the display window of finding a view, or be to click the shutter release button showing on screen).Certainly, photograph is taken instruction and also can be triggered by other mode, for example, triggers photograph and take instruction while reaching the scheduled time after starting video capture.
Concrete, the default trigger event in this step, can arrange arbitrarily according to demand.Preferably, this trigger event can be that the photograph of preset times is taken and to be finished, when N(preset times) sheet photo has been when taken, end video capture.For example, preset times can get 1, and user presses soon behind the door, take pictures complete in, video capture is also stopped.This trigger event can be also the photograph of preset times take be finished after through the second default duration, when N(preset times) after sheet photo taken, (the second duration of presetting) end video capture through after a period of time.This preset times can be 1.In addition, this trigger event can also be to receive to finish video capture instruction, this instruction can operate triggering by user, for example, can in the shoot function interface in above-mentioned application program, the button that finishes video capture be set, user clicks after this button, triggers and finishes video capture instruction, finishes video capture.
Step 103, corresponding the storing of video by the photograph of shooting with shooting.
Preferably, this step can be carried out when video capture finishes, when video capture finishes, and corresponding the storing of video by the photograph of shooting with shooting.Certainly, this step also can be triggered and be carried out by user's operation.
Concrete, by the mode of photograph and video corresponding stored, can be the video of the photograph of shooting and shooting to be encoded into a media file and to store.This media file can be the media file that can be decoded and be play by above-mentioned application program.By above-mentioned flow process, the media file of generation can be defined as same class media file.Certainly, can also to photograph and the video taken, store by another way, for example, photo files and video file can also be separate files, be stored in same catalogue, again for example, photo files and video file can be stored respectively, set up mapping table, in table, record the corresponding relation of photograph and video, when showing, can find the video that photograph is corresponding by this mapping table, carry out corresponding demonstration.
Concrete, during storing process in carry out this step, can corresponding the storing of video with shooting by whole photographs of taking, also can corresponding the storing of video with shooting by the part photograph of shooting.And, when carrying out this storing process, can corresponding the storing of complete video with shooting by the photograph of shooting, also can be by corresponding the storing of certain video-frequency band in the video of the photograph of shooting and shooting.
For above-mentioned by the situation of photograph and video-frequency band corresponding stored, concrete processing procedure can be: in the video of taking, obtain video-frequency band, wherein, the duration of this video-frequency band is the 3rd default duration, and the end point of the video for this reason taken of the end point of this video-frequency band; By the photograph of shooting and corresponding the storing of this video-frequency band of obtaining.In this processing mode, intercepting one section of the most close end point in the video of taking.Preferably, this processing mode can be applied to photograph and take more concentrated situation, or is applied to only take the situation of a sheet photo.
In the embodiment of the present invention, in the main interface of above-mentioned application program, function of browse button can be set, user clicks after this function of browse button, can open browser interface, at browser interface, comprises selection window and browses window, user can select photograph (or video) in selection window, after selection, can in browsing window, show the photograph selected and corresponding video, but also can show other photograph with the corresponding same video of this photograph.
In the embodiment of the present invention, start video capture, and in the process of video capture, when receiving photograph shooting instruction, carry out photograph shooting, and when default trigger event occurs, finish video capture, then, corresponding the storing of video by the photograph of shooting with shooting, like this, in storage photograph, also corresponding storage the video of the sight of shooting during photograph, wherein comprised more more fully context information, thereby, can improve and carry out the efficiency that context information is obtained.
Embodiment tri-
Below in conjunction with concrete application scenarios, the shooting that the embodiment of the present invention is provided the method for storing photograph are explained in detail, and concrete handling process can as shown in Figure 2, comprise the following steps:
Step 201, electronic equipment is opened the display window of finding a view for taking, and starts video capture.
Step 202, in the process of video capture, electronic equipment receives photograph and takes instruction, triggers and carries out photograph shooting.
Step 203, takes when complete when photograph, and electronic equipment finishes video capture, and corresponding the storing of video with shooting by the photograph of shooting.Visible, in the process of the present embodiment video capture, only take a sheet photo.
In the embodiment of the present invention, start video capture, and in the process of video capture, when receiving photograph shooting instruction, carry out photograph shooting, and when default trigger event occurs, finish video capture, then, corresponding the storing of video by the photograph of shooting with shooting, like this, in storage photograph, also corresponding storage the video of the sight of shooting during photograph, wherein comprised more more fully context information, thereby, can improve and carry out the efficiency that context information is obtained.
Embodiment tetra-
Below in conjunction with concrete application scenarios, the shooting that the embodiment of the present invention is provided the method for storing photograph are explained in detail, and concrete handling process can as shown in Figure 3, comprise the following steps:
Step 301, electronic equipment is opened the display window of finding a view for taking, and starts video capture.
Step 302, in the process of video capture, electronic equipment, when receiving photograph shooting instruction, carries out photograph shooting.Visible, in the process of the present embodiment video capture, can take one or more photograph.
Step 303, when receiving the instruction of end video capture, electronic equipment finishes video capture, and corresponding the storing of video with shooting by the photograph of shooting.
In the embodiment of the present invention, start video capture, and in the process of video capture, when receiving photograph shooting instruction, carry out photograph shooting, and when default trigger event occurs, finish video capture, then, corresponding the storing of video by the photograph of shooting with shooting, like this, in storage photograph, also corresponding storage the video of the sight of shooting during photograph, wherein comprised more more fully context information, thereby, can improve and carry out the efficiency that context information is obtained.
Embodiment five
Technical conceive based on identical, the embodiment of the present invention also provides a kind of device of taking and storing photograph, and as shown in Figure 4, described device comprises:
Start module 410, for starting video capture;
Taking module 420, for the process at described video capture, when receiving photograph shooting instruction, carries out photograph shooting; And when default trigger event occurs, finish described video capture;
Memory module 430, for corresponding the storing of video with shooting by the photograph of shooting.
Preferably, described startup module 410, specifically for:
When opening for finding a view during display window of taking, start video capture; Or,
When receiving pre-shooting instruction, start video capture.
Preferably, shown in taking module 420, also for:
In the process of described video capture, obtain the duration of the video of shooting;
When the duration getting surpasses the first default duration, from video starting point, the duration of the video of current shooting is deleted to described the first duration.
Preferably, described default trigger event, is specially: the photograph of preset times is taken and is finished, or the photograph of preset times take be finished after through the second default duration.
Preferably, described memory module 430, specifically for:
When described video capture finishes, corresponding the storing of video by the photograph of shooting with shooting.
Preferably, described memory module 430, specifically for:
In the video of described shooting, obtain video-frequency band, wherein, the duration of described video-frequency band is the 3rd default duration, and the end point of the end point of the described video-frequency band video that is described shooting;
By the photograph of described shooting and corresponding the storing of described video-frequency band of obtaining.
Preferably, described memory module 430, specifically for:
The video of the photograph of described shooting and described shooting is encoded into a media file to be stored.
In the embodiment of the present invention, start video capture, and in the process of video capture, when receiving photograph shooting instruction, carry out photograph shooting, and when default trigger event occurs, finish video capture, then, corresponding the storing of video by the photograph of shooting with shooting, like this, in storage photograph, also corresponding storage the video of the sight of shooting during photograph, wherein comprised more more fully context information, thereby, can improve and carry out the efficiency that context information is obtained.
It should be noted that: the shooting that above-described embodiment provides the device of storing photograph are when taking and storing the device of photograph, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and by different functional modules, completed as required, the internal structure that is about to device is divided into different functional modules, to complete all or part of function described above.In addition, the shooting that above-described embodiment provides the embodiment of the method for storing device and the shooting of photograph and storing photograph belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step that realizes above-described embodiment can complete by hardware, also can come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.