US-12621407-B2 - Systems and methods for camera synchronization
Abstract
The present disclosure may relate to systems and methods for camera synchronization. A method may include determining a frequency difference between a first frequency of a first camera and a second frequency of a second camera. The method may also include synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference. The method may further include directing the first camera and the second camera to execute camera operations under synchronized frequency.
Inventors
- Zongmiao WANG
- Weiping Shi
- Yanfei LYU
Assignees
- ZHEJIANG HUARAY TECHNOLOGY CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20240108
- Priority Date
- 20210708
Claims (18)
- 1 . A system, comprising: at least one storage medium including a set of instructions; and at least one processor in communication with the at least one storage medium, wherein when executing the set of instructions, the at least one processor is directed to cause the system to perform operations including: determining a frequency difference between a first frequency of a first camera and a second frequency of a second camera; synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference by: synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference and a preset dividing frequency; and directing the first camera and the second camera to execute camera operations under synchronized frequency.
- 2 . The system of claim 1 , wherein the determining a frequency difference between a first frequency of a first camera and a second frequency of a second camera includes: determining a first time of the first camera sending a message and a second time of the second camera receiving the message; determining a third time of the first camera sending a message and a fourth time of the second camera receiving the message; and determining the frequency difference based on the first time, the second time, the third time, and the fourth time.
- 3 . The system of claim 2 , wherein a format of the message at least includes camera ID, wherein the first time or the third time is a time point of the first camera sending a first camera ID of the first camera, and the second time or the fourth time is a time point of the second camera receiving the first camera ID.
- 4 . The system of claim 1 , wherein the synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference and a preset dividing frequency includes: dividing the second frequency of the second camera to the preset dividing frequency based on a target frequency dividing coefficient of the second camera; and multiplying the preset dividing frequency to the first frequency of the first camera.
- 5 . The system of claim 4 , wherein the determining the target frequency dividing coefficient includes: determining a base frequency dividing coefficient based on the first frequency and the preset dividing frequency; determining a difference ratio based on a difference value between the first frequency and the second frequency; determining a supplementary frequency dividing coefficient based on the base frequency dividing coefficient and the difference ratio; and determining the target frequency dividing coefficient based on the base frequency dividing coefficient and the supplementary frequency dividing coefficient.
- 6 . The system of claim 1 , the operations further including: determining a time difference between a first time of the first camera and a second time of the second camera under the synchronized frequency; and synchronizing the second time of the second camera to the first time of the first camera based on the time difference.
- 7 . The system of claim 6 , wherein the determining a time difference between a first time of the first camera and a second time of the second camera under the synchronized frequency includes: determining a fifth time of the second camera sending a message and a sixth time of the first camera receiving the message; determining a seventh time of the first camera sending a message and an eighth time of the second camera receiving the message; and determining the time difference based on the fifth time, the sixth time, the seventh time, and the eighth time.
- 8 . The system of claim 6 , the operations further including: receiving a trigger instruction; detecting a current time of the first camera and a current time of the second camera based on the trigger instruction; determining whether the current time of the first camera and the current time of the second camera satisfy a preset condition; and in response to a determination that the current time of the first camera and the current time of the second camera satisfy the preset condition, directing the first camera and the second camera to execute the camera operations.
- 9 . The system of claim 1 , wherein the first camera is connected to the second camera via a camera pin, a bus, or a network interface.
- 10 . A method, comprising: determining a frequency difference between a first frequency of a first camera and a second frequency of a second camera; synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference by: synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference and a preset dividing frequency; and directing the first camera and the second camera to execute camera operations under synchronized frequency.
- 11 . The method of claim 10 , wherein the determining a frequency difference between a first frequency of a first camera and a second frequency of a second camera includes: determining a first time of the first camera sending a message and a second time of the second camera receiving the message; determining a third time of the first camera sending a message and a fourth time of the second camera receiving the message; and determining the frequency difference based on the first time, the second time, the third time, and the fourth time.
- 12 . The method of claim 11 , wherein a format of the message at least includes camera ID, wherein the first time or the third time is a time point of the first camera sending a first camera ID of the first camera, and the second time or the fourth time is a time point of the second camera receiving the first camera ID.
- 13 . The method of claim 10 , wherein the synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference and a preset dividing frequency includes: dividing the second frequency of the second camera to the preset dividing frequency based on a target frequency dividing coefficient of the second camera; and multiplying the preset dividing frequency to the first frequency of the first camera.
- 14 . The method of claim 13 , wherein the determining the target frequency dividing coefficient includes: determining a base frequency dividing coefficient based on the first frequency and the preset dividing frequency; determining a difference ratio based on a difference value between the first frequency and the second frequency; determining a supplementary frequency dividing coefficient based on the base frequency dividing coefficient and the difference ratio; and determining the target frequency dividing coefficient based on the base frequency dividing coefficient and the supplementary frequency dividing coefficient.
- 15 . The method of claim 10 , the operations further including: determining a time difference between a first time of the first camera and a second time of the second camera under the synchronized frequency; and synchronizing the second time of the second camera to the first time of the first camera based on the time difference.
- 16 . The method of claim 15 , wherein the determining a time difference between a first time of the first camera and a second time of the second camera under the synchronized frequency includes: determining a fifth time of the second camera sending a message and a sixth time of the first camera receiving the message; determining a seventh time of the first camera sending a message and an eighth time of the second camera receiving the message; and determining the time difference based on the fifth time, the sixth time, the seventh time, and the eighth time.
- 17 . The method of claim 15 , the operations further including: receiving a trigger instruction; detecting a current time of the first camera and a current time of the second camera based on the trigger instruction; determining whether the current time of the first camera and the current time of the second camera satisfy a preset condition; and in response to a determination that the current time of the first camera and the current time of the second camera satisfy the preset condition, directing the first camera and the second camera to execute the camera operations.
- 18 . A non-transitory computer readable medium, comprising at least one set of instructions, wherein when executed by one or more processors of a computing device, the at least one set of instructions causes the computing device to perform a method, the method comprising: determining a frequency difference between a first frequency of a first camera and a second frequency of a second camera; synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference by: synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference and a preset dividing frequency; and directing the first camera and the second camera to execute camera operations under synchronized frequency.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a Continuation of International Application No. PCT/CN2022/104126, filed on Jul. 6, 2022, which claims priority of Chinese Patent Application No. 202110769848.0 filed on Jul. 8, 2021, the contents of each of which are incorporated herein by reference in their entirety. TECHNICAL FIELD The present disclosure generally relates to communication technologies, and in particular, to systems and methods for camera synchronization. BACKGROUND In the field of machine vision, application scenarios in which a plurality of cameras are synchronously triggered to take images or cooperate with each other are very common. For the existing trigger instruction-based trigger manners, network jitter or delay fluctuation of instructions parsed by cameras may make it difficult for the plurality of cameras to achieve synchronized operation. In addition, if a signal line trigger manner is used, since system clocks of the plurality of cameras are generally different due to the difference among the plurality of cameras themselves, time stamps of data frames output from the plurality of cameras can't be accurately synchronized with internal data. Therefore, it is desirable to provide accurate systems and methods for camera synchronization, thereby achieving accurate cooperation among cameras. SUMMARY According to an aspect of the present disclosure, a system for camera synchronization may be provided. The system may include at least one storage medium including a set of instructions, and at least one processor in communication with the at least one storage medium. When executing the set of instructions, the at least one processor may be directed to cause the system to perform operations. The operations may include determining a frequency difference between a first frequency of a first camera and a second frequency of a second camera. The operations may also include synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference. The operations may further include directing the first camera and the second camera to execute camera operations under synchronized frequency. In some embodiments, the determining a frequency difference between a first frequency of a first camera and a second frequency of a second camera may include determining a first time of the first camera sending a message and a second time of the second camera receiving the message, determining a third time of the first camera sending a message and a fourth time of the second camera receiving the message, and determining the frequency difference based on the first time, the second time, the third time, and the fourth time. In some embodiments, a format of the message at least may include camera ID. The first time or the third time may be a time point of the first camera sending a first camera ID of the first camera. The second time or the fourth time may be a time point of the second camera receiving the first camera ID. In some embodiments, the synchronizing a second frequency of the second camera to a first frequency of the first camera based on the frequency difference may include synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference and a preset dividing frequency. In some embodiments, the synchronizing the second frequency of the second camera to the first frequency of the first camera based on the frequency difference and a preset dividing frequency may include dividing the second frequency of the second camera to the preset dividing frequency based on a target frequency dividing coefficient of the second camera, and multiplying the preset dividing frequency to the first frequency of the first camera. In some embodiments, the determining the target frequency dividing coefficient may include determining a base frequency dividing coefficient based on the first frequency and the preset dividing frequency, determining a difference ratio based on a difference value between the first frequency and the second frequency, determining a supplementary frequency dividing coefficient based on the base frequency dividing coefficient and the difference ratio, and determining the target frequency dividing coefficient based on the base frequency dividing coefficient and the supplementary frequency dividing coefficient. In some embodiments, the operations may further include determining a time difference between a first time of the first camera and a second time of the second camera under the synchronized frequency, and synchronizing the second time of the second camera to the first time of the first camera based on the time difference. In some embodiments, the determining the time difference between the first time of the first camera and the second time of the second camera under the synchronized frequency may include determining a fifth time of the second camera sending a mes