WO2017080241A1 - 延时摄影方法和装置 - Google Patents

延时摄影方法和装置 Download PDF

Info

Publication number
WO2017080241A1
WO2017080241A1 PCT/CN2016/089041 CN2016089041W WO2017080241A1 WO 2017080241 A1 WO2017080241 A1 WO 2017080241A1 CN 2016089041 W CN2016089041 W CN 2016089041W WO 2017080241 A1 WO2017080241 A1 WO 2017080241A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
time
frame image
frame
recording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/089041
Other languages
English (en)
French (fr)
Inventor
王文峰
张乃雷
姜天宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
Lemobile Information Technology (Beijing) Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
Lemobile Information Technology (Beijing) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Le Holdings Beijing Co Ltd, Lemobile Information Technology (Beijing) Co Ltd filed Critical Le Holdings Beijing Co Ltd
Publication of WO2017080241A1 publication Critical patent/WO2017080241A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/915Television signal processing therefor for field- or frame-skip recording or reproducing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/82Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only
    • H04N9/8205Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal

Definitions

  • the embodiments of the present invention relate to the field of image processing technologies, and in particular, to a time-lapse photography method and apparatus.
  • time-lapse photography uses fixed-time recording, and video frames are taken at a fixed ratio during recording, and then the framed images are played in time series to form a fixed-length video.
  • video frames are taken at a fixed ratio during recording, and then the framed images are played in time series to form a fixed-length video.
  • the corresponding 1/4, 1/8, 1/16 should be used in the recording process.
  • the frame is scaled to perform video frame drawing, and then the framed image is played in time series to form a video of the corresponding playing duration.
  • the time-lapse photography method and device provided by the embodiments of the present application can generate a video with a specified playing time after recording a video of any length of time, and is not limited to the limitation of the recording duration.
  • the embodiment of the present application provides a time-lapse photography method, including: recording a video, and forming a time sequence of a corresponding frame image of the video; The total playing time of the video reaches n times the predetermined playing time, then the first frame image time sequence and the second frame image time sequence formed as the current recording are combined, and one frame is extracted every n frames in time sequence to form a new one.
  • the first image time series is recorded; and, when the video is recorded after this time, the video is recorded at a 1/n original framed recording ratio to form a new time sequence of the second frame image, where n is greater than 0 An integer; responsive to the triggering operation of stopping the recording of the video, merging the currently formed first image time series and the second frame image time series into a play video.
  • the embodiment of the present application further provides a time-lapse photography device, including: a video recording module, configured to record a video, and form a time sequence of a corresponding frame image of the video; and a first image processing module, configured to total the video as of the current recording When the playing time reaches n times the predetermined playing time, the first frame image time sequence and the second frame image time sequence formed as the current recording are combined, and one frame is extracted every n frames in chronological order to form a new first image.
  • a second image processing module configured to record a video at a recording ratio of 1/n of the original framed frame when the total playback time of the currently recorded video reaches n times the predetermined playback time, to form a new video
  • the second frame image time series wherein the n is any integer greater than 0;
  • the play video forming module is configured to: in response to the triggering operation of stopping the recording of the video, the currently formed first image time series and the The second frame image time series are combined in time series to form a play video.
  • an embodiment of the present application provides a time-lapse photography apparatus, including a memory, one or more processors, and one or more programs, wherein the one or more programs are processed by the one or more
  • the following operations are performed: recording the video and forming a corresponding time frame sequence of the video; as the total playing time of the currently recorded video reaches n times the predetermined playing time, the time series of the first frame image formed up to the current recording is The second frame image time series is merged, and one frame is extracted every n frames in chronological order to form a new time sequence of the second frame image; and, when the video is recorded after this time, the original framed recording ratio is 1/n.
  • embodiments of the present application provide a computer readable storage medium having stored thereon computer executable instructions that, in response to execution, cause a time delay photography device to perform an operation,
  • the operation includes: recording a video and forming a time sequence of the corresponding frame image of the video; as the total playing time of the currently recorded video reaches n times the predetermined playing time, the first frame image time sequence and the second frame image formed up to the current recording are formed.
  • the time series is merged, and one frame is extracted every n frames in chronological order to form a new time sequence of the second frame image; and, when the video is recorded after this time, the video is recorded at a ratio of 1/n original framed recording, forming a video.
  • the first image time sequence and the second frame image currently formed are formed in response to a triggering operation of stopping recording of the video
  • the time series are combined in chronological order to form a play video.
  • the time-lapse photography method and device divides the time sequence of the frame image formed by the recorded video into two parts, which are respectively the first frame image time sequence that has been recorded and stored and the second frame image time sequence currently being recorded.
  • the two frame image time series are combined, and the frame is stored and formed to form a new first frame image time sequence, and at the same time, Recording video at a 1/n original framed recording ratio when recording a video at a time to form a new second frame image time sequence; thereby, the stored frame image time series and the frame image time sequence being recorded are the same
  • the framed recording is more cyclic than the video formed.
  • the first frame image time series and the second frame image time series are combined in time series to form a play video.
  • the play time of the play video is specified between the predetermined play time and n times the predetermined play time.
  • FIG. 1 is a flowchart of an embodiment of a time-lapse photography method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a sample image processing logic according to an embodiment of the present application.
  • FIG. 3 is a second schematic diagram of a frame image processing logic according to an embodiment of the present application.
  • FIG. 4 is a structural block diagram of an embodiment of a time delay photography apparatus according to an embodiment of the present application.
  • FIG. 5 is a structural block diagram of another embodiment of a time delay photography apparatus according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of still another embodiment of a time delay photography apparatus according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an embodiment of a computer program product for time-lapse photography according to an embodiment of the present application.
  • the frame time processing is performed on the time sequence of the frame image that has been recorded and stored, and the time sequence of the frame image being recorded, and the recording ratio of the corresponding frame is continuously increased as the recording time is extended to ensure the final recording.
  • the playback time of the video is in the specified playback time range.
  • FIG. 1 is a flowchart of an embodiment of a time-lapse photography method according to an embodiment of the present disclosure.
  • the execution body of the method may be a terminal such as a mobile phone or an ipad configured with a camera function, or a device or a chip integrated on the terminals.
  • the time-lapse photography method includes the following steps:
  • Existing terminals such as mobile phones and ipads have integrated photography functions to record video.
  • the video recorded by these terminals is mainly processed, and the type of the terminal and the specific technology used for recording the video are not limited.
  • the frame images of the corresponding video are obtained, and the frame images are sorted in the time sequence of recording, that is, a time series about the frame image is obtained.
  • the first frame image time sequence and the second frame image time sequence formed by the current recording are combined, and one time is extracted every n frames in chronological order.
  • the frame forms a new second frame image time series.
  • the content of S130 may be executed after this time.
  • S130 Record a video at a 1/n original frame-recording ratio when recording a video after this time to form a new first frame image time sequence.
  • n is any integer greater than 0.
  • the following takes the frame image processing logic shown in FIG. 2 as an example, and specifically describes steps S120 and S130. As shown in Figure 2, suppose you want to record a video with a playback time of about 1 minute. Then, the predetermined playback time is 1 minute, and the n value is 2, and the following processing is performed.
  • a new file is created to store the original frame image recorded next, and when every eight frames are acquired, seven frames are lost, and one frame is stored, that is, 1/8 frame-to-frame recording ratio ( 1/2 last framed recording ratio) is saved.
  • the frame image time series of the previous two files (the stored second frame image time series and the first frame image time sequence just recorded, that is, the frame image recorded in 0-8 minutes)
  • a frame is again taken every two frames and stored as a new file, forming a new second frame image time series.
  • the video being recorded at this time is stored in an 8x speed mode, and the previously stored file becomes a new file at 8x speed.
  • the first frame image time sequence and the second frame image time sequence which have been formed so far are combined in time sequence to form a complete playing video, and the video is formed.
  • the playing time is set to 1-2 minutes.
  • the partial frame image in the time series of the frame image corresponding to the playback video is formed to form a third frame image time sequence; the playback time of the playback video formed by the third frame image time series is a predetermined playback time.
  • the played video formed by the third frame image time series is the final formed play video.
  • the manner of extracting the original frame image corresponding to the played video when forming the third frame image time series is not limited.
  • a partial frame image in the time series of the original frame image may be uniformly extracted.
  • the ratio m of the video playing time corresponding to the currently formed playing video to the initially scheduled playing time may be calculated first; then, the time series of the frame image corresponding to the playing video is extracted by one frame per m frame in time sequence to form a third Frame image time series.
  • a video of a frame time series of 1 minute and 40 seconds has been stored (where the time frame of the first frame image is 40 seconds and the time sequence of the second frame image is 1 minute), then one is made. If the final video playback time is one minute, then the corresponding m value is 5/3, and 3 frames can be extracted every 5 frames (the middle 2 frames are lost) for storage, so that the final frame image time series corresponds.
  • the video playback time is approximately equal to 1 minute.
  • the time-lapse photography method provided by the embodiment of the present invention performs frame extraction processing by synchronizing the time sequence of the frame image that has been recorded and recorded and the time sequence of the frame image being recorded, and the proportion of corresponding framed recording increases with the extension of the recording time. Large to ensure that the final recorded video playback time is within the specified playback time range.
  • the frame image time series is subjected to frame drawing processing, and finally the video playing time corresponding to the frame image time series after the frame drawing process is controlled at a predetermined playing time.
  • the interval of the frame-taking and the duration of the final recording are usually set, and the duration of the final recording is not actually necessary, but due to the capacity problem of the memory, generally The recording duration is set.
  • the playback time of the final video is always fixed, so there is no need to worry about the memory overflow during recording.
  • FIG. 4 a structural block diagram of an embodiment of a time-lapse photography apparatus provided by an embodiment of the present application may be used to perform the method steps shown in FIG. 1, including:
  • the video recording module 410 is configured to record a video and form a time sequence of the corresponding frame image of the video.
  • the first image processing module 420 is configured to play the total video as of the current recorded video. When the time reaches n times the predetermined playing time, the first frame image time sequence and the second frame image time sequence formed as the current recording are combined, and one frame is extracted every n frames in chronological order to form a new second frame image time series.
  • the second image processing module 430 is configured to: when the total playing time of the currently recorded video reaches n times the predetermined playing time, the video is recorded at a ratio of 1/n original framed recording when the video is recorded at the moment, forming a new a frame image time series, the n being any integer greater than 0; the play video forming module 440, configured to time the first frame image time sequence and the second frame image that are currently formed in response to the triggering operation of stopping the recording of the video The time series are combined in chronological order to form a play video.
  • the time-lapse photography apparatus may further include: an image extraction module 450, configured to extract a partial frame image in a time series of a frame image corresponding to the playback video to form a third frame image time sequence;
  • the playing time of the played video formed by the third frame image time series is the predetermined playing time.
  • the image extraction module 450 may include: a ratio calculation unit 451, configured to calculate a ratio m of a video playback time corresponding to the playback video and the predetermined playback time; and an image extraction unit 452 configured to: use the frame image corresponding to the playback video The time series extracts one frame per m frame in chronological order to form a third frame image time series.
  • n value may be 2.
  • the time-lapse photography apparatus performs frame-drawing processing by synchronizing the time sequence of the frame image that has been recorded and stored and the time series of the frame image being recorded, and the recording ratio of the corresponding frame is increasing as the recording time is extended. Large to ensure that the final recorded video playback time is within the specified playback time range.
  • the frame image time series is subjected to frame drawing processing, and finally the video playing time corresponding to the frame image time series after the frame drawing process is controlled at a predetermined playing time.
  • FIG. 6 is a schematic structural diagram of still another embodiment of a time-lapse photography apparatus according to an embodiment of the present application.
  • the time-lapse photography apparatus of the embodiment of the present application includes a memory 61, one or more processors 62, and one or more programs 63.
  • the one or more programs 63 when executed by one or more processors 62, perform any of the above-described embodiments.
  • the time-lapse photography device provided by the embodiment of the present application divides the time sequence of the frame image formed by the recorded video into two parts, which are respectively the first frame image time sequence that has been recorded and stored and the second frame image time sequence currently being recorded; After the combined playback time of the corresponding recorded video reaches n times the predetermined playing time, the two frame image time series are combined, and the frame is stored and formed to form a new first frame image time sequence, and at the same time, after this time When recording a video, the video is recorded at a 1/n original framed recording ratio to form a new second frame image time sequence; thus, the stored frame image time series and the frame image time sequence being recorded are the same.
  • the frame recording ratio forms a video and cycles accordingly. Finally, after the end of the recording, the first frame image time series and the second frame image time series are combined in time series to form a play video.
  • the play time of the play video is specified between the predetermined play time and n times the predetermined play time.
  • FIG. 7 is a schematic structural diagram of an embodiment of a computer program product for time-lapse photography according to an embodiment of the present application.
  • the computer program product 71 for time-lapse photography of the embodiment of the present application may include a signal bearing medium 72.
  • Signal bearing medium 72 may include one or more instructions 73 that, when executed by, for example, a processor, may provide the functionality described above with respect to Figures 1-5.
  • the instruction 73 may include: one or more instructions for recording a video and forming a time sequence of the corresponding frame image of the video; for if the total playing time of the currently recorded video reaches n times the predetermined playing time, it will be up to the current Combining the formed first frame image time series and the second frame image time series, and extracting one frame per n frames in chronological order to form a new time sequence of the second frame image; and, when recording the video after this time Recording a video at a 1/n original frame-drawing ratio to form a new time series of the first frame image, where n is One or more instructions of any integer greater than 0; and chronologically merging the currently formed first image time series and the second frame image time series in response to a triggering operation to stop recording the video Form one or more instructions to play the video.
  • the time-lapse photography device can perform one or more of the steps shown in FIG. 1 in response to instruction 73.
  • signal bearing medium 72 can include computer readable media 74 such as, but not limited to, a hard disk drive, a compact disk (CD), a digital versatile disk (DVD), a digital tape, a memory, and the like.
  • the signal bearing medium 72 can include a recordable medium 75 such as, but not limited to, a memory, a read/write (R/W) CD, an R/W DVD, and the like.
  • the signal bearing medium 72 can include a communication medium 76 such as, but not limited to, a digital and/or analog communication medium (eg, fiber optic cable, waveguide, wired communication link, wireless communication link, etc.).
  • the computer program product 71 can be transmitted by the RF signal bearing medium 72 to one or more modules of the identification device of the multi-finger swipe gesture, wherein the signal bearing medium 72 is comprised of a wireless communication medium (eg, wireless compliant with the IEEE 802.11 standard) Communication medium) transmission.
  • a wireless communication medium eg, wireless compliant with the IEEE 802.11 standard
  • the computer program product of the embodiment of the present application divides the time sequence of the frame image formed by the recorded video into two parts, which are respectively the first frame image time sequence that has been recorded and stored and the second frame image time sequence currently being recorded; After the combined playback time of the corresponding recorded video reaches n times of the predetermined playing time, the two frame image time series are combined, and the frame is stored to form a new first frame image time sequence, and the video is recorded after this time. The video is recorded at a 1/n original framed recording ratio to form a new second frame image time sequence; thereby, the stored frame image time series and the frame image time series being recorded are recorded in the same frame. More than forming a video, loop accordingly. Finally, after the end of the recording, the first frame image time series and the second frame image time series are combined in time series to form a play video. The play time of the play video is specified between the predetermined play time and n times the predetermined play time.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)

