Video acquisition control method, device, equipment and storage medium
By obtaining the current timestamp and phase of the acquisition end and adjusting the exposure time, the synchronization problem caused by crystal oscillation drift at the acquisition end is solved, and synchronous acquisition of video frames is achieved.
Patent Information
- Application Number
- CN202310239332.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-03-08
AI Technical Summary
In the prior art, the acquisition end will cause crystal oscillator drift and other conditions during the acquisition of video frames, resulting in time errors and cannot synchronously acquire video frames.
By obtaining the current acquisition timestamp corresponding to the current video frame of each acquisition end, the current acquisition phase is determined based on the preset frame rate, and the exposure time of the target acquisition end is adjusted to synchronize its acquisition phase.
Synchronous acquisition of video frames is realized, avoiding the problem of acquisition phase outage caused by crystal oscillator drift and other conditions.
Smart Images

Figure CN116249004B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to computer technology, and more particularly to a video acquisition control method, apparatus, device and storage medium. Background Art
[0002] With the rapid development of computer technology, at least two acquisition terminals, such as mobile phones, can be used to acquire video frames from different perspectives to obtain free-perspective video. Figure 1 A video frame acquisition example is given, such as Figure 1 As shown in FIG. 1 , due to the different degrees of crystal oscillator drift and other conditions that occur during the acquisition of video frames by the acquisition end, there is a time error, which makes it impossible for the acquisition end to synchronously acquire video frames. It can be seen that there is an urgent need for a method that can control the acquisition end to synchronously acquire video frames. Summary of the invention
[0003] The present disclosure provides a video acquisition control method, apparatus, device and storage medium to synchronize the acquisition phase of an acquisition end, thereby achieving synchronous acquisition of video frames.
[0004] In a first aspect, an embodiment of the present disclosure provides a video acquisition control method, wherein the video is acquired by at least two acquisition terminals, and each acquisition terminal acquires video frames at a corresponding viewing angle based on a preset frame rate, and the method includes:
[0005] Get the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end;
[0006] Based on the preset frame rate and the current acquisition timestamp, determining a current acquisition phase corresponding to a current video frame acquired by each acquisition end;
[0007] Based on the current acquisition phase, determining a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized;
[0008] Determine the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase;
[0009] Based on the target exposure time, a single-frame exposure time adjustment is performed on subsequent video frames captured by the target capture end, so that the capture phase of the target capture end is synchronized to the target capture phase.
[0010] In a second aspect, an embodiment of the present disclosure further provides a video acquisition control device, wherein the video is acquired by at least two acquisition terminals, each acquisition terminal acquires video frames at a corresponding viewing angle based on a preset frame rate, and the device comprises:
[0011] The current acquisition timestamp acquisition module is used to obtain the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end;
[0012] A current acquisition phase determination module, used to determine a current acquisition phase corresponding to a current video frame acquired by each acquisition end based on the preset frame rate and the current acquisition timestamp;
[0013] A target acquisition end determination module, configured to determine, based on the current acquisition phase, a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized;
[0014] A target exposure time determination module, used to determine the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase;
[0015] The exposure time adjustment module is used to adjust the single-frame exposure time of subsequent video frames collected by the target collection end based on the target exposure time, so that the collection phase of the target collection end is synchronized to the target collection phase.
[0016] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0017] one or more processors;
[0018] a storage device for storing one or more programs,
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the video acquisition control method as described in any one of the embodiments of the present disclosure.
[0020] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the video acquisition control method as described in any one of the embodiments of the present disclosure.
[0021] The disclosed embodiments obtain the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end, determine the current acquisition phase corresponding to the current video frame acquired by each acquisition end based on the preset frame rate and the current acquisition timestamp of the acquired video frame, and determine the target acquisition end that needs to synchronize the phase and the target acquisition phase to which the target acquisition end needs to be synchronized based on the current acquisition phase; determine the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the changing relationship between the exposure time and the acquisition phase; and adjust the single-frame exposure time of subsequent video frames acquired by the target acquisition end based on the target exposure time, so that the target acquisition end is adjusted from the current acquisition phase to the target acquisition phase, thereby synchronizing the acquisition phase of the target acquisition end by adjusting the single-frame exposure time, avoiding the situation where the acquisition phase is not synchronized due to crystal oscillator drift and the like, thereby realizing synchronous acquisition of video frames. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0023] Figure 1 It is an example of video frame acquisition in the prior art;
[0024] Figure 2 It is a flowchart of a video acquisition control method provided by an embodiment of the present disclosure;
[0025] Figure 3 is an example of a synchronous acquisition phase involved in the embodiments of the present disclosure;
[0026] Figure 4 is a flowchart of another video acquisition control method provided by an embodiment of the present disclosure;
[0027] Figure 5 is a structural schematic diagram of a video acquisition control device provided by an embodiment of the present disclosure;
[0028] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0030] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0036] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0037] Figure 2A flow chart of a video acquisition control method provided in an embodiment of the present disclosure is applicable to controlling at least two acquisition terminals to synchronously acquire video frames. The method can be executed by a video acquisition control device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC, a server, etc.
[0038] like Figure 2 As shown, the video acquisition control method specifically includes the following steps:
[0039] S110: Obtain a current acquisition timestamp corresponding to a current video frame acquired by each acquisition end.
[0040] The video is collected by at least two acquisition terminals, and each acquisition terminal collects video frames under the corresponding viewing angle based on a preset frame rate. For example, the collected video may refer to a free-viewing angle video, that is, a video that can be viewed at different viewing angles. The acquisition terminal refers to any terminal device that can collect video frames. For example, the acquisition terminal may be a mobile terminal with a camera, such as a mobile phone, a tablet computer, a camera, etc. The number of acquisition terminals is at least two, so as to collect video frames under at least two different viewing angles, so that the user can watch videos under at least two different viewing angles. All acquisition terminals used to collect the same video have the same brand and model, which further ensures the synchronous acquisition of video frames.
[0041] Among them, the preset frame rate can be a frame rate that is set in advance based on business needs and actual scenarios, and is used by the acquisition end to acquire video frames. For example, the preset frame rate can be 30fps, that is, 30 frames are acquired per second. The current video frame can refer to the video frame acquired by the acquisition end at the current moment. The current acquisition timestamp can be a timestamp used to represent the start of acquisition of the current video frame. The timestamp can be represented directly by the current moment, or it can be represented by the interval length from a fixed moment to the current moment. At this time, each acquisition end will determine the timestamp based on the same fixed moment, so that the timestamp can be used to measure whether the acquisition is synchronized.
[0042] Specifically, at least two acquisition terminals can be used to acquire video frames of the same object at the same preset frame rate at different viewing angles, thereby obtaining video frames at different viewing angles. In the process of each acquisition terminal acquiring video frames, the control terminal can obtain the current acquisition timestamp corresponding to the current video frame acquired by each acquisition terminal in real time, so as to synchronize the acquisition phases of all acquisition terminals in real time; or the current acquisition timestamp corresponding to the current video frame acquired by each acquisition terminal can be obtained at regular intervals. In order to synchronize the acquisition phase at regular intervals, synchronization resources can be saved. Among them, the interval of regular acquisition can be determined based on the degree of crystal oscillator drift of the acquisition terminal. For example, the value range of the regular interval can be 5 minutes to 15 minutes.
[0043] It should be noted that, since each acquisition end may produce different degrees of crystal oscillator drift and other conditions in the process of collecting video frames, the time interval between each adjacent frame collected by each acquisition end is not strictly equal. For example, when collecting video frames at 30fps, the time interval between each adjacent frame is not strictly 33.3333 milliseconds. The time interval between each adjacent frame collected by different acquisition ends is different, and the time interval between each adjacent frame collected by the same acquisition end may also have nanosecond-level jitter. For example, the crystal oscillator drift generated by the acquisition end itself will cause a millisecond-level time error in one minute. In response to this, the control end can synchronize the acquisition phases in all acquisition ends so that all acquisition ends can synchronously collect video frames to avoid time errors caused by crystal oscillator drift and other conditions.
[0044] S120: Determine a current acquisition phase corresponding to a current video frame acquired by each acquisition end based on a preset frame rate and a current acquisition timestamp.
[0045] Among them, the current acquisition phase may refer to the acquisition phase when the current video frame is acquired. The acquisition phase may refer to the position of the start acquisition position point in the cyclic acquisition period corresponding to the preset frame rate. For example, when the preset frame rate is 20fps, that is, 20 frames are acquired per second, and the acquisition period corresponding to each frame is 50 milliseconds, if the actual start acquisition position point corresponding to a certain video frame is the 51st millisecond, then the position of the actual start acquisition position point of the video frame in the acquisition period is used as the acquisition phase of the video frame. For example, the difference (i.e. 1 millisecond) between the actual start acquisition position point (i.e. 51st millisecond) and the standard start acquisition position point (i.e. 50th millisecond) can be used as the acquisition phase of the video frame, or the ratio between the difference and the acquisition period can be used as the acquisition phase of the video frame.
[0046] Specifically, the control end may determine the current acquisition phase corresponding to the current video frame acquired by each acquisition end based on the current acquisition timestamp corresponding to the current video frame acquired by each acquisition frame within the acquisition period corresponding to the preset frame rate.
[0047] Exemplarily, S120 may include: determining a standard acquisition duration of a single video frame based on a preset frame rate; determining a total acquisition duration from the first video frame acquired by each acquisition end to the current video frame based on a current acquisition timestamp corresponding to the current video frame acquired by each acquisition end and a first acquisition timestamp corresponding to the first video frame acquired; performing modulo processing on the total acquisition duration and the standard acquisition duration to determine a current acquisition phase corresponding to the current video frame acquired by each acquisition end.
[0048] The standard acquisition duration may refer to the acquisition duration that a single video frame should have when there is no crystal oscillator drift. For example, if the preset frame rate is 20fps, the standard acquisition duration corresponding to a single video frame is 50 milliseconds.
[0049] Specifically, the reciprocal of the preset frame rate can be taken to obtain the standard acquisition duration of a single video frame. When the current moment is used to represent the current acquisition timestamp, for each acquisition end, the interval duration between the current acquisition timestamp corresponding to the current video frame acquired by the acquisition end and the first acquisition timestamp corresponding to the first video frame acquired can be used as the total acquisition duration from the first video frame acquired by the acquisition end to the current video frame. The total acquisition duration is subjected to the remainder processing with the standard acquisition duration, and the obtained remainder can be directly used as the current acquisition phase corresponding to the current video frame acquired by the acquisition end, or the ratio between the obtained remainder and the standard acquisition duration can be used as the current acquisition phase corresponding to the current video frame acquired by the acquisition end.
[0050] Exemplarily, when the interval from a fixed moment to the current moment is used to represent the current acquisition timestamp, the current acquisition timestamp and the standard acquisition duration can be directly modulo processed, and the obtained remainder can be directly used as the current video frame captured by the acquisition end, or the ratio between the obtained remainder and the standard acquisition duration can be used as the current acquisition phase corresponding to the current video frame captured by the acquisition end.
[0051] S130. Based on the current acquisition phase, determine a target acquisition end that needs to be synchronized with a phase and a target acquisition phase to which the target acquisition end needs to be synchronized.
[0052] The target acquisition end may refer to an acquisition end whose acquisition phase is not synchronized among all acquisition ends. The target acquisition phase may refer to an acquisition phase to which the target acquisition end needs to be adjusted. There may be one or more target acquisition ends.
[0053] Specifically, the current acquisition phase of each acquisition end for acquiring the current video frame can be compared to determine all target acquisition ends that need to synchronize the phases and the target acquisition phase to which each target acquisition end needs to adjust from the current acquisition phase, so that the acquisition phases of all acquisition ends are synchronized, thereby all acquisition ends can synchronously acquire video frames.
[0054] Exemplarily, the determination process of the target acquisition end can be implemented in at least the following two ways:
[0055] As an implementation method, S130 may include: determining the acquisition phase difference corresponding to each acquisition end based on the current acquisition phase and the preset standard phase corresponding to each acquisition end; determining the acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference as the target acquisition end that needs to be synchronized with the phase, and determining the preset standard phase as the target acquisition phase to which the target acquisition end needs to be synchronized.
[0056] Among them, the preset standard phase can be a preset standard acquisition phase for the acquisition end to acquire video frames. The preset phase difference can be a preset maximum value of the allowed acquisition phase fluctuation. Specifically, the synchronization of the acquisition phase can be achieved by synchronizing the current acquisition phase of all acquisition ends that acquire the current video frame to the preset standard phase. For this method, the difference between the current acquisition phase corresponding to each acquisition end and the preset standard phase can be used to determine the acquisition phase difference corresponding to the corresponding acquisition end, and the acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference is determined as the target acquisition end that needs to synchronize the phase. The preset standard phase is determined as the target acquisition phase that each target acquisition end needs to synchronize to. The acquisition end whose acquisition phase difference is less than the preset phase difference is the acquisition end that does not need to adjust the acquisition phase. By adjusting the acquisition phase of all target acquisition ends to the preset standard phase, each acquisition end can acquire video frames with the preset standard phase, thereby achieving synchronization of the acquisition phase.
[0057] As another implementation method, S130 may include: determining the acquisition phase difference between the first acquisition end and each second acquisition end based on the current acquisition phase corresponding to the first acquisition end and the current acquisition phase corresponding to each second acquisition end; determining the second acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference as the target acquisition end that needs to be synchronized with the phase, and determining the current acquisition phase corresponding to the first acquisition end as the target acquisition phase to which the target acquisition end needs to be synchronized.
[0058] Among them, the first acquisition end may be an acquisition end used as a synchronization standard. The second acquisition end may be an acquisition end other than the first acquisition end. The preset phase difference may be a preset maximum value of the allowed acquisition phase fluctuation. Specifically, the synchronization of the acquisition phase may be achieved by synchronizing the current acquisition phase of all second acquisition ends for acquiring the current video frame to the current acquisition phase of the first acquisition end. For this method, the acquisition phase difference corresponding to the corresponding second acquisition end may be determined by the difference between the current acquisition phase corresponding to each second acquisition end and the current acquisition phase corresponding to the first acquisition end, and the second acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference may be determined as the target acquisition end that needs to synchronize the phase. The current acquisition phase corresponding to the first acquisition end is determined as the target acquisition phase that each target acquisition end needs to synchronize to. The acquisition end whose acquisition phase difference is less than the preset phase difference is the acquisition end that does not need to adjust the acquisition phase. By adjusting the acquisition phase of all second acquisition ends to the acquisition phase of the first acquisition end, each second acquisition end may acquire a video frame with the acquisition phase of the first acquisition end, thereby achieving synchronization of the acquisition phase.
[0059] S140: Determine a target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase.
[0060] The exposure time may be the time that the shutter is open when capturing video frames. The exposure time may affect the capture duration of the video frames, thereby affecting the capture phase of the video frames. By extending the exposure time of a certain video frame, the capture duration of the video frame may be extended, thereby changing the capture phase of the subsequently captured video frames. The relationship between the exposure time and the capture phase may be predetermined, and the corresponding relationship between the exposure time change and the capture phase change may be predetermined.
[0061] Specifically, for each target acquisition end, the difference between the current acquisition phase corresponding to the target acquisition end and the target acquisition phase can be determined as the target phase difference corresponding to the target acquisition end, and based on the changing relationship between the exposure time and the acquisition phase, the exposure extension time corresponding to the target phase difference is determined, and based on the exposure extension time and the minimum exposure time that affects the change in the acquisition phase, the target exposure time for adjusting the current acquisition phase of the target acquisition end to the target acquisition phase is determined.
[0062] S150: Based on the target exposure time, adjust the single-frame exposure time of subsequent video frames acquired by the target acquisition end, so that the acquisition phase of the target acquisition end is synchronized to the target acquisition phase.
[0063] Each acquisition terminal has a function of adjusting the exposure time of a single frame. For example, the operating system of each acquisition terminal is an Android system, so that the acquisition terminal supports adjusting the exposure time of a single frame.
[0064] Specifically, the exposure time of the target acquisition end can be temporarily adjusted to the target exposure time. After the target acquisition end acquires a subsequent video frame based on the adjusted target exposure time, the exposure time of the target acquisition end is readjusted to the original exposure time, and the acquisition is continued using the original exposure time. Thus, by extending the exposure time of a video frame, the acquisition phase corresponding to the subsequent video frame of the video frame can be made the target acquisition phase, thereby achieving synchronization of the acquisition phase. For example, Figure 3 An example of synchronous acquisition phase is given. Figure 3 As shown, the acquisition phase corresponding to the Mth frame is 50% of the acquisition cycle (the position indicated by the dotted line in the figure). The acquisition phase 50% of the acquisition end is greater than the preset standard phase 0, and it is necessary to trigger the adjustment of the exposure time at the Mth frame, and use the adjusted extended exposure time to acquire the M+2th frame, so that the acquisition time of the M+2th frame becomes longer, and then the acquisition phase of the M+3th frame and subsequent video frames is adjusted to the preset standard phase 0, thereby achieving synchronization of the acquisition phase 0.
[0065] For example, when it is determined that the acquisition phase of a certain acquisition end needs to be synchronized based on the acquisition phase of the current video frame acquired by a certain acquisition end, if the acquisition end can adjust the exposure time of a single frame every few frames, then after the group of video frames is acquired using the current exposure time, the first video frame of the next group can be acquired using the adjusted target exposure time, and after the acquisition of the first video frame is completed, the original exposure time can be used to continue to acquire subsequent video frames, such as Figure 3 As shown, it takes about 5 to 10 frames to synchronize to the standard phase. If the acquisition end can adjust the exposure time of a single frame frame by frame, the next video frame of the current video frame can be directly acquired using the adjusted target exposure time, so that the acquisition phase can be synchronized more quickly.
[0066] It should be noted that by adjusting the exposure time of a single frame, the acquisition phase of all acquisition ends for acquiring video frames can be synchronized. That is to say, all acquisition ends start acquiring video frames at the same position, so that all acquisition ends can acquire video frames synchronously, thereby achieving frame synchronization between all acquisition ends.
[0067] The technical solution of the disclosed embodiment obtains the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end, determines the current acquisition phase corresponding to the current video frame acquired by each acquisition end based on the preset frame rate and the current acquisition timestamp of the acquired video frame, and determines the target acquisition end that needs to synchronize the phase and the target acquisition phase to which the target acquisition end needs to be synchronized based on the current acquisition phase; determines the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the changing relationship between the exposure time and the acquisition phase; and adjusts the single-frame exposure time of subsequent video frames acquired by the target acquisition end based on the target exposure time, so that the target acquisition end is adjusted from the current acquisition phase to the target acquisition phase, so that the acquisition phase of the target acquisition end can be synchronized by adjusting the single-frame exposure time, thereby avoiding the situation where the acquisition phase is not synchronized due to crystal oscillator drift and the like, thereby realizing the synchronous acquisition of video frames.
[0068] On the basis of the above technical solution, before S110, the method may further include: periodically synchronizing the system time of each acquisition terminal based on a preset time interval.
[0069] The preset time interval may be a preset synchronization period interval for synchronizing the system time of the acquisition end. The preset time interval may be set based on the degree of crystal oscillator drift. For example, the preset time interval may be 5 minutes to 10 minutes.
[0070] Specifically, the existing time synchronization method can be used to periodically synchronize the system time of each acquisition end based on a preset time interval, thereby ensuring the synchronization of the acquisition timestamps in each acquisition end, and further ensuring the synchronization of the acquisition phase. The system time can be synchronized regularly, and the acquisition phase can be synchronized regularly, so as to ensure the synchronous acquisition of the video, and support long-term recording of synchronized video or streaming synchronized video.
[0071] Based on the above technical solution, the method also includes: determining abnormal video frames in the video stream collected by each collection end, the abnormal video frames including video frames with abnormal exposure time; deleting the abnormal video frames and saving the deleted video stream.
[0072] The video stream may refer to the continuous video frames continuously collected by the collection end. The abnormal video frame may refer to the video frame collected using the adjusted target exposure time. Since the target exposure time is the extended exposure time, the collection time of the collected video frame will be greater than the standard collection time. Figure 3 As shown, the M+2th frame is an abnormal video frame. The acquisition time of the abnormal video frame is greater than the standard acquisition time corresponding to the preset frame rate.
[0073] Specifically, when recording a video, it is possible to detect whether the exposure time of each video frame in the video stream collected by each collection end is greater than the original exposure time, or whether the collection duration is greater than the standard collection duration. If so, it indicates that the video frame is collected using an extended exposure time. At this time, the video frame can be determined as an abnormal video frame with an abnormal exposure video, and all abnormal video frames in the video stream are deleted, so that only the video stream with normal exposure time is saved, thereby avoiding image flickering when playing the video stream and improving the user viewing experience.
[0074] Figure 4 This is a flow chart of another video acquisition control method provided by an embodiment of the present disclosure. Based on the above disclosed embodiments, the present disclosed embodiment further optimizes the step of "determining the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase". The explanations of the terms that are the same or corresponding to the above disclosed embodiments are not repeated here.
[0075] like Figure 4 As shown, the video acquisition control method specifically includes the following steps:
[0076] S210: Obtain a current acquisition timestamp corresponding to a current video frame acquired by each acquisition end.
[0077] S220: Determine a current acquisition phase corresponding to a current video frame acquired by each acquisition end based on a preset frame rate and a current acquisition timestamp.
[0078] S230: Based on the current acquisition phase, determine a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized.
[0079] S240: Determine a target phase difference corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end.
[0080] Specifically, for each target acquisition end, the difference between the current acquisition phase corresponding to the target acquisition end and the target acquisition phase may be determined as the target phase difference corresponding to the target acquisition end.
[0081] S250: Determine a target exposure time corresponding to the target acquisition end based on the target phase difference, a preset frame rate, a preset variation coefficient, and an exposure time control threshold.
[0082] Among them, the preset variation coefficient may refer to the variation coefficient between the exposure time variation and the phase variation. The preset variation coefficient may be determined in advance based on historical acquisition data. For example, if the preset variation coefficient is 2, it means that for every 1 unit change in exposure time, the acquisition phase changes by 2 units. The exposure time control threshold may refer to the minimum exposure time that affects the change in the acquisition phase. An exposure time that is too small will not affect the change in the acquisition phase. Only when the exposure time is greater than the exposure time control threshold will it affect the change in the acquisition phase. Therefore, it is necessary to use the exposure time control threshold to determine the target exposure time that can be adjusted to the target acquisition phase.
[0083] Specifically, the exposure extension time required to extend the current acquisition phase of the target acquisition end when adjusting the current acquisition phase to the target acquisition phase can be determined based on the target phase difference, the standard acquisition time corresponding to the preset frame rate, and the preset variation coefficient, and the target exposure time after adding the exposure extension time to the exposure time control threshold can be determined based on the exposure extension time and the exposure time control threshold. By using the preset variation coefficient and the exposure time control threshold, the target exposure time that needs to be extended can be directly and quickly determined, thereby further improving the synchronization efficiency of the acquisition phase.
[0084] It should be noted that, since too small an exposure time will not affect the change of the acquisition phase, the acquisition phase can only be changed by extending the exposure time based on the exposure time control threshold. At this time, the target exposure time is greater than the original exposure time.
[0085] Exemplarily, S250 may include: determining a standard acquisition time of a single video frame based on a preset frame rate; determining a target difference between a target phase difference and the standard acquisition time; determining an exposure extension time based on the target difference and a preset variation coefficient; determining a target exposure time corresponding to a target acquisition end based on the exposure extension time and an exposure time control threshold.
[0086] Specifically, since the acquisition phase of subsequent video frames can only be synchronized by extending the acquisition duration, when the remainder is directly used to characterize the acquisition phase, it is necessary to determine the target difference between the target phase difference and the standard acquisition duration, and the target difference is the phase change amount that actually needs to be changed. If the preset change coefficient is the ratio of the exposure time change amount divided by the phase change amount, the target difference can be multiplied by the preset change coefficient, and the product obtained is determined as the exposure extension time. The exposure extension time is added to the exposure time control threshold, and the addition result obtained is determined as the target exposure time corresponding to the target acquisition end.
[0087] S260: Based on the target exposure time, adjust the single-frame exposure time of subsequent video frames collected by the target collection end, so that the collection phase of the target collection end is synchronized to the target collection phase.
[0088] The technical solution of the disclosed embodiments determines the target phase difference corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end, and determines the target exposure time corresponding to the target acquisition end based on the target phase difference, a preset frame rate, a preset variation coefficient and an exposure time control threshold. Therefore, the preset variation coefficient and the exposure time control threshold can be used to directly and quickly determine the target exposure time that needs to be extended, thereby further improving the synchronization efficiency of the acquisition phase.
[0089] On the basis of the above technical solution, before synchronously collecting the phase, the exposure time control threshold can be determined through the following steps S310-S330:
[0090] S310, obtaining a first exposure time and a second exposure time, wherein the first exposure time does not affect changes in the acquisition phase, and the second exposure time affects changes in the acquisition phase.
[0091] Among them, the acquisition phase will not change when adjusted to the first exposure time. The acquisition phase will change when adjusted to the second exposure time. Specifically, two exposure times can be pre-set, namely the first exposure time that will not affect the change of the acquisition phase and the second exposure time that will affect the change of the acquisition phase. At this time, the exposure time control threshold is between the first exposure time and the second exposure time. For example, when the preset frame rate is 30fps, the first exposure time is set to 20000000 nanoseconds, and the second exposure time is set to 40000000 nanoseconds. The first exposure time is relatively short, and the second exposure time is relatively long.
[0092] S320: Determine an average exposure time based on the first exposure time and the second exposure time, and detect whether setting the average exposure time affects a change in an acquisition phase.
[0093] Specifically, the first exposure time and the second exposure time are averaged to obtain an average exposure time. After the original exposure time of the acquisition end is adjusted to the average exposure time, the acquisition phase corresponding to the original exposure time is compared with the acquisition phase corresponding to the average exposure time to see whether they are the same or within an allowable error range. If so, it is determined that the average exposure time will not affect the change of the acquisition phase. Otherwise, it is determined that the average exposure time will affect the change of the acquisition phase.
[0094] S330, updating the first exposure time or the second exposure time based on the detection result, and detecting whether the difference between the updated first exposure time and the second exposure time is less than or equal to the preset difference, if so, executing step S340, if not, executing step S320.
[0095] The preset difference may be a preset allowable error range of the exposure time control threshold. The smaller the preset difference is, the higher the accuracy of the exposure time control threshold is.
[0096] Specifically, if it is detected that the acquisition phase has changed, it indicates that the average exposure time is greater than the exposure time control threshold, and the second exposure time can be updated to the average exposure time. If it is detected that the acquisition phase has not changed, it indicates that the average exposure time is less than the exposure time control threshold, and the first exposure time can be updated to the average exposure time. After the first exposure time or the second exposure time is updated, it can be detected whether the difference between the updated first exposure time and the second exposure time is less than the preset difference, so as to determine whether to continue to update the first exposure time or the second exposure time based on the detection result. If the difference between the first exposure time and the second exposure time is greater than the preset difference, it indicates that the distance between the first exposure time and the second exposure time needs to be further reduced. At this time, it can return to step S320 and cyclically update the first exposure time or the second exposure time again until the first exposure time and the second exposure time that meet the requirements are determined.
[0097] S340: Determine an exposure time control threshold based on the first exposure time and the second exposure time.
[0098] Specifically, when the difference between the updated first exposure time and the second exposure time is less than or equal to the preset difference, the updated first exposure time and the second exposure time can be averaged, and the obtained average exposure time is determined as the exposure time control threshold. By continuously and cyclically reducing the distance between the first exposure time and the second exposure time, the exposure time control threshold can be accurately determined, further ensuring the accuracy and efficiency of acquisition phase synchronization.
[0099] Figure 5 The structure diagram of a video acquisition control device provided by an embodiment of the present disclosure is shown in FIG. The video is acquired by at least two acquisition terminals, and each acquisition terminal acquires video frames at a corresponding viewing angle based on a preset frame rate. Figure 5 As shown, the device specifically includes: a current acquisition timestamp acquisition module 310, a current acquisition phase determination module 320, a target acquisition end determination module 330, a target exposure time determination module 340 and an exposure time adjustment module 350.
[0100] Among them, the current acquisition timestamp acquisition module 310 is used to obtain the current acquisition timestamp corresponding to the current video frame collected by each acquisition end; the current acquisition phase determination module 320 is used to determine the current acquisition phase corresponding to the current video frame collected by each acquisition end based on the preset frame rate and the current acquisition timestamp; the target acquisition end determination module 330 is used to determine the target acquisition end that needs to be synchronized with the phase and the target acquisition phase to which the target acquisition end needs to be synchronized based on the current acquisition phase; the target exposure time determination module 340 is used to determine the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase; the exposure time adjustment module 350 is used to adjust the single-frame exposure time of subsequent video frames collected by the target acquisition end based on the target exposure time, so that the acquisition phase of the target acquisition end is synchronized to the target acquisition phase.
[0101] The technical solution provided by the embodiment of the present disclosure obtains the current acquisition timestamp corresponding to the current video frame collected by each acquisition end, determines the current acquisition phase corresponding to the current video frame collected by each acquisition end based on the preset frame rate and the current acquisition timestamp of the collected video frame, and determines the target acquisition end that needs to synchronize the phase and the target acquisition phase to which the target acquisition end needs to be synchronized based on the current acquisition phase; determines the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the changing relationship between the exposure time and the acquisition phase; and adjusts the single-frame exposure time of subsequent video frames collected by the target acquisition end based on the target exposure time, so that the target acquisition end is adjusted from the current acquisition phase to the target acquisition phase, so that the acquisition phase of the target acquisition end can be synchronized by adjusting the single-frame exposure time, thereby avoiding the situation where the acquisition phase is not synchronized due to crystal oscillator drift and the like, thereby realizing the synchronous acquisition of video frames.
[0102] Based on the above technical solution, the current acquisition phase determination module 320 is specifically used for:
[0103] Based on the preset frame rate, the standard acquisition duration of a single video frame is determined; based on the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end and the first acquisition timestamp corresponding to the first video frame acquired, the total acquisition duration from the first video frame acquired by each acquisition end to the current video frame is determined; the total acquisition duration is modulo the standard acquisition duration to determine the current acquisition phase corresponding to the current video frame acquired by each acquisition end.
[0104] On the basis of the above technical solutions, the target acquisition end determination module 330 is specifically used to:
[0105] Based on the current acquisition phase and the preset standard phase corresponding to each acquisition end, the acquisition phase difference corresponding to each acquisition end is determined; the acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference is determined as the target acquisition end that needs to be synchronized with the phase, and the preset standard phase is determined as the target acquisition phase that the target acquisition end needs to synchronize to.
[0106] On the basis of the above technical solutions, the target acquisition end determination module 330 is specifically used to:
[0107] Based on the current acquisition phase corresponding to the first acquisition end and the current acquisition phase corresponding to each second acquisition end, the acquisition phase difference between the first acquisition end and each second acquisition end is determined; the second acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference is determined as the target acquisition end that needs to be synchronized with the phase, and the current acquisition phase corresponding to the first acquisition end is determined as the target acquisition phase that the target acquisition end needs to synchronize with.
[0108] Based on the above technical solutions, the target exposure time determination module 340 includes:
[0109] A target phase difference determining unit, configured to determine a target phase difference corresponding to the target acquisition end based on a current acquisition phase and a target acquisition phase corresponding to the target acquisition end;
[0110] A target exposure time determination unit, configured to determine a target exposure time corresponding to the target acquisition end based on the target phase difference, the preset frame rate, the preset variation coefficient and the exposure time control threshold;
[0111] The preset variation coefficient refers to the variation coefficient between the exposure time variation and the phase variation; the exposure time control threshold refers to the minimum exposure time that affects the change in the acquisition phase.
[0112] On the basis of the above technical solutions, the target exposure time determination unit is specifically used to:
[0113] Based on the preset frame rate, determine the standard acquisition duration of a single video frame; determine the target difference between the target phase difference and the standard acquisition duration; based on the target difference and a preset variation coefficient, determine the exposure extension time; based on the exposure extension time and the exposure time control threshold, determine the target exposure time corresponding to the target acquisition end.
[0114] On the basis of the above technical solutions, the device also includes:
[0115] An exposure time control threshold determination module is used to obtain a first exposure time and a second exposure time, wherein the first exposure time does not affect changes in the acquisition phase, and the second exposure time affects changes in the acquisition phase; determine an average exposure time based on the first exposure time and the second exposure time, and detect whether setting the average exposure time affects changes in the acquisition phase; update the first exposure time or the second exposure time based on the detection result, and return to execute the operation of determining the average exposure time based on the first exposure time and the second exposure time, until the difference between the first exposure time and the second exposure time is less than or equal to a preset difference, and determine the exposure time control threshold based on the first exposure time and the second exposure time.
[0116] On the basis of the above technical solutions, the device also includes:
[0117] The time synchronization module is used to periodically synchronize the system time of each acquisition end based on a preset time interval before obtaining the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end.
[0118] On the basis of the above technical solutions, the device also includes:
[0119] An abnormal video frame determination module, used to determine abnormal video frames in the video stream collected by each collection end, wherein the abnormal video frames include video frames with abnormal exposure time;
[0120] The video stream saving module is used to delete the abnormal video frame and save the deleted video stream.
[0121] The video acquisition control device provided in the embodiments of the present disclosure can execute the video acquisition control method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0122] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0123] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 6 , which shows an electronic device (eg, Figure 6The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0124] like Figure 6 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0125] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0126] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0127] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0128] The electronic device provided in the embodiment of the present disclosure and the video acquisition control method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0129] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the video acquisition control method provided by the above embodiment is implemented.
[0130] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0131] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0132] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0133] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end; determines the current acquisition phase corresponding to the current video frame acquired by each acquisition end based on the preset frame rate and the current acquisition timestamp; determines the target acquisition end that needs to synchronize the phase and the target acquisition phase to which the target acquisition end needs to be synchronized based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase, determines the target exposure time corresponding to the target acquisition end; based on the target exposure time, adjusts the single-frame exposure time of subsequent video frames acquired by the target acquisition end so that the acquisition phase of the target acquisition end is synchronized to the target acquisition phase.
[0134] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0135] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0136] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0137] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0138] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0139] According to one or more embodiments of the present disclosure, [Example 1] provides a video acquisition control method, wherein the video is acquired by at least two acquisition terminals, and each acquisition terminal acquires video frames at a corresponding viewing angle based on a preset frame rate, and the method includes:
[0140] Get the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end;
[0141] Based on the preset frame rate and the current acquisition timestamp, determining a current acquisition phase corresponding to a current video frame acquired by each acquisition end;
[0142] Based on the current acquisition phase, determining a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized;
[0143] Determine the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase;
[0144] Based on the target exposure time, a single-frame exposure time adjustment is performed on subsequent video frames captured by the target capture end, so that the capture phase of the target capture end is synchronized to the target capture phase.
[0145] According to one or more embodiments of the present disclosure, [Example 2] provides a video acquisition control method, further comprising:
[0146] Optionally, determining, based on the preset frame rate and the current acquisition timestamp, a current acquisition phase corresponding to a current video frame acquired by each acquisition end includes:
[0147] Based on the preset frame rate, determine a standard acquisition duration of a single video frame;
[0148] Determine the total acquisition time from the first video frame to the current video frame acquired by each acquisition end based on the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end and the first acquisition timestamp corresponding to the first video frame acquired;
[0149] The total acquisition time is modulo the standard acquisition time to determine a current acquisition phase corresponding to a current video frame acquired by each acquisition end.
[0150] According to one or more embodiments of the present disclosure, [Example 3] provides a video acquisition control method, further comprising:
[0151] Optionally, the determining, based on the current acquisition phase, a target acquisition end that needs to synchronize phases and a target acquisition phase to which the target acquisition end needs to synchronize includes:
[0152] Determine the acquisition phase difference corresponding to each acquisition end based on the current acquisition phase corresponding to each acquisition end and the preset standard phase;
[0153] The acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference is determined as the target acquisition end that needs phase synchronization, and the preset standard phase is determined as the target acquisition phase that the target acquisition end needs to synchronize to.
[0154] According to one or more embodiments of the present disclosure, [Example 4] provides a video acquisition control method, further comprising:
[0155] Optionally, the determining, based on the current acquisition phase, a target acquisition end that needs to synchronize phases and a target acquisition phase to which the target acquisition end needs to synchronize includes:
[0156] Determine an acquisition phase difference between the first acquisition end and each second acquisition end based on a current acquisition phase corresponding to the first acquisition end and a current acquisition phase corresponding to each second acquisition end;
[0157] The second acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference is determined as the target acquisition end that needs phase synchronization, and the current acquisition phase corresponding to the first acquisition end is determined as the target acquisition phase that the target acquisition end needs to synchronize to.
[0158] According to one or more embodiments of the present disclosure, [Example 5] provides a video acquisition control method, further comprising:
[0159] Optionally, determining the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase includes:
[0160] Determining a target phase difference corresponding to the target acquisition end based on a current acquisition phase and a target acquisition phase corresponding to the target acquisition end;
[0161] Determining a target exposure time corresponding to the target acquisition end based on the target phase difference, the preset frame rate, the preset variation coefficient and the exposure time control threshold;
[0162] The preset variation coefficient refers to the variation coefficient between the exposure time variation and the phase variation; the exposure time control threshold refers to the minimum exposure time that affects the change in the acquisition phase.
[0163] According to one or more embodiments of the present disclosure, [Example 6] provides a video acquisition control method, further comprising:
[0164] Optionally, determining the target exposure time corresponding to the target acquisition end based on the target phase difference, the preset frame rate, the preset variation coefficient and the exposure time control threshold includes:
[0165] Based on the preset frame rate, determine a standard acquisition duration of a single video frame;
[0166] Determining a target difference between the target phase difference and the standard acquisition duration;
[0167] Determining an extended exposure time based on the target difference and a preset variation coefficient;
[0168] Based on the exposure extension time and the exposure time control threshold, a target exposure time corresponding to the target acquisition end is determined.
[0169] According to one or more embodiments of the present disclosure, [Example 7] provides a video acquisition control method, further comprising:
[0170] Optionally, the process of determining the exposure time control threshold includes:
[0171] Acquire a first exposure time and a second exposure time, wherein the first exposure time does not affect the change of the acquisition phase, and the second exposure time affects the change of the acquisition phase;
[0172] Determine an average exposure time based on the first exposure time and the second exposure time, and detect whether setting the average exposure time affects a change in an acquisition phase;
[0173] The first exposure time or the second exposure time is updated based on the detection result, and the operation of determining the average exposure time based on the first exposure time and the second exposure time is returned to execute until the difference between the first exposure time and the second exposure time is less than or equal to the preset difference, and the exposure time control threshold is determined based on the first exposure time and the second exposure time.
[0174] According to one or more embodiments of the present disclosure, [Example 8] provides a video acquisition control method, further comprising:
[0175] Optionally, before obtaining the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end, the method further includes:
[0176] Based on the preset time interval, the system time of each collection end is synchronized periodically.
[0177] According to one or more embodiments of the present disclosure, [Example 9] provides a video acquisition control method, further comprising:
[0178] Optionally, the method further includes:
[0179] Determine abnormal video frames in the video stream collected by each collection end, wherein the abnormal video frames include video frames with abnormal exposure time;
[0180] The abnormal video frame is deleted, and the deleted video stream is saved.
[0181] According to one or more embodiments of the present disclosure, [Example 10] provides a video acquisition control device, wherein the video is acquired by at least two acquisition terminals, each acquisition terminal acquires video frames at a corresponding viewing angle based on a preset frame rate, and the device includes:
[0182] The current acquisition timestamp acquisition module is used to obtain the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end;
[0183] A current acquisition phase determination module, used to determine a current acquisition phase corresponding to a current video frame acquired by each acquisition end based on the preset frame rate and the current acquisition timestamp;
[0184] A target acquisition end determination module, configured to determine, based on the current acquisition phase, a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized;
[0185] A target exposure time determination module, used to determine the target exposure time corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end and the change relationship between the exposure time and the acquisition phase;
[0186] The exposure time adjustment module is used to adjust the single-frame exposure time of subsequent video frames collected by the target collection end based on the target exposure time, so that the collection phase of the target collection end is synchronized to the target collection phase.
[0187] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0188] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0189] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A video acquisition control method, characterized in that: The video is collected by at least two collection terminals, each collection terminal collects video frames at a corresponding viewing angle based on a preset frame rate, and the method includes: Get the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end; Based on the preset frame rate and the current acquisition timestamp, determine the current acquisition phase corresponding to the current video frame acquired by each acquisition end, wherein the current acquisition phase refers to the position of the start acquisition position point of the current video frame within the cyclic acquisition period corresponding to the preset frame rate; Based on the current acquisition phase, determining a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized; Determining a target phase difference corresponding to the target acquisition end based on a current acquisition phase and a target acquisition phase corresponding to the target acquisition end; Based on the target phase difference, the preset frame rate, the preset variation coefficient and the exposure time control threshold, the target exposure time corresponding to the target acquisition end is determined; wherein the preset variation coefficient refers to the variation coefficient between the exposure time variation and the phase variation; the exposure time control threshold refers to the minimum exposure time that affects the change in the acquisition phase; Based on the target exposure time, a single-frame exposure time adjustment is performed on a subsequent video frame captured by the target acquisition end, so that the acquisition phase of the target acquisition end is synchronized to the target acquisition phase.
2. The video acquisition control method according to claim 1, characterized in that: The determining, based on the preset frame rate and the current acquisition timestamp, a current acquisition phase corresponding to a current video frame acquired by each acquisition end includes: Based on the preset frame rate, determine a standard acquisition duration of a single video frame; Determine the total acquisition time from the first video frame to the current video frame acquired by each acquisition end based on the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end and the first acquisition timestamp corresponding to the first video frame acquired; The total acquisition time is modulo the standard acquisition time to determine a current acquisition phase corresponding to a current video frame acquired by each acquisition end.
3. The video acquisition control method according to claim 1, characterized in that: The determining, based on the current acquisition phase, of a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized includes: Determine the acquisition phase difference corresponding to each acquisition end based on the current acquisition phase corresponding to each acquisition end and the preset standard phase; The acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference is determined as the target acquisition end that needs phase synchronization, and the preset standard phase is determined as the target acquisition phase that the target acquisition end needs to synchronize to.
4. The video acquisition control method according to claim 1, characterized in that: The determining, based on the current acquisition phase, of a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized includes: Determine an acquisition phase difference between the first acquisition end and each second acquisition end based on a current acquisition phase corresponding to the first acquisition end and a current acquisition phase corresponding to each second acquisition end; The second acquisition end whose acquisition phase difference is greater than or equal to the preset phase difference is determined as the target acquisition end that needs phase synchronization, and the current acquisition phase corresponding to the first acquisition end is determined as the target acquisition phase that the target acquisition end needs to synchronize to.
5. The video acquisition control method according to claim 1, characterized in that: The determining the target exposure time corresponding to the target acquisition end based on the target phase difference, the preset frame rate, the preset variation coefficient and the exposure time control threshold comprises: Based on the preset frame rate, determine a standard acquisition duration of a single video frame; Determining a target difference between the target phase difference and the standard acquisition duration; Determining an extended exposure time based on the target difference and a preset variation coefficient; Based on the exposure extension time and the exposure time control threshold, a target exposure time corresponding to the target acquisition end is determined.
6. The video acquisition control method according to claim 1, characterized in that: The process of determining the exposure time control threshold includes: Acquire a first exposure time and a second exposure time, wherein the first exposure time does not affect the change of the acquisition phase, and the second exposure time affects the change of the acquisition phase; Determine an average exposure time based on the first exposure time and the second exposure time, and detect whether setting the average exposure time affects a change in an acquisition phase; The first exposure time or the second exposure time is updated based on the detection result, and the operation of determining the average exposure time based on the first exposure time and the second exposure time is returned to execute until the difference between the first exposure time and the second exposure time is less than or equal to the preset difference, and the exposure time control threshold is determined based on the first exposure time and the second exposure time.
7. The video acquisition control method according to claim 1, characterized in that: Before obtaining the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end, it also includes: Based on the preset time interval, the system time of each collection end is synchronized periodically.
8. The video acquisition control method according to any one of claims 1 to 7, characterized in that: The method further comprises: Determine abnormal video frames in the video stream collected by each collection end, wherein the abnormal video frames include video frames with abnormal exposure time; The abnormal video frame is deleted, and the deleted video stream is saved.
9. A video acquisition control device, characterized in that: The video is collected by at least two collection terminals, each of which collects video frames at a corresponding viewing angle based on a preset frame rate. The device includes: The current acquisition timestamp acquisition module is used to obtain the current acquisition timestamp corresponding to the current video frame acquired by each acquisition end; A current acquisition phase determination module, used to determine the current acquisition phase corresponding to the current video frame acquired by each acquisition end based on the preset frame rate and the current acquisition timestamp, wherein the current acquisition phase refers to the position of the start acquisition position point of the current video frame within the cyclic acquisition period corresponding to the preset frame rate; A target acquisition end determination module, configured to determine, based on the current acquisition phase, a target acquisition end that needs a synchronization phase and a target acquisition phase to which the target acquisition end needs to be synchronized; A target exposure time determination module is used to determine the target phase difference corresponding to the target acquisition end based on the current acquisition phase and the target acquisition phase corresponding to the target acquisition end; determine the target exposure time corresponding to the target acquisition end based on the target phase difference, the preset frame rate, the preset variation coefficient and the exposure time control threshold; wherein the preset variation coefficient refers to the variation coefficient between the exposure time variation and the phase variation; the exposure time control threshold refers to the minimum exposure time that affects the change in the acquisition phase; The exposure time adjustment module is used to adjust the single-frame exposure time of a subsequent video frame collected by the target collection end based on the target exposure time, so that the collection phase of the target collection end is synchronized to the target collection phase.
10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the video acquisition control method as described in any one of claims 1-8.
11. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the video acquisition control method as described in any one of claims 1-8 when executed by a computer processor.
Citation Information
Patent Citations
Synchronous exposure method and apparatus, and terminal device
CN107231533A
Video frame acquisition synchronization control
CN114697466A