WO2019033956A1 - 一种监控视频同步方法及摄像机 - Google Patents
一种监控视频同步方法及摄像机 Download PDFInfo
- Publication number
- WO2019033956A1 WO2019033956A1 PCT/CN2018/099184 CN2018099184W WO2019033956A1 WO 2019033956 A1 WO2019033956 A1 WO 2019033956A1 CN 2018099184 W CN2018099184 W CN 2018099184W WO 2019033956 A1 WO2019033956 A1 WO 2019033956A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time
- processor
- difference
- video
- system time
- Prior art date
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 80
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000012937 correction Methods 0.000 claims description 22
- 230000001360 synchronised effect Effects 0.000 claims description 19
- 230000003247 decreasing effect Effects 0.000 claims description 5
- 239000013078 crystal Substances 0.000 description 20
- 230000000694 effects Effects 0.000 description 10
- 238000012986 modification Methods 0.000 description 10
- 230000004048 modification Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 9
- 238000004364 calculation method Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 3
- 230000007423 decrease Effects 0.000 description 3
- 230000010355 oscillation Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/28—Timers or timing mechanisms used in protocols
-
- 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/10—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
- H04N23/13—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths with multiple sensors
-
- 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
-
- 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/70—Circuitry for compensating brightness variation in the scene
-
- 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
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
Definitions
- the present application relates to the field of video surveillance technologies, and in particular, to a surveillance video synchronization method and a video camera.
- a video capture device is installed in lane 1, lane 2, and lane 3, respectively, for collecting monitoring video of each lane, and the normal monitoring video is as shown in FIG.
- the monitoring video collected by each video capture device is not synchronized, resulting in monitoring video collected by each video capture device.
- splicing as shown at 120, significant misalignment or splitting occurs.
- the purpose of the embodiment of the present application is to provide a monitoring video synchronization method and a camera to implement synchronization of monitoring video.
- the specific technical solutions are as follows:
- the embodiment of the present application provides a method for monitoring a video synchronization, which is applied to a first video collection device, where the method includes:
- the standard time is obtained through the network time protocol NTP, and the system time is corrected according to the standard time;
- the changed exposure parameter is sent to the primary video capture device associated with itself, so that the primary video capture device adjusts itself and the associated with the exposure component according to the exposure parameter
- the exposure parameters of the second video capture device other than the first video capture device, and the adjusted exposure parameters are respectively sent to the second video capture devices;
- the acquisition of the surveillance video begins when the acquisition time agreed with the primary video capture device and the second video capture device arrives.
- the step of correcting the system time of the UE according to the standard time includes:
- the system time of itself is gradually modified until the system time of the self is modified to the standard time.
- the step of gradually modifying the system time of the user according to the first preset duration until the system time of the self is modified to the standard time comprises:
- the step of adjusting the step of the system time of the system according to the system time of the self and the real time of the self includes:
- the step of the system time is continuously adjusted until the time difference between the system time and the real time does not change.
- the step of continuously adjusting the step of the system time according to the magnitude relationship between the target time difference and the initial time difference until the target time difference and the initial time difference are no longer changed includes:
- the step of the system time is decreased according to the second preset step, and the time for executing the waiting for the second preset time is returned, and the self is calculated. a step of a target time difference between the system time and the real time of the self;
- the step of ending the adjustment includes:
- the target time difference is equal to the initial time difference, returning to the step of performing the waiting for the second preset duration, calculating a target time difference between the system time of the self and the real time of the self, until the When it is judged that the time difference between the system time and the real time is no longer changed, the adjustment is ended.
- the step of starting to collect the monitoring video when the collection time agreed with the other video collection device arrives includes:
- the monitoring video is started to be collected.
- the step of starting to collect the monitoring video when the collection time agreed with the other video collection device arrives includes:
- the receiving platform or the video capture instruction sent by the primary video capture device includes an acquisition time, and when the acquisition time comes, the monitoring video is started to be collected.
- the embodiment of the present application provides a monitoring video synchronization device, which is applied to a first video collection device, where the device includes:
- a calibration module configured to acquire a standard time by using a network time protocol NTP according to the set time interval, and correct a system time of the first video collection device according to the standard time;
- an adjustment module configured to adjust a step of a system time of the first video collection device according to a system time of the first video collection device and a real time of the first video collection device;
- a sending module configured to: when the exposure parameter of the first video capture device changes, send the changed exposure parameter to a primary video capture device associated with the first video capture, so that the primary video capture device Adjusting, according to the exposure parameter, an exposure parameter of the second video capture device other than the first video capture device associated with the first video capture device, and transmitting the adjusted exposure parameter to each second video capture device;
- the collecting module is configured to start collecting monitoring video when an acquisition time corresponding to the primary video capturing device and the second video capturing device arrives.
- the calibration module includes:
- a determining sub-module configured to calculate a time difference between the standard time and a system time of the first video collection device, and determine whether the time difference is greater than a preset threshold
- a first modification submodule configured to: when the determination result of the determining submodule is yes, modify a system time of the first video collection device to the standard time;
- a second modification submodule configured to: when the determination result of the determining submodule is negative, modify the system time of the first video collection device according to the first preset duration, until the first video is used The system time of the acquisition device is modified to the standard time.
- the second modification submodule includes:
- a determining subunit configured to determine whether the current time difference is greater than the first preset duration
- a processing subunit configured to adjust a system time of the first video collection device to the first preset duration value when the judgment result of the determining subunit is YES, wait for a specified duration, and calculate the adjusted The current time difference between the system time and the standard time, and triggering the determining subunit;
- the modifying subunit is configured to modify the system time of the first video capturing device to the standard time when the determining result of the determining subunit is negative.
- the adjusting module includes:
- a first calculation submodule configured to calculate an initial time difference between a system time of the first video collection device and a real time of the first video collection device
- a second calculation sub-module configured to calculate a target time difference between a system time of the first video capture device and a real-time time of the first video capture device after waiting for a second preset duration
- the adjusting submodule is configured to continue to adjust the step of the system time according to the size relationship between the target time difference and the initial time difference until the time difference between the system time and the real time time does not change.
- the adjusting submodule includes:
- a first adjusting subunit configured to: when the target time difference is greater than the initial time difference, reduce a step of the system time according to a second preset step size, and trigger the second calculating submodule;
- a second adjusting subunit configured to increase a step of the system time according to a third preset step size when the target time difference is less than the initial time difference, and trigger the second calculating submodule;
- the ending subunit is specifically configured to trigger the second calculating submodule when the target time difference is equal to the initial time difference, until the preset time determines that the system time and the real time are obtained. When the time difference between them no longer changes, the adjustment ends.
- the collecting module is specifically configured to start collecting monitoring video when receiving the video capturing instruction sent by the primary video capturing device.
- the collecting module is specifically configured to receive, by the receiving platform or the main video capturing device, a video capturing instruction that includes an acquisition time, and start collecting the monitoring video when the collecting time comes.
- an embodiment of the present application provides a camera, where the camera includes: a processor and a video collection unit;
- the processor is configured to obtain time difference information by using a network time protocol NTP, and correct a system time of the processor according to the time difference information; adjusting a time step of the processor is the same as a preset standard time step;
- the time difference information is: time difference information between a time of the standard time device and a system time of the processor; the system time is gradually increased according to the time step;
- the processor is further configured to: after correcting a system time of the processor and adjusting a time step of the processor, when the system time of the processor reaches a specified acquisition time, to the video collection unit Sending an acquisition instruction indicating that the acquisition of the surveillance video is started;
- the video collection unit starts collecting monitoring video when receiving the acquisition instruction sent by the processor.
- the time difference information includes: a time difference of a system time of the processor being faster or slower than a time of the standard time device; the processor correcting a system time of the processor according to the time difference information
- a time difference of a system time of the processor being faster or slower than a time of the standard time device
- the processor correcting a system time of the processor according to the time difference information
- the system time of the processor is adjusted in stages based on the time difference.
- the processor when the system time of the processor is adjusted in stages, includes:
- Determining the number of adjustments according to the time difference and the preset first preset duration of each adjustment adjusting the system time of the processor to the first preset according to the determined number of adjustments Duration; after each adjustment, wait for the specified duration before making the next adjustment.
- the camera further includes a clock unit;
- the standard time step is a time step of the clock unit;
- a time step of the clock unit is the same as a time step of a clock unit of another camera;
- the processor when adjusting the time step of the processor is the same as the preset standard time step, includes:
- the system time is a system time after the processor is corrected or before the correction; the real-time time of the clock unit is gradually increased according to the time step of the clock unit;
- the processor when adjusting the time step of the processor and the time step of the clock unit according to the system time and the real-time time of the clock unit, includes:
- Obtaining a first system time of the processor at a first moment and a first real time of the clock unit acquiring a second system time of the processor and a second real time of the clock unit at a second moment;
- the first time is longer than the second time by a specific time;
- the processor when the time step of the processor is the same as the time step of the clock unit, according to the first difference value and the second difference value, includes:
- the time step of the processor is adjusted to a preset step size; after waiting for the second preset time period, the current time is the first time, and the time after the current time is the second time.
- the time step of the processor is adjusted to a preset step size; after waiting for the second preset time period, the current time is the first time, and the time after the current time is the second time.
- the processor when the time step of the processor is adjusted by a preset step, includes:
- the time step of the processor is decreased by a preset step size.
- the processor is further configured to:
- the processor is further configured to:
- the collection instruction is sent to the video collection unit when the following conditions are met:
- the exposure parameter of the camera changes
- the system time of the processor reaches a specified acquisition time.
- the embodiment of the present application further provides a method for monitoring a video synchronization, which is applied to a processor in a video capture device, where the video capture device further includes a video capture unit.
- the method includes:
- time difference information by using a network time protocol NTP, and correcting a system time of the processor according to the time difference information; wherein the time difference information is: time difference information between a time of the standard time device and a system time of the processor ;
- Adjusting the time step of the processor is the same as the preset standard time step; wherein, the system time is gradually increased according to the time step;
- the time difference information includes: a time difference of a system time of the processor being faster or slower than a time of the standard time device; and the step of correcting a system time of the processor according to the time difference information, include:
- the system time of the processor is adjusted in stages based on the time difference.
- the step of performing stepwise adjustment on the system time of the processor includes:
- Determining the number of adjustments according to the time difference and the preset first preset duration of each adjustment adjusting the system time of the processor to the first preset according to the determined number of adjustments Duration; after each adjustment, wait for the specified duration before making the next adjustment.
- the camera further includes a clock unit;
- the standard time step is a time step of the clock unit;
- a time step of the clock unit is the same as a time step of a clock unit of another camera;
- the step of adjusting the time step of the processor is the same as the preset standard time step, including:
- the system time is a system time after the processor is corrected or before the correction; the real-time time of the clock unit is gradually increased according to the time step of the clock unit;
- the step of adjusting a time step of the processor to be the same as a time step of the clock unit according to a system time and a real time of the clock unit includes:
- Obtaining a first system time of the processor at a first moment and a first real time of the clock unit acquiring a second system time of the processor and a second real time of the clock unit at a second moment;
- the first time is longer than the second time by a specific time;
- the step of adjusting a time step of the processor to be the same as a time step of the clock unit according to the first difference value and the second difference value including:
- the time step of the processor is adjusted to a preset step size; after waiting for the second preset time period, the current time is the first time, and the time after the current time is the second time.
- the time step of the processor is adjusted to a preset step size; after waiting for the second preset time period, the current time is the first time, and the time after the current time is the second time.
- the step of adjusting the time step of the processor to a preset step comprises:
- the time step of the processor is decreased by a preset step size.
- the specified collection time is obtained in the following manner:
- the method before the sending the sending instruction to the video collection unit, the method further includes:
- the acquisition instruction is sent to the video collection unit when the following conditions are met:
- the exposure parameter of the video capture device changes
- the system time of the processor reaches a specified acquisition time.
- the processor corrects the system time according to the time difference information, and adjusts the time step of the processor to be the same as the standard time step, so that the absolute time between the devices is the same and the time is increased. As much as possible, the time consistency between the devices in the continuation of the time is ensured, and the system time between the devices is not much different after a period of time, so as to improve the synchronization of each camera when collecting the monitoring video. .
- FIG. 1 is a schematic diagram of a monitoring scenario according to an embodiment of the present application
- FIG. 2 is a flowchart of a method for monitoring video synchronization according to an embodiment of the present application
- FIG. 3 is another flowchart of a method for monitoring video synchronization according to an embodiment of the present application
- FIG. 4 is another flowchart of a method for monitoring video synchronization according to an embodiment of the present application
- FIG. 5 is another flowchart of a method for monitoring video synchronization according to an embodiment of the present application.
- FIG. 6 is a schematic diagram of a process of monitoring video synchronization according to an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a monitoring video synchronization apparatus according to an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a video collection device according to an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of a camera according to an embodiment of the present disclosure.
- FIG. 10 is a flowchart of a method for monitoring video synchronization according to an embodiment of the present application.
- FIG. 2 illustrates a flow of a method for monitoring video synchronization according to an embodiment of the present application.
- the method may include the following steps:
- S201 Acquire a standard time by using a network time protocol NTP according to the set time interval, and correct its own system time according to the standard time.
- the method provided by the embodiment of the present application can be applied to a first video collection device, for example, to a video collection device in a monitoring scenario as shown in FIG. 1 .
- the system time of each video collection device may be synchronized. Specifically, the system time of the video capture device installed in different lanes on the same road can be synchronized.
- the association relationship between the video collection devices that need to perform system time synchronization may be pre-established to facilitate subsequent synchronization operations.
- the system time of each video capture device can be corrected by a standard time to achieve system time synchronization of each video capture device.
- the system time correction process in the embodiment of the present application is described below by taking the correction of the system time of any video capture device as an example. It can be understood that when each video capture device performs system time correction by the method, system time synchronization of each video capture device can be realized.
- the system time of the video capture device can be corrected by using NTP (Network Time Protocol).
- NTP Network Time Protocol
- NTP is a protocol used to synchronize the time of each device in the network. It enables the device to synchronize its server or clock source. It can provide high-accuracy time correction.
- the time source of NTP is international standard time.
- the standard time can be obtained from the NTP server.
- the NTP server can be understood as a server to which NTP is applied.
- the video capture device can obtain the standard time from the NTP server according to the set time interval, such as 2 minutes, 5 minutes, 1 hour, 6 hours, etc., and correct its own system time according to the obtained standard time.
- video capture devices can use standard time to update their system time. After the system is time-corrected by the NTP server, the system time of each video capture device will be the same as the standard time of the NTP server. The system time of each video capture device will also be the same.
- S202 Adjust the step of the system time of the system according to the system time of the self and the real time of the self.
- the video capture device For the video capture device, it has corresponding system time and real-time time.
- the system time is the time of the system clock.
- the real-time time is the time of the hardware clock (also called Real-Time Clock, RTC for short), hardware clock. Clock device on the main board.
- RTC clock and the system clock are not synchronized, which causes the system time and real-time time to be out of sync.
- both the RTC and the system clock start at 0:0:0. After an hour, there will be a gap between the RTC and the system clock. Some devices may have a gap of 5 seconds or more.
- the system time is maintained by real-time time.
- the device starts, it needs to set the system time according to the real-time time. Therefore, when the system time of any video capture device is synchronized with other video capture devices, but the real-time time and system time are not synchronized, when the system time of the video capture device is set according to its real-time time, the system time will be Not synchronized with other video capture devices.
- the cause of the inconsistency between the RTC and the system clock is that the system time step and the stepping of the RTC chip are deviated, resulting in two time inconsistencies.
- the stepping of time can be understood as the unit time.
- the stepping in this embodiment can be understood as the number of crystal vibrations corresponding to the unit duration.
- the system time is the time counted according to the number of vibrations of the crystal of the device CPU.
- the step of the system time can be understood as the number of crystal vibrations of the CPU corresponding to the unit time.
- the stepping of the system time may be that the crystal of the CPU is timed by 0.1 second for every 1000 vibrations.
- the real time time ie, RTC time
- the step of real-time time can be understood as the number of crystal vibrations of the RTC chip corresponding to the unit duration.
- the stepping of the real-time time cannot be modified, and the stepping of the system time can be modified.
- step S201 When the system time of its own is corrected in step S201, the system time of each video capture device is consistent. In order to ensure that the system time of each video capture device remains the same after a certain time, the system time of each video capture device can be adjusted to be consistent.
- each video capture device In order to adjust the system time of each video capture device to be consistent, for each video capture device with consistent steps in real-time time, the steps of each video capture device's own system time and its own real-time time can be adjusted. Consistently, the stepping of the system time of each video capture device is achieved.
- each video capture device can use the same type of RTC chip, or a real-time time stepping similar RTC chip, so that the real-time time of each video capture device can be consistent.
- the system time and real time of the video capturing device may be synchronized. Specifically, the stepping of the system time and the stepping of the real-time time can be synchronized.
- system time and real time can be recorded at a certain time. After a period of time, such as 100 seconds, 200 seconds, etc., the system time and the real-time time are acquired again, and the change value of the system time and the change value of the real-time time are determined, and according to the change value of the system time and the change value of the real-time time, Adjust the step of the system time.
- a period of time such as 100 seconds, 200 seconds, etc.
- the step of the system time can be reduced; when the change value of the system time is less than the real-time time
- the change value indicates that the step of the system time is smaller than the step of the real time time.
- the step of the system time can be increased. Repeat the above steps continuously to adjust the step of the system time until the change in system time is equal to the change in real-time time.
- the change of the system time is equal to the change value of the real-time time after multiple adjustments, it is considered that the step of the system time of the first video capture device is consistent with the step of the real-time time, and thus each video capture device is realized.
- the stepping between system time is consistent.
- the second video capture device is a device different from the first video capture device.
- the exposure parameters may include exposure time and the like.
- one of the multiple video capture devices that need to be synchronized is one of the main video capture devices.
- any one of the stations can be set as the primary video capture device in advance.
- the exposure parameters of each video collection device may be synchronized.
- the video capture device that needs to be synchronized may be associated in advance.
- the exposure parameter of a video capture device is changed, the changed exposure parameter may be sent to the primary video capture device associated with itself.
- the main video capture device may adjust the exposure parameters of the video capture device other than the video capture device that transmits the exposure parameter according to the exposure parameter, and adjust the adjusted exposure parameters respectively. Send to each other video capture device. In this way, the main video capture device and other video capture devices can perform video capture according to the adjusted exposure parameters, thereby ensuring synchronization of the collected surveillance videos.
- the main video capture device can acquire a video image collected by each video capture device and stitch together the video images. Further, in the spliced image, the image acquired by the video capture device that sends the exposure parameter may be used as a reference to calculate an exposure parameter corresponding to each of the other video capture devices in the case that the spliced image does not exhibit significant hopping.
- the video collection device that sends the exposure parameter is device 1, and the corresponding brightness information is 80; the main video collection device is device 2, and the corresponding brightness information is 70; another established association
- the video capture device of the relationship is the device 3, and the corresponding brightness information is 85.
- the device 2 can determine, according to the image corresponding to the device 1, the brightness information corresponding to the device 2 and the device 3 is adjusted to 78 and 82 respectively. There is no obvious jump in the image after the image. In this case, the device 2 can determine that its own brightness information is adjusted to 78, and the brightness information of the device 3 is adjusted to 82. And, the device 2 can transmit the brightness information of the device 3 to the device 3.
- the first video capture device is the main video capture device, after its own exposure parameter is changed, it can adjust the exposure parameters of other video capture devices according to the changed exposure parameters.
- step S203 may be performed before S201 or S202, or may be performed after S201 or S202, which is not specifically limited in this embodiment.
- each video capture device can perform the collection time convention during the video capture, so as to ensure that each video capture device performs monitoring video collection at the same time.
- the video capture command can be sent by the main video capture device, and the other video capture devices start collecting the surveillance video immediately after receiving the video capture command.
- the video capture instruction can be sent by the platform or the primary video capture device.
- the video collection instruction may include an acquisition time. After receiving the video acquisition instruction, the other video collection devices start collecting the surveillance video when the acquisition time comes.
- the arrival of the acquisition time is determined according to the system time.
- the system time of each image acquisition device is consistent. In this case, according to the respective system time, when the acquisition time comes, it is possible to start collecting the monitoring video at the same time.
- the system time of the video capture device can be corrected by using NTP, and the step of the system time of the video capture device can be adjusted to ensure the step of the system time of the video capture device and the step of the real-time time. Consistently, the system time and real-time time of the video capture device are consistent. Moreover, the exposure parameters and the acquisition time of each video capture device can be synchronized to ensure that each video capture device synchronizes the monitoring video collection, thereby ensuring synchronization of the monitoring video collected by each video capture device.
- the process of the first video capture device correcting its own system time according to the standard time may include:
- step S302. Determine whether the time difference is greater than a preset threshold; if yes, execute step S303, and if no, perform step S304.
- the first video collection device determines that the time difference between the standard time and the system time is greater than a preset threshold, such as when the time difference is 2 seconds, 3 seconds, etc., in order to improve the calibration efficiency of the system time
- the video collection is performed.
- the device can directly modify its own system time to standard time.
- S304 Stepwise modify the system time of the system according to the first preset duration until the system time of the self is modified to the standard time.
- the direct modification time may cause the screen after the splicing to appear to be smeared and dislocated.
- the first video capture device may gradually follow the first preset duration.
- the system time of its own is modified until its own system time is modified to the standard time.
- the first preset duration may be set according to actual conditions. For example, according to the actual situation when the monitoring video is spliced, a duration that has less influence on the splicing effect as much as possible may be set.
- the video capture device can increase or decrease the system time by the first preset duration each time, and after multiple adjustments, adjust the system time to be the same as the standard time.
- the correction efficiency and the monitoring video stitching effect can be comprehensively considered, and the system time is corrected by using different correction methods according to the time difference between the system time and the standard time.
- the higher correction efficiency ensures the splicing effect of the surveillance video.
- the first video capture device when the first video capture device corrects its own system time according to the standard time, it may directly modify its own system time to the standard time; or, according to the first preset duration, Gradually modify your own system time until you change your system time to standard time.
- the process of the video capture device correcting its own system time according to the standard time may include:
- step S402. Determine whether the time difference is greater than a preset threshold; if yes, execute step S403; if no, perform step S404.
- the calculated time difference may be determined as the current time difference.
- step S405. Determine whether the current time difference is greater than a first preset duration; if yes, execute step S406; if no, perform step S403.
- step S406 Adjust the first preset duration value of the system time, wait for the specified duration, calculate the current time difference between the adjusted system time and the standard time, and return to step S405.
- the specified duration may or may not be equal to the first preset duration.
- the first video capture device may save the first preset duration locally, and when the system time is corrected, the first preset duration may be adjusted each time. Specifically, when the current time difference is greater than the first preset duration, the system time of the first time period may be adjusted. For example, when the system time is greater than the standard time, the system time can be reduced by the first preset duration, and when the system time is less than the standard time, the system time can be increased by the first preset duration.
- the video capture device may perform step S403 to modify its own system time to the standard time to complete the correction of the system time.
- the video capture device can first set the system time. Decrease 50 milliseconds, then wait 50 milliseconds; then determine that the new current time difference is 70 milliseconds, still greater than the first preset time of 50 milliseconds, then you can reduce the system time by 50 milliseconds, then wait 50 milliseconds; then determine the new The current time difference is 20 milliseconds, which is less than the first preset time of 50 milliseconds.
- the system time can be directly modified to the standard time to complete the correction of the system time.
- the video capture device can perform multiple corrections on the system time, and the system time for each modification is not too large, so that the monitoring video collected during the system time correction process is not significantly spliced. Misplacement.
- the process of adjusting the step of the system time of the first video collection device may include:
- the first video capture device when the first video capture device adjusts the step of its own system time, it may first calculate an initial time difference between its own system time and its own real-time time, that is, start the system time step.
- the time difference during the adjustment such as the initial time difference is 10 milliseconds.
- the first preset step size may be a fixed value, such as 10, 20, etc.; or, may be a proportional value, such as 10%, 20%, and the like.
- the first video capture device may increase the step of its own system time by the value; when the first preset step size is a proportional value, such as 10%, the first The video capture device can increase its own system time step by 10% of the current step.
- the first video capture device can wait for the second preset duration, such as waiting for 100 seconds, 200 seconds, etc., and waiting for the second preset duration to calculate its own system.
- the target time difference between the time and its own real-time time that is, the new time difference between the system time and the real-time time after the step of the system time is adjusted and after the second preset time period.
- the first video capture device can continue to adjust the step of the system time according to the magnitude relationship between the target time difference and the initial time difference until the time difference between the system time and the real-time time. When it no longer changes, it indicates that the system time is synchronized with the real-time time, and the adjustment is ended.
- the first video capture device can reduce the step of the system time according to the second preset step, and wait for the second preset duration to calculate its own system time and its real time.
- the target time difference between the two and continue to adjust the step of the system time according to the size relationship between the newly calculated target time difference and the previous target time difference until the newly calculated target time difference is equal to the previous target time difference.
- the first video capture device can increase the step of the system time according to the third preset step, and wait for the second preset duration to calculate its own system time and its own real time.
- the target time difference between the two and continue to adjust the step of the system time according to the size relationship between the newly calculated target time difference and the previous target time difference until the newly calculated target time difference is equal to the previous target time difference.
- the target time difference When the target time difference is equal to the initial time difference, it indicates that the step of the system time is equal to the step of the real time. In this case, the video capture device can end the adjustment.
- the first video capture device may not immediately End the adjustment. Rather, it can continue to wait for the second preset duration, calculate the target time difference between its own system time and its own real-time time, and continue to determine whether the newly calculated target time difference and the previous target time difference are equal.
- the adjustment is terminated only when the preset number of times judges that the newly calculated target time difference and the previous target time difference do not change any more. This further ensures synchronization of real-time time and system time.
- the step adjustment method of the system time is described by taking the step of increasing the system time as an example.
- the stepping of the system time may be first reduced to adjust the step of the system time, which is not limited in this embodiment of the present application.
- the stepping of the system time can be sequentially adjusted, and finally the synchronization of the system time and the real-time time is realized, thereby ensuring synchronization of the monitoring video.
- camera A, camera B, and camera C are video capture devices installed on different lanes in the same road.
- camera B is the main camera.
- camera A, camera B, and camera C can request the calibration time from the NTP server to ensure that the system time of each camera is the same. At the same time, each camera synchronizes its own system time and real time.
- the main camera that is, the camera B
- the other cameras adjust the exposure information accordingly. For example, when the exposure of the camera A changes, it can transmit the changed exposure information to the camera B, and the camera B can adjust the exposure information of itself and the camera C according to the received exposure information, and adjust the camera C of the camera C.
- the exposure information is sent to the camera C; when the exposure of the camera B changes, it can adjust the exposure information of the camera A and the camera C according to the changed exposure information, and send the adjusted exposure information to the camera A and the camera C respectively; When the exposure of the camera C changes, it can transmit the changed exposure information to the camera B, and the camera B can adjust the exposure information of itself and the camera A according to the received exposure information, and transmit the adjusted exposure information of the camera A.
- the camera B can adjust the exposure information of itself and the camera A according to the received exposure information, and transmit the adjusted exposure information of the camera A.
- the three screens of the cameras A, B, and C are basically not split or misplaced.
- the embodiment of the present application further provides a monitoring video synchronization device, which is applied to a first video collection device.
- the device includes:
- the calibration module 710 is configured to obtain a standard time by using a network time protocol NTP according to the set time interval, and correct a system time of the first video collection device according to the standard time;
- the adjusting module 720 is configured to adjust a step of a system time of the first video capturing device according to a system time of the first video capturing device and a real time of the first video capturing device;
- the sending module 730 is configured to: when the exposure parameter of the first video capture device changes, send the changed exposure parameter to a primary video capture device associated with the first video capture device, to enable the primary video
- the collecting device adjusts the exposure parameters of the second video capturing device and the associated video capturing device according to the exposure parameter, and sends the adjusted exposure parameters to the second video capturing devices respectively;
- the collecting module 740 is configured to start collecting monitoring video when an acquisition time agreed with the primary video capturing device and the second video capturing device comes.
- the system time of the video capture device can be corrected by using NTP, and the step of the system time of the video capture device can be adjusted to ensure the step of the system time of the video capture device and the step of the real-time time. Consistently, the system time and real-time time of the video capture device are consistent. Moreover, the exposure parameters and the acquisition time of each video collection device can be synchronized to ensure synchronization of the monitoring video collection by each video collection device, thereby ensuring synchronization of the monitoring video collected by each video acquisition device.
- the calibration module 710 includes:
- a judging sub-module (not shown), configured to calculate a time difference between the standard time and a system time of the first video collection device, and determine whether the time difference is greater than a preset threshold;
- a first modification sub-module (not shown), configured to modify a system time of the first video collection device to the standard time when the determination result of the determination sub-module is YES;
- a second modification sub-module (not shown), configured to: when the determination result of the determining sub-module is negative, gradually modify the system time of the first video collection device according to the first preset duration; Until the system time of the first video capture device is modified to the standard time.
- the second modification submodule includes:
- a determining subunit (not shown) for determining whether the current time difference is greater than the first preset duration
- a processing subunit (not shown), configured to adjust a system time of the first video collection device to the first preset duration value when the judgment subunit determines that the result is YES, and wait for a specified duration After the time, calculating a current time difference between the adjusted system time and the standard time, and triggering the determining subunit;
- Modifying a subunit for modifying the system time of the first video capture device to the standard time when the judgment result of the judging subunit is no.
- the adjusting module 720 includes:
- a first calculation sub-module (not shown), configured to calculate an initial time difference between a system time of the first video collection device and a real-time time of the first video collection device;
- a second calculation sub-module (not shown), configured to calculate a time between the system time of the first video capture device and the real-time time of the first video capture device after waiting for a second preset duration Target time difference;
- Adjusting a sub-module for continuously adjusting the step of the system time according to the magnitude relationship between the target time difference and the initial time difference until the system time and the real-time time The time difference between them no longer changes.
- the adjusting submodule includes:
- a first adjusting subunit (not shown in the figure), configured to: when the target time difference is greater than the initial time difference, reduce a step of the system time according to a second preset step size, and trigger the first Second calculation submodule;
- a second adjustment subunit (not shown), configured to increase a step of the system time according to a third preset step size when the target time difference is less than the initial time difference, and trigger the step Second calculation submodule;
- End subunits (not shown) for ending the adjustment when the target time difference is equal to the initial time difference.
- the ending subunit is specifically configured to trigger the second calculating submodule when the target time difference is equal to the initial time difference, until the preset number of times determines that the When the time difference between the system time and the real time does not change, the adjustment ends.
- the collecting module 740 is specifically configured to start collecting monitoring video when receiving the video capturing instruction sent by the primary video capturing device.
- the collecting module 740 is specifically configured to receive, by the receiving platform or the main video capturing device, a video capturing instruction that includes an acquisition time, and start collecting when the collecting time arrives. Monitor the video.
- the embodiment of the present application further provides a video capture device, as shown in FIG. 8, including a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820.
- the memory 830 completes communication with each other through the communication bus 840.
- the memory 830 is configured to store a computer program
- the processor 810 is configured to perform the following steps when executing the program stored on the memory 830:
- the standard time is obtained through the network time protocol NTP, and the system time is corrected according to the standard time;
- the changed exposure parameter is sent to the main video capture device associated with itself, so that the main video capture device adjusts itself and the second associated with it according to the exposure parameter.
- the exposure parameter of the video capture device, and the adjusted exposure parameter is sent to each second video capture device;
- the acquisition of the surveillance video begins when the acquisition time agreed with the primary video capture device and the second video capture device arrives.
- the system time of the video capture device can be corrected by using NTP, and the step of the system time of the video capture device can be adjusted to ensure the step of the system time of the video capture device and the step of the real-time time. Consistently, the system time and real-time time of the video capture device are consistent. Moreover, the exposure parameters and the acquisition time of each video capture device can be synchronized to ensure that each video capture device synchronizes the monitoring video collection, thereby ensuring synchronization of the monitoring video collected by each video capture device.
- the communication bus 840 mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- the communication bus 840 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
- Communication interface 820 is used for communication between the aforementioned computer devices and other devices.
- the memory 830 may include a random access memory (RAM), and may also include a non-volatile memory such as at least one disk storage.
- the memory 830 may also be at least one storage device located away from the foregoing processor.
- the processor 810 may be a general-purpose processor, including a central processing unit (CPU), a network processor (Ne twork processor, NP for short), and the like; or a digital signal processor (Digital Signal Processing, referred to as DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
- CPU central processing unit
- Ne twork processor Network processor
- NP Network processor
- DSP Digital Signal Processing
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, implements a method as described in the foregoing embodiment. Monitor video synchronization methods.
- the system time of the video capture device can be corrected by using NTP, and the step of the system time of the video capture device can be adjusted to ensure the step of the system time of the video capture device and the step of the real-time time. Consistently, the system time and real-time time of the video capture device are consistent. Moreover, the exposure parameters and the acquisition time of each video capture device can be synchronized to ensure that each video capture device synchronizes the monitoring video collection, thereby ensuring synchronization of the monitoring video collected by each video capture device.
- the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
- FIG. 9 is a schematic structural diagram of a camera according to an embodiment of the present application.
- the camera includes a processor 910 and a video capture unit 920.
- the processor may be a CPU or a Microcontroller Unit (MCU) or the like.
- the camera in this embodiment may be an embedded camera.
- the processor 910 is configured to obtain time difference information by using a network time protocol (NTP), and correct the system time of the processor 910 according to the time difference information; and adjust the time step of the processor 910 to be the same as the preset standard time step.
- the time difference information is time difference information between the time of the standard time device and the system time of the processor 910. The system time gradually increases in time steps.
- the processor 910 is further configured to: after correcting the system time of the processor 910 and adjusting the time step of the processor 910, when the system time of the processor 910 reaches the specified acquisition time, send a notification to the video collection unit 920 to start the acquisition monitoring. Video capture instructions.
- the video collection unit 920 starts collecting the surveillance video when receiving the acquisition instruction sent by the processor 910.
- the processor 910 can communicate with the standard time device, and the time difference information of the system time of the processor 910 relative to the time of the standard time device can be obtained through the NTP protocol.
- the standard time device can be an NTP server.
- the processor 910 corrects the system time of the processor 910 based on the time difference information, which can be understood as correcting the absolute value of the system time.
- the time difference information is one minute faster than the system time of the processor relative to the standard time device, and the system time of the processor 910 can be slowed down by one minute when the system time of the processor 910 is corrected. This means that the absolute value of the implementation time is consistent with the standard time.
- the processor 910 can acquire time difference information through the NTP according to the set time interval, and correct the system time of the processor 910 according to the time difference information. This continually corrects absolute time and improves time consistency between devices.
- the system time is the time counted according to the number of crystal oscillations of the processor.
- the time step of the processor can be understood as the number of crystal vibrations of the processor corresponding to the unit duration.
- the time step of the processor may be that the crystal oscillator of the processor is timed 0.1 second for every 1000 vibrations.
- the time step of the processor 910 adjusting the processor 910 is the same as the standard time step, which can be understood as adjusting the speed of the processor time increase when the time continues.
- the above camera can be a camera in the system.
- the system can also contain other cameras.
- the standard time steps may be separately set in each camera, and each camera adjusts the time step of the camera processor according to the standard time step.
- each camera performs the operation of adjusting the time step, it can ensure that the time steps of the processors between the cameras in the system are consistent. After each camera has performed an operation to correct the system time according to the time of the standard time device, the time consistency between the devices during the time continuation can be ensured as much as possible.
- the processor 910 may adjust the time step of the processor 910 to be the same as the standard time step before or after the system time of the processor 910 is corrected according to the time difference information; the time step of the processor 910 may be adjusted according to a preset time interval. It is the same as the standard time step; after the camera is turned on, the time step of the adjustment processor 910 is the same as the standard time step, and the time step of the processor 910 does not have to be adjusted before the camera is powered off. All of the above are feasible options.
- the processor corrects the system time according to the time difference information, and adjusts the time step of the processor to be the same as the standard time step, so that the absolute time between the devices is the same and the time is increased.
- the time consistency between the devices in the continuation of the time can be ensured as much as possible, and the system time between the devices is not much different after a period of time, so that the cameras can be as high as possible when collecting the monitoring video. Synchronization.
- the time difference information includes a time difference between the system time of the processor 910 and the time of the standard time device.
- the system time of the processor 910 is relative to the time of the standard time device: 2 minutes faster; or, 1 minute slower, and the like.
- the processor 910 when correcting the system time of the processor 910 according to the time difference information, may include:
- the preset threshold may be a time threshold determined in advance according to experience.
- the preset threshold may be 2.5 seconds or 3 seconds or the like.
- directly adjusting the system time of the processor may cause a spliced video screen to appear smeared or misaligned. Therefore, in order to avoid this, the system time of the processor can be gradually adjusted in stages when the time of the standard time device differs from the system time of the processor.
- the scheme using the split adjustment may need to be adjusted many times to eliminate the time difference between the system time of the processor and the standard time device, and the efficiency is low.
- the system time of the processor can be directly adjusted to the time difference.
- the system time of the processor can be directly slowed down by 2min.
- the system time of the device is adjusted by 1 min.
- the correction efficiency and the video stitching effect can be comprehensively considered, and the system time is corrected by using different correction methods according to the time difference information, while maintaining high correction efficiency. It may guarantee the stitching effect of the video.
- the method may include:
- the first preset duration may be determined in advance according to experience, for example, according to a time interval in which the video does not cause significant misalignment.
- the specified duration can be a value that is preset as needed.
- the processor 910 determines the number of adjustments
- the result of dividing the time difference by the first preset duration may be directly used as the number of adjustments.
- the processor can perform multiple corrections on the system time, and the system time of each modification is not too large, so that the monitoring video collected during the system time correction process is not obviously spliced. Misplacement.
- the camera can include the following two times: the time of the processor and the time of the clock unit.
- the processor's time is the system time, which is the time the processor counts based on the number of crystal oscillations inside the processor.
- the clock unit can be an RTC chip.
- the time of the clock unit is the real time, that is, the time counted according to the number of crystal oscillations of the RTC chip.
- the crystal of the clock unit can be different from the crystal inside the processor.
- the system time is maintained by real-time time. When the camera starts, it needs to set the system time according to the real-time time.
- the time step of the clock unit can be understood as the number of crystal vibrations of the RTC chip corresponding to the unit duration.
- the time step of the clock unit cannot be modified, and the time step of the processor can be modified.
- the standard time step in the embodiment shown in Fig. 9 may be a time step of the clock unit.
- the time step of the clock unit of the camera can be made the same as the time step of the clock unit of other cameras by pre-selecting the device hardware. It is to make the time steps of the clock units of each camera the same. This can be achieved by selecting the same type of RTC chip for each camera, or by using an RTC chip with similar time steps.
- the processor 910 adjusts the time step of the processor 910 to be the same as the preset standard time step, including:
- the real time of the clock unit is obtained. According to the system time and the real time of the clock unit, the time step of the adjustment processor 910 is the same as the time step of the clock unit.
- the system time is the system time after the processor is corrected or before the correction.
- the real-time time of the clock unit is gradually increased in accordance with the time step of the clock unit. Obtaining the real-time time of the clock unit can be understood as the real-time time of acquiring the clock unit of the camera itself.
- the time step of the processor can be adjusted according to the variation rule of the difference between the system time and the real time.
- the processor 910 when adjusting the time step of the processor and the time step of the clock unit according to the system time and the real-time time of the clock unit, may include:
- the first moment is a specific time longer than the second moment.
- the time step of the adjustment processor 910 is the same as the time step of the clock unit based on the first difference and the second difference.
- the first time or the second time may be a system time or a real time.
- the first real time T1 is acquired, and at the second system time t2, the second real time T2 is acquired.
- t2-t1 and T2-T1 are 2 seconds and 20 milliseconds, it can be determined that the system time is 30 milliseconds slower than the real time in 2 seconds. You can adjust the time step and clock unit of the processor with this information. The time steps are the same.
- the processor 910 when the time step of the adjustment processor 910 is the same as the time step of the clock unit according to the first difference value and the second difference value, may include:
- the time step of the processor 910 is adjusted to a preset step size; after waiting for the second preset time period, the current time is the first time, and the time after the current time is the second time, and returning Obtaining a first system time of the processor 910 at a first moment and a first real time of the clock unit, and acquiring an operation of the second system time of the processor 910 and the second real time of the clock unit at the second moment;
- the preset step size can be understood as the value of the time step.
- the second preset duration may be determined in advance based on experience.
- the processor 910 when the time step of the processor 910 is stepped to a preset step size, may include:
- the preset step size is assumed to be 100 vibrations, and the initial time step of the processor and the time step of the clock unit assume that the crystal vibration is 10,000 times as 1 second.
- the first difference is not equal to the second difference, it can be understood that the crystal vibration of the processor is different from the time period corresponding to the crystal vibration of the clock unit n times.
- the time step of the processor can be modified to 10100 times as 1 second.
- the time step of the processor can be modified to 9900 times as 1 second.
- the first difference and the second difference are continuously updated.
- the time step of the processor has been modified to be consistent with the clock unit.
- the time step of the processor is 10200 times as 1 second. That is, the duration of the crystal vibration of the processor is 10200 times and the duration of the crystal vibration of the clock unit is 10,000 times.
- the time step of the processor is realized to be the same as the time step of the clock unit.
- the embodiment increases or decreases the time step of the processor according to the relationship between the first difference and the second difference, and finally causes the time step of the processor to be consistent with the time step of the clock unit. Provides a different adjustment method and enriches the technical means.
- the system time of each camera can be made consistent, and the time is consistent as much as possible during the continuation of the time. .
- the processor 910 is further configured to:
- the video acquisition instruction sent by the receiving platform or other camera including the specified acquisition time, acquires the specified acquisition time from the video acquisition instruction.
- the platform can be understood as a server or other device capable of sending video capture instructions to the camera.
- Other cameras are cameras other than the above cameras in the system.
- the camera can send video capture instructions to other cameras. All of the above are possible implementations.
- the processor 910 is further configured to:
- the acquisition instruction is sent to the video collection unit when the following conditions are met:
- the exposure parameter of the camera changes
- the processor's system time reaches the specified acquisition time.
- the exposure parameters may include exposure time and the like.
- the exposure parameters change, the picture quality of the surveillance video captured by the camera also changes.
- the above camera detects its own exposure parameter change, it can synchronize with the exposure parameters of other cameras in the system.
- the processor of the camera can send the changed exposure parameter to the main camera in the system.
- the main camera can adjust its own exposure parameters according to the exposure parameters, and adjust the exposure parameters of each other camera. For example, if the main camera receives the changed exposure time sent by the camera 1 for 30 ms, the main camera can adjust its own exposure time and the exposure time of other cameras to 30 ms.
- the main camera performs monitoring video acquisition according to the adjusted own exposure parameters.
- the main camera can send the exposure parameters of each other camera to the corresponding other cameras, so that each other camera performs video acquisition according to the adjusted exposure parameters sent by the main camera.
- the processor 910 can determine that the other cameras have changed the respective exposure parameters according to the changed exposure parameters of the camera, and after determining that the other cameras have been changed according to the camera after transmitting the changed exposure parameters to the main camera for a certain period of time.
- the exposure parameters adjust the respective exposure parameters; when receiving notification messages sent by other cameras or the main camera, it is also determined that other cameras have adjusted their respective exposure parameters according to the changed exposure parameters of the camera.
- the acquisition instruction is sent to the video collection unit when each condition is satisfied, so as to ensure that the brightness of the captured video images of each camera is consistent and improved.
- the effect of stitching the image is
- FIG. 10 is a schematic flowchart of a method for monitoring video synchronization according to an embodiment of the present application.
- the method embodiment corresponds to the device embodiment shown in FIG.
- the method embodiment is applied to a processor in a video capture device, and the video capture device further includes a video capture unit.
- the method includes:
- Step S101 Obtain time difference information through a network time protocol (NTP), and correct a system time of the processor according to the time difference information.
- NTP network time protocol
- the time difference information is time difference information between a time of the standard time device and a system time of the processor.
- Step S102 The time step of adjusting the processor is the same as the preset standard time step.
- the system time gradually increases according to the time step
- Step S103 After correcting the system time of the processor and adjusting the time step of the processor, when the system time of the processor reaches the specified acquisition time, sending an acquisition instruction indicating that the acquisition of the monitoring video is started to the video collection unit, so that The video collection unit starts collecting the monitoring video when receiving the acquisition instruction sent by the processor.
- the embodiment can correct the system time according to the time difference information, and adjust the time step of the processor to be the same as the standard time step, so that the absolute time between the devices is the same and the time is increased. As far as possible, the time consistency between the devices in the continuation of the time is ensured, and the system time between the devices is not much different after a period of time, so as to ensure the synchronization of each camera when collecting the monitoring video. .
- the time difference information may include a time difference of a system time of the processor that is faster or slower than a time of the standard time device.
- the step of correcting the system time of the processor according to the time difference information in step S101 may include:
- the system time of the processor is adjusted in stages based on the time difference.
- the step of performing a stepwise adjustment on the system time of the processor includes:
- the camera further includes a clock unit; the standard time step is a time step of the clock unit; the time step of the clock unit is compared with the time of the clock unit of the other camera. The same stepping;
- Step S102 adjusting the time step of the processor is the same as the preset standard time step, and specifically includes:
- the time step of adjusting the processor is the same as the time step of the clock unit;
- the system time is the system time after the processor is corrected or before the correction; the real-time time of the clock unit is gradually increased according to the time step of the clock unit.
- adjusting the time step of the processor is the same as the time step of the clock unit according to the system time and the real time of the clock unit. Steps, including:
- the time step of the adjustment processor is the same as the time step of the clock unit based on the first difference and the second difference.
- the steps of adjusting the time step of the processor and the time step of the clock unit according to the first difference value and the second difference value include:
- the time step of the processor is adjusted to a preset step size; after waiting for the second preset time period, the current time is the first time, and the current time is the second time, and the execution is returned.
- the step of adjusting the time step of the processor to the preset step size according to the embodiment shown in FIG. 10 specifically includes:
- the time step of the processor is increased by a preset step size.
- the specified acquisition time is obtained in the following manner:
- the video capture instruction sent by the receiving platform or other video capture device obtains the specified acquisition time from the video capture instruction.
- the method before the sending the acquisition instruction to the video collection unit, the method further includes:
- the acquisition instruction is sent to the video acquisition unit when the following conditions are met:
- the exposure parameter of the video capture device changes
- the system time of the processor reaches a specified acquisition time.
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Studio Devices (AREA)
Abstract
本申请实施例提供了一种监控视频同步方法及摄像机,所述方法应用于摄像机的处理器,该摄像机还包括视频采集单元。该方法包括:通过网络时间协议NTP获取时间差信息,并根据该时间差信息校正处理器的***时间;调整处理器的时间步进与预设的标准时间步进相同;在校正处理器的***时间以及调整处理器的时间步进之后,当处理器的***时间到达指定的采集时间时,向视频采集单元发送表示开始采集监控视频的采集指令。本实施例能够能够尽可能提高各摄像机在采集监控视频时的同步性。
Description
本申请要求于2017年08月14日提交中国专利局、申请号为201710693239.5、发明名称为“一种监控视频同步方法、装置及视频采集设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及视频监控技术领域,特别是涉及一种监控视频同步方法及摄像机。
随着视频监控技术的不断发展,平安城市、智能小区、智能交通等建设日益普遍,视频监控应用越来越广泛。在交通监控领域,有些情况下,对多车道的道路进行监控时,为了提高监控效果,通常会在每个车道分别安装一台视频采集设备,以分别获取每个车道的监控视频。并且,为了方便视频处理等操作,在获取到各车道的监控视频后,可以将各车道的监控视频拼接到一起。
如图1所示,在车道1、车道2、车道3分别安装有视频采集设备,用来采集每个车道的监控视频,正常的监控视频如110所示。但是,由于每个视频采集设备之间存在时间差,即各视频采集设备的***时间之间存在差异,导致各视频采集设备采集的监控视频不同步,从而导致各视频采集设备采集的监控视频经平台拼接后如120所示,出现了明显的错位或者割裂。
因此,如何对视频采集设备进行时钟同步,进而保证监控视频的同步,成为一个亟待解决的问题。
发明内容
本申请实施例的目的在于提供一种监控视频同步方法及摄像机,以实现监控视频的同步。具体技术方案如下:
第一方面,本申请实施例提供了一种监控视频同步方法,应用于第一视频采集设备,所述方法包括:
按照设定的时间间隔,通过网络时间协议NTP获取标准时间,并根据所述标准时间校正自身的***时间;
根据所述自身的***时间和自身的实时时间,调整自身的***时间的步进;
当自身的曝光参数改变时,将改变后的曝光参数发送给与自身相关联的主视频采集设备,以使所述主视频采集设备根据所述曝光参数,调整其自身以及与其相关联的所述第一视频采集设备之外的第二视频采集设备的曝光参数,并将调整后的曝光参数分别发送给各第二视频采集设备;
在与所述主视频采集设备以及所述第二视频采集设备约定的采集时间到来时,开始采集监控视频。
可选的,所述根据所述标准时间校正自身的***时间的步骤包括:
计算所述标准时间与自身的***时间之间的时间差,并判断所述时间差是否大于预设阈值;
如果是,将自身的***时间修改为所述标准时间;
如果否,按照第一预设时长,逐步对自身的***时间进行修改,直至将所述自身的***时间修改为所述标准时间。
可选的,所述按照第一预设时长,逐步对自身的***时间进行修改,直至将所述自身的***时间修改为所述标准时间的步骤包括:
将所述时间差确定为当前时间差;
判断所述当前时间差是否大于第一预设时长;
如果是,将自身的***时间调整所述第一预设时长值,等待指定时长的时间后,计算调整后的***时间与所述标准时间之间的当前时间差,并返回执行所述判断所述当前时间差是否大于所述第一预设时长的步骤;
如果否,将自身的***时间修改为所述标准时间。
可选的,所述根据所述自身的***时间和自身的实时时间,调整自身的***时间的步进的步骤包括:
计算所述自身的***时间和自身的实时时间之间的初始时间差;
按照第一预设步长,增大所述***时间的步进;
等待第二预设时长的时间后,计算所述自身的***时间和所述自身的实时时间之间的目标时间差;
根据所述目标时间差与所述初始时间差之间的大小关系,继续调整所述***时间的步进,直至所述***时间和所述实时时间之间的时间差不再变化。
可选的,所述根据所述目标时间差与所述初始时间差之间的大小关系,继续调整所述***时间的步进,直至所述目标时间差与所述初始时间差不再变化的步骤包括:
当所述目标时间差大于所述初始时间差时,按照第二预设步长,减小所 述***时间的步进,并返回执行所述等待第二预设时长的时间后,计算所述自身的***时间和所述自身的实时时间之间的目标时间差的步骤;
当所述目标时间差小于所述初始时间差时,按照第三预设步长,增大所述***时间的步进,并返回执行所述等待第二预设时长的时间后,计算所述自身的***时间和所述自身的实时时间之间的目标时间差的步骤;
当所述目标时间差等于所述初始时间差时,结束调整。
可选的,所述当所述目标时间差等于所述初始时间差时,结束调整的步骤包括:
当所述目标时间差等于所述初始时间差时,返回执行所述等待第二预设时长的时间后,计算所述自身的***时间和所述自身的实时时间之间的目标时间差的步骤,直到预设数量次判断得到所述***时间和所述实时时间之间的时间差不再变化时,结束调整。
可选的,所述在与所述其他视频采集设备约定的采集时间到来时,开始采集监控视频的步骤包括:
当接收到所述主视频采集设备发送的视频采集指令时,开始采集监控视频。
可选的,所述在与所述其他视频采集设备约定的采集时间到来时,开始采集监控视频的步骤包括:
接收平台或所述主视频采集设备发送的包含采集时间的视频采集指令,并在所述采集时间到来时,开始采集监控视频。
第二方面,本申请实施例提供了一种监控视频同步装置,应用于第一视频采集设备,所述装置包括:
校正模块,用于按照设定的时间间隔,通过网络时间协议NTP获取标准时间,并根据所述标准时间校正所述第一视频采集设备的***时间;
调整模块,用于根据所述第一视频采集设备的***时间和所述第一视频采集设备的实时时间,调整所述第一视频采集设备的***时间的步进;
发送模块,用于当所述第一视频采集设备的曝光参数改变时,将改变后的曝光参数发送给与所述第一视频采集相关联的主视频采集设备,以使所述主视频采集设备根据所述曝光参数,调整其自身以及与其相关联的所述第一视频采集设备之外的第二视频采集设备的曝光参数,并将调整后的曝光参数分别发送给各第二视频采集设备;
采集模块,用于在与所述主视频采集设备以及所述第二视频采集设备约 定的采集时间到来时,开始采集监控视频。
可选的,所述校正模块包括:
判断子模块,用于计算所述标准时间与所述第一视频采集设备的***时间之间的时间差,并判断所述时间差是否大于预设阈值;
第一修改子模块,用于当所述判断子模块的判断结果为是时,将所述第一视频采集设备的***时间修改为所述标准时间;
第二修改子模块,用于当所述判断子模块的判断结果为否时,按照第一预设时长,逐步对所述第一视频采集设备的***时间进行修改,直至将所述第一视频采集设备的***时间修改为所述标准时间。
可选的,所述第二修改子模块,包括:
确定子单元,用于将所述时间差确定为当前时间差;
判断子单元,用于判断所述当前时间差是否大于所述第一预设时长;
处理子单元,用于当所述判断子单元的判断结果为是时,将所述第一视频采集设备的***时间调整所述第一预设时长值,等待指定时长的时间后,计算调整后的***时间与所述标准时间之间的当前时间差,并触发所述判断子单元;
修改子单元,用于当所述判断子单元的判断结果为否时,将所述第一视频采集设备的***时间修改为所述标准时间。
可选的,所述调整模块,包括:
第一计算子模块,用于计算所述第一视频采集设备的***时间和所述第一视频采集设备的实时时间之间的初始时间差;
增大子模块,用于按照第一预设步长,增大所述***时间的步进;
第二计算子模块,用于等待第二预设时长的时间后,计算所述第一视频采集设备的***时间和所述第一视频采集设备的实时时间之间的目标时间差;
调整子模块,用于根据所述目标时间差与所述初始时间差之间的大小关系,继续调整所述***时间的步进,直至所述***时间和所述实时时间之间的时间差不再变化。
可选的,所述调整子模块,包括:
第一调整子单元,用于当所述目标时间差大于所述初始时间差时,按照第二预设步长,减小所述***时间的步进,并触发所述第二计算子模块;
第二调整子单元,用于当所述目标时间差小于所述初始时间差时,按照第三预设步长,增大所述***时间的步进,并触发所述第二计算子模块;
结束子单元,用于当所述目标时间差等于所述初始时间差时,结束调整。
可选的,所述结束子单元,具体用于当所述目标时间差等于所述初始时间差时,触发所述第二计算子模块,直到预设数量次判断得到所述***时间和所述实时时间之间的时间差不再变化时,结束调整。
可选的,所述采集模块,具体用于当接收到所述主视频采集设备发送的视频采集指令时,开始采集监控视频。
可选的,所述采集模块,具体用于接收平台或所述主视频采集设备发送的包含采集时间的视频采集指令,并在所述采集时间到来时,开始采集监控视频。
第三方面,本申请实施例提供了一种摄像机,该摄像机包括:处理器和视频采集单元;
所述处理器,用于通过网络时间协议NTP获取时间差信息,并根据所述时间差信息校正所述处理器的***时间;调整所述处理器的时间步进与预设的标准时间步进相同;其中,所述时间差信息为:标准时间设备的时间与所述处理器的***时间之间的时间差信息;***时间按照时间步进逐渐增加;
所述处理器,还用于在校正所述处理器的***时间以及调整所述处理器的时间步进之后,当所述处理器的***时间到达指定的采集时间时,向所述视频采集单元发送表示开始采集监控视频的采集指令;
所述视频采集单元,在接收到所述处理器发送的所述采集指令时,开始采集监控视频。
可选的,所述时间差信息包括:所述处理器的***时间相对于所述标准时间设备的时间快或慢的时间差;所述处理器,根据所述时间差信息校正所述处理器的***时间时,包括:
判断所述时间差是否大于预设阈值;
如果是,则直接将所述处理器的***时间调整所述时间差;
如果否,则基于所述时间差,对所述处理器的***时间进行分次调整。
可选的,所述处理器,对所述处理器的***时间进行分次调整时,包括:
根据所述时间差以及预设的每次调整时的第一预设时长,确定调整次数;按照确定的调整次数,在每次调整时,将所述处理器的***时间调整所述第一预设时长;在每次调整后,等待指定时长的时间后进行下次调整。
可选的,所述摄像机还包括时钟单元;所述标准时间步进为所述时钟单元的时间步进;所述时钟单元的时间步进与其他摄像机的时钟单元的时间步 进相同;
所述处理器,调整所述处理器的时间步进与预设的标准时间步进相同时,包括:
获取所述时钟单元的实时时间,根据***时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同;
其中,所述***时间为所述处理器校正后或校正前的***时间;所述时钟单元的实时时间按照所述时钟单元的时间步进逐渐增加;
可选的,所述处理器,根据***时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同时,包括:
获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时所述处理器的第二***时间和所述时钟单元的第二实时时间;所述第一时刻比所述第二时刻早特定时长;
计算所述第一***时间和所述第二***时间的第一差值,计算所述第一实时时间和所述第二实时时间的第二差值;
根据所述第一差值与所述第二差值,调整所述处理器的时间步进与所述时钟单元的时间步进相同。
可选的,所述处理器,根据所述第一差值与所述第二差值,调整所述处理器的时间步进与所述时钟单元的时间步进相同时,包括:
判断所述第一差值是否等于所述第二差值;
如果不等于,则将所述处理器的时间步进调整预设步长;在等待第二预设时长的时间之后,以当前时刻为所述第一时刻,以当前时刻之后的时刻为第二时刻,返回执行所述获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时所述处理器的第二***时间和所述时钟单元的第二实时时间的操作;
如果等于,则确定已调整至所述处理器的时间步进与所述时钟单元的时间步进相同。
可选的,所述处理器,将所述处理器的时间步进调整预设步长时,包括:
当所述第一差值大于所述第二差值时,将所述处理器的时间步进增大预设步长;
当所述第一差值小于所述第二差值时,将所述处理器的时间步进减小预设步长。
可选的,所述处理器,还用于:
接收平台或其他摄像机发送的包含所述指定的采集时间的视频采集指令,从所述视频采集指令中获取所述指定的采集时间。
可选的,所述处理器,还用于:
在向所述视频采集单元发送所述采集指令之前,在以下条件满足时,向所述视频采集单元发送所述采集指令:
所述摄像机的曝光参数改变;
确定其他摄像机均根据所述摄像机改变后的曝光参数调整各自的曝光参数;
所述处理器的***时间到达指定的采集时间。
第四方面,本申请实施例还提供了一种监控视频同步方法,应用于视频采集设备中的处理器,所述视频采集设备还包括视频采集单元;所述方法包括:
通过网络时间协议NTP获取时间差信息,并根据所述时间差信息校正所述处理器的***时间;其中,所述时间差信息为:标准时间设备的时间与所述处理器的***时间之间的时间差信息;
调整所述处理器的时间步进与预设的标准时间步进相同;其中,***时间按照时间步进逐渐增加;
在校正所述处理器的***时间以及调整所述处理器的时间步进之后,当所述处理器的***时间到达指定的采集时间时,向所述视频采集单元发送表示开始采集监控视频的采集指令,以使所述视频采集单元在接收到所述处理器发送的采集指令时开始采集监控视频。
可选的,所述时间差信息包括:所述处理器的***时间相对于所述标准时间设备的时间快或慢的时间差;所述根据所述时间差信息校正所述处理器的***时间的步骤,包括:
判断所述时间差是否大于预设阈值;
如果是,则直接将所述处理器的***时间调整所述时间差;
如果否,则基于所述时间差,对所述处理器的***时间进行分次调整。
可选的,所述对所述处理器的***时间进行分次调整的步骤,包括:
根据所述时间差以及预设的每次调整时的第一预设时长,确定调整次数;按照确定的调整次数,在每次调整时,将所述处理器的***时间调整所述第一预设时长;在每次调整后,等待指定时长的时间后进行下次调整。
可选的,所述摄像机还包括时钟单元;所述标准时间步进为所述时钟单 元的时间步进;所述时钟单元的时间步进与其他摄像机的时钟单元的时间步进相同;
所述调整所述处理器的时间步进与预设的标准时间步进相同的步骤,包括:
获取所述时钟单元的实时时间,根据***时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同;
其中,所述***时间为所述处理器校正后或校正前的***时间;所述时钟单元的实时时间按照所述时钟单元的时间步进逐渐增加;
可选的,所述根据***时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同的步骤,包括:
获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时所述处理器的第二***时间和所述时钟单元的第二实时时间;所述第一时刻比所述第二时刻早特定时长;
计算所述第一***时间和所述第二***时间的第一差值,计算所述第一实时时间和所述第二实时时间的第二差值;
根据所述第一差值与所述第二差值,调整所述处理器的时间步进与所述时钟单元的时间步进相同。
可选的,所述根据所述第一差值与所述第二差值,调整所述处理器的时间步进与所述时钟单元的时间步进相同的步骤,包括:
判断所述第一差值是否等于所述第二差值;
如果不等于,则将所述处理器的时间步进调整预设步长;在等待第二预设时长的时间之后,以当前时刻为所述第一时刻,以当前时刻之后的时刻为第二时刻,返回执行所述获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时所述处理器的第二***时间和所述时钟单元的第二实时时间的步骤;
如果等于,则确定已调整至所述处理器的时间步进与所述时钟单元的时间步进相同。
可选的,所述将所述处理器的时间步进调整预设步长的步骤,包括:
当所述第一差值大于所述第二差值时,将所述处理器的时间步进增大预设步长;
当所述第一差值小于所述第二差值时,将所述处理器的时间步进减小预设步长。
可选的,采用以下方式获取所述指定的采集时间:
接收平台或其他视频采集设备发送的包含所述指定的采集时间的视频采集指令,从所述视频采集指令中获取所述指定的采集时间。
可选的,在向所述视频采集单元发送所述采集指令之前,所述方法还包括:
在以下条件满足时,向所述视频采集单元发送所述采集指令:
所述视频采集设备的曝光参数改变;
确定所述其他视频采集设备均根据所述改变后的曝光参数调整各自的曝光参数;
所述处理器的***时间到达指定的采集时间。
本申请实施例中,处理器根据时间差信息校正***时间,并且调整处理器的时间步进与标准时间步进相同,这样即调整了设备之间的绝对时间相同并且使得时间增加的快慢一致,能够尽可能保证各个设备之间在时间的延续过程中时间的一致性,避免一段时间之后设备之间的***时间又相差较多的情况,进而能够尽可能提高各摄像机在采集监控视频时的同步性。
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例的一种监控场景示意图;
图2为本申请实施例的一种监控视频同步方法的流程图;
图3为本申请实施例的一种监控视频同步方法的另一流程图;
图4为本申请实施例的一种监控视频同步方法的另一流程图;
图5为本申请实施例的一种监控视频同步方法的另一流程图;
图6为本申请实施例的一种监控视频同步方法过程示意图;
图7为本申请实施例的一种监控视频同步装置的结构示意图;
图8为本申请实施例的一种视频采集设备的结构示意图;
图9为本申请实施例提供的一种摄像机的结构示意图;
图10为本申请实施例提供的一种监控视频同步方法的流程图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行 清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
以下通过具体实施例,对本申请进行详细说明。
请参考图2,其示出了本申请实施例的一种监控视频同步方法流程,该方法可以包括以下步骤:
S201,按照设定的时间间隔,通过网络时间协议NTP获取标准时间,并根据所述标准时间校正自身的***时间。
本申请实施例提供的方法可以应用于第一视频采集设备,例如,可以应用于如图1所示监控场景中的视频采集设备。
在本申请实施例中,为了保证各视频采集设备所采集监控视频的同步,可以对各视频采集设备的***时间进行同步。具体的,可以对同一道路上不同车道安装的视频采集设备的***时间进行同步。可选的,在本申请实施例中,可以对需要进行***时间同步的视频采集设备预先建立关联关系,以方便后续的同步操作。
例如,可以通过一个标准时间对各视频采集设备的***时间进行校正,从而达到各视频采集设备的***时间同步。下面以对任一视频采集设备的***时间进行校正为例,来说明本申请实施例中***时间校正过程。可以理解,当每台视频采集设备都通过本方法进行***时间校正后,即可实现各视频采集设备的***时间同步。
在一种实现方式中,可以通过NTP(Network Time Protocol,网络时间协议)对视频采集设备的***时间进行校正。NTP是用来同步网络中各个设备的时间的协议,它可以使设备对其服务器或时钟源做同步化,它可以提供高精准度的时间校正,NTP的时间来源是国际标准时间。
通过NTP获取标准时间时,可以从NTP服务器中获取标准时间。其中,NTP服务器可以理解为应用了NTP的服务器。
具体的,视频采集设备可以按照设定的时间间隔,如2分钟、5分钟、1小时、6小时等,从NTP服务器获取标准时间,并根据所获取的标准时间校正自身的***时间。如,视频采集设备可以使用标准时间来更新自身的***时间。需要同步的多台视频采集设备都通过NTP服务器进行***时间校正后,各视频采集设备的***时间均会与NTP服务器的标准时间一致,从而各视频采集设备的***时间也将一致。
S202,根据所述自身的***时间和自身的实时时间,调整自身的***时间的步进。
对于视频采集设备来说,其有对应的***时间和实时时间,***时间为***时钟的时间,实时时间为硬件时钟(也称为实时时钟,Real-Time Clock,简称RTC)的时间,硬件时钟为主板上的时钟设备。对于视频采集设备来说,由于晶振、CPU主频等差异,会造成RTC时钟和***时钟不同步,进而导致***时间和实时时间不同步。例如RTC和***时钟都从0:0:0开始,经过一小时后,RTC和***时钟就会有差距,有些设备可能会差距到5秒或更大。
而***时间是靠实时时间维护的,当设备启动时,需要根据实时时间来设置***时间。因此,当任一视频采集设备与其他视频采集设备的***时间已同步,但其实时时间和***时间不同步时,当该视频采集设备的***时间根据其实时时间进行设置后,其***时间将与其他视频采集设备不同步。申请人在研究中发现,造成RTC和***时钟不一致的原因为***时间步进和RTC芯片的步进存在偏差,所以造成了两个时间不一致。
时间的步进可以理解为单位时长。本实施例中的步进可以理解为单位时长对应的晶振振动次数。***时间为根据设备CPU的晶振的振动次数计时的时间。***时间的步进可以理解为单位时长对应的CPU的晶振振动次数。例如,***时间的步进可以为,CPU的晶振每振动1000次计时0.1秒。实时时间(即RTC时间)为根据RTC芯片的晶振的振动次数计时的时间。实时时间的步进可以理解为单位时长对应的RTC芯片的晶振振动次数。对于设备来说,实时时间的步进不可修改,***时间的步进可以修改。
在步骤S201中校正自身的***时间时,各个视频采集设备的***时间达到了一致。为了在一定时间之后,各个视频采集设备的***时间仍然一致,可以将各个视频采集设备的***时间的步进调整得一致。
为了将各个视频采集设备的***时间的步进调整得一致,针对实时时间的步进一致的各个视频采集设备来说,可以通过调整各个视频采集设备自身***时间的步进与自身实时时间的步进一致,实现使各个视频采集设备的***时间的步进达到一致。在这种实施方式中,各个视频采集设备可以采用相同型号的RTC芯片,或者采用实时时间的步进相近的RTC芯片,这样可以实现各个视频采集设备的实时时间的步进一致。
在本申请实施例中,为了保证监控视频的同步,避免因***时间和实时时间不同步而导致的监控视频不同步,可以对视频采集设备的***时间和实 时时间进行同步。具体的,可以对***时间的步进和实时时间的步进进行同步。
如,可以在某一时刻,记录***时间和实时时间。经过一段时间后,如100秒、200秒等,再次获取***时间和实时时间,确定***时间的变化值和实时时间的变化值,并根据***时间的变化值和实时时间的变化值的大小,对***时间的步进进行调整。
当***时间的变化值大于实时时间的变化值时,表明***时间的步进大于实时时间的步进,这种情况下,可以减小***时间的步进;当***时间的变化值小于实时时间的变化值时,表明***时间的步进小于实时时间的步进,这种情况下,可以增大***时间的步进。不断地重复上述步骤,对***时间的步进进行调整,直到***时间的变化值等于实时时间的变化值为止。
若多次调整后均能使***时间的变化值等于实时时间的变化值,则认为第一视频采集设备的***时间的步进与实时时间的步进已达到一致,也就实现各个视频采集设备之间的***时间的步进达到一致。
S203,当自身的曝光参数改变时,将改变后的曝光参数发送给与自身相关联的主视频采集设备,以使所述主视频采集设备根据所述曝光参数,调整其自身以及与其相关联的第二视频采集设备的曝光参数,并将调整后的曝光参数分别发送给各第二视频采集设备。
第二视频采集设备为不同于第一视频采集设备的设备。
曝光参数可以包括曝光时间等。
本申请实施例中,需要同步的多台视频采集设备中,其中一台为主视频采集设备。例如,可以预先将其中任一台设定为主视频采集设备。
多台视频采集设备采集监控视频时,若各视频采集设备的曝光参数差别较大,如,各视频采集设备的亮度信息差别较大,这将导致各视频采集设备采集的监控视频的亮度差别较大,在进行监控视频拼接时,在拼接处将出现明显的像素值跳变,也即出现监控视频不同步的情况。
在本申请实施例中,为了保证各视频采集设备采集监控视频的同步,可以对各视频采集设备的曝光参数进行同步。具体的,可以预先将需要进行同步的视频采集设备建立关联关系,当一台视频采集设备的曝光参数改变时,其可以将改变后的曝光参数发送给与自身相关联的主视频采集设备。
主视频采集设备接收到曝光参数后,可以根据该曝光参数,调整其自身以及与其相关联的发送曝光参数的视频采集设备之外的其他视频采集设备的 曝光参数,并将调整后的曝光参数分别发送给各其他视频采集设备。这样,主视频采集设备和其他视频采集设备均可以根据调整后的曝光参数进行视频采集,从而保证所采集的监控视频的同步。
例如,主视频采集设备可以获取每台视频采集设备采集的一幅视频图像,并将各视频图像拼接在一起。进一步地,可以在拼接后的图像中,以发送曝光参数的视频采集设备采集的图像为基准,计算在拼接图像不出现明显跳变的情况下,其他各视频采集设备对应的曝光参数。
如,当对亮度信息进行调整时,发送曝光参数的视频采集设备为设备1,其对应的亮度信息为80;主视频采集设备为设备2,其对应的亮度信息为70;另一已建立关联关系的视频采集设备为设备3,其对应的亮度信息为85时,设备2可以以设备1对应的图像为基准,确定将设备2和设备3对应的亮度信息分别调整为78和82时,拼接后的图像没有明显的跳变。这种情况下,设备2即可确定自身的亮度信息调整为78,设备3的亮度信息调整为82。并且,设备2可以将设备3的亮度信息发送给设备3。
可以理解,当第一视频采集设备为主视频采集设备时,其自身的曝光参数改变后,其可以根据改变后的曝光参数,对其他的视频采集设备的曝光参数进行调整。
上述步骤S203可以在S201或S202之前执行,也可以在S201或S202之后执行,本实施例对此不做具体限定。
S204,根据自身的***时间,在与所述主视频采集设备以及所述第二视频采集设备约定的采集时间到来时,开始采集监控视频。
在本申请实施例中,在进行视频采集时,各视频采集设备可以进行采集时间的约定,从而保证各视频采集设备在同一时间进行监控视频采集。
如,可以由主视频采集设备发送视频采集指令,其他的视频采集设备收到视频采集指令后立即开始采集监控视频。或者,可以由平台或主视频采集设备发送视频采集指令。并且,该视频采集指令中可以包含采集时间,其他视频采集设备接收到该视频采集指令后,在采集时间到来时,开始采集监控视频。
本实施例中,采集时间的到来是根据***时间来确定的。在步骤S201和S202之后,***时间经过校正、***时间的步进经过调整之后,各个图像采集设备的***时间达到一致。在这种情况下根据各自的***时间,当采集时间到来时,能够实现同时开始采集监控视频。
本申请实施例中,可以通过NTP对视频采集设备的***时间进行校正,并且,可以对视频采集设备的***时间的步进进行调整,保证视频采集设备的***时间的步进和实时时间的步进一致,进而保证视频采集设备的***时间和实时时间一致。并且,还可以对各视频采集设备的曝光参数和采集时间进行同步,保证各视频采集设备进行监控视频采集的同步,进而保证各视频采集设备所采集监控视频的同步。
作为本申请实施例的一种实施方式,为了保证拼接后的监控视频的质量,如图3所示,第一视频采集设备根据标准时间校正自身的***时间的过程可以包括:
S301,计算所述标准时间与自身的***时间之间的时间差。
S302,判断所述时间差是否大于预设阈值;如果是,执行步骤S303,如果否,执行步骤S304。
S303,将自身的***时间修改为所述标准时间。
在本申请实施例中,当第一视频采集设备判断得到标准时间与***时间之间的时间差大于预设阈值,如时间差为2秒、3秒等时,为了提高***时间的校正效率,视频采集设备可以直接将自身的***时间修改为标准时间。
S304,按照第一预设时长,逐步对自身的***时间进行修改,直至将所述自身的***时间修改为所述标准时间。
当标准时间和当前***时间偏差较大时,直接修改时间会引起拼接后的画面出现花屏、错位现象。在本申请实施例中,当标准时间与***时间之间的时间差小于或等于预设阈值时,为了避免拼接视频出现严重的错位现象,第一视频采集设备可以按照第一预设时长,逐步对自身的***时间进行修改,直至将自身的***时间修改为所述标准时间。其中,第一预设时长可以根据实际情况设定,如可以根据对监控视频进行拼接时的实际情况,设定一个尽可能对拼接效果影响较小的时长。
如,视频采集设备可以每次对***时间增大或减小第一预设时长,经过多次调整后,将***时间调整得与标准时间相同。
本实施例中,在对***时间进行校正时,可以综合考虑校正效率和监控视频拼接效果,根据***时间和标准时间之间的时间差的不同,采用不同的校正方式对***时间进行校正,在保持较高的校正效率的同时保证了监控视频的拼接效果。
在本申请的另一实施例中,第一视频采集设备根据标准时间校正自身的 ***时间时,可以为,直接将自身的***时间修改为标准时间;也可以为,按照第一预设时长,逐步对自身的***时间进行修改,直至将自身的***时间修改为标准时间。
作为本申请实施例的一种实施方式,如图4所示,视频采集设备根据标准时间校正自身的***时间的过程可以包括:
S401,计算所述标准时间与自身的***时间之间的时间差。
S402,判断所述时间差是否大于预设阈值;如果是,执行步骤S403,如果否,执行步骤S404。
S403,将自身的***时间修改为所述标准时间。
S404,将所述时间差确定为当前时间差。
在本申请实施例中,当视频采集设备计算得到***时间和标准时间之间的时间差后,可以将计算得到的时间差确定为当前时间差。
S405,判断所述当前时间差是否大于第一预设时长;如果是,执行步骤S406,如果否,执行步骤S403。
S406,将自身的***时间调整所述第一预设时长值,等待指定时长的时间后,计算调整后的***时间与所述标准时间之间的当前时间差,并返回步骤S405。
其中,指定时长可以与第一预设时长相等,也可以不相等。
在本申请实施例中,第一视频采集设备可以在本地保存第一预设时长,对***时间进行校正时,可以每次均调整第一预设时长。具体的,当当前时间差大于第一预设时长时,可以将自身的***时间调整第一预设时长值。如,当***时间大于标准时间时,可以将***时间调小第一预设时长,当***时间小于标准时间时,可以将***时间增大第一预设时长。
对***时间进行调整后,可以等待第一预设时长的时间后,再次计算调整后的***时间与标准时间之间的当前时间差,并返回判断当前时间差是否大于第一预设时长值,以继续对***时间进行调整。
不断循环上述步骤,直到当前时间差不大于第一预设时长时,视频采集设备可以执行步骤S403,将自身的***时间修改为标准时间,完成对***时间的校正。
例如,当***时间与标准时间之间的当前时间差为1秒20毫秒,也即***时间比标准时间大1秒20毫秒,第一预设时长为50毫秒时,视频采集设备可以首先将***时间减小50毫秒,然后等待50毫秒;之后确定新的当前时间差为 70毫秒,仍然大于第一预设时长50毫秒,则可以再将***时间减小50毫秒,然后等待50毫秒;之后确定新的当前时间差为20毫秒,小于第一预设时长50毫秒,则可以直接将***时间修改为标准时间,完成***时间的校正。
本实施例中,视频采集设备可以对***时间进行多次校正,每次修改的***时间都不会过大,从而使得在***时间校正过程中采集的监控视频进行拼接后也不会有很明显的错位现象。
作为本申请实施例的一种实施方式,如图5所示,第一视频采集设备调整自身的***时间的步进的过程可以包括:
S501,计算所述自身的***时间和自身的实时时间之间的初始时间差。
在本申请实施例中,第一视频采集设备对自身的***时间的步进进行调整时,其可以首先计算自身的***时间和自身的实时时间之间的初始时间差,也即开始进行***时间步进调整时的时间差,如初始时间差为10毫秒。
S502,按照第一预设步长,增大所述***时间的步进。
其中,第一预设步长可以为固定的数值,如10、20等;或者,也可以为一个比例值,如10%、20%等。当第一预设步长为固定的数值时,第一视频采集设备可以将自身的***时间的步进增大该数值;当第一预设步长为比例值,如10%时,第一视频采集设备可以将自身的***时间的步进增大当前步进的10%。
S503,等待第二预设时长的时间后,计算所述自身的***时间和所述自身的实时时间之间的目标时间差。
对***时间的步进进行调整后,第一视频采集设备可以等待第二预设时长的时间,如等待100秒、200秒等,并在等待第二预设时长的时间后,计算自身的***时间和自身的实时时间之间的目标时间差,也即对***时间的步进进行调整并经过第二预设时长之后,***时间和实时时间之间新的时间差。
S504,根据所述目标时间差与所述初始时间差之间的大小关系,继续调整所述***时间的步进,直至所述***时间和所述实时时间之间的时间差不再变化。
计算得到***时间和实时时间之间的目标时间差后,第一视频采集设备可以根据目标时间差与初始时间差之间的大小关系,继续调整***时间的步进,直至***时间和实时时间之间的时间差不再变化时,表明***时间与实时时间达到了同步,结束调整。
例如,当目标时间差大于初始时间差时,表明***时间的步进大于实时 时间的步进。这种情况下,第一视频采集设备可以按照第二预设步长,减小***时间的步进,并继续等待第二预设时长的时间后,计算自身的***时间和自身的实时时间之间的目标时间差,并继续根据新计算得到的目标时间差和上次的目标时间差之间的大小关系,对***时间的步进继续进行调整,直到新计算得到的目标时间差和上次的目标时间差相等。
当目标时间差小于初始时间差时,表明***时间的步进小于实时时间的步进。这种情况下,第一视频采集设备可以按照第三预设步长,增大***时间的步进,并继续等待第二预设时长的时间后,计算自身的***时间和自身的实时时间之间的目标时间差,并继续根据新计算得到的目标时间差和上次的目标时间差之间的大小关系,对***时间的步进继续进行调整,直到新计算得到的目标时间差和上次的目标时间差相等。
当目标时间差等于初始时间差时,表明***时间的步进等于实时时间的步进。这种情况下,视频采集设备可以结束调整。
可选的,为了准确地确定***时间的步进与实时时间的步进是否一致,当第一视频采集设备第一次判断得到当前目标时间差和上次计算得到的目标时间差相等时,可以不立即结束调整。而是,可以继续等待第二预设时长的时间后,计算自身的***时间和自身的实时时间之间的目标时间差,并继续判断新计算得到的目标时间差和上次的目标时间差是否相等。只有预设数量次判断得到新计算得到的目标时间差和上次的目标时间差不再变化时,才结束调整。这样可以进一步保证实时时间和***时间的同步。
需要说明的是,上述实施例中,以增大***时间的步进为例来说明了***时间的步进调整方法。在另一实施例中,也可以先减小***时间的步进来对***时间的步进进行调整,本申请实施例对此不进行限定。
本实施例中,可以依次对***时间的步进进行调整,最终实现***时间和实时时间的同步,进而保证监控视频的同步。
下面结合一个具体的实施例,对本申请提供的监控视频同步方法进行详细说明。
如图6所示,摄像机A、摄像机B、摄像机C为同一道路中不同车道上安装的视频采集设备。其中,摄像机B为主摄像机。
首先,摄像机A、摄像机B、摄像机C可以分别向NTP服务器请求校时,确保各摄像机的***时间一致。同时,各摄像机对自身的***时间和实时时间进行同步。
然后可以由主摄像机,即摄像机B,主动向其他摄像机发送采集指令,即发送重启sensor请求,其中包含有采集时间,所有摄像机在约定的采集时间到达后,同时重启sensor,开始采集监控视频。
需要同步的多台摄像机中有一台摄像机的曝光信息发生变化时,其他摄像机均对应进行曝光信息的调整。如,当摄像机A曝光发生变化时,其可以将变化后的曝光信息发送给摄像机B,摄像机B可以根据接收到的曝光信息调整其自身和摄像机C的曝光信息,并将调整后的摄像机C的曝光信息发送给摄像机C;当摄像机B曝光发生变化时,其可以根据变化后的曝光信息调整摄像机A和摄像机C的曝光信息,并将调整后的曝光信息分别发送给摄像机A和摄像机C;当摄像机C曝光发生变化时,其可以将变化后的曝光信息发送给摄像机B,摄像机B可以根据接收到的曝光信息调整其自身和摄像机A的曝光信息,并将调整后的摄像机A的曝光信息发送给摄像机A。
做到上述同步后,摄像机A、B、C三个画面拼接后基本没有割裂或者错位现象了。
相应的,本申请实施例还提供了一种监控视频同步装置,应用于第一视频采集设备,如图7所示,所述装置包括:
校正模块710,用于按照设定的时间间隔,通过网络时间协议NTP获取标准时间,并根据所述标准时间校正所述第一视频采集设备的***时间;
调整模块720,用于根据所述第一视频采集设备的***时间和所述第一视频采集设备的实时时间,调整所述第一视频采集设备的***时间的步进;
发送模块730,用于当所述第一视频采集设备的曝光参数改变时,将改变后的曝光参数发送给与所述第一视频采集设备相关联的主视频采集设备,以使所述主视频采集设备根据所述曝光参数,调整其自身以及与其相关联的第二视频采集设备的曝光参数,并将调整后的曝光参数分别发送给各第二视频采集设备;
采集模块740,用于在与所述主视频采集设备以及所述第二视频采集设备约定的采集时间到来时,开始采集监控视频。
本申请实施例中,可以通过NTP对视频采集设备的***时间进行校正,并且,可以对视频采集设备的***时间的步进进行调整,保证视频采集设备的***时间的步进和实时时间的步进一致,进而保证视频采集设备的***时间和实时时间一致。并且,还可以对各视频采集设备的曝光参数和采集时间进行同步,保证各视频采集设备进行监控视频采集的同步,进而保证各视频采 集设备所采集监控视频的同步。
作为本申请实施例的一种实施方式,所述校正模块710包括:
判断子模块(图中未示出),用于计算所述标准时间与所述第一视频采集设备的***时间之间的时间差,并判断所述时间差是否大于预设阈值;
第一修改子模块(图中未示出),用于当所述判断子模块的判断结果为是时,将所述第一视频采集设备的***时间修改为所述标准时间;
第二修改子模块(图中未示出),用于当所述判断子模块的判断结果为否时,按照第一预设时长,逐步对所述第一视频采集设备的***时间进行修改,直至将所述第一视频采集设备的***时间修改为所述标准时间。
作为本申请实施例的一种实施方式,所述第二修改子模块,包括:
确定子单元(图中未示出),用于将所述时间差确定为当前时间差;
判断子单元(图中未示出),用于判断所述当前时间差是否大于所述第一预设时长;
处理子单元(图中未示出),用于当所述判断子单元判断结果为是时,将所述第一视频采集设备的***时间调整所述第一预设时长值,等待指定时长的时间后,计算调整后的***时间与所述标准时间之间的当前时间差,并触发所述判断子单元;
修改子单元(图中未示出),用于当所述判断子单元的判断结果为否时,将所述第一视频采集设备的***时间修改为所述标准时间。
作为本申请实施例的一种实施方式,所述调整模块720,包括:
第一计算子模块(图中未示出),用于计算所述第一视频采集设备的***时间和所述第一视频采集设备的实时时间之间的初始时间差;
增大子模块(图中未示出),用于按照第一预设步长,增大所述***时间的步进;
第二计算子模块(图中未示出),用于等待第二预设时长的时间后,计算所述第一视频采集设备的***时间和所述第一视频采集设备的实时时间之间的目标时间差;
调整子模块(图中未示出),用于根据所述目标时间差与所述初始时间差之间的大小关系,继续调整所述***时间的步进,直至所述***时间和所述实时时间之间的时间差不再变化。
作为本申请实施例的一种实施方式,所述调整子模块,包括:
第一调整子单元(图中未示出),用于当所述目标时间差大于所述初始时 间差时,按照第二预设步长,减小所述***时间的步进,并触发所述第二计算子模块;
第二调整子单元(图中未示出),用于当所述目标时间差小于所述初始时间差时,按照第三预设步长,增大所述***时间的步进,并触发所述第二计算子模块;
结束子单元(图中未示出),用于当所述目标时间差等于所述初始时间差时,结束调整。
作为本申请实施例的一种实施方式,所述结束子单元,具体用于当所述目标时间差等于所述初始时间差时,触发所述第二计算子模块,直到预设数量次判断得到所述***时间和所述实时时间之间的时间差不再变化时,结束调整。
作为本申请实施例的一种实施方式,所述采集模块740,具体用于当接收到所述主视频采集设备发送的视频采集指令时,开始采集监控视频。
作为本申请实施例的一种实施方式,所述采集模块740,具体用于接收平台或所述主视频采集设备发送的包含采集时间的视频采集指令,并在所述采集时间到来时,开始采集监控视频。
相应的,本申请实施例还提供了一种视频采集设备,如图8所示,包括处理器810、通信接口820、存储器830和通信总线840,其中,所述处理器810、所述通信接口820、所述存储器830通过所述通信总线840完成相互间的通信;
所述存储器830,用于存放计算机程序;
所述处理器810,用于执行所述存储器830上所存放的程序时,实现以下步骤:
按照设定的时间间隔,通过网络时间协议NTP获取标准时间,并根据所述标准时间校正自身的***时间;
根据所述自身的***时间和自身的实时时间,调整自身的***时间的步进;
当自身的曝光参数改变时,将改变后的曝光参数发送给与自身相关联的主视频采集设备,以使所述主视频采集设备根据所述曝光参数,调整其自身以及与其相关联的第二视频采集设备的曝光参数,并将调整后的曝光参数分别发送给各第二视频采集设备;
在与所述主视频采集设备以及所述第二视频采集设备约定的采集时间到来时,开始采集监控视频。
本申请实施例中,可以通过NTP对视频采集设备的***时间进行校正,并且,可以对视频采集设备的***时间的步进进行调整,保证视频采集设备的***时间的步进和实时时间的步进一致,进而保证视频采集设备的***时间和实时时间一致。并且,还可以对各视频采集设备的曝光参数和采集时间进行同步,保证各视频采集设备进行监控视频采集的同步,进而保证各视频采集设备所采集监控视频的同步。
上述计算机设备提到的通信总线840可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。该通信总线840可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口820用于上述计算机设备与其他设备之间的通信。
存储器830可以包括随机存取存储器(Random Access Memory,简称RAM),也可以包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。可选的,存储器830还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器810可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Ne twork Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Applica tion Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
相应的,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如上述实施例所述的一种监控视频同步方法。
本申请实施例中,可以通过NTP对视频采集设备的***时间进行校正,并且,可以对视频采集设备的***时间的步进进行调整,保证视频采集设备的***时间的步进和实时时间的步进一致,进而保证视频采集设备的***时间和实时时间一致。并且,还可以对各视频采集设备的曝光参数和采集时间进行同步,保证各视频采集设备进行监控视频采集的同步,进而保证各视频采集设备所采集监控视频的同步。
对于装置/视频采集设备/存储介质实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。
图9为本申请实施例提供的一种摄像机的结构示意图。该摄像机包括:处理器910和视频采集单元920。其中,处理器可以为CPU或微控制单元(Microcontroller Unit,MCU)等。本实施例中的摄像机可以为嵌入式摄像机。
处理器910,用于通过网络时间协议(NTP)获取时间差信息,并根据该时间差信息校正处理器910的***时间;调整处理器910的时间步进与预设的标准时间步进相同。时间差信息为:标准时间设备的时间与处理器910的***时间之间的时间差信息。***时间按照时间步进逐渐增加。
处理器910,还用于在校正处理器910的***时间以及调整处理器910的时间步进之后,当处理器910的***时间到达指定的采集时间时,向视频采集单元920发送表示开始采集监控视频的采集指令。
视频采集单元920,在接收到处理器910发送的采集指令时,开始采集监控视频。
在本实施例中,处理器910可以与标准时间设备进行通信,通过NTP协议,可以获得处理器910的***时间相对于标准时间设备的时间的时间差信息。标准时间设备可以为NTP服务器。
处理器910根据该时间差信息校正处理器910的***时间,可以理解为校正了***时间的绝对值。例如,时间差信息为处理器的***时间相对于标准时间设备的时间快了1分钟,在校正处理器910的***时间时,可以将处理器910的***时间调慢1分钟。这样即实现时间的绝对值上与标准时间一致。处理器910可以按照设定的时间间隔,通过NTP获取时间差信息,根据该时间差信息校正处理器910的***时间。这样能够不断地校正绝对时间,提高设备之间时间的一致性。
***时间为根据处理器的晶振振动次数计时的时间。处理器的时间步进可以理解为,单位时长对应的处理器的晶振振动次数。例如,处理器的时间步进可以为,处理器的晶振每振动1000次计时0.1秒。
处理器910调整处理器910的时间步进与标准时间步进相同,可以理解为,在时间不断延续时,调整处理器时间增加的快慢。
上述摄像机可以为***中的一个摄像机。该***还可以包含其他摄像机。为了将各个摄像机的处理器的时间步进调整得一致,可以预先将标准时间步进分别设置在各个摄像机中,每个摄像机均按照该标准时间步进调整该摄像机处理器的时间步进。当每个摄像机都执行了调整时间步进的操作时,即可以保证***中各个摄像机之间处理器的时间步进一致。在每个摄像机均执行 了根据标准时间设备的时间校正***时间的操作之后,即可以尽可能保证在时间延续过程中各设备之间时间的一致性。
处理器910,可以在根据时间差信息校正处理器910的***时间之前或之后,调整处理器910的时间步进与标准时间步进相同;可以按照预设的时间间隔调整处理器910的时间步进与标准时间步进相同;也可以在摄像机开启之后,调整处理器910的时间步进与标准时间步进相同,在摄像机断电之前,都不必再调整处理器910的时间步进。以上都是可行的方案。
综上可见,本实施例中处理器根据时间差信息校正***时间,并且调整处理器的时间步进与标准时间步进相同,这样即调整了设备之间的绝对时间相同并且使得时间增加的快慢一致,能够尽可能保证各个设备之间在时间的延续过程中时间的一致性,避免一段时间之后设备之间的***时间又相差较多的情况,进而能够尽可能提高各摄像机在采集监控视频时的同步性。
在本申请的另一实施例中,基于图9所示实施例,上述时间差信息包括:处理器910的***时间相对于标准时间设备的时间快或慢的时间差。例如,处理器910的***时间相对于标准时间设备的时间:快2分钟;或者,慢1分钟等。时间差信息可以采用Δx=+2min,或者Δx=-1min。
处理器910,根据时间差信息校正处理器910的***时间时,可以包括:
判断时间差是否大于预设阈值,如果是,则直接将处理器的***时间调整该时间差;如果否,则基于上述时间差,对处理器910的***时间进行分次调整。
其中,上述预设阈值可以为预先根据经验确定的时间阈值。例如,该预设阈值可以为2.5秒或3秒等。
本实施例中,在获取时间差信息之后,直接调整处理器的***时间可能会引起拼接后的视频画面出现花屏、错位现象。因此,为了避免这种情况出现,可以在标准时间设备的时间与处理器的***时间相差较小时,分次逐渐调整处理器的***时间。
当标准时间设备的时间与处理器的***时间相差较大时,采用分次调整的方案可能需要调整很多次,才能消除处理器的***时间与标准时间设备之间的时间差,效率较低。在这种情况下,可以直接将处理器的***时间调整该时间差。
例如,当Δx=+2min时,2min大于预设阈值,这种情况下可以直接将处理器的***时间调慢2min。当Δx=-1min时,1min不大于预设阈值,这种情况下 可以根据预设的调整次数5,确定每次调的时间值为1min/5=0.2min,分5次调整,最终将处理器的***时间调快1min。
本实施例中,在对***时间进行校正时,可以综合考虑校正效率和视频拼接效果,根据时间差信息的不同,采用不同的校正方式对***时间进行校正,在保持较高的校正效率的同时尽可能保证视频的拼接效果。
在本申请的另一实施例中,基于图9所示实施例,处理器910对处理器910的***时间进行分次调整时,可以包括:
根据时间差以及预设的每次调整时的第一预设时长,确定调整次数;按照确定的调整次数,在每次调整时,将处理器的***时间调整第一预设时长;在每次调整后,等待指定时长的时间后进行下次调整。
其中,第一预设时长可以预先根据经验确定,例如可以根据使视频不产生明显错位的时间间隔来确定。指定时长可以为根据需要预先设定的值。
处理器910确定调整次数时,可以直接将时间差除以第一预设时长的结果作为调整次数。
例如,已知时间差信息Δx=-1min,且第一预设时长为2秒,指定时长为1秒。则可以确定调整次数为1min/2秒=30次,每次将处理器的***时间调快2秒,间隔1秒之后,再调快2秒,如此循环,直至调整30次结束。
本实施例中,处理器可以对***时间进行多次校正,每次修改的***时间都不会过大,从而使得在***时间校正过程中采集的监控视频进行拼接后也不会有很明显的错位现象。
摄像机可以包括以下两个时间:处理器的时间以及时钟单元的时间。处理器的时间即为***时间,即处理器根据处理器内部的晶振振动次数计时的时间。时钟单元可以为RTC芯片。时钟单元的时间为实时时间,即根据RTC芯片的晶振振动次数计时的时间。时钟单元的晶振与处理器内部的晶振可以不同。***时间是靠实时时间维护的,当摄像机启动时,需要根据实时时间来设置***时间。
时钟单元的时间步进可以理解为单位时长对应的RTC芯片的晶振振动次数。对于设备来说,时钟单元的时间步进不可修改,处理器的时间步进可以修改。
在本申请的另一实施例中,为了提高可操作性,当摄像机包括时钟单元 时,图9所示实施例中的标准时间步进可以为时钟单元的时间步进。为了使得每个摄像机都能将自身处理器的时间步进调整至相同值,可以通过预先选择设备硬件,使得本摄像机的时钟单元的时间步进与其他摄像机的时钟单元的时间步进相同,也就是使得每个摄像机的时钟单元的时间步进相同。这可以通过为各个摄像机选用相同型号的RTC芯片,或者选用时间步进相近的RTC芯片实现。
处理器910调整处理器910的时间步进与预设的标准时间步进相同时,包括:
获取时钟单元的实时时间,根据***时间和时钟单元的实时时间,调整处理器910的时间步进与时钟单元的时间步进相同。
其中,上述***时间为处理器校正后或校正前的***时间。时钟单元的实时时间按照时钟单元的时间步进逐渐增加。获取时钟单元的实时时间,可以理解为获取摄像机自身的时钟单元的实时时间。
由于***时间也是按照处理器的时间步进逐渐增加的,这样就可以根据***时间和和实时时间之间差值的变化规律,对处理器的时间步进进行调整。
在一种实施方式中,处理器910根据***时间和时钟单元的实时时间,调整处理器的时间步进与时钟单元的时间步进相同时,可以包括:
获取第一时刻时处理器910的第一***时间和时钟单元的第一实时时间,获取第二时刻时处理器910的第二***时间和时钟单元的第二实时时间。第一时刻比第二时刻早特定时长。
计算第一***时间和第二***时间的第一差值,计算第一实时时间和第二实时时间的第二差值;
根据第一差值与第二差值,调整处理器910的时间步进与时钟单元的时间步进相同。
其中,上述第一时刻或第二时刻可以为***时间,也可以为实时时间。
例如,在第一***时间t1时,获取第一实时时间T1,在第二***时间t2时,获取第二实时时间T2。计算t2-t1以及T2-T1。假设t2-t1为2秒,T2-T1为2秒20毫秒,则可以确定在2秒时间内,***时间比实时时间慢了30毫秒,可以就这些信息调整处理器的时间步进与时钟单元的时间步进相同。
在一种实施方式中,处理器910,根据第一差值与第二差值,调整处理器910的时间步进与时钟单元的时间步进相同时,可以包括:
判断第一差值是否等于第二差值;
如果不等于,则将处理器910的时间步进调整预设步长;在等待第二预设时长的时间之后,以当前时刻为第一时刻,以当前时刻之后的时刻为第二时刻,返回执行获取第一时刻时处理器910的第一***时间和时钟单元的第一实时时间,获取第二时刻时处理器910的第二***时间和时钟单元的第二实时时间的操作;
如果等于,则确定已调整至处理器910的时间步进与时钟单元的时间步进相同。
其中,预设步长可以理解为时间步进的取值。第二预设时长可以为预先根据经验确定。
具体的的,处理器910,将处理器910的时间步进调整预设步长时,可以包括:
当第一差值大于第二差值时,将处理器的时间步进增大预设步长;当第一差值小于第二差值时,将处理器的时间步进减小预设步长。
例如,预设步长假设为振动100次,处理器初始的时间步进以及时钟单元的时间步进假设均为晶振振动10000次记为1秒。当第一差值不等于第二差值时,可以理解为处理器的晶振振动n次与时钟单元的晶振振动n次对应的时长不同。当第一差值大于第二差值时,可以将处理器的时间步进修改为10100次记为1秒。当第一差值小于第二差值时,可以将处理器的时间步进修改为9900次记为1秒。
不断更新第一差值和第二差值,当第一差值等于第二差值时,认为已经将处理器的时间步进修改得与时钟单元的一致。例如,当第一差值等于第二差值时,处理器的时间步进为10200次记为1秒。即处理器的晶振振动10200次的时长与时钟单元的晶振振动10000次的时长相同,此时即实现了处理器的时间步进与时钟单元的时间步进相同。
综上,本实施例根据第一差值和第二差值之间的大小关系,增大或减小处理器的时间步进,最终使得处理器的时间步进与时钟单元的时间步进一致,提供了一种不同的调整方式,丰富了技术手段。
针对***中的每个摄像机,当校正了摄像机的***时间,并且调整了处理器的时间步进之后,能够使得每个摄像机的***时间一致,并且在时间延续的过程中也尽可能保持时间一致。
在本申请的另一实施例中,基于图1所示实施例,处理器910还用于:
接收平台或其他摄像机发送的包含指定的采集时间的视频采集指令,从视频采集指令中获取指定的采集时间。
其中,平台可以理解为服务器或其他能够向摄像机发送视频采集指令的设备。其他摄像机为***中除了上述摄像机之外的其他摄像机。
在另一实施例中,上述摄像机可以向其他摄像机发送视频采集指令。以上都是可行的实施方式。
在本申请的另一实施例中,为了进一步提高视频拼接时的效果,处理器910还用于:
在向视频采集单元发送采集指令之前,在以下条件满足时,向视频采集单元发送采集指令:
摄像机的曝光参数改变;
确定其他摄像机均根据摄像机改变后的曝光参数调整各自的曝光参数;
处理器的***时间到达指定的采集时间。
其中,曝光参数可以包括曝光时间等。当曝光参数发生变化时,摄像机采集的监控视频的画面质量也会发生变化。
为了尽可能使得***中各个摄像机的曝光参数保持一致,当上述摄像机检测到自身的曝光参数改变时,可以与***中的其他摄像机的曝光参数进行同步。具体的,上述摄像机的处理器可以将改变后的曝光参数发送至***中的主摄像机。主摄像机在接收到上述摄像机发送的曝光参数之后,可以根据该曝光参数,调整其自身的曝光参数,并且调整各个其他摄像机的曝光参数。例如,主摄像机接收到摄像机1发送的改变后的曝光时间为30ms,则主摄像机可以将自身的曝光时间以及其他摄像机的曝光时间均调整为30ms。
主摄像机根据调整后的自身的曝光参数进行监控视频采集。主摄像机可以将各个其他摄像机的曝光参数发送至相应的其他摄像机,以使各个其他摄像机根据主摄像机发送的调整后的曝光参数,进行视频采集。
处理器910在确定其他摄像机均根据摄像机改变后的曝光参数调整各自的曝光参数时,可以在将自身改变后的曝光参数发送至主摄像机之后的一定时长之后,即确定其他摄像机已根据摄像机改变后的曝光参数调整各自的曝光参数;也可以在接收到其他摄像机或主摄像机发送的通知消息时,确定其他摄像机已根据摄像机改变后的曝光参数调整各自的曝光参数。
综上,本实施例中,可以在摄像机的曝光参数发生改变的情况下,在各 个条件满足时向视频采集单元发送采集指令,这样能够尽可能保证各个摄像机在采集的监控视频画面亮度一致,提高拼接图像的效果。
图10为本申请实施例提供的一种监控视频同步方法的流程示意图。该方法实施例与图9所示的设备实施例相对应。该方法实施例应用于视频采集设备中的处理器,该视频采集设备还包括视频采集单元。该方法包括:
步骤S101:通过网络时间协议(NTP)获取时间差信息,并根据时间差信息校正所述处理器的***时间。
其中,所述时间差信息为:标准时间设备的时间与所述处理器的***时间之间的时间差信息。
步骤S102:调整处理器的时间步进与预设的标准时间步进相同。
其中,***时间按照时间步进逐渐增加;
步骤S103:在校正处理器的***时间以及调整处理器的时间步进之后,当处理器的***时间到达指定的采集时间时,向视频采集单元发送表示开始采集监控视频的采集指令,以使所述视频采集单元在接收到所述处理器发送的采集指令时开始采集监控视频。
综上可见,本实施例可以根据时间差信息校正***时间,并且调整处理器的时间步进与标准时间步进相同,这样即调整了设备之间的绝对时间相同并且使得时间增加的快慢一致,能够尽可能保证各个设备之间在时间的延续过程中时间的一致性,避免一段时间之后设备之间的***时间又相差较多的情况,进而能够尽可能保证各摄像机在采集监控视频时的同步性。
在本申请的另一实施例中,基于图10所示实施例,时间差信息可以包括:处理器的***时间相对于标准时间设备的时间快或慢的时间差。步骤S101中根据时间差信息校正处理器的***时间的步骤,可以包括:
判断所述时间差是否大于预设阈值;
如果是,则直接将所述处理器的***时间调整所述时间差;
如果否,则基于所述时间差,对处理器的***时间进行分次调整。
在本申请的另一实施例中,基于图10所示实施例,对处理器的***时间进行分次调整的步骤,包括:
根据时间差以及预设的每次调整时的第一预设时长,确定调整次数;按照确定的调整次数,在每次调整时,将处理器的***时间调整第一预设时长;在每次调整后,等待指定时长的时间后进行下次调整。
在本申请的另一实施例中,基于图10所示实施例,摄像机还包括时钟单 元;标准时间步进为时钟单元的时间步进;时钟单元的时间步进与其他摄像机的时钟单元的时间步进相同;
步骤S102调整处理器的时间步进与预设的标准时间步进相同的步骤,具体包括:
获取时钟单元的实时时间,根据***时间和时钟单元的实时时间,调整处理器的时间步进与时钟单元的时间步进相同;
其中,***时间为处理器校正后或校正前的***时间;时钟单元的实时时间按照时钟单元的时间步进逐渐增加。
在本申请的另一实施例中,基于图10所示实施例,根据***时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同的步骤,包括:
获取第一时刻时处理器的第一***时间和时钟单元的第一实时时间,获取第二时刻时处理器的第二***时间和时钟单元的第二实时时间;第一时刻比第二时刻早特定时长;
计算第一***时间和第二***时间的第一差值,计算第一实时时间和第二实时时间的第二差值;
根据第一差值与所述第二差值,调整处理器的时间步进与时钟单元的时间步进相同。
在本申请的另一实施例中,基于图10所示实施例,根据第一差值与第二差值,调整处理器的时间步进与时钟单元的时间步进相同的步骤,包括:
判断所述第一差值是否等于所述第二差值;
如果不等于,则将处理器的时间步进调整预设步长;在等待第二预设时长的时间之后,以当前时刻为第一时刻,以当前时刻之后时刻为第二时刻,返回执行获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时处理器的第二***时间和时钟单元的第二实时时间的步骤;
如果等于,则确定已调整至所述处理器的时间步进与所述时钟单元的时间步进相同。
在本申请的另一实施例中,基于图10所示实施例,将所述处理器的时间步进调整预设步长的步骤,具体包括:
当第一差值大于第二差值时,将处理器的时间步进减小预设步长;
当第一差值小于第二差值时,将处理器的时间步进增大预设步长。
在本申请的另一实施例中,基于图10所示实施例,采用以下方式获取指定的采集时间:
接收平台或其他视频采集设备发送的包含指定的采集时间的视频采集指令,从视频采集指令中获取指定的采集时间。
在本申请的另一实施例中,基于图10所示实施例,在向视频采集单元发送采集指令之前,该方法还包括:
在以下条件满足时,向视频采集单元发送采集指令:
视频采集设备的曝光参数改变;
确定所述其他视频采集设备均根据所述改变后的曝光参数调整各自的曝光参数;
所述处理器的***时间到达指定的采集时间。
由于上述方法实施例是基于设备实施例得到的,与该设备实施例具有相同的技术效果,因此方法实施例的技术效果在此不再赘述。对于方法实施例而言,由于其基本相似于设备实施例,所以描述得比较简单,相关之处参见设备实施例的部分说明即可。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。
Claims (18)
- 一种摄像机,其特征在于,包括:处理器和视频采集单元;所述处理器,用于通过网络时间协议NTP获取时间差信息,并根据所述时间差信息校正所述处理器的***时间;调整所述处理器的时间步进与预设的标准时间步进相同;其中,所述时间差信息为:标准时间设备的时间与所述处理器的***时间之间的时间差信息;***时间按照时间步进逐渐增加;所述处理器,还用于在校正所述处理器的***时间以及调整所述处理器的时间步进之后,当所述处理器的***时间到达指定的采集时间时,向所述视频采集单元发送表示开始采集监控视频的采集指令;所述视频采集单元,在接收到所述处理器发送的所述采集指令时,开始采集监控视频。
- 根据权利要求1所述的摄像机,其特征在于,所述时间差信息包括:所述处理器的***时间相对于所述标准时间设备的时间快或慢的时间差;所述处理器,根据所述时间差信息校正所述处理器的***时间时,包括:判断所述时间差是否大于预设阈值;如果是,则直接将所述处理器的***时间调整所述时间差;如果否,则基于所述时间差,对所述处理器的***时间进行分次调整。
- 根据权利要求2所述的摄像机,其特征在于,所述处理器,对所述处理器的***时间进行分次调整时,包括:根据所述时间差以及预设的每次调整时的第一预设时长,确定调整次数;按照确定的调整次数,在每次调整时,将所述处理器的***时间调整所述第一预设时长;在每次调整后,等待指定时长的时间后进行下次调整。
- 根据权利要求1所述的摄像机,其特征在于,所述摄像机还包括时钟单元;所述标准时间步进为所述时钟单元的时间步进;所述时钟单元的时间步进与其他摄像机的时钟单元的时间步进相同;所述处理器,调整所述处理器的时间步进与预设的标准时间步进相同时,包括:获取所述时钟单元的实时时间,根据***时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同;其中,所述***时间为所述处理器校正后或校正前的***时间;所述时钟单元的实时时间按照所述时钟单元的时间步进逐渐增加。
- 根据权利要求4所述的摄像机,其特征在于,所述处理器,根据*** 时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同时,包括:获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时所述处理器的第二***时间和所述时钟单元的第二实时时间;所述第一时刻比所述第二时刻早特定时长;计算所述第一***时间和所述第二***时间的第一差值,计算所述第一实时时间和所述第二实时时间的第二差值;根据所述第一差值与所述第二差值,调整所述处理器的时间步进与所述时钟单元的时间步进相同。
- 根据权利要求5所述的摄像机,其特征在于,所述处理器,根据所述第一差值与所述第二差值,调整所述处理器的时间步进与所述时钟单元的时间步进相同时,包括:判断所述第一差值是否等于所述第二差值;如果不等于,则将所述处理器的时间步进调整预设步长;在等待第二预设时长的时间之后,以当前时刻为所述第一时刻,以当前时刻之后的时刻为第二时刻,返回执行所述获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时所述处理器的第二***时间和所述时钟单元的第二实时时间的操作;如果等于,则确定已调整至所述处理器的时间步进与所述时钟单元的时间步进相同。
- 根据权利要求6所述的摄像机,其特征在于,所述处理器,将所述处理器的时间步进调整预设步长时,包括:当所述第一差值大于所述第二差值时,将所述处理器的时间步进增大预设步长;当所述第一差值小于所述第二差值时,将所述处理器的时间步进减小预设步长。
- 根据权利要求1-7任一项所述的摄像机,其特征在于,所述处理器,还用于:接收平台或其他摄像机发送的包含所述指定的采集时间的视频采集指令,从所述视频采集指令中获取所述指定的采集时间。
- 根据权利要求1所述的摄像机,其特征在于,所述处理器,还用于:在向所述视频采集单元发送所述采集指令之前,在以下条件满足时,向 所述视频采集单元发送所述采集指令:所述摄像机的曝光参数改变;确定其他摄像机均根据所述摄像机改变后的曝光参数调整各自的曝光参数;所述处理器的***时间到达指定的采集时间。
- 一种监控视频同步方法,其特征在于,应用于视频采集设备中的处理器,所述视频采集设备还包括视频采集单元;所述方法包括:通过网络时间协议NTP获取时间差信息,并根据所述时间差信息校正所述处理器的***时间;其中,所述时间差信息为:标准时间设备的时间与所述处理器的***时间之间的时间差信息;调整所述处理器的时间步进与预设的标准时间步进相同;其中,***时间按照时间步进逐渐增加;在校正所述处理器的***时间以及调整所述处理器的时间步进之后,当所述处理器的***时间到达指定的采集时间时,向所述视频采集单元发送表示开始采集监控视频的采集指令,以使所述视频采集单元在接收到所述处理器发送的采集指令时开始采集监控视频。
- 根据权利要求10所述的方法,其特征在于,所述时间差信息包括:所述处理器的***时间相对于所述标准时间设备的时间快或慢的时间差;所述根据所述时间差信息校正所述处理器的***时间的步骤,包括:判断所述时间差是否大于预设阈值;如果是,则直接将所述处理器的***时间调整所述时间差;如果否,则基于所述时间差,对所述处理器的***时间进行分次调整。
- 根据权利要求11所述的方法,其特征在于,所述对所述处理器的***时间进行分次调整的步骤,包括:根据所述时间差以及预设的每次调整时的第一预设时长,确定调整次数;按照确定的调整次数,在每次调整时,将所述处理器的***时间调整所述第一预设时长;在每次调整后,等待指定时长的时间后进行下次调整。
- 根据权利要求10所述的方法,其特征在于,所述摄像机还包括时钟单元;所述标准时间步进为所述时钟单元的时间步进;所述时钟单元的时间步进与其他摄像机的时钟单元的时间步进相同;所述调整所述处理器的时间步进与预设的标准时间步进相同的步骤,包括:获取所述时钟单元的实时时间,根据***时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同;其中,所述***时间为所述处理器校正后或校正前的***时间;所述时钟单元的实时时间按照所述时钟单元的时间步进逐渐增加。
- 根据权利要求13所述的方法,其特征在于,所述根据***时间和所述时钟单元的实时时间,调整所述处理器的时间步进与所述时钟单元的时间步进相同的步骤,包括:获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时所述处理器的第二***时间和所述时钟单元的第二实时时间;所述第一时刻比所述第二时刻早特定时长;计算所述第一***时间和所述第二***时间的第一差值,计算所述第一实时时间和所述第二实时时间的第二差值;根据所述第一差值与所述第二差值,调整所述处理器的时间步进与所述时钟单元的时间步进相同。
- 根据权利要求14所述的方法,其特征在于,所述根据所述第一差值与所述第二差值,调整所述处理器的时间步进与所述时钟单元的时间步进相同的步骤,包括:判断所述第一差值是否等于所述第二差值;如果不等于,则将所述处理器的时间步进调整预设步长;在等待第二预设时长的时间之后,以当前时刻为所述第一时刻,以当前时刻之后的时刻为第二时刻,返回执行所述获取第一时刻时所述处理器的第一***时间和所述时钟单元的第一实时时间,获取第二时刻时所述处理器的第二***时间和所述时钟单元的第二实时时间的步骤;如果等于,则确定已调整至所述处理器的时间步进与所述时钟单元的时间步进相同。
- 根据权利要求15所述的方法,其特征在于,所述将所述处理器的时间步进调整预设步长的步骤,包括:当所述第一差值大于所述第二差值时,将所述处理器的时间步进增大预设步长;当所述第一差值小于所述第二差值时,将所述处理器的时间步进减小预设步长。
- 根据权利要求10-16任一项所述的方法,其特征在于,采用以下方式 获取所述指定的采集时间:接收平台或其他视频采集设备发送的包含所述指定的采集时间的视频采集指令,从所述视频采集指令中获取所述指定的采集时间。
- 根据权利要求10所述的方法,其特征在于,在向所述视频采集单元发送所述采集指令之前,所述方法还包括:在以下条件满足时,向所述视频采集单元发送所述采集指令:所述视频采集设备的曝光参数改变;确定所述其他视频采集设备均根据所述改变后的曝光参数调整各自的曝光参数;所述处理器的***时间到达指定的采集时间。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710693239.5 | 2017-08-14 | ||
CN201710693239.5A CN109391799B (zh) | 2017-08-14 | 2017-08-14 | 一种监控视频同步方法、装置及视频采集设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019033956A1 true WO2019033956A1 (zh) | 2019-02-21 |
Family
ID=65361754
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/099184 WO2019033956A1 (zh) | 2017-08-14 | 2018-08-07 | 一种监控视频同步方法及摄像机 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109391799B (zh) |
WO (1) | WO2019033956A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110809041A (zh) * | 2019-10-30 | 2020-02-18 | 北京百度网讯科技有限公司 | 一种数据同步方法、装置、电子设备及存储介质 |
CN111047622A (zh) * | 2019-11-20 | 2020-04-21 | 腾讯科技(深圳)有限公司 | 视频中对象的匹配方法和装置、存储介质及电子装置 |
CN112312069A (zh) * | 2019-07-31 | 2021-02-02 | 杭州海康汽车技术有限公司 | 视频处理方法、装置、***及设备 |
CN114697466A (zh) * | 2022-03-17 | 2022-07-01 | 杭州海康威视数字技术股份有限公司 | 视频帧采集同步控制 |
CN118042082A (zh) * | 2024-02-23 | 2024-05-14 | 湖北泰跃卫星技术发展股份有限公司 | 一种在数据中台中基于气象变化对视频时间校准方法 |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110687877A (zh) * | 2019-09-12 | 2020-01-14 | 深圳市铭华航电工艺技术有限公司 | 基于视觉网络的监测方法、装置、终端及存储介质 |
CN112149670A (zh) * | 2020-09-25 | 2020-12-29 | 武汉大学 | 一种社会安防视频自动校时方法 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101014136A (zh) * | 2007-02-05 | 2007-08-08 | 北京大学 | 一种用于多视点视频采集的时间同步方法及*** |
CN102223484A (zh) * | 2011-08-04 | 2011-10-19 | 浙江工商大学 | 一种摄像机前端参数配置的方法和装置 |
WO2017082077A1 (ja) * | 2015-11-11 | 2017-05-18 | ソニー株式会社 | 画像処理装置および画像処理方法 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102005062468A1 (de) * | 2005-12-27 | 2007-07-05 | Robert Bosch Gmbh | Verfahren zur Synchronisation von Datenströmen |
CN101324799B (zh) * | 2007-06-11 | 2011-08-17 | 群联电子股份有限公司 | 可携式储存装置及其同步方法 |
CN104618737B (zh) * | 2013-11-01 | 2019-09-20 | 深圳力维智联技术有限公司 | 流媒体***时钟慢同步方法及其装置 |
CN104639796B (zh) * | 2013-11-08 | 2017-11-21 | 浙江大华技术股份有限公司 | 一种监控服务器及其控制视频源设备时间同步的方法 |
CN105554594B (zh) * | 2015-10-27 | 2018-11-27 | 东莞酷派软件技术有限公司 | 一种控制处理方法及用户终端 |
CN106154816B (zh) * | 2016-07-14 | 2019-04-16 | 南京国电南自电网自动化有限公司 | 一种自动装置高精度守时方法 |
-
2017
- 2017-08-14 CN CN201710693239.5A patent/CN109391799B/zh active Active
-
2018
- 2018-08-07 WO PCT/CN2018/099184 patent/WO2019033956A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101014136A (zh) * | 2007-02-05 | 2007-08-08 | 北京大学 | 一种用于多视点视频采集的时间同步方法及*** |
CN102223484A (zh) * | 2011-08-04 | 2011-10-19 | 浙江工商大学 | 一种摄像机前端参数配置的方法和装置 |
WO2017082077A1 (ja) * | 2015-11-11 | 2017-05-18 | ソニー株式会社 | 画像処理装置および画像処理方法 |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112312069A (zh) * | 2019-07-31 | 2021-02-02 | 杭州海康汽车技术有限公司 | 视频处理方法、装置、***及设备 |
CN112312069B (zh) * | 2019-07-31 | 2023-03-24 | 杭州海康汽车技术有限公司 | 视频处理方法、装置、***及设备 |
CN110809041A (zh) * | 2019-10-30 | 2020-02-18 | 北京百度网讯科技有限公司 | 一种数据同步方法、装置、电子设备及存储介质 |
CN110809041B (zh) * | 2019-10-30 | 2023-06-27 | 北京百度网讯科技有限公司 | 一种数据同步方法、装置、电子设备及存储介质 |
CN111047622A (zh) * | 2019-11-20 | 2020-04-21 | 腾讯科技(深圳)有限公司 | 视频中对象的匹配方法和装置、存储介质及电子装置 |
CN111047622B (zh) * | 2019-11-20 | 2023-05-30 | 腾讯科技(深圳)有限公司 | 视频中对象的匹配方法和装置、存储介质及电子装置 |
CN114697466A (zh) * | 2022-03-17 | 2022-07-01 | 杭州海康威视数字技术股份有限公司 | 视频帧采集同步控制 |
CN114697466B (zh) * | 2022-03-17 | 2023-10-13 | 杭州海康威视数字技术股份有限公司 | 视频帧采集同步控制 |
CN118042082A (zh) * | 2024-02-23 | 2024-05-14 | 湖北泰跃卫星技术发展股份有限公司 | 一种在数据中台中基于气象变化对视频时间校准方法 |
Also Published As
Publication number | Publication date |
---|---|
CN109391799B (zh) | 2020-09-04 |
CN109391799A (zh) | 2019-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019033956A1 (zh) | 一种监控视频同步方法及摄像机 | |
US8190680B2 (en) | Method and system for synchronization of digital media playback | |
US10728428B2 (en) | Semiconductor device, electronic device module and network system | |
WO2018228352A1 (zh) | 一种同步曝光方法、装置及终端设备 | |
CN108923876A (zh) | 时间同步方法、装置及*** | |
US11503366B2 (en) | Dynamic playout of transition frames while transitioning between play out of media streams | |
WO2018228353A1 (zh) | 一种多相机***同步曝光的控制方法、装置及终端设备 | |
US10666417B1 (en) | Time synchronization using timestamp exchanges | |
US9774413B2 (en) | Communication apparatus, communication system, and communication controlling method to synchronize clock process | |
US20160088210A1 (en) | Photographing control apparatus that controls synchronous photographing by plurality of image capture apparatus | |
KR102566550B1 (ko) | 복수의 커넥티드 장치 간 디지털 콘텐츠의 재생 동기화를 맞추는 방법 및 이를 이용한 장치 | |
US9807282B2 (en) | Synchronous camera | |
WO2011162052A1 (ja) | 表示装置及び表示システム | |
US20230412918A1 (en) | System for wireless synchronized capturing, and smart device | |
WO2018188365A1 (zh) | 同步播放方法、装置和*** | |
CN110971941A (zh) | 用于弹幕拥挤疏通的方法、***、服务器及直播间控制器 | |
US11664969B2 (en) | Communication apparatus, method of controlling communication apparatus, and storage medium | |
CN107455006B (zh) | 一种同步曝光的方法、装置及终端设备 | |
CN112351201B (zh) | 多媒体数据处理方法、***、装置、电子设备和存储介质 | |
EP2871848A1 (en) | Providing correction information for media synchronization | |
CN103945237A (zh) | 一种时钟同步方法、***及数字电视设备、epg服务器 | |
JP2013074338A (ja) | タイムサーバ、端末、時刻同期システム、時刻同期方法、及びプログラム | |
JP2017049544A (ja) | 表示システム、表示装置、及び表示システムの制御方法 | |
WO2020042090A1 (zh) | 一种图像显示方法、装置及图像处理设备 | |
WO2022233143A1 (zh) | 相机快门同步实现方法、装置和设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18846025 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18846025 Country of ref document: EP Kind code of ref document: A1 |