Abstract

实施例涉及延时摄影方法和装置,所述方法包括:录制视频,并形成视频相应的帧图像时间序列;若截至当前录制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的所述第二帧图像时间序列;并且,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的所述第一帧图像时间序列;响应于停止录制视频的触发操作,将当前已形成的所述第一图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频。实施例可在录制任意时长的视频后,都可以生成指定播放时长的视频,不再拘泥于录制时长的限制。

Description

延时摄影方法和装置
本专利申请要求申请日为2015年11月15日、申请号为2015107788570的中国专利申请的优先权,并将上述专利申请以引用的方式全文引入本文中。
技术领域
本申请实施例涉及图像处理技术领域,尤其涉及一种延时摄影方法和装置。
背景技术
当前,一些延时摄影的方法是采用固定时长录制,并在录制过程中按固定比例进行视频抽帧,然后将抽帧图像按时间序列播放形成固定时长的视频。例如,在将一个固定录制时长的视频生成1/4时长,1/8时长,1/16时长的短片时,需在录制过程中采用相对应的1/4,1/8,1/16的抽帧比例进行视频抽帧,然后将抽帧图像按时间序列播放形成相应播放时长的视频。
但是,如果用户想录制一段长达一个小时甚至几个小时的时长不固定的视频(比如录制一个清晨花开的过程,或者录制一个夕阳落山的过程),而且希望在固定时长内,如在一分钟的时间内播放完,那么采用现有的延时摄影技术则无法实现。
发明内容
本申请实施例提供的延时摄影方法和装置,可在录制任意时长的视频后,都可以生成指定播放时长的视频,不再拘泥于录制时长的限制。
为达到上述目的,本申请实施例提供了一种延时摄影方法,包括:录制视频,并形成视频相应的帧图像时间序列;若截至当前录 制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的所述第一图像时间序列;并且,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的所述第二帧图像时间序列,所述n为大于0的任一整数;响应于停止录制视频的触发操作,将当前已形成的所述第一图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频。
本申请实施例还提供了一种延时摄影装置,包括:视频录制模块,用于录制视频,并形成视频相应的帧图像时间序列;第一图像处理模块,用于若截至当前录制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的所述第一图像时间序列;第二图像处理模块,用于若截至当前录制视频的总播放时间达到n倍预定播放时间,则在此刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的所述第二帧图像时间序列,所述n为大于0的任一整数;播放视频形成模块,用于响应于停止录制视频的触发操作,将当前已形成的所述第一图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频。
另一方面,本申请实施例提供一种延时摄影装置,包括存储器、一个或多个处理器以及一个或多个程序,其中,所述一个或多个程序在由所述一个或多个处理器执行时执行下述操作:录制视频,并形成视频相应的帧图像时间序列;截至当前录制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的所述第二帧图像时间序列;并且,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的所述第一帧图像时间序列,所述n为大于0的任一整数;响应于停止录制视频的触发操作,将当前已形成的所述第一图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频。
另一方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可执行指令,所述计算机可执行指令响应于执行使得延时摄影装置执行操作,所述操作包括:录制视频,并形成视频相应的帧图像时间序列;截至当前录制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的所述第二帧图像时间序列;并且,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的所述第一帧图像时间序列,所述n为大于0的任一整数;响应于停止录制视频的触发操作,将当前已形成的所述第一图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频。
本申请实施例提供的延时摄影方法和装置,将录制视频形成的帧图像时间序列分为两部分,分别为已经录制存储的第一帧图像时间序列和当前正在录制的第二帧图像时间序列;当二者合并后对应的录制视频的总播放时间达到n倍预定播放时间,则将两个帧图像时间序列合并,并抽帧后存储形成新的第一帧图像时间序列,同时,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的第二帧图像时间序列;由此,使得已存储的帧图像时间序列和正在录制形成的帧图像时间序列以相同的抽帧录制比形成视频,依此循环。最后,在录制结束后,将第一帧图像时间序列与第二帧图像时间序列按时间顺序合并形成播放视频。该播放视频的播放时间指定在预定播放时间与n倍预定播放时间之间。
附图说明
图1为本申请实施例提供的延时摄影方法一个实施例的流程图;
图2为本申请实施例提供的帧图像处理逻辑样例一示意图;
图3为本申请实施例提供的帧图像处理逻辑样例二意识图;
图4为本申请实施例提供的延时摄影装置一个实施例的结构框图;
图5为本申请实施例提供的延时摄影装置另一个实施例的结构框图;
图6为本申请实施例提供的延时摄影装置又一个实施例的结构示意图;
图7为本申请实施例提供的用于延时摄影的计算机程序产品一个实施例的结构示意图。
附图标记说明:410-视频录制模块、420-第一图像处理模块、430-第二图像处理模块、440-播放视频形成模块、450-图像抽取模块、451-比例计算单元、452-图像抽取单元。
具体实施方式
本申请实施例,通过对已录制存储的帧图像时间序列和正在录制的帧图像时间序列同步进行抽帧处理,并且随着录制时间的延长,对应抽帧录制比例不断增大,以保证最终录制的视频的播放时间在指定的播放放时间范围。
下面结合附图对本申请实施例中的延时摄影方法和装置进行详细描述。
实施例一
图1为本申请实施例提供的延时摄影方法一个实施例的流程图,该方法的执行主体可以为配置有摄影功能的如手机、ipad等终端,或集成在这些终端上的装置或芯片。如图1所示,以终端为例,该延时摄影方法包括如下步骤:
S110,录制视频,并形成视频相应的帧图像时间序列。
现有终端如手机、ipad等都集成了摄影功能,可以录制视频。本实施例中主要是针对这些终端所录制的视频进行后续的处理,而对于终端的种类以及录制视频所采用的具体技术不作限定。
在终端录制视频后,可得到相应视频的帧图像,将这些帧图像按录制的时间顺序进行排序,即得到关于帧图像的时间序列。
S120,若截至当前录制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的第二帧图像时间序列。
同时,若截至当前录制视频的总播放时间达到n倍预定播放时间,则此时刻之后还可执行S130的内容。
S130,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的第一帧图像时间序列。其中,上述n为大于0的任一整数。
下面以图2所示的帧图像处理逻辑为例,对步骤S120和S130进行具体说明。如图2所示,假设想录制一个播放时间为1分钟左右的视频。则可以预定播放时间为1分钟,n值为2进行如下处理。
首先如图(2.1)中所示,在启动录制视频后,当录像的时长小于2分钟时,则持续获取到录像的原始帧图像,并存入到磁盘中,形成最初的第一帧图像时间序列。针对每个帧图像可通过一个映射表来记录每个帧的时间序列位置。
如图(2.2),当录像的时长大于2分钟时,则可新建一个文件来存储接下来的录制的原始帧图像,并且以每获取两帧时,丢一帧,存储一帧,即1/2抽帧录制比进行保存,从而形成新的第一帧图像时间序列。同时在另一个线程中对之前存储的第一帧图像时间序列(0~2分钟录制的帧图像)进行每两帧抽一帧的方式另存为一个新的文件,相应形成的新的帧图像时间序列作为第二帧图像时间序列。此时,正在录制的视频是2倍速的方式存储,而之前已经存储的文件也变成了2倍速的新视频文件,且视频播放时长为1分钟。
如图(2.3),当视频录制达到4分钟时,则再次新建一个文件来存储接下来录制的原始帧图像,并且以每获取四帧时,丢三帧,存储一帧,即1/4抽帧录制比(1/2上一抽帧录制比)进行保存。同时在另一个线程中对之前存储两个文件的帧图像时间序列(已存储的第二帧图像时间序列和刚刚录制完成的第一帧图像时间序列,即 0~4分钟内录制的帧图像)再次每两帧抽一帧并存储为一个新的文件,形成新的第二帧图像时间序列。此时正在录制的视频是4倍速的方式存储,而之前已经存储的文件也变成了4倍速的新文件。
接下来,当视频录制达到8分钟时,则新建一个文件来存储接下来录制的原始帧图像,并且以每获取八帧时,丢七帧,存储一帧,即1/8抽帧录制比(1/2上一抽帧录制比)进行保存。同时在另一个线程中对之前存储两个文件的帧图像时间序列(已存储的第二帧图像时间序列和刚刚录制完成的第一帧图像时间序列,即0~8分钟内录制的帧图像)再次每两帧抽一帧并存储为一个新的文件,形成新的第二帧图像时间序列。此时正在录制的视频是8倍速的方式存储,而之前已经存储的文件也变成了8倍速的新文件。
依次继续下去,这样无论录制存储多久,则始终是已经存储了一个一分钟的文件,即第二帧图像时间序列,跟一个正在录制存储的小于一分钟的文件,即第一帧图像时间序列。
S140,响应于停止录制视频的触发操作,将当前已形成的第一图像时间序列与第二帧图像时间序列按时间顺序合并形成播放视频。
以图2为例,如图3所示,当停止录像后,对截至当前已形成的第一帧图像时间序列以及第二帧图像时间序列按时间顺序进行合并,形成完整的播放视频,且视频播放时间制定为1—2两分钟。
进一步地,如图1和图3所示,为了提高最终视频播放时间的精度,在S140之后还可继续执行如下步骤:
抽取播放视频对应的帧图像时间序列中部分帧图像形成第三帧图像时间序列;该第三帧图像时间序列所构成的播放视频的播放时间为预定播放时间。
当然,该第三帧图像时间序列所构成的播放视频即为最终形成的播放视频。这里关于形成第三帧图像时间序列时对播放视频对应的原始帧图像的抽取方式不做限定。例如,为了保证播放视频内容的均匀连贯性,可均匀的抽取原始帧图像时间序列中的部分帧图像。
具体地,可先计算当前形成的播放视频对应的视频播放时间与最初所预定播放时间的比值m;然后,将播放视频对应的帧图像时间序列按时间顺序每m帧中抽取一帧形成第三帧图像时间序列。
以图2所示为例,假如已经储存了1分40秒的帧图像时间序列的视频(其中,第一帧图像时间序列为40秒,第二帧图像时间序列为1分钟),则做一个等比例丢帧,使最终视频播放时间为一分钟,那么相应的m取值为5/3,即可每5帧抽取3帧(丢中间2帧)进行存储,使得最终帧图像时间序列对应的视频播放时长约等于1分钟。
本申请实施例提供的延时摄影方法,通过对已录制存储的帧图像时间序列和正在录制的帧图像时间序列同步进行抽帧处理,并且随着录制时间的延长,对应抽帧录制比例不断增大,以保证最终录制的视频的播放时间在指定的播放放时间范围。
在此基础上,本实施例为了提高最终形成的播放视频播放时间的精度,在将已存储的第一图像时间序列与当前正在存储的第二帧图像时间序列按时间顺序合并后,对合并后的帧图像时间序列进行抽帧处理,最终将抽帧处理后的帧图像时间序列对应的视频播放时间控制在预定播放时间。
进一步地,由于现有技术是按照恒定抽帧录制比例录制视频,通常会设置取帧的间隔和最终录制的时长,最终录制的时长实际上不是必须的,但是由于考虑到存储器的容量问题,一般会对录制时长进行设置。而本方案中,由于是按录制时间阶梯性更改抽帧录制比例录制视频,使得最终视频的播放时间总是固定的,因此不用担心录制过程中存储器溢出问题。
实施例二
如图4所示,为本申请实施例提供的延时摄影装置一个实施例的结构框图,可用于执行如图1所示的方法步骤,其中包括:
视频录制模块410,用于录制视频,并形成视频相应的帧图像时间序列;第一图像处理模块420,用于若截至当前录制视频的总播放 时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的第二帧图像时间序列;第二图像处理模块430,用于若截至当前录制视频的总播放时间达到n倍预定播放时间,则在此刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的第一帧图像时间序列,所述n为大于0的任一整数;播放视频形成模块440,用于响应于停止录制视频的触发操作,将当前已形成的第一帧图像时间序列与第二帧图像时间序列按时间顺序合并形成播放视频。
在此基础上,如图5所示,上述延时摄影装置还可包括:图像抽取模块450,用于抽取播放视频对应的帧图像时间序列中部分帧图像形成第三帧图像时间序列;所述第三帧图像时间序列所构成的播放视频的播放时间为预定播放时间。
进一步地,上述图像抽取模块450可包括:比例计算单元451,用于计算播放视频对应的视频播放时间与所述预定播放时间的比值m;图像抽取单元452,用于将播放视频对应的帧图像时间序列按时间顺序每m帧中抽取一帧形成第三帧图像时间序列。
进一步地,上述n取值可为2。
本申请实施例提供的延时摄影装置,通过对已录制存储的帧图像时间序列和正在录制的帧图像时间序列同步进行抽帧处理,并且随着录制时间的延长,对应抽帧录制比例不断增大,以保证最终录制的视频的播放时间在指定的播放放时间范围。
在此基础上,本实施例为了提高最终形成的播放视频播放时间的精度,在将已存储的第一图像时间序列与当前正在存储的第二帧图像时间序列按时间顺序合并后,对合并后的帧图像时间序列进行抽帧处理,最终将抽帧处理后的帧图像时间序列对应的视频播放时间控制在预定播放时间。
实施例三
图6为本申请实施例提供的延时摄影装置又一个实施例的结构示意图。如图6所示,本申请实施例的延时摄影装置包括:存储器61、一个或多个处理器62以及一个或多个程序63。
其中,所述一个或多个程序63在由一个或多个处理器62执行时执行上述实施例中的任意一种方法。本申请实施例提供的延时摄影装置,将录制视频形成的帧图像时间序列分为两部分,分别为已经录制存储的第一帧图像时间序列和当前正在录制的第二帧图像时间序列;当二者合并后对应的录制视频的总播放时间达到n倍预定播放时间,则将两个帧图像时间序列合并,并抽帧后存储形成新的第一帧图像时间序列,同时,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的第二帧图像时间序列;由此,使得已存储的帧图像时间序列和正在录制形成的帧图像时间序列以相同的抽帧录制比形成视频,依此循环。最后,在录制结束后,将第一帧图像时间序列与第二帧图像时间序列按时间顺序合并形成播放视频。该播放视频的播放时间指定在预定播放时间与n倍预定播放时间之间。
实施例四
图7为本申请实施例提供的用于延时摄影的计算机程序产品一个实施例的结构示意图。如图7所示,本申请实施例的用于延时摄影的计算机程序产品71,可以包括信号承载介质72。信号承载介质72可以包括一个或更多个指令73,该指令73在由例如处理器执行时,处理器可以提供以上针对图1-5描述的功能。例如,指令73可以包括:用于录制视频,并形成视频相应的帧图像时间序列的一个或多个指令;用于若截至当前录制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的所述第二帧图像时间序列;并且,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的所述第一帧图像时间序列,所述n为 大于0的任一整数的一个或多个指令;以及用于响应于停止录制视频的触发操作,将当前已形成的所述第一图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频的一个或多个指令。因此,例如,参照图4,延时摄影装置可以响应于指令73来进行图1中所示的步骤中的一个或更多个。
在一些实现中,信号承载介质72可以包括计算机可读介质74,诸如但不限于硬盘驱动器、压缩盘(CD)、数字通用盘(DVD)、数字带、存储器等。在一些实现中,信号承载介质72可以包括可记录介质75,诸如但不限于存储器、读/写(R/W)CD、R/W DVD等。在一些实现中,信号承载介质72可以包括通信介质76,诸如但不限于数字和/或模拟通信介质(例如,光纤线缆、波导、有线通信链路、无线通信链路等)。因此,例如,计算机程序产品71可以通过RF信号承载介质72传送给多指滑动手势的识别装置的一个或多个模块,其中,信号承载介质72由无线通信介质(例如,符合IEEE 802.11标准的无线通信介质)传送。
本申请实施例的计算机程序产品,将录制视频形成的帧图像时间序列分为两部分,分别为已经录制存储的第一帧图像时间序列和当前正在录制的第二帧图像时间序列;当二者合并后对应的录制视频的总播放时间达到n倍预定播放时间,则将两个帧图像时间序列合并,并抽帧后存储形成新的第一帧图像时间序列,同时,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的第二帧图像时间序列;由此,使得已存储的帧图像时间序列和正在录制形成的帧图像时间序列以相同的抽帧录制比形成视频,依此循环。最后,在录制结束后,将第一帧图像时间序列与第二帧图像时间序列按时间顺序合并形成播放视频。该播放视频的播放时间指定在预定播放时间与n倍预定播放时间之间。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者 说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (8)

  1. 一种延时摄影方法,其特征在于,所述方法包括:
    录制视频,并形成视频相应的帧图像时间序列;
    若截至当前录制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的所述第二帧图像时间序列;并且,在此时刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的所述第一帧图像时间序列,所述n为大于0的任一整数;
    响应于停止录制视频的触发操作,将当前已形成的所述第一图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频。
  2. 根据权利要求1所述的方法,其特征在于,所述将当前已形成的所述第一图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频之后还包括:
    抽取所述播放视频对应的帧图像时间序列中部分帧图像形成第三帧图像时间序列;所述第三帧图像时间序列所构成的播放视频的播放时间为所述预定播放时间。
  3. 根据权利要求2所述的方法,其特征在于,所述抽取所述播放视频对应的帧图像时间序列中部分帧图像形成第三帧图像时间序列包括:
    计算所述播放视频对应的视频播放时间与所述预定播放时间的比值m;
    将所述播放视频对应的帧图像时间序列按时间顺序每m帧中抽取一帧形成所述第三帧图像时间序列。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述n取值为2。
  5. 一种延时摄影装置,其特征在于,所述装置包括:
    视频录制模块,用于录制视频,并形成视频相应的帧图像时间 序列;
    第一图像处理模块,用于若截至当前录制视频的总播放时间达到n倍预定播放时间,则将截至当前录制形成的第一帧图像时间序列和第二帧图像时间序列合并,并按时间顺序每n帧中抽取一帧形成新的所述第二帧图像时间序列;
    第二图像处理模块,用于若截至当前录制视频的总播放时间达到n倍预定播放时间,则在此刻之后录制视频时以1/n原有抽帧录制比例录制视频,形成新的所述第一帧图像时间序列,所述n为大于0的任一整数;
    播放视频形成模块,用于响应于停止录制视频的触发操作,将当前已形成的所述第一帧图像时间序列与所述第二帧图像时间序列按时间顺序合并形成播放视频。
  6. 根据权利要求5所述的装置,其特征在于,所述装置还包括:
    图像抽取模块,用于抽取所述播放视频对应的帧图像时间序列中部分帧图像形成第三帧图像时间序列;所述第三帧图像时间序列所构成的播放视频的播放时间为所述预定播放时间。
  7. 根据权利要求6所述的装置,其特征在于,所述图像抽取模块包括:
    比例计算单元,用于计算所述播放视频对应的视频播放时间与所述预定播放时间的比值m;
    图像抽取单元,用于将所述播放视频对应的帧图像时间序列按时间顺序每m帧中抽取一帧形成所述第三帧图像时间序列。
  8. 根据权利要求6所述的装置,其特征在于,所述n取值为2。
PCT/CN2016/089041 2015-11-15 2016-07-07 延时摄影方法和装置 Ceased WO2017080241A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510778857.0 2015-11-15
CN201510778857.0A CN105657246A (zh) 2015-11-15 2015-11-15 延时摄影方法和装置

Publications (1)

Publication Number Publication Date
WO2017080241A1 true WO2017080241A1 (zh) 2017-05-18

Family

ID=56481790

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/089041 Ceased WO2017080241A1 (zh) 2015-11-15 2016-07-07 延时摄影方法和装置

Country Status (2)

Country Link
CN (1) CN105657246A (zh)
WO (1) WO2017080241A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448974A (zh) * 2019-08-30 2021-03-05 北京嗨动视觉科技有限公司 网络交互方法、装置及系统和图像处理系统
CN113596339A (zh) * 2021-09-07 2021-11-02 杭州海康威视数字技术股份有限公司 一种延时摄影文件生成方法、装置及电子设备
CN114390236A (zh) * 2021-12-17 2022-04-22 云南腾云信息产业有限公司 视频处理方法、装置、计算机设备和存储介质
CN114845150A (zh) * 2022-04-28 2022-08-02 陕西科技大学 一种显示屏多视频显示同步系统、方法、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657246A (zh) * 2015-11-15 2016-06-08 乐视移动智能信息技术(北京)有限公司 延时摄影方法和装置
CN113747080B (zh) * 2021-09-29 2024-03-22 维沃移动通信(杭州)有限公司 一种拍摄预览方法、拍摄预览装置、电子设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674444A (zh) * 2009-10-15 2010-03-17 杭州华三通信技术有限公司 视频数据的存储方法、系统和编码器
WO2014166862A1 (en) * 2013-04-09 2014-10-16 Here Global B.V. Automatic time lapse capture
CN104349060A (zh) * 2013-08-06 2015-02-11 卡西欧计算机株式会社 图像处理装置以及图像处理方法
AU2015100630A4 (en) * 2014-05-30 2015-06-11 Apple Inc. System and methods for time lapse video acquisition and compression
CN105657246A (zh) * 2015-11-15 2016-06-08 乐视移动智能信息技术(北京)有限公司 延时摄影方法和装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9414038B2 (en) * 2012-10-16 2016-08-09 Amanjyot Singh JOHAR Creating time lapse video in real-time

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674444A (zh) * 2009-10-15 2010-03-17 杭州华三通信技术有限公司 视频数据的存储方法、系统和编码器
WO2014166862A1 (en) * 2013-04-09 2014-10-16 Here Global B.V. Automatic time lapse capture
CN104349060A (zh) * 2013-08-06 2015-02-11 卡西欧计算机株式会社 图像处理装置以及图像处理方法
AU2015100630A4 (en) * 2014-05-30 2015-06-11 Apple Inc. System and methods for time lapse video acquisition and compression
CN105657246A (zh) * 2015-11-15 2016-06-08 乐视移动智能信息技术(北京)有限公司 延时摄影方法和装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112448974A (zh) * 2019-08-30 2021-03-05 北京嗨动视觉科技有限公司 网络交互方法、装置及系统和图像处理系统
CN112448974B (zh) * 2019-08-30 2023-10-17 北京嗨动视觉科技有限公司 网络交互方法、装置及系统和图像处理系统
CN113596339A (zh) * 2021-09-07 2021-11-02 杭州海康威视数字技术股份有限公司 一种延时摄影文件生成方法、装置及电子设备
CN114390236A (zh) * 2021-12-17 2022-04-22 云南腾云信息产业有限公司 视频处理方法、装置、计算机设备和存储介质
CN114845150A (zh) * 2022-04-28 2022-08-02 陕西科技大学 一种显示屏多视频显示同步系统、方法、设备及存储介质

Also Published As

Publication number Publication date
CN105657246A (zh) 2016-06-08

Similar Documents

Publication Publication Date Title
WO2017080241A1 (zh) 延时摄影方法和装置
US10212386B2 (en) Method, device, terminal device, and storage medium for video effect processing
EP2998960B1 (en) Method and device for video browsing
KR102131322B1 (ko) 동영상을 처리하는 컴퓨팅 장치, 방법 및 컴퓨터 프로그램
US20150243326A1 (en) Automatic generation of compilation videos
CN104509092B (zh) 控制相机的方法及相关计算设备和计算机可读存储介质
US9324376B2 (en) Time-lapse video capture with temporal points of interest
WO2022120828A1 (zh) 视频抽帧方法、设备及存储介质
WO2018095252A1 (zh) 视频录制方法及装置
WO2015184873A1 (zh) 一种视频拍摄的处理方法、系统和装置
CN112004133A (zh) 音画同调方法、装置、投影设备及可读存储介质
CN110149479A (zh) 双摄像头成像方法、装置、终端和介质
US20140285649A1 (en) Image acquisition apparatus that stops acquisition of images
CN104754268B (zh) 录制倒序视频的方法及装置
US20170269809A1 (en) Method for screen capture and electronic device
CN106961567A (zh) 动画图像生成方法及装置
JP6230386B2 (ja) 画像処理装置、画像処理方法及び画像処理プログラム
US10832369B2 (en) Method and apparatus for determining the capture mode following capture of the content
JP2016506688A (ja) シングルクリックに基づく映像クリップの始点および終点の判定方法
CN104915663A (zh) 一种提升人脸识别显示的方法、系统及移动终端
JP6485238B2 (ja) タギング装置、タギングシステム、タギング方法及びプログラム
CN104735342B (zh) 动态图像处理装置、动态图像处理方法及记录介质
US20250016396A1 (en) Method and apparatus for video detection, electronic device, and storage medium
JP2013058853A (ja) 動画再生装置、動画再生方法及びプログラム
WO2016175003A1 (ja) 撮影装置、撮影装置の制御方法、および制御プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16863419

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16863419

Country of ref document: EP

Kind code of ref document: A1