CN114697466A - Video frame acquisition synchronization control - Google Patents
Video frame acquisition synchronization control Download PDFInfo
- Publication number
- CN114697466A CN114697466A CN202210263854.3A CN202210263854A CN114697466A CN 114697466 A CN114697466 A CN 114697466A CN 202210263854 A CN202210263854 A CN 202210263854A CN 114697466 A CN114697466 A CN 114697466A
- Authority
- CN
- China
- Prior art keywords
- shooting
- time
- period
- camera
- shooting time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/04—Synchronising
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/64—Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
- H04N7/181—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
The embodiment of the application provides a video frame acquisition synchronization control method, a video frame acquisition synchronization control device, a video camera, a video system and a storage medium, wherein the system time of the video camera is calibrated according to a received clock synchronization signal of a master clock device according to a preset clock synchronization period; according to a preset shooting calibration period, calibrating shooting time by taking the system time of a camera as a clock source to obtain calibrated shooting time; taking the system time of the camera as a clock source, and shooting video frames according to the calibrated shooting time; each camera in the synchronous shooting system is in clock synchronization with the master clock equipment, the system time of each camera is the same, each camera takes the system time of the camera as a clock source to calibrate the shooting time, the shooting time of each camera is guaranteed to be the same, and therefore the synchronous control of video frame acquisition of multiple cameras is achieved.
Description
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for controlling video frame acquisition synchronization.
Background
Cameras in the monitoring field generally work independently, video acquisition signals among different cameras do not have corresponding synchronization mechanisms, and in some scenes where multiple cameras are cooperatively shot, for example, scenes where multiple angles of the same object are cooperatively shot, or scenes where a large-range scene is cooperatively shot in a splicing manner, etc., synchronous shooting of video frames among multiple cameras needs to be realized.
Disclosure of Invention
The embodiment of the application aims to provide a method and a device for synchronously controlling video frame acquisition, so as to realize the synchronous control of the video frame acquisition of multiple cameras. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a video frame acquisition synchronization control method, which is applied to cameras in a synchronous shooting system, where the synchronous shooting system includes multiple cameras, and the method includes:
calibrating the system time of the camera according to a preset clock synchronization period and a received clock synchronization signal of the master clock device;
acquiring the shooting time deviation of a video frame and the period duration of a single synchronous shooting period by taking the system time of the camera as a clock source according to a preset shooting calibration period;
determining a target adjusting mode of the shooting time according to the shooting time deviation and the period duration, wherein the adjusting mode of the shooting time comprises increasing a shooting interval and reducing the shooting interval;
determining an adjusting step length according to the current synchronous shooting period, the target period to be calibrated and the shooting time deviation;
calibrating the shooting time based on the adjustment step length according to the target adjustment mode to obtain the calibrated shooting time;
and taking the system time of the camera as a clock source, and shooting the video frame according to the calibrated shooting time.
In a possible implementation manner, the acquiring, according to a preset shooting calibration period and using the system time of the camera as a clock source, a shooting time deviation of a video frame and a period duration of a single synchronous shooting period includes:
according to a preset shooting calibration period, after shooting time calibration is started, when a field synchronization signal is detected, obtaining the system time of the camera to obtain a first moment;
acquiring the period duration of a single synchronous shooting period;
and carrying out remainder operation on the first time by utilizing the period duration to obtain the shooting time deviation of the video frame.
In a possible embodiment, the determining an adjustment step size according to the current synchronous shooting period, the target period to be calibrated, and the shooting time deviation includes:
determining a time length to be adjusted according to the shooting time deviation, and acquiring a second time for determining the time length to be adjusted, wherein the time length to be adjusted is a difference value between the period time length and the shooting time deviation under the condition that half of the period time length is smaller than the shooting time deviation; under the condition that half of the period time length is not smaller than the shooting time deviation, the time length to be adjusted is the shooting time deviation;
and calculating to obtain an adjusting step length according to the time length to be adjusted, the second moment, the shooting moment of the target period to be calibrated and the shooting moment of the current synchronous shooting period.
In a possible implementation manner, the calculating an adjustment step length according to the duration to be adjusted, the second time, the shooting time of the target period to be calibrated, and the shooting time of the current synchronous shooting period includes:
the adjustment step length is calculated according to the following formula:
t1 is the shooting time of the current synchronous shooting cycle, T2 is the shooting time of the target cycle, and N1 is the time from the second time to the adjustment step calculation timeN2 is the frame interval from the adjustment step calculation time to the shooting time of the target period, NxAnd delta t is the time length to be adjusted for presetting the number of smooth frames.
In a possible implementation manner, the determining a target adjustment manner of the shooting time according to the shooting time deviation and the cycle duration includes:
under the condition that half of the period duration is smaller than the deviation of the shooting time, judging that the shooting time is adjusted by increasing the shooting interval;
and under the condition that half of the period duration is not less than the deviation of the shooting time, judging that the shooting time is adjusted in a mode of reducing the shooting interval.
In a possible embodiment, the calibrating the shooting time based on the adjustment step length according to the target adjustment manner to obtain a calibrated shooting time includes:
adjusting a field synchronization signal adjusting parameter according to the target adjusting mode and the adjusting step length;
and adjusting parameters according to the adjusted field synchronization signal, and calibrating the shooting time to obtain the calibrated shooting time.
In one possible embodiment, the method further comprises:
and adjusting the exposure parameters of the camera according to the adjusted field synchronization signal adjustment parameters.
In a second aspect, an embodiment of the present application provides a video frame acquisition synchronization control apparatus, which is applied to cameras in a synchronous shooting system, where the synchronous shooting system includes multiple cameras, and the apparatus includes:
the system time calibration module is used for calibrating the system time of the camera according to a preset clock synchronization period and a received clock synchronization signal of the master clock device;
the data acquisition module is used for acquiring the shooting moment deviation of a video frame and the period duration of a single synchronous shooting period by taking the system time of the camera as a clock source according to a preset shooting calibration period;
the adjusting mode determining module is used for determining a target adjusting mode of the shooting time according to the shooting time deviation and the period duration, wherein the adjusting mode of the shooting time comprises the steps of increasing the shooting interval and decreasing the shooting interval;
the adjusting step length determining module is used for determining the adjusting step length according to the current synchronous shooting period, the target period to be calibrated and the shooting time deviation;
the shooting time calibration module is used for calibrating the shooting time based on the adjustment step length according to the target adjustment mode to obtain the calibrated shooting time;
and the video frame acquisition synchronous control module is used for taking the system time of the camera as a clock source and shooting the video frame according to the calibrated shooting time.
In a possible implementation manner, the data obtaining module is specifically configured to: according to a preset shooting calibration period, after the shooting time calibration is started, when a field synchronizing signal is detected, acquiring the system time of the camera to obtain a first moment; acquiring a preset shooting moment of a specified synchronous shooting period and the period duration of a single synchronous shooting period; calculating a difference value between the first moment and the preset shooting moment; and performing remainder operation on the difference value and the period duration to obtain the shooting moment deviation of the video frame.
In a possible implementation manner, the adjustment step size determining module is specifically configured to: determining a time length to be adjusted according to the shooting time deviation, and acquiring a second time for determining the time length to be adjusted, wherein the time length to be adjusted is a difference value between the period time length and the shooting time deviation under the condition that half of the period time length is smaller than the shooting time deviation; under the condition that half of the period time length is not smaller than the shooting time deviation, the time length to be adjusted is the shooting time deviation; and calculating to obtain an adjusting step length according to the time length to be adjusted, the second moment, the shooting moment of the target period to be calibrated and the shooting moment of the current synchronous shooting period.
In a possible implementation manner, the adjustment step size determining module is specifically configured to:
the adjustment step length is calculated according to the following formula:
t1 is the shooting time of the current synchronous shooting cycle, T2 is the shooting time of the target cycle, N1 is the frame interval from the second time to the adjustment step calculation time, N2 is the frame interval from the adjustment step calculation time to the shooting time of the target cyclexAnd delta t is the time length to be adjusted for presetting the number of smooth frames.
In a possible implementation manner, the adjustment manner determining module is specifically configured to: under the condition that half of the period duration is smaller than the deviation of the shooting time, judging that the shooting time is adjusted by increasing the shooting interval; and under the condition that half of the period duration is not less than the deviation of the shooting time, judging that the shooting time is adjusted in a mode of reducing the shooting interval.
In a possible implementation manner, the shooting time calibration module is specifically configured to: adjusting a field synchronization signal adjusting parameter according to the target adjusting mode and the adjusting step length; and adjusting parameters according to the adjusted field synchronizing signal, and calibrating the shooting time to obtain the calibrated shooting time.
The embodiment of the application has the following beneficial effects:
according to the video frame acquisition synchronization control method, the video frame acquisition synchronization control device, the video camera, the video system and the storage medium, the system time of the video camera is calibrated according to the received clock synchronization signal of the master clock device according to the preset clock synchronization period; acquiring the shooting time deviation of a video frame and the period duration of a single synchronous shooting period by taking the system time of a camera as a clock source according to a preset shooting calibration period; determining a target adjusting mode of the shooting time according to the shooting time deviation and the period duration, wherein the adjusting mode of the shooting time comprises increasing the shooting interval and reducing the shooting interval; determining an adjusting step length according to the current synchronous shooting period, the target period to be calibrated and the shooting time deviation; calibrating the shooting time based on the adjustment step length according to a target adjustment mode to obtain the calibrated shooting time; and taking the system time of the camera as a clock source, and shooting the video frame according to the calibrated shooting time. Each camera in the synchronous shooting system is in clock synchronization with the master clock device, the system time of each camera is the same, each camera takes the system time of the camera as a clock source to calibrate the shooting time, the shooting time of each camera is guaranteed to be the same, and therefore the synchronous control of video frame acquisition of multiple cameras is achieved. Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art according to these drawings.
Fig. 1 is a schematic diagram of a video frame acquisition synchronization control method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a possible implementation manner of step S102 according to an embodiment of the present application;
fig. 3 is a schematic diagram of a possible implementation manner of step S104 according to an embodiment of the present application;
fig. 4 is a schematic diagram of a video frame acquisition synchronization control apparatus according to an embodiment of the present application;
fig. 5 is a schematic diagram of a camera according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the description herein are intended to be within the scope of the present disclosure.
First, terms in the present application are explained:
and (3) system timing: the Time of the video camera is consistent with the Time of a related timing System such as an NTP (Network Time Protocol) server or a GPS (Global Positioning System) module, so that the purpose of keeping the System Time consistent among the cameras is achieved.
VD Signal (Vertical Drive Signal): the method comprises the steps that a sensor (sensor) video collects a field synchronization signal, namely a starting signal of each frame of video is collected, and when the sensor works in a main mode, a VD signal is spontaneously generated by the sensor according to register configuration; when the sensor operates in the slave mode, the VD signal is provided by the master chip, and generally keeps consistent with the video frame rate value.
In order to realize synchronous control of video frame acquisition of multiple cameras, an embodiment of the present application provides a synchronous control method for video frame acquisition, which is applied to cameras in a synchronous shooting system, where the synchronous shooting system includes multiple cameras, and with reference to fig. 1, the method includes:
s101, calibrating the system time of the camera according to a preset clock synchronization period and a received clock synchronization signal of the master clock device.
The video frame acquisition synchronization control method is applied to the camera, so that the video frame acquisition synchronization control method can be realized through the camera.
The camera may choose different system time calibration schemes according to actual situations, for example, the master clock device may be an NTP server, or the master clock device may be a GPS signal transmitting device (e.g., a GPS satellite), and the like. The precision of the NTP server is mainly influenced by the network environment, can reach the precision within milliseconds under the condition of a local area network, and is suitable for indoor scene application; the system based on the GPS signal has high time correction precision which can reach the time correction precision of less than microsecond level, and a camera is required to carry a GPS module for matching use, so that the system is suitable for outdoor scenes.
The core of the camera system time calibration is that based on uniform system time, synchronization of camera video signal acquisition is realized by adjusting an external VD signal (the sensor works in a slave mode) or a frame rate control register of the camera (the sensor works in a master mode), each camera is provided with an independent high-precision crystal oscillator as the sensor to provide an input clock, and the camera can perform time calibration through an NTP server or a GPS module.
And S102, acquiring the shooting time deviation of the video frame and the period duration of a single synchronous shooting period by taking the system time of the camera as a clock source according to a preset shooting calibration period.
The preset clock synchronization period and the preset shooting calibration period can be set by self according to actual conditions, and can be the same or different. In an actual scene, the camera acquires images according to a set synchronous shooting period. The deviation of the image capturing time indicates: the time difference between the actual shooting moment of the image and the set shooting moment.
And S103, determining a target adjusting mode of the shooting time according to the shooting time deviation and the period duration, wherein the adjusting mode of the shooting time comprises the steps of increasing the shooting interval and reducing the shooting interval.
The adjustment mode of the shooting time includes increasing the shooting interval and decreasing the shooting interval, and whether to increase or decrease the shooting interval is determined by comparing the shooting time deviation with the cycle duration, i.e., the target adjustment mode.
In a possible implementation manner, the determining a target adjustment manner of the shooting time according to the shooting time deviation and the cycle duration includes: under the condition that half of the period duration is smaller than the deviation of the shooting time, judging that the shooting time is adjusted by increasing the shooting interval; and under the condition that half of the period duration is not less than the deviation of the shooting time, judging that the shooting time is adjusted in a mode of reducing the shooting interval.
And S104, determining an adjusting step length according to the current synchronous shooting period, the target period to be calibrated and the shooting time deviation.
The target period is a synchronous shooting period which needs to be adjusted, namely the actual shooting time of the camera in the target period is expected to be the same as the designed shooting time. The shooting time deviation is a deviation required to be adjusted, and the time length required to be adjusted of each synchronous shooting period, namely the adjustment step length, can be calculated according to the current synchronous shooting period, the target period to be calibrated and the shooting time deviation.
And S105, calibrating the shooting time based on the adjusting step length according to the target adjusting mode to obtain the calibrated shooting time.
And under the condition that the target adjustment mode is to increase the shooting interval, the time length of the adjustment step length is increased in each synchronous shooting period from the current synchronous shooting period to the target period, so that the shooting time is calibrated. And when the target adjustment mode is to reduce the shooting interval, the time length of the adjustment step length is reduced in each synchronous shooting period from the current synchronous shooting period to the target period, so that the shooting time is calibrated.
And S106, taking the system time of the camera as a clock source, and shooting the video frame according to the calibrated shooting time.
In the embodiment of the application, each camera in the synchronous shooting system performs clock synchronization with the master clock device, the system time of each camera is the same, each camera uses the system time of the camera as a clock source to calibrate the shooting time based on the adjustment step length according to a target adjustment mode, the calibration of the shooting time of the cameras is realized, the shooting time of each camera is ensured to be the same, and therefore the synchronous control of video frame acquisition of multiple cameras is realized.
In a possible implementation manner, referring to fig. 2, the acquiring, according to a preset shooting calibration period and using the system time of the camera as a clock source, a shooting time deviation of a video frame and a period duration of a single synchronous shooting period includes:
and S1021, according to a preset shooting calibration period, after the shooting time calibration is started, when the field synchronization signal is detected, acquiring the system time of the camera to obtain a first moment.
And S1022, acquiring the preset shooting time of the appointed synchronous shooting period and the period duration of a single synchronous shooting period.
And S1023, calculating the difference value between the first moment and the preset shooting moment.
And S1024, performing remainder operation on the difference value and the period duration to obtain the shooting moment deviation of the video frame.
After the shooting time calibration is started, when the camera detects a VD signal (field synchronization signal), the system time of the camera itself at this time is immediately acquired as a first time, and then a difference between the first time and a designed shooting time (preset shooting time) of a specified synchronous shooting period is calculated according to the system time of the camera itself. In one example, the period duration of a single synchronous shooting period may be determined according to a Sensor output frame rate in the camera; for example, the Sensor output frame rate is denoted as freate, the period duration of a single synchronous shooting period:
T=1000/FRate
the unit of T is ms (millisecond), and the difference between the first time and the preset shooting time is recorded as time, so that the shooting time deviation M of the video frame image can be represented as time% T, where% represents the remainder operation.
The designated synchronous shooting period can be set by self according to actual conditions, for example, the synchronous shooting period with the shooting time of 0 point, 0 minute and 0 second whole can be used as the designated synchronous shooting period. The method for acquiring the shooting time deviation of the video frame and the period duration of a single synchronous shooting period by taking the system time of the camera as a clock source according to a preset shooting calibration period comprises the following steps:
step one, according to a preset shooting calibration period, after shooting time calibration is started, when a field synchronizing signal is detected, obtaining system time of the camera to obtain a first moment.
And step two, acquiring the period duration of a single synchronous shooting period.
And thirdly, performing remainder operation on the first time by using the period duration to obtain the shooting time deviation of the video frame.
In some scenarios, the time when the camera captures the first frame of video frame is considered to be 0 point, 0 minutes, and 0 seconds, in which case, the shooting time deviation M of the video frame may be expressed as M ═ T% T, where T represents the first time.
In a possible embodiment, referring to fig. 3, the determining an adjustment step size according to the current synchronous shooting period, the target period to be calibrated, and the shooting time deviation includes:
s1041, determining a time length to be adjusted according to the shooting time deviation, and acquiring a second time for determining the time length to be adjusted, wherein the time length to be adjusted is a difference value between the period time length and the shooting time deviation under the condition that half of the period time length is smaller than the shooting time deviation; and under the condition that half of the period time length is not less than the shooting time deviation, the time length to be adjusted is the shooting time deviation.
Recording the time length to be adjusted as delta t, and under the condition that half of the period time length is not less than the deviation of the shooting moment, taking the time length to be adjusted as the deviation of the shooting moment:
δt=time%T (time%T≤T/2)
under the condition that half of the period duration is smaller than the deviation of the shooting moment, the duration to be adjusted is the difference between the period duration and the deviation of the shooting moment:
δt=(T-time%T) (time%T>T/2)
in practical application, a certain error is allowed to exist in the shooting time, whether the shooting time is calibrated or not can be judged according to a preset precision threshold, and the shooting time is calibrated under the condition that delta t is greater than the precision threshold; otherwise, the calibration of the shooting time is not performed.
And S1042, calculating to obtain an adjusting step length according to the time length to be adjusted, the second moment, the shooting moment of the target period to be calibrated and the shooting moment of the current synchronous shooting period.
In a possible implementation manner, the calculating an adjustment step length according to the duration to be adjusted, the second time, the shooting time of the target period to be calibrated, and the shooting time of the current synchronous shooting period includes:
the adjustment step length is calculated according to the following formula:
t1 is the shooting time of the current synchronous shooting cycle, T2 is the shooting time of the target cycle, N1 is the frame interval from the second time to the adjustment step calculation time, N2 is the frame interval from the adjustment step calculation time to the shooting time of the target cyclexAnd delta t is the time length to be adjusted for presetting the number of smooth frames.
In a possible embodiment, the calibrating the shooting time based on the adjustment step length according to the target adjustment manner to obtain a calibrated shooting time includes:
step one, adjusting a field synchronization signal adjusting parameter according to the target adjusting mode and the adjusting step length.
And under the condition that the target adjusting mode is to increase the shooting interval, overlapping the adjusting step length and the predetermined field synchronizing signal adjusting parameter to obtain the adjusted field synchronizing signal adjusting parameter. And when the target adjusting mode is to reduce the shooting interval, reducing the shooting interval on the predetermined field synchronizing signal adjusting parameter to obtain the adjusted field synchronizing signal adjusting parameter. The predetermined field sync signal adjustment parameter is a field sync signal adjustment parameter calculated according to a designed synchronous shooting period, and a specific calculation manner of the predetermined field sync signal adjustment parameter can be referred to in the prior art.
And step two, adjusting parameters according to the adjusted field synchronizing signal, and calibrating the shooting time to obtain the calibrated shooting time.
And from the current synchronous shooting period to the target period, calibrating the shooting time in each synchronous shooting period according to the adjusted field synchronous signal adjusting parameters to obtain the calibrated shooting time.
In one possible embodiment, the method further comprises:
and adjusting the exposure parameters of the camera according to the adjusted field synchronization signal adjustment parameters.
In order to ensure the stable brightness of the image, the exposure parameters of the cameras need to be configured in a linkage manner. Assuming that in a case where an exposure is stable, the current exposure time is T (T ≦ T1), then:
h1 is the exposure time for one line of the current synchronous shooting period, H2 is the exposure time for one line of the new synchronous shooting period, V1 is the maximum exposure line number of the current synchronous shooting period, V2 is the maximum exposure line number of the new synchronous shooting period, n1 is the exposure line number of the current synchronous shooting period, and n2 is the effective exposure line number of the new synchronous shooting period, that is, the value to be allocated to the sensor. When calculating the equivalent exposure row, the n2 is less than or equal to V2, which cannot be exceeded.
The configuration of n2 needs to be synchronized with the adjusted field sync signal adjustment parameters, otherwise, exposure incompatibility occurs.
The embodiment of the present application further provides a video frame acquisition synchronization control device, which is applied to a video camera, and referring to fig. 4, the device includes:
a system time calibration module 401, configured to calibrate the system time of the camera according to a preset clock synchronization period and according to a received clock synchronization signal of the master clock device;
a data obtaining module 402, configured to obtain, according to a preset shooting calibration period and with the system time of the camera as a clock source, a shooting time deviation of a video frame and a period duration of a single synchronous shooting period;
an adjusting mode determining module 403, configured to determine a target adjusting mode of the shooting time according to the shooting time deviation and the period duration, where the adjusting mode of the shooting time includes increasing a shooting interval and decreasing the shooting interval;
an adjusting step length determining module 404, configured to determine an adjusting step length according to the current synchronous shooting period, the target period to be calibrated, and the shooting time deviation;
a shooting time calibration module 405, configured to calibrate the shooting time based on the adjustment step length according to the target adjustment manner, so as to obtain calibrated shooting time;
and the video frame acquisition synchronous control module 406 is configured to take the system time of the camera as a clock source, and shoot video frames according to the calibrated shooting time.
In a possible implementation manner, the data obtaining module is specifically configured to: according to a preset shooting calibration period, after the shooting time calibration is started, when a field synchronizing signal is detected, acquiring the system time of the camera to obtain a first moment; acquiring a preset shooting moment of a specified synchronous shooting period and the period duration of a single synchronous shooting period; calculating a difference value between the first moment and the preset shooting moment; and performing remainder operation on the difference value and the period duration to obtain the shooting moment deviation of the video frame.
In a possible implementation manner, the adjustment step size determining module is specifically configured to: determining a time length to be adjusted according to the shooting time deviation, and acquiring a second time for determining the time length to be adjusted, wherein the time length to be adjusted is a difference value between the period time length and the shooting time deviation under the condition that half of the period time length is smaller than the shooting time deviation; under the condition that half of the period time length is not smaller than the shooting time deviation, the time length to be adjusted is the shooting time deviation; and calculating to obtain the adjusting step length according to the duration to be adjusted, the second moment, the shooting moment of the target period to be calibrated and the shooting moment of the current synchronous shooting period.
In a possible implementation manner, the adjustment step size determining module is specifically configured to:
the adjustment step length is calculated according to the following formula:
t1 is the shooting time of the current synchronous shooting cycle, T2 is the shooting time of the target cycle, N1 is the frame interval from the second time to the adjustment step calculation time, N2 is the frame interval from the adjustment step calculation time to the shooting time of the target cyclexAnd delta t is the time length to be adjusted for presetting the number of smooth frames.
In a possible implementation manner, the adjustment manner determining module is specifically configured to: under the condition that half of the period duration is smaller than the deviation of the shooting time, judging that the shooting time is adjusted by increasing the shooting interval; and under the condition that half of the period duration is not less than the deviation of the shooting time, judging that the shooting time is adjusted in a mode of reducing the shooting interval.
In a possible implementation manner, the shooting time calibration module is specifically configured to: adjusting a field synchronization signal adjusting parameter according to the target adjusting mode and the adjusting step length; and adjusting parameters according to the adjusted field synchronization signal, and calibrating the shooting time to obtain the calibrated shooting time.
In a possible implementation, the apparatus further includes an exposure parameter adjustment module configured to: and adjusting the exposure parameters of the camera according to the adjusted field synchronization signal adjustment parameters.
The embodiment of the present application further provides a camera, where:
the memory is used for storing a computer program;
the processor is configured to implement the video frame acquisition synchronization control method according to any of the present application when executing the program stored in the memory.
In a possible implementation manner, referring to fig. 5, the camera according to the embodiment of the present application further includes a communication interface 502 and a communication bus 504, where the processor 501, the communication interface 502, and the memory 503 are configured to communicate with each other through the communication bus 504.
The communication bus mentioned in the above-mentioned video camera may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the camera and other devices.
The Memory may include a RAM (Random Access Memory) or an NVM (Non-Volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor including a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The embodiment of the present application further provides a synchronous shooting system, including: a plurality of cameras as described in any of the present applications. In one possible embodiment, the synchronous shooting system further includes an NTP server. Each camera can execute the video frame acquisition synchronization control method in the application, and system time among the cameras can be calibrated through the NTP server or the GPS module, so that consistency is kept.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for controlling synchronization of video frame acquisition according to any of the present application is implemented.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the video frame acquisition synchronization control method described in any of the present applications.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It should be noted that, in this document, the technical features in the various alternatives can be combined to form the scheme as long as the technical features are not contradictory, and the scheme is within the scope of the disclosure of the present application. Relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the camera, the computer program product and the storage medium, which are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to the partial description of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims (8)
1. A video frame acquisition synchronization control method is applied to cameras in a synchronous shooting system, the synchronous shooting system comprises a plurality of cameras, and the method comprises the following steps:
calibrating the system time of the camera according to a preset clock synchronization period and a received clock synchronization signal of the master clock device;
acquiring the shooting time deviation of a video frame and the period duration of a single synchronous shooting period by taking the system time of the camera as a clock source according to a preset shooting calibration period;
determining a target adjusting mode of the shooting time according to the shooting time deviation and the period duration, wherein the adjusting mode of the shooting time comprises increasing a shooting interval and reducing the shooting interval;
determining an adjusting step length according to the current synchronous shooting period, the target period to be calibrated and the shooting time deviation;
calibrating the shooting time based on the adjustment step length according to the target adjustment mode to obtain the calibrated shooting time;
and taking the system time of the camera as a clock source, and shooting the video frame according to the calibrated shooting time.
2. The method according to claim 1, wherein the obtaining the deviation of the shooting time of the video frame and the period duration of the single synchronous shooting period according to the preset shooting calibration period and with the system time of the camera as a clock source comprises:
according to a preset shooting calibration period, after shooting time calibration is started, when a field synchronization signal is detected, obtaining the system time of the camera to obtain a first moment;
acquiring the period duration of a single synchronous shooting period;
and carrying out remainder operation on the first time by utilizing the period duration to obtain the shooting time deviation of the video frame.
3. The method according to claim 2, wherein the determining an adjustment step size according to the current synchronous shooting period, the target period to be calibrated and the shooting time deviation comprises:
determining a time length to be adjusted according to the shooting time deviation, and acquiring a second time for determining the time length to be adjusted, wherein the time length to be adjusted is a difference value between the period time length and the shooting time deviation under the condition that half of the period time length is smaller than the shooting time deviation; under the condition that half of the period time length is not smaller than the shooting time deviation, the time length to be adjusted is the shooting time deviation;
and calculating to obtain an adjusting step length according to the time length to be adjusted, the second moment, the shooting moment of the target period to be calibrated and the shooting moment of the current synchronous shooting period.
4. The method according to claim 3, wherein calculating an adjustment step size according to the duration to be adjusted, the second time, the shooting time of the target period to be calibrated, and the shooting time of the current synchronous shooting period includes:
the adjustment step length is calculated according to the following formula:
t1 is the shooting time of the current synchronous shooting cycle, T2 is the shooting time of the target cycle, N1 is the frame interval from the second time to the adjustment step calculation time, N2 is the frame interval from the adjustment step calculation time to the shooting time of the target cyclexAnd delta t is the time length to be adjusted for presetting the number of smooth frames.
5. The method of claim 1, wherein determining the target adjustment mode for the capture time based on the capture time offset and the cycle duration comprises:
under the condition that half of the period duration is smaller than the deviation of the shooting time, judging that the shooting time is adjusted by increasing the shooting interval;
and under the condition that half of the period duration is not less than the deviation of the shooting time, judging that the shooting time is adjusted in a mode of reducing the shooting interval.
6. The method of claim 1, wherein the calibrating the shooting time based on the adjustment step size according to the target adjustment manner to obtain a calibrated shooting time comprises:
adjusting a field synchronization signal adjusting parameter according to the target adjusting mode and the adjusting step length;
and adjusting parameters according to the adjusted field synchronization signal, and calibrating the shooting time to obtain the calibrated shooting time.
7. The method of claim 6, further comprising:
and adjusting the exposure parameters of the camera according to the adjusted field synchronization signal adjustment parameters.
8. A video frame acquisition synchronization control device is applied to a camera in a synchronous shooting system, the synchronous shooting system comprises a plurality of cameras, and the device comprises:
the system time calibration module is used for calibrating the system time of the camera according to a preset clock synchronization period and a received clock synchronization signal of the master clock device;
the data acquisition module is used for acquiring the shooting moment deviation of a video frame and the period duration of a single synchronous shooting period by taking the system time of the camera as a clock source according to a preset shooting calibration period;
the adjusting mode determining module is used for determining a target adjusting mode of the shooting time according to the shooting time deviation and the period duration, wherein the adjusting mode of the shooting time comprises the steps of increasing the shooting interval and decreasing the shooting interval;
the adjusting step length determining module is used for determining the adjusting step length according to the current synchronous shooting period, the target period to be calibrated and the shooting time deviation;
the shooting time calibration module is used for calibrating the shooting time based on the adjustment step length according to the target adjustment mode to obtain the calibrated shooting time;
and the video frame acquisition synchronous control module is used for taking the system time of the camera as a clock source and shooting the video frame according to the calibrated shooting time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210263854.3A CN114697466B (en) | 2022-03-17 | 2022-03-17 | Video frame acquisition synchronization control |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210263854.3A CN114697466B (en) | 2022-03-17 | 2022-03-17 | Video frame acquisition synchronization control |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114697466A true CN114697466A (en) | 2022-07-01 |
CN114697466B CN114697466B (en) | 2023-10-13 |
Family
ID=82139749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210263854.3A Active CN114697466B (en) | 2022-03-17 | 2022-03-17 | Video frame acquisition synchronization control |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114697466B (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003078864A (en) * | 2001-08-30 | 2003-03-14 | Nec Corp | System for providing camera image and time correction method for camera image |
US20050048929A1 (en) * | 2003-09-02 | 2005-03-03 | Denso Corporation | Communications system |
US20130038755A1 (en) * | 2011-08-11 | 2013-02-14 | Sony Corporation | Electronic apparatus, method of time synchronization, and program therefor |
CN103442216A (en) * | 2013-08-22 | 2013-12-11 | 中国电子科技集团第三十八研究所 | Monitoring video time calibration device and calibration method thereof |
WO2016002130A1 (en) * | 2014-06-30 | 2016-01-07 | パナソニックIpマネジメント株式会社 | Image pickup method, image pickup system, terminal device and server |
CN106161870A (en) * | 2015-04-10 | 2016-11-23 | 杭州海康威视数字技术股份有限公司 | A kind of multi-screen controls equipment and the system of synchronization |
CN207638767U (en) * | 2017-10-12 | 2018-07-20 | 北京工业职业技术学院 | Image temporal calibration system |
WO2019033956A1 (en) * | 2017-08-14 | 2019-02-21 | 杭州海康威视数字技术股份有限公司 | Monitoring video synchronization method and video camera |
US20190199890A1 (en) * | 2017-12-22 | 2019-06-27 | Canon Kabushiki Kaisha | Image capturing apparatus capable of time code synchronization, control method of the same, storage medium, and image capturing system |
WO2020043181A1 (en) * | 2018-08-31 | 2020-03-05 | 中兴通讯股份有限公司 | Clock synchronization method and apparatus, system, storage medium, and electronic device |
US20200084372A1 (en) * | 2018-09-07 | 2020-03-12 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method, and apparatus for clock synchronization, device, storage medium and vehicle |
JP2020174248A (en) * | 2019-04-09 | 2020-10-22 | 株式会社デンソーテン | Image reproduction device and image reproduction method |
WO2020248705A1 (en) * | 2019-06-12 | 2020-12-17 | 杭州萤石软件有限公司 | Camera and camera starting method and device |
CN112217985A (en) * | 2020-08-28 | 2021-01-12 | 新奥特(北京)视频技术有限公司 | Information acquisition method, device and system |
CN113873345A (en) * | 2021-09-27 | 2021-12-31 | 中国电子科技集团公司第二十八研究所 | Distributed ultrahigh-definition video synchronous processing method |
-
2022
- 2022-03-17 CN CN202210263854.3A patent/CN114697466B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003078864A (en) * | 2001-08-30 | 2003-03-14 | Nec Corp | System for providing camera image and time correction method for camera image |
US20050048929A1 (en) * | 2003-09-02 | 2005-03-03 | Denso Corporation | Communications system |
US20130038755A1 (en) * | 2011-08-11 | 2013-02-14 | Sony Corporation | Electronic apparatus, method of time synchronization, and program therefor |
CN103442216A (en) * | 2013-08-22 | 2013-12-11 | 中国电子科技集团第三十八研究所 | Monitoring video time calibration device and calibration method thereof |
WO2016002130A1 (en) * | 2014-06-30 | 2016-01-07 | パナソニックIpマネジメント株式会社 | Image pickup method, image pickup system, terminal device and server |
CN106161870A (en) * | 2015-04-10 | 2016-11-23 | 杭州海康威视数字技术股份有限公司 | A kind of multi-screen controls equipment and the system of synchronization |
WO2019033956A1 (en) * | 2017-08-14 | 2019-02-21 | 杭州海康威视数字技术股份有限公司 | Monitoring video synchronization method and video camera |
CN207638767U (en) * | 2017-10-12 | 2018-07-20 | 北京工业职业技术学院 | Image temporal calibration system |
US20190199890A1 (en) * | 2017-12-22 | 2019-06-27 | Canon Kabushiki Kaisha | Image capturing apparatus capable of time code synchronization, control method of the same, storage medium, and image capturing system |
WO2020043181A1 (en) * | 2018-08-31 | 2020-03-05 | 中兴通讯股份有限公司 | Clock synchronization method and apparatus, system, storage medium, and electronic device |
US20200084372A1 (en) * | 2018-09-07 | 2020-03-12 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method, and apparatus for clock synchronization, device, storage medium and vehicle |
JP2020174248A (en) * | 2019-04-09 | 2020-10-22 | 株式会社デンソーテン | Image reproduction device and image reproduction method |
WO2020248705A1 (en) * | 2019-06-12 | 2020-12-17 | 杭州萤石软件有限公司 | Camera and camera starting method and device |
CN112217985A (en) * | 2020-08-28 | 2021-01-12 | 新奥特(北京)视频技术有限公司 | Information acquisition method, device and system |
CN113873345A (en) * | 2021-09-27 | 2021-12-31 | 中国电子科技集团公司第二十八研究所 | Distributed ultrahigh-definition video synchronous processing method |
Also Published As
Publication number | Publication date |
---|---|
CN114697466B (en) | 2023-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9654672B1 (en) | Synchronized capture of image and non-image sensor data | |
US9813783B2 (en) | Multi-camera dataset assembly and management with high precision timestamp requirements | |
KR101389789B1 (en) | Image pickup apparatus, image pickup system, image pickup method and computer readable non-transitory recording medium | |
US7337344B2 (en) | Methods and apparatus for synchronizing devices on different serial data buses | |
CN102053453B (en) | Imaging device, method for controlling imaging device | |
CN109391799B (en) | Monitoring video synchronization method and device and video acquisition equipment | |
CN107277385B (en) | Multi-camera system synchronous exposure control method and device and terminal equipment | |
WO2018228352A1 (en) | Synchronous exposure method and apparatus and terminal device | |
US9661191B2 (en) | Image capture apparatus having function of generating frame synchronization signal at constant cycle | |
KR20160078893A (en) | Semiconductor device, electronic device module and network system | |
CN111757015B (en) | Exposure control method and device and electronic equipment | |
US11032477B2 (en) | Motion stabilized image sensor, camera module and apparatus comprising same | |
CN110099236B (en) | Video data storage method, video data request method, video data storage device and video data request device | |
CN112087569B (en) | Camera and camera starting method and device | |
US11949767B2 (en) | Communication apparatus, method of controlling communication apparatus, and storage medium | |
US20180084189A1 (en) | Lens module system, image sensor, and method of controlling lens module | |
CN114697466B (en) | Video frame acquisition synchronization control | |
US11184590B2 (en) | Image processing apparatus and method | |
CN110971818A (en) | Time calibration method and device, auxiliary slave equipment and auxiliary master equipment | |
US20200358949A1 (en) | Image capturing apparatus and control method therefor | |
WO2022160328A1 (en) | A system for wireless synchronized capturing, and a smart device | |
WO2020042090A1 (en) | Image display method and apparatus, and image processing device | |
US20240236512A1 (en) | Control apparatus, image capturing system and control method thereof, and storage medium | |
US20230199303A1 (en) | Imaging apparatus and control device | |
US20240204980A1 (en) | Synchronous communication apparatus, control method of the same and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |