Delay photography method and device based on low power consumption and storage medium
By acquiring and processing initial video data to generate time-lapse frames under low-power conditions, the high power consumption problem of low-power cameras during time-lapse photography is solved, achieving power optimization and video stream stability, and improving device battery life.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HUACHENG SOFTWARE TECH CO LTD
- Filing Date
- 2025-12-04
- Publication Date
- 2026-04-21
AI Technical Summary
Existing low-power cameras need to wake up the main camera system to perform high-power operations such as sensor initialization, image acquisition and high-quality encoding when performing time-lapse photography tasks, which seriously affects the device's battery life. Furthermore, directly reusing P-frames can lead to decoding errors or inserting I-frames, which can disrupt the bitrate stability of the video stream.
By acquiring initial video data under low-power tasks, generating time-lapse frames based on task time and encoding type, and using the raw data to generate high-resolution images in parallel, the system avoids fully waking up. Key frames and non-key frames are processed in parallel, and the acquisition cycle is adjusted collaboratively to optimize power consumption.
It reduces the individual processing logic and duration of time-lapse photography tasks, significantly saves power, improves the battery life of image acquisition equipment, and maintains the bitrate stability and storage efficiency of video streams.
Smart Images

Figure CN121908126A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of low-power electronics technology, and in particular to a low-power time-lapse photography method, device, and storage medium. Background Technology
[0002] Low-power cameras (such as AOV (Always On Video) cameras) typically include a low-power mode and a continuous recording mode. Their low-power (AOV mode) primarily involves acquiring image frames at low resolution and long intervals and encoding them into a video stream containing I-frames and P-frames, which can be used for event detection. When a target event is triggered, they switch to continuous recording mode to perform continuous recording tasks.
[0003] However, in the existing operating schemes of low-power cameras, each function operates independently. If a low-power camera is needed for time-lapse photography (usually to capture still images at high resolution and long intervals), the main camera system must be woken up independently each time a time-lapse photography task is performed, and high-power operations such as sensor initialization, image acquisition, high-quality encoding, and data storage must be performed, which severely limits the device's battery life.
[0004] Therefore, there is an urgent need for a low-power solution to optimize the power consumption of cameras when performing time-lapse photography. Summary of the Invention
[0005] This application provides at least one method, apparatus, device, and computer-readable storage medium based on low-power time-lapse photography.
[0006] The first aspect of this application provides a low-power time-lapse photography method, comprising: acquiring initial video data collected under a low-power task; in response to a time-lapse photography task received while executing the low-power task, determining target video data in the initial video data according to the task time when the time-lapse photography task is received; and generating a time-lapse photography frame according to the target video data and the encoding type of the target video data.
[0007] In one embodiment, generating a time-lapse frame based on the target video data and the encoding type of the target video data includes: determining whether the encoding type is keyframe encoding or non-keyframe encoding; and generating the time-lapse frame based on the target video data in response to the encoding type being keyframe encoding.
[0008] In one embodiment, generating the time-lapse frame based on the target video data includes: generating a target image based on the target video data, determining the target image as the time-lapse frame of the time-lapse photography task; and performing keyframe encoding processing on the target video data to obtain the video keyframe corresponding to the low-power task.
[0009] In one embodiment, after determining whether the encoding type is keyframe encoding or non-keyframe encoding, the method further includes: in response to the encoding type being non-keyframe encoding, acquiring raw image data from the same source as the target video data within a low-power acquisition period corresponding to the target video data; and generating the time-lapse frame based on the raw image data.
[0010] In one embodiment, the method further includes: pausing the continuous recording task in response to a time-lapse photography task received during the execution of a continuous recording task; acquiring time-lapse photography frames according to the time-lapse photography task; and resuming the continuous recording task.
[0011] In one embodiment, the method further includes: obtaining the low-power acquisition period corresponding to the low-power task and the time-lapse photography period of the time-lapse photography task; determining whether the low-power acquisition period and the time-lapse photography period match; if not, adjusting the low-power acquisition period and / or the time-lapse photography period.
[0012] In one embodiment, the adjustment process for the low-power acquisition period and / or the time-lapse photography period includes: adjusting the low-power acquisition period and the time-lapse photography period to be integer multiples of each other; or, adjusting the duration of the image group of the low-power task to be an integer multiple of the time-lapse photography period.
[0013] In one embodiment, the method further includes: obtaining a low-power acquisition period corresponding to the low-power task; and generating recommended setting parameters for the time-lapse photography task based on the low-power acquisition period in response to receiving a user's setting instruction for the time-lapse photography task.
[0014] A second aspect of this application provides a low-power time-lapse photography apparatus, comprising: an acquisition module for acquiring initial video data collected under a low-power task; a target determination module for determining target video data in the initial video data based on the task time when the time-lapse photography task is received, in response to a time-lapse photography task received during the execution of the low-power task; and a time-lapse generation module for generating time-lapse frames based on the target video data and the encoding type of the target video data.
[0015] A third aspect of this application provides an electronic device including a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the aforementioned low-power time-lapse photography method.
[0016] The fourth aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the aforementioned low-power time-lapse photography method.
[0017] The above scheme acquires initial video data collected by the image acquisition device under low-power task conditions. If the image acquisition device receives a time-lapse photography task while performing the low-power task, the target video data in the initial video data can be determined based on the task time when the time-lapse photography task is received. Then, a time-lapse photography frame is generated based on the target video data and its encoding type. This reduces the need to fully wake up the image acquisition device to perform time-lapse photography when a time-lapse photography task is received in low-power mode, as is the problem in traditional methods. It also reduces the logic and duration of separate processing for time-lapse photography tasks, thus significantly saving power, improving the battery life of the image acquisition device, and optimizing power consumption during the time-lapse photography process.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0020] Figure 1 This is a flowchart illustrating an exemplary embodiment of the low-power time-lapse photography method of this application; Figure 2 This is a block diagram illustrating a low-power time-lapse photography device as an exemplary embodiment of this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 4 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0021] The solution of this embodiment will now be described in detail with reference to the accompanying drawings.
[0022] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0023] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0024] To facilitate understanding, one of the applicable scenarios of this application will be illustrated by example.
[0025] Low-power cameras (such as AOV (Always On Video) cameras) typically include a low-power mode and a continuous recording mode.
[0026] Its low-power mode (AOV mode) mainly needs to perform the task of acquiring image frames at low resolution and long intervals and encoding them into a video stream (H.264 / H.265) containing I-frames (key frames) and P-frames (non-key frames), which can be used for event detection; and when the target event is triggered, it switches to continuous recording mode to perform continuous recording tasks.
[0027] However, in the existing operating schemes of low-power cameras, each function operates independently. If a low-power camera is needed for time-lapse photography (which typically requires capturing still images at high resolution and long intervals), the main camera system must be woken up independently each time a time-lapse photography task is performed, and high-power operations such as sensor initialization, image acquisition, high-quality encoding, and data storage must be performed, which severely limits the device's battery life.
[0028] A deeper problem is that in AOV mode, directly reusing P frames from the AOV video stream can lead to decoding errors in time-lapse photography, while blindly inserting I frames into the AOV video stream can disrupt the bitrate stability of the AOV video stream and increase unnecessary storage overhead.
[0029] Therefore, there is an urgent need for a low-power solution that can completely resolve the dependency of encoded frames and optimize the power consumption of the camera when performing time-lapse photography.
[0030] Please see Figure 1 , Figure 1 This is a flowchart illustrating an exemplary embodiment of the low-power time-lapse photography method of this application. Specifically, it may include the following steps: Step S110: Obtain the initial video data collected under low-power task.
[0031] Low-power tasks refer to tasks where the camera acquires data using low-power acquisition parameters in low-power mode. These parameters mainly include acquisition period and image resolution, which are not specified here.
[0032] For example, when the camera is performing a low-power task, it is periodically woken up with a preset low-power acquisition cycle (T_aov) and the image data of the first resolution is acquired and encoded into a video stream containing I-frames and P-frames to obtain the initial video data.
[0033] Among them, I-frame is a keyframe type in video compression technology. It is usually the first frame of each group of pictures (GOP). I-frame is also known as a keyframe.
[0034] P-frames are a type of predictive coded frame in video coding. They achieve efficient compression by recording the differences between the P-frame and the previous reference frame (I-frame or P-frame). P-frames are also known as non-key frames.
[0035] Similar to P-frames are B-frames (bidirectional prediction frames), which will not be discussed further here. For ease of understanding, this application will primarily use P-frames as an example to illustrate non-key frames.
[0036] In this application, the encoding process corresponding to I-frames is referred to as keyframe encoding, and the encoding process corresponding to P-frames is referred to as non-keyframe encoding. Specific encoding and decoding techniques can be found in relevant explanations within this technical field, and will not be elaborated upon here.
[0037] Step S120: In response to the time-lapse photography task received during the execution of a low-power task, the target video data in the initial video data is determined based on the task time when the time-lapse photography task is received.
[0038] Time-lapse photography tasks also have their corresponding time-lapse photography parameters. These parameters may include the acquisition period, image resolution, etc., which are not limited here.
[0039] For example, in traditional methods, when a camera performs a time-lapse photography task, it is periodically woken up with a preset time-lapse photography period (T_tl) and the second-resolution image data is collected as time-lapse photography frames.
[0040] It should be noted that the low-power acquisition period and the time-lapse photography period can be the same or different (generally the time-lapse photography period is longer than the low-power acquisition period), and the first resolution and the second resolution can be the same or different (generally the second resolution is greater than the first resolution). There are no restrictions here.
[0041] In the time-lapse photography method of this application, when a time-lapse photography task is received in AOV mode, there is no need to enter the traditional time-lapse photography process. Instead, the target video data is determined from the initial video data acquired by the low-power task based on the task time when the time-lapse photography task is received. The time-lapse photography frame is generated by reusing the target video data acquired in the low-power task, thereby achieving lossless acquisition. "Lossless" means that it does not affect the bitrate and storage efficiency of the AOV video stream.
[0042] For example, when acquiring initial video data in AOV mode, if a time-lapse photography task is received at time A, requiring immediate acquisition of time-lapse frames, then time A can be used as the task time. The video data (video frames) corresponding to time A in the initial video data are then determined as the target video data.
[0043] In another example, when acquiring initial video data in AOV mode, if a time-lapse photography task is received at time A, requiring the acquisition of time-lapse frames at time B, then time B can be used as the task time. The video data (video frames) corresponding to time B in the initial video data are then determined as the target video data.
[0044] Step S130: Generate time-lapse frames based on the target video data and the encoding type of the target video data.
[0045] Based on the steps described above, the encoding types of video data include keyframe encoding and non-keyframe encoding.
[0046] For example, in this application, when generating time-lapse frames based on target video data, it is also necessary to determine the encoding type of the target video data (whether it is keyframe encoding) and then decide whether to use the target video data to generate time-lapse frames or to obtain the sensor raw data (raw data) corresponding to the target video data to generate time-lapse frames.
[0047] Therefore, the time-lapse photography method of this application can not only generate time-lapse photography frames by reusing video data acquired in AOV mode, reducing the power consumption of the camera when performing a complete time-lapse photography task; it can also solve the decoding error problem caused by directly reusing P frames in AOV video stream in AOV mode, and the problem that blindly inserting I frames into AOV video stream will destroy the bit rate stability of AOV video stream, and can also avoid increasing unnecessary storage overhead.
[0048] In another example, in the specific implementation of this application, time-lapse frames may be generated based on the target video data and the encoding type of the target video data; at the same time, target video frames of the video stream may be generated in parallel based on the target video data and the encoding type of the target video data.
[0049] As can be seen, this application acquires the initial video data collected by the image acquisition device under low-power task conditions. If the image acquisition device receives a time-lapse photography task while performing a low-power task, the target video data in the initial video data can be determined based on the task time when the time-lapse photography task is received. Then, a time-lapse photography frame is generated based on the target video data and its encoding type. This reduces the problem of traditional methods requiring the image acquisition device to be fully woken up for time-lapse photography when a time-lapse photography task is received in low-power mode. It also reduces the logic and duration of separate processing for time-lapse photography tasks, thereby significantly saving power, improving the battery life of the image acquisition device, and optimizing power consumption in the time-lapse photography process.
[0050] Based on the above embodiments, this embodiment provides an exemplary description of a data storage structure that can be selectively implemented in this application.
[0051] The camera system can create a central frame management queue and add corresponding tags to the image frames in the central frame management queue.
[0052] For example, the central frame management queue is primarily used to cache and tag generated video frames (such as AOV video frames) and time-lapse frames (such as JPEG images).
[0053] Optionally, if hardware resources permit, the central frame management queue can also be configured with a "raw data buffer". This buffer is used to temporarily store raw data (raw data) after the image sensor output has been processed by the video encoder; and / or to cache high-quality intermediate image data (such as video frame images in the initial video data) after processing by the ISP (Image Signal Processor).
[0054] Understandably, the raw data captured by the sensor and the image data processed by the ISP retain richer image information and higher image quality potential compared to encoded video frames or JPEG images. Its main uses include at least: High-quality archive: When needed later, this raw data can be encoded into high-quality images or videos, providing users with footage that surpasses the quality of conventional photography.
[0055] Advanced visual analytics: Provides data sources for more complex computer vision algorithms on image acquisition devices that require high-quality image input.
[0056] Based on the above embodiments, this embodiment further explains step S130. Specifically, the method for generating time-lapse frames according to the target video data and the encoding type of the target video data in step S130 may include the following steps S131 to S132.
[0057] Step S131: Determine whether the encoding type is keyframe encoding or non-keyframe encoding.
[0058] Once the target video data is determined, the corresponding method can be selected to generate time-lapse frames based on the target video data and its encoding type.
[0059] The encoding type may include keyframe encoding (I-frame encoding) or non-keyframe encoding (non-I-frame encoding). For a detailed explanation, please refer to the foregoing embodiments, which will not be repeated here.
[0060] It should be noted that the process of determining whether the encoding type is I-frame encoding or non-I-frame encoding in this application can be based on the type of video frames planned to be generated in the current acquisition cycle, or on the frame type position in the GOP structure at the current moment. The purpose of determining the encoding type is mainly to decide on the subsequent frame generation strategy.
[0061] Since the method for generating time-lapse frames in this application can be: generating time-lapse frames in parallel using video data (or raw data) before the video data is encoded into I-frames or P-frames, it is not necessary to perform encoding type parsing on already encoded video frames when determining the encoding type. It can also be to determine the type that the unencoded video data is planned to be encoded into, which will not be elaborated here.
[0062] Step S132: In response to the encoding type being keyframe encoding, a time-lapse photography frame is generated based on the target video data.
[0063] For example, when in AOV mode and reaching the time-lapse photography acquisition point (time of time-lapse photography task), the lossless frame acquisition process is started as follows.
[0064] Determine whether the encoding type of the target video data acquired in the current low-power task is keyframe encoding, which is equivalent to determining whether the target video frame acquired at the moment is exactly an I-frame in the AOV video stream.
[0065] If the target video data is encoded as keyframe (or the video frame corresponding to the target video data is an I-frame), a second-resolution independent image can be generated based on the target video data and marked as a time-lapse frame; or the I-frame image can be directly reused as a time-lapse frame.
[0066] Therefore, target video data that generates I-frames directly from the AOV video stream can be reused to generate corresponding time-lapse frames, saving power consumption when performing a complete time-lapse photography task.
[0067] Based on the above embodiments, this embodiment further describes step S132. Specifically, the method for generating time-lapse frames based on target video data in step S132 may include steps S1321 to S1322.
[0068] Step S1321: Generate a target image based on the target video data, and determine the target image as the time-lapse frame of the time-lapse photography task.
[0069] The target image generated from the target video data (data before I-frame encoding) can be a second-resolution JPEG image, as mentioned in the previous example, which can also be used as a time-lapse frame.
[0070] Therefore, the target image is labeled and identified as a time-lapse frame for the time-lapse photography task.
[0071] Alternatively, one could decode the I-frame and then use the decoded data to generate a time-lapse frame (which may be less efficient), but this is not a limitation here.
[0072] Step S1322 involves performing keyframe encoding on the target video data to obtain the video keyframes corresponding to the low-power task.
[0073] Simultaneously, I-frame encoding can be performed on the target video data to obtain the video keyframes (I-frames of the AOV video stream) corresponding to the low-power task in AOV mode.
[0074] Therefore, when the image acquisition device supports the one-in-many-out function (usually provided by the ISP), video frames and time-lapse frames can be generated in parallel according to the method of this embodiment.
[0075] Specifically, after a single sensor exposure, low-resolution data can be output simultaneously for video frame encoding in AOV tasks, and high-resolution data can be used to generate JPEG images for time-lapse photography tasks.
[0076] The following example illustrates the application scenarios for time-lapse photography tasks in AOV mode.
[0077] AOV mode: period interval T_aov=5 seconds, resolution 720P, H.264 encoding, GOP=30 (one I-frame every 30 frames).
[0078] Time-lapse photography task: period interval T_tl=30 seconds (N=6), resolution 4K.
[0079] A comprehensive analysis of the above AOV acquisition parameters and time-lapse photography acquisition parameters shows that the system can simultaneously trigger the acquisition of AOV video frames and time-lapse photography frames at 0, 30, 60 seconds, etc.
[0080] At second 0, a natural I-frame point (GOP start) is established, which can trigger the lossless frame acquisition process described in the previous embodiment. The ISP generates a 720P frame for video encoding and a 4K JPEG image as a time-lapse frame in parallel.
[0081] At seconds 5, 10, 15...25, AOV captures and generates P-frames, while time-lapse photography shows no motion.
[0082] At the 30-second mark, the AOV captures and generates a P-frame, simultaneously triggering time-lapse photography. Therefore, time-lapse frames can be generated based on the raw data corresponding to the P-frame.
[0083] Throughout the entire process, the AOV video stream remains completely undisturbed and does not require a full wake-up of the main camera system.
[0084] Another example is that if the first resolution required for an I-frame in an AOV task is different from the second resolution required for a time-lapse frame in a time-lapse photography task, then an ISP is needed to generate two image frames in parallel at the two resolutions.
[0085] If the first resolution and the second resolution are the same, then I-frame data can be directly reused as time-lapse frames.
[0086] Based on the above embodiments, this embodiment describes the method after step S131. Specifically, after determining whether the encoding type is keyframe encoding or non-keyframe encoding in step S131, the following steps S133 to S134 may also be included.
[0087] Step S133: In response to the encoding type being non-keyframe encoding, acquire the original image data of the same source as the target video data within the low-power acquisition cycle corresponding to the target video data.
[0088] In this context, "same source" means that the data comes from the same data source, which means that the original image data and the target video data in this step were collected within the same data acquisition cycle.
[0089] For example, after the sensor acquires the raw image data at time A, the ISP processor processes the raw image data to obtain the target video data. That is, the "target video data" and the "raw image data" acquired by the sensor at time A have the same origin.
[0090] Referring to the foregoing embodiments, if the target video data is encoded as a non-keyframe encoding, for example, if the currently acquired target video frame is a P-frame, then the P-frame data cannot be directly used for time-lapse photography.
[0091] Therefore, in this embodiment, when the encoding type of the target video data is non-keyframe encoding, the original image data in the low-power acquisition cycle of the target video data can be obtained to generate time-lapse frames. This achieves the effect of single sensor acquisition and dual-channel data output, obtaining time-lapse frames and P-frames in parallel.
[0092] Step S134: Generate time-lapse frames based on the original image data.
[0093] For example, the controllable image signal processor (ISP) can generate a second-resolution independent image in parallel based on the raw image data of the sensor within the acquisition cycle corresponding to this time-lapse photography task (that is, within the low-power acquisition cycle of the target video data), and mark it as a time-lapse photography frame.
[0094] Another example is given, in conjunction with the foregoing embodiments, using the scenario in this embodiment where the time-lapse photography period interval T_tl = 10 seconds (N = 2) as an example.
[0095] In the AOV task, P-frames (non-keyframes) should be generated at 10 and 20 seconds. Simultaneously, time-lapse photography will also be triggered at 10 and 20 seconds.
[0096] Therefore, after receiving the acquired raw data, the ISP processes it internally in parallel: it outputs 720P video frame data and encodes it into P-frames according to the normal process; at the same time, it uses the raw data to generate a 4K JPEG image as a time-lapse frame.
[0097] The 4K image can be stored in the central frame management queue. The AOV video stream is still increased by a normal P frame, rather than an I frame that disrupts the GOP structure. This keeps the bit rate stable and does not require waking up the main camera system.
[0098] Therefore, even though P-frames should be generated in the AOV video stream when performing time-lapse photography, the encoding process of the AOV video stream is not affected because the time-lapse frames are generated in parallel using raw data in this embodiment. This cleverly avoids the technical difficulty of being unable to decode independently caused by directly using P-frames as time-lapse frames. At the same time, it avoids forcibly refreshing the GOP structure to obtain I-frames, thus ensuring the bitrate stability and storage efficiency of the AOV video stream; its GOP structure, bitrate, and storage size can remain unchanged.
[0099] Based on the above embodiments, this embodiment further explains that, in this application, when the image acquisition device needs to perform AOV tasks and time-lapse photography tasks, a preset cooperative mode can be enabled to coordinate the low-power acquisition cycle of the AOV task and the time-lapse photography cycle of the time-lapse photography task. Specifically, the method of this embodiment may include the following steps S210 to S230.
[0100] It should be noted that in this embodiment, by adjusting the cycle of the AOV task and the cycle of the time-lapse photography task through the collaborative mode, the AOV camera can be made to capture AOV video frames exactly when it reaches the time-lapse photography acquisition point (time of the time-lapse photography task).
[0101] Therefore, time-lapse frames can be generated by reusing the video data corresponding to AOV video frames, avoiding the need to fully wake up the main camera system.
[0102] Furthermore, by using certain settings, the AOV camera can be configured so that when it reaches the time-lapse photography acquisition point (time of the time-lapse photography task), the video frame acquired in the current AOV task is exactly I-frame data, so that the method described in steps S1321 to S1322 can always be run in the most efficient way.
[0103] This minimizes the scenarios where time-lapse photography is triggered when acquiring non-critical frames, requiring the reading of P-frame raw data, thus further reducing system power consumption and processing complexity.
[0104] Step S210: Obtain the low-power acquisition period corresponding to the low-power task and the time-lapse photography period of the time-lapse photography task.
[0105] For example, the low-power acquisition period T_aov corresponding to the low-power task and the time-lapse photography period T_tl of the time-lapse photography task are obtained.
[0106] The low-power acquisition cycle refers to performing an image acquisition once every T_aov time interval. Similarly, the time-lapse photography cycle refers to performing an image acquisition once every T_tl time interval.
[0107] Step S220: Determine whether the low-power acquisition cycle and the time-lapse photography cycle match.
[0108] The method for determining whether the low-power acquisition period and the time-lapse photography period match may include determining whether the time-lapse photography period is an integer multiple of the low-power acquisition period.
[0109] For example, the multiple relationship N between T_tl and T_aov can be calculated; if N≥1 and N is an integer, then the low-power acquisition period and the time-lapse photography period are determined to match; otherwise, the low-power acquisition period and the time-lapse photography period are determined to be mismatched.
[0110] Step S230: If not, adjust the low-power acquisition cycle and / or time-lapse photography cycle.
[0111] Based on the steps described above, after obtaining the multiplier relationship N, if it is determined that the low-power acquisition period and the time-lapse photography period are mismatched, the low-power acquisition period, the time-lapse photography period, or both can be adjusted to make them match.
[0112] Based on the above embodiments, this embodiment further describes step S230. Specifically, the method for adjusting the low-power acquisition period and / or time-lapse photography period in step S230 may include the following steps S231 to S232.
[0113] Step S231: Adjust the low-power acquisition period and the time-lapse photography period to be an integer multiple relationship.
[0114] Step S232, or, adjust the duration of the image group for the low-power task to be an integer multiple of the time-lapse photography period.
[0115] For example, the low-power acquisition period and / or time-lapse photography period can be directly adjusted to make them integer multiples of each other.
[0116] This ensures that each time time-lapse photography is triggered, it coincides with the time when video frames are captured in the AOV task, allowing time-lapse frames to be generated directly from the video data captured by the AOV.
[0117] Another example is that the coordinator can issue coordinator adjustment instructions to the video encoder to dynamically adjust the GOP (group of pictures) length of the AOV video stream.
[0118] Therefore, by adjusting the GOP length, the duration of the GOP can be set to an integer multiple of the time-lapse photography period (T_tl), ensuring that each time time-lapse photography is triggered, it coincides with the time when an I-frame is captured in the AOV task. Alternatively, when T_tl = N * T_aov, the GOP length can be directly set to N.
[0119] By adjusting the above methods, the generation time of the naturally acquired video frames in the AOV video stream can be aligned with the acquisition time of the time-lapse photography (i.e., the task time of the time-lapse photography task), which means that the video data of the generated video frames can be used to synchronously generate time-lapse photography frames.
[0120] Based on the above embodiments, this embodiment should also note that the specific timing of the implementation of the periodic coordinated adjustment method provided in the foregoing embodiments is not limited in this application. For example, it can be implemented before step S110 or after step S130. Furthermore, the method for adjusting the period can be implemented automatically or manually, and is not limited here.
[0121] For example, the time-lapse photography method of this application may also include steps S310 to S320.
[0122] Step S310: Obtain the low-power acquisition cycle corresponding to the low-power task.
[0123] In step S320, in response to receiving the user's setting instruction for the time-lapse photography task, recommended setting parameters for the time-lapse photography task are generated based on the low-power acquisition cycle.
[0124] For example, if a user's setting instruction for a time-lapse photography task is received, one or more recommended setting parameters (such as a recommended time-lapse photography period) for the time-lapse photography task can be determined based on the low-power acquisition period of the current AOV task, according to the period coordination adjustment method in the foregoing embodiments. The recommended setting parameters enable the generation time of video frames in the AOV task to be aligned with the acquisition time of the time-lapse photography.
[0125] Alternatively, upon receiving a user's configuration instruction for the AOV task, one or more recommended configuration parameters for the AOV task can be determined using the aforementioned method, which will not be elaborated upon here.
[0126] As another example, when users set up AOV and time-lapse photography tasks, one or more sets of recommended setting parameters for AOV and time-lapse photography tasks can be generated by referring to the aforementioned method, which will not be elaborated here.
[0127] Based on the above embodiments, it should be noted that the AOV camera's operating modes include AOV mode and continuous recording mode. Referring to relevant AOV camera products in this technical field, generally, the AOV camera switches from AOV mode to continuous recording mode when a target event is detected.
[0128] This embodiment describes a scenario where a time-lapse photography task is received in continuous recording mode. Specifically, the method in this embodiment may include the following steps S410 to S430.
[0129] Step S410: In response to the time-lapse photography task received during the execution of the continuous recording task, the continuous recording task is paused.
[0130] Step S420: Acquire time-lapse frames according to the time-lapse photography task.
[0131] Step S430, continue to run the continuous video recording task.
[0132] It should be noted that in the traditional method, if the AOV camera receives a time-lapse shooting task (time-lapse shooting instruction) in the continuous video recording mode, it usually chooses to ignore the time-lapse shooting instruction or wakes up the main photography system for shooting after the continuous video recording task ends. The traditional method may result in missed shots or high-power shooting.
[0133] In this embodiment, when a time-lapse photography task is received during the execution of the continuous video recording task, the method of inserting key frames can be used to first pause the continuous video recording task, switch to the time-lapse photography task to collect time-lapse photography frames, and then switch back to the continuous video recording task to continue execution.
[0134] Thus, through the task switching mechanism, the time-lapse photography task occupies a very short time during the continuous video recording task to generate time-lapse photography frames, avoiding the more power consumption required to fully start the main photography system.
[0135] Exemplarily, in response to the time-lapse photography task received during the execution of the continuous video recording task, pause the continuous video recording task (force interruption of the current continuous video stream).
[0136] Control the Sensor sensor and the ISP image processor to quickly switch to the acquisition parameters corresponding to the time-lapse photography task (such as the second resolution), acquire a frame of high-quality image, and mark the high-quality image to obtain the time-lapse photography frame.
[0137] Then switch back to the acquisition parameters corresponding to the original continuous video recording task and continue to run the continuous video recording task.
[0138] In summary, this embodiment proposes a minimum-interference interruption recovery mechanism for the continuous video recording mode. Based on the core of "fast switching" and "state preservation", it can complete the configuration switching, acquisition and recovery of the Sensor sensor and the ISP processor within milliseconds (e.g., <50ms).
[0139] Reduce a full-function wake-up process that originally consumed energy E to a local mode switch with only energy consumption e (where e << E), significantly reducing power consumption.
[0140] It should be noted that the task switching mechanism provided in the foregoing embodiment can also be applied to image acquisition devices that do not support one-input and multiple-outputs. When a time-lapse photography task is triggered in the AOV mode, when the acquisition time of the time-lapse photography frame arrives, it can first switch to the time-lapse photography resolution to acquire the image and then immediately switch back to the resolution in the original AOV mode to continue the task processing in the AOV mode. For the specific method principle, reference can be made to the methods provided in the foregoing multiple embodiments, and details are not described here.
[0141] It should be further noted that the execution entity of the low-power time-lapse photography method can be a low-power time-lapse photography device. For example, the low-power time-lapse photography method can be executed by a terminal device, a server, or other processing devices. The terminal device can be a user equipment (UE), computer, mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, the low-power time-lapse photography method can be implemented by the processor calling computer-readable instructions stored in memory.
[0142] Figure 2 This is a block diagram illustrating a low-power time-lapse photography device, as shown in an exemplary embodiment of this application. Figure 2 As shown, this exemplary low-power time-lapse photography device 200 includes: an acquisition module 210, a target determination module 220, and a time-lapse generation module 230. Specifically: The acquisition module 210 is used to acquire the initial video data collected under low-power tasks.
[0143] The target determination module 220 is used to determine the target video data in the initial video data based on the task time when the time-lapse photography task is received, in response to a time-lapse photography task received during the execution of a low-power task.
[0144] The time-lapse generation module 230 is used to generate time-lapse frames based on the target video data and the encoding type of the target video data.
[0145] In this exemplary low-power time-lapse photography device, by acquiring the initial video data collected by the image acquisition device under low-power task conditions, if the image acquisition device receives a time-lapse photography task while performing a low-power task, the target video data in the initial video data can be determined based on the task time when the time-lapse photography task is received. Then, a time-lapse photography frame is generated based on the target video data and its encoding type. This reduces the problem of traditional methods requiring the image acquisition device to be fully woken up to perform time-lapse photography when a time-lapse photography task is received in low-power mode, reduces the logic and duration of separate processing for time-lapse photography tasks, thereby significantly saving power, improving the battery life of the image acquisition device, and optimizing power consumption in the time-lapse photography process.
[0146] It should be noted that the apparatus and method provided in the above embodiments belong to the same concept, and the specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the apparatus provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above, and this is not a limitation.
[0147] The functions of each module can be found in the implementation examples of the low-power time-lapse photography method, and will not be repeated here.
[0148] Please see Figure 3 , Figure 3 This is a schematic diagram of an embodiment of the electronic device of this application. The electronic device 100 includes a memory 101 and a processor 102. The processor 102 is used to execute program instructions stored in the memory 101 to implement the steps in any of the above embodiments of the low-power time-lapse photography method. In a specific implementation scenario, the electronic device 100 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 100 may also include mobile devices such as laptops and tablets, which are not limited here.
[0149] Specifically, processor 102 controls itself and memory 101 to implement the steps in any of the above embodiments of the low-power time-lapse photography method. Processor 102 can also be referred to as a CPU (Central Processing Unit). Processor 102 may be an integrated circuit chip with signal processing capabilities. Processor 102 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 102 can be implemented using integrated circuit chips.
[0150] In this exemplary electronic device, by acquiring initial video data collected by an image acquisition device under low-power task conditions, if the image acquisition device receives a time-lapse photography task while performing a low-power task, the target video data in the initial video data can be determined based on the task time when the time-lapse photography task is received. Then, a time-lapse frame is generated based on the target video data and its encoding type. This reduces the need for the image acquisition device to be fully woken up for time-lapse photography when a time-lapse photography task is received in low-power mode, as is the problem in traditional methods. It also reduces the logic and duration of separate processing for the time-lapse photography task, thus significantly saving power, improving the battery life of the image acquisition device, and optimizing power consumption during the time-lapse photography process.
[0151] Please see Figure 4 , Figure 4 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 110 stores program instructions 111 that can be executed by a processor. The program instructions 111 are used to implement the steps in any of the above embodiments of the low-power time-lapse photography method.
[0152] In this exemplary storage medium, by running the program instructions in the storage medium, the initial video data acquired by the image acquisition device under low-power task is obtained. If the image acquisition device receives a time-lapse photography task while performing the low-power task, the target video data in the initial video data can be determined based on the task time when the time-lapse photography task is received. Then, a time-lapse photography frame is generated based on the target video data and its encoding type. This reduces the problem of traditional methods requiring the image acquisition device to be fully woken up to perform time-lapse photography when a time-lapse photography task is received in low-power mode. It also reduces the logic and duration of separate processing for time-lapse photography tasks, thereby significantly saving power, improving the battery life of the image acquisition device, and optimizing power consumption in the time-lapse photography process.
[0153] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0154] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0155] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0156] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A time-lapse photography method based on low power consumption, characterized in that, The method includes: Acquire initial video data collected under low-power tasks; In response to a time-lapse photography task received while performing the low-power task, the target video data in the initial video data is determined based on the task time when the time-lapse photography task is received; Time-lapse frames are generated based on the target video data and the encoding type of the target video data.
2. The method according to claim 1, characterized in that, The step of generating time-lapse frames based on the target video data and the encoding type of the target video data includes: Determine whether the encoding type is keyframe encoding or non-keyframe encoding; In response to the encoding type being the keyframe encoding, the time-lapse frame is generated based on the target video data.
3. The method according to claim 2, characterized in that, The step of generating the time-lapse frame based on the target video data includes: A target image is generated based on the target video data, and the target image is determined as the time-lapse frame of the time-lapse photography task. Furthermore, the target video data is subjected to keyframe encoding processing to obtain the video keyframes corresponding to the low-power task.
4. The method according to claim 2, characterized in that, After determining whether the encoding type is keyframe encoding or non-keyframe encoding, the method further includes: In response to the encoding type being the non-keyframe encoding, the original image data of the same source as the target video data within the low-power acquisition cycle corresponding to the target video data is acquired. The time-lapse frame is generated based on the original image data.
5. The method according to claim 1, characterized in that, The method further includes: In response to a time-lapse photography task received during the execution of a continuous recording task, the continuous recording task is paused. The time-lapse photography frames are acquired according to the time-lapse photography task; Continue running the continuous recording task.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the low-power acquisition period corresponding to the low-power task and the time-lapse photography period of the time-lapse photography task; Determine whether the low-power acquisition period and the time-lapse photography period match; If not, the low-power acquisition period and / or the time-lapse photography period shall be adjusted.
7. The method according to claim 6, characterized in that, The adjustment process for the low-power acquisition period and / or the time-lapse photography period includes: The low-power acquisition period and the time-lapse photography period are adjusted to be integer multiples of each other. Alternatively, the duration of the image group for the low-power task can be adjusted to be an integer multiple of the time-lapse photography period.
8. The method according to claim 1, characterized in that, The method further includes: Obtain the low-power acquisition period corresponding to the low-power task; In response to receiving a user's setting instruction for the time-lapse photography task, recommended setting parameters for the time-lapse photography task are generated based on the low-power acquisition cycle.
9. An electronic device, characterized in that, The method includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the method described in any one of claims 1 to 8.