Multi-camera synchronous photographing method and system, electronic equipment and storage medium
By calculating the clock difference rate between the camera terminal device and the base station and converting the timestamp, UWB technology is used to realize high-precision wireless synchronous photography of multi-camera systems, solving the problems of complex wiring, poor scalability and high cost in the existing technology, and achieving a high-precision, low-cost and high scalability multi-camera synchronous photography solution.
Patent Information
- Application Number
- CN202411840010.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-11
AI Technical Summary
The existing multi-camera synchronous photography technology has problems such as complex wiring, poor scalability and high cost in large-scale applications, and the wireless synchronization method has low time accuracy, which cannot meet the requirements of high-precision synchronous photography.
By obtaining the time synchronization data packets sent by the base station, the clock difference rate between the camera-side device and the base station is calculated, and the local timestamp of the camera-side device is converted into the base station reference timestamp, and the camera is controlled to perform the photography operation. This method uses UWB technology to achieve wireless high-precision time synchronization, simplify system deployment, improve scalability and reduce costs.
It realizes nanosecond synchronization accuracy of multi-camera systems in wireless environments, simplifies system deployment and maintenance, improves system scalability and flexibility, and reduces overall costs.
Smart Images

Figure CN119603550A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of camera control technology, and more specifically, to a method, system, electronic device and storage medium for synchronously photographing multiple cameras. Background Art
[0002] In large-scale computer vision applications, such as vibration table tests, multiple cameras (possibly dozens or hundreds) are usually required to synchronously capture the key point motion of the object under test in a vibration environment. Such tests require extremely high synchronization accuracy of the shooting time to ensure the accuracy and comparability of the acquired data.
[0003] The existing synchronization method mainly triggers all cameras to take photos synchronously through wired connection. However, this method has obvious limitations in large-scale applications: Complex wiring: Multiple physical cables are required to connect, which not only increases the complexity of the system, but also consumes a lot of manpower for wiring and maintenance.
[0004] Poor scalability: When the number of devices increases, the wired connection solution becomes clumsy and difficult to expand, making it difficult to meet flexible and changing experimental needs.
[0005] High cost: Some high-precision synchronization solutions, such as PTP (Precision Time Protocol), can achieve sub-microsecond accuracy, but they require low-latency networks and special chip support, resulting in high overall costs and not conducive to widespread application.
[0006] In addition, commonly used wireless synchronization methods, such as the WIFI-based NTP (Network Time Protocol) protocol, although it has the convenience of wireless communication, its time accuracy is low and cannot meet the requirements of high-precision synchronous photography. Although PTP can achieve sub-microsecond accuracy, it requires wired network support, which limits its universal application in complex environments.
[0007] Faced with these challenges, the industry urgently needs a multi-camera synchronous photography solution that can achieve high-precision time synchronization, wireless communication convenience and low cost advantages. Especially in large-scale and complex application scenarios, how to simplify system deployment, improve scalability and reduce costs while ensuring synchronization accuracy has become a technical problem that needs to be solved urgently.
[0008] In view of the above problems, this application proposes a new solution. Summary of the invention
[0009] The purpose of the present application is to provide a multi-camera synchronous photography method, system, electronic device and storage medium, which have the advantages of achieving high-precision time synchronization, simplifying system deployment, improving scalability and reducing costs.
[0010] In the first aspect, the present application provides a multi-camera synchronous photography method, and the technical solution is as follows: include: Acquire a time synchronization data packet sent by a base station, wherein the time synchronization data packet includes a timestamp sent by the base station; Calculate the clock difference rate between the camera end device and the base station according to the timestamp sent by the base station and the local timestamp of the camera end device receiving the time synchronization data packet; According to the clock difference rate, converting the current local timestamp of the camera end device into a base station reference timestamp; According to the base station reference timestamp, the camera in the camera-end device is controlled to perform a photo-taking operation.
[0011] Further, in the present application, the step of calculating the clock difference rate between the camera end device and the base station according to the timestamp sent by the base station and the local timestamp of the camera end device receiving the time synchronization data packet includes: Obtaining a base station sending timestamp ST1 when the base station sends the first time synchronization data packet and a base station sending timestamp ST2 when the base station sends the second time synchronization data packet; Calculate a base station sending timestamp interval ΔST between two time synchronization data packets sent by the base station, ΔST=ST2-ST1; Obtaining a local timestamp RT1 of the first time synchronization data packet received by the camera end device and a local timestamp RT2 of the second time synchronization data packet; Calculate the local timestamp interval ΔRT between two time synchronization data packets received by the camera end device, ΔRT=RT2-RT1; The clock difference ratio Ratio is calculated according to the formula Ratio=(ΔST-ΔRT) / ΔST.
[0012] Further, in the present application, the step of converting the current local timestamp of the camera device into a base station reference timestamp according to the clock difference rate includes: Get the current local timestamp RT of the camera device; The base station reference timestamp ST is calculated according to the formula ST=ST1+(RT-RT1)×(1+Ratio), where: ST1 is the base station sending timestamp when the base station sends the first time synchronization data packet; RT1 is the local timestamp of the camera device receiving the first time synchronization data packet; Ratio is the clock difference ratio.
[0013] Further, in the present application, the step of controlling the camera in the camera-end device to perform a photographing operation according to the base station reference timestamp includes: Adjusting the current local time of the camera device according to the base station reference timestamp, and receiving a time synchronization data packet sent by the base station to recalculate the clock difference rate; When |RT-ST|>preset value, the clock of the camera-end device is set to the calculated ST value, so as to synchronize the time of the camera-end device with the time of the base station, so that all the camera-end devices will use the time of the base station as a reference and control the camera in the camera-end device to perform a photo operation according to the set photo interval.
[0014] In a second aspect, the present application proposes a multi-camera synchronous photo taking system, comprising: A base station, configured to send a time synchronization data packet, wherein the time synchronization data packet includes a base station sending timestamp; A plurality of camera-side devices, each of the camera-side devices comprising: Camera, used to perform photo taking tasks; A controller is used to receive the time synchronization data packet and obtain a local timestamp for receiving the time synchronization data packet, calculate a clock difference rate based on the timestamp sent by the base station and the local timestamp for receiving the time synchronization data packet, and convert the current local timestamp of the camera-end device into a base station reference timestamp based on the clock difference rate, and control the camera to perform a photo-taking operation.
[0015] Furthermore, in the present application, the base station is connected to a first UWB module, the first UWB module is connected to a computer, and the computer is used to control the base station to send the time synchronization data packet through the first UWB module, and monitor all the camera-end devices through the base station.
[0016] Furthermore, in the present application, the controller includes: A second UWB module is used to receive the time synchronization data packet sent by the first UWB module, extract the base station sending timestamp in the time synchronization data packet, and generate a local timestamp for receiving the time synchronization data packet; The single chip microcomputer is used to calculate the clock difference rate according to the timestamp sent by the base station and the local timestamp of the time synchronization data packet received, and convert the current local timestamp of the camera end device into the base station reference timestamp according to the clock difference rate, so as to control the camera to perform a photo-taking operation.
[0017] Furthermore, in the present application, the single chip microcomputer includes: A first calculation unit, used for obtaining a base station sending timestamp ST1 when the base station sends the first time synchronization data packet and a base station sending timestamp ST2 when the base station sends the second time synchronization data packet; Calculate a base station sending timestamp interval ΔST between two time synchronization data packets sent by the base station, ΔST=ST2-ST1; Obtaining a local timestamp RT1 of the first time synchronization data packet received by the camera end device and a local timestamp RT2 of the second time synchronization data packet; Calculate the local timestamp interval ΔRT between two time synchronization data packets received by the camera end device, ΔRT=RT2-RT1; The clock difference ratio Ratio is calculated according to the formula Ratio=(ΔST-ΔRT) / ΔST; A second calculation unit is used to obtain the current local timestamp RT of the camera end device; The base station reference timestamp ST is calculated according to the formula ST=ST1+(RT-RT1)×(1+Ratio), where: ST1 is the base station sending timestamp when the base station sends the first time synchronization data packet; RT1 is the local timestamp of the camera device receiving the first time synchronization data packet; Ratio is the clock difference ratio.
[0018] In a third aspect, the present application proposes an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the above method are executed.
[0019] In a fourth aspect, the present application proposes a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are executed.
[0020] As can be seen from the above, the present application provides a method, system, electronic device and storage medium for synchronous photography of multiple cameras, including obtaining a time synchronization data packet sent by a base station, calculating a clock difference rate according to a timestamp sent by the base station and a timestamp received by a camera-end device, converting the current local timestamp of the camera-end device into a base station reference timestamp, and controlling the camera to perform a photography operation. By using wireless communication technology and clock synchronization algorithms, high-precision synchronous photography of multiple cameras is achieved, which has the advantages of achieving high-precision time synchronization, simplifying system deployment, improving scalability and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A flowchart of a multi-camera synchronous photo taking method provided in this application.
[0022] Figure 2 A schematic diagram of the structure of a multi-camera synchronous photo taking system provided in this application.
[0023] Figure 3 The present invention provides an electronic device that illustrates the structure of the present invention.
[0024] In the figure: 100, camera-end device; 200, base station; 210, first UWB module; 400, computer; 110, camera; 120, single-chip microcomputer; 130, second UWB module; 310, processor; 320, memory. DETAILED DESCRIPTION
[0025] The technical solutions in the present application will be clearly and completely described below in conjunction with the drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0026] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0027] In large-scale computer vision applications, such as vibration table tests, multiple cameras are required to synchronously capture the key point motion of the object to be tested in a vibrating environment. These tests require extremely high synchronization accuracy of the shooting time, usually at the nanosecond level. Existing synchronization methods mainly trigger all cameras to take pictures synchronously through wired connections, but there are obvious limitations in large-scale applications. The wiring is complex and labor-intensive, and when the number of devices increases, the wired connection becomes clumsy and difficult to expand. In addition, although existing synchronization solutions such as PTP can achieve sub-microsecond accuracy, they require low-latency networks and special chip support, and the overall cost is high. Commonly used wireless synchronization methods have low time accuracy, and although PTP can reach sub-microseconds, it requires wired network support, which limits the universality of the application. These problems seriously affect the synchronization accuracy, scalability, and deployment efficiency of multi-camera systems.
[0028] For example, in a large-scale vibration table test scenario, researchers need to use 100 high-speed cameras to synchronously capture the deformation process of a complex structure under high-frequency vibration, requiring the camera synchronization accuracy to reach less than 1 nanosecond to ensure that accurate deformation data is captured. However, existing wired synchronization systems face severe challenges in such large-scale applications. First, the wiring work is extremely complicated, requiring the laying of hundreds of meters of coaxial cables, which is not only time-consuming and labor-intensive, but also prone to errors. Secondly, due to the different cable lengths, the difference in signal transmission delay leads to a decrease in synchronization accuracy. In addition, the vibration environment may cause the cable connection to loosen, further affecting the synchronization stability. Although wireless synchronization solutions such as Wi-Fi avoid wiring problems, their millisecond-level synchronization accuracy is far from meeting the requirements. Although the PTP solution has higher accuracy, the deployment cost in this scenario is too high and still requires complex network wiring.
[0029] If this technical problem cannot be effectively solved, the data quality and reliability of the vibration table test will be seriously affected. Millisecond-level synchronization errors may cause key deformation details under high-frequency vibration to be incorrectly captured or completely missed, thus affecting the accuracy of the structural dynamic response analysis. This will not only increase the cost of the test, but may also lead to incorrect structural design decisions and even create safety hazards. In addition, complex wiring and limited scalability will greatly reduce the flexibility and efficiency of the test system, limiting the ability of researchers to conduct larger-scale and more complex vibration tests. Therefore, there is an urgent need for a multi-camera synchronization technology solution that can achieve nanosecond-level synchronization accuracy in a wireless environment, while having high scalability and low deployment cost.
[0030] This application first considers the limitations of the existing technology when solving the problem of synchronous photography of multiple cameras. Although the wired synchronization solution has high precision, the wiring is complex, the scalability is poor, and the cost is high. Although wireless synchronization solutions such as Wi-Fi are easy to deploy, the accuracy is insufficient. Therefore, a solution that can achieve high-precision synchronization and have the advantages of wireless communication is needed.
[0031] Based on this idea, this application explores the possibility of using ultra-wideband (UWB) technology for time synchronization. UWB technology has high-precision timestamp capabilities and can theoretically achieve nanosecond synchronization accuracy. However, relying solely on the UWB module to send timestamps is not enough to solve the problem, because the distance between each camera device and the base station is different, and the reception time is different.
[0032] To overcome this challenge, this application proposes a correction method based on the clock difference rate. Specifically, the clock difference rate is calculated by comparing the difference between the timestamp sent by the base station and the timestamp received by the camera device. This difference rate not only takes into account the transmission delay, but also the clock frequency difference between devices.
[0033] For details, please refer to Figure 1 In the first aspect, the present application provides a method for synchronously photographing multiple cameras, the technical solution of which includes: S110, obtaining a time synchronization data packet sent by a base station, where the time synchronization data packet includes a timestamp sent by the base station; S120, calculating the clock difference rate between the camera end device and the base station according to the timestamp sent by the base station and the local timestamp of the time synchronization data packet received by the camera end device; S130, converting the current local timestamp of the camera end device into a base station reference timestamp according to the clock difference rate; S140. Control the camera in the camera-end device to perform a photo-taking operation according to the base station reference timestamp.
[0034] The base station refers to a device used to send time synchronization data packets.
[0035] The time synchronization data packet refers to a data packet containing a timestamp sent by the base station.
[0036] The camera-end device refers to a device that receives a time synchronization data packet and performs a photo-taking operation.
[0037] The clock difference rate refers to the clock frequency difference between the camera-end device and the base station, which can be calculated by comparing the sending and receiving timestamps of multiple time synchronization data packets.
[0038] The core innovation of this application is to propose a wireless high-precision multi-camera synchronous photography method based on UWB technology. By calculating the clock difference rate between the camera-end device and the base station, the accurate conversion of the local timestamp to the base station reference timestamp is realized, thereby achieving nanosecond synchronization accuracy. This method not only solves the problems of complex wiring and poor scalability of traditional wired synchronization solutions, but also overcomes the defects of insufficient accuracy of common wireless synchronization solutions.
[0039] Here’s how this application works: First, the base station can periodically broadcast a time synchronization packet containing the base station sending timestamp. After the camera device receives the time synchronization packet, it records the local timestamp of the reception. By comparing the base station sending timestamps and the corresponding local timestamps of multiple time synchronization packets, the clock difference rate between the camera device and the base station is calculated. This difference rate not only takes into account the signal transmission delay, but also includes the clock frequency difference between the devices.
[0040] Furthermore, the camera-side device uses the calculated clock difference rate to convert the current local timestamp into a reference timestamp that is consistent with the base station. This conversion process takes into account the initial time difference and the accumulated clock deviation, ensuring high-precision time synchronization. Finally, the camera-side device accurately controls the camera to perform the photo operation based on the converted base station reference timestamp.
[0041] Therefore, this application realizes the synchronization of multiple cameras in nanoseconds without physical connection. The key to this method lies in the accurate calculation and application of the clock difference rate, which effectively eliminates the influence of clock deviation and signal transmission delay between devices. At the same time, the use of UWB technology as a wireless communication method not only ensures the acquisition of high-precision timestamps, but also simplifies system deployment.
[0042] Further, in some of the embodiments, the step of calculating the clock difference rate between the camera device and the base station according to the timestamp sent by the base station and the local timestamp of the time synchronization data packet received by the camera device includes: Obtain a base station sending timestamp ST1 of a first time synchronization data packet sent by the base station and a base station sending timestamp ST2 of a second time synchronization data packet sent by the base station; Calculate the base station sending timestamp interval ΔST between two time synchronization data packets sent by the base station, ΔST=ST2-ST1; Obtain the local timestamp RT1 of the first time synchronization data packet received by the camera end device and the local timestamp RT2 of the second time synchronization data packet; Calculate the local timestamp interval ΔRT between two time synchronization data packets received by the camera end device, ΔRT=RT2-RT1; The clock difference ratio Ratio is calculated according to the formula Ratio=(ΔST-ΔRT) / ΔST.
[0043] This method calculates the clock difference rate between the base station and the camera-end device by obtaining the sending and receiving timestamps of two time synchronization data packets. Specifically, first obtain the base station sending timestamps ST1 and ST2 of the two time synchronization data packets sent by the base station, and calculate the time interval ΔST between them. Then obtain the local timestamps RT1 and RT2 of the camera-end device receiving these two time synchronization data packets, and calculate the time interval ΔRT between them. Finally, the clock difference rate Ratio is calculated by the formula Ratio=(ΔST-ΔRT) / ΔST.
[0044] This calculation method takes into account the clock frequency difference between the base station and the camera device. By comparing the time elapsed in the same time interval between the two devices, the clock difference between them can be accurately quantified. The clock difference ratio Ratio represents the clock frequency deviation of the camera device relative to the base station.
[0045] For example, the timestamps (ST1 and ST2) of the two time synchronization data packets sent by the base station and the timestamps (RT1 and RT2) of the two data packets received by the camera end device are in nanoseconds.
[0046] The time stamp interval between two time synchronization packets ΔST = ST2 - ST1 = 1000100000 -1000000000 = 100000 nanoseconds (0.1 milliseconds) The local timestamp interval ΔRT between two time synchronization packets received by the camera device is = RT2 - RT1 = 1000100150 - 1000000100 = 100050 nanoseconds Use the formula to calculate Ratio: Ratio = (ΔST - ΔRT) / ΔST = (100000 - 100050) / 100000 = -0.0005 or -0.05% This result indicates that the clock of the camera device is slightly faster than the base station clock, about 0.05% faster per second.
[0047] The advantage of this calculation method is that by using data from two time points, the clock difference rate can be calculated more accurately, reducing the error that may be caused by a single measurement. This method can adapt to different clock frequency differences, whether fast or slow, and can accurately calculate. The clock difference rate can be dynamically updated by continuously receiving time synchronization packets to adapt to possible clock drift. The calculation formula is simple and can be quickly executed in embedded systems with limited resources.
[0048] In practical applications, this calculation process can be further optimized. For example, the data of multiple groups of time synchronization packets can be averaged to obtain a more stable clock difference rate. A time window can also be set to use only the data within the most recent period for calculation to accommodate possible clock drift.
[0049] By accurately calculating the clock difference rate, the camera-side device can more accurately convert the local timestamp to the base station reference timestamp, thereby achieving high-precision time synchronization between multiple cameras. This is of great significance for applications that require precise time synchronization, such as multi-camera 3D reconstruction and high-speed motion capture.
[0050] Compared with the prior art, the method for calculating the clock difference rate proposed in this application does not require dedicated hardware: unlike some existing methods that require special clock synchronization hardware, the method of this application can be implemented on an ordinary embedded system. Compared with the PTP protocol of wired networks, this method is more suitable for wireless communication environments and has better flexibility and scalability. By using UWB technology and precise timestamps, this method can achieve nanosecond time synchronization accuracy, which is far superior to the NTP protocol based on Wi-Fi. By continuously updating the clock difference rate, this method can adapt to clock drift and environmental changes and maintain long-term high-precision synchronization.
[0051] Further, in some of the embodiments, the step of converting the current local timestamp of the camera device into the base station reference timestamp according to the clock difference rate includes: Get the current local timestamp RT of the camera device; The base station reference timestamp ST is calculated according to the formula ST=ST1+(RT-RT1)×(1+Ratio), where: ST1 is the base station sending timestamp when the base station sends the first time synchronization data packet; RT1 is the local timestamp of the first time synchronization data packet received by the camera device; Ratio is the clock difference ratio.
[0052] This method achieves accurate conversion of the local timestamp of the camera device to the base station reference timestamp by introducing the clock difference ratio Ratio. This conversion takes into account the clock frequency difference between the camera device and the base station, thereby improving the accuracy of time synchronization.
[0053] Specifically, the method first obtains the current local timestamp RT of the camera device. This timestamp represents the current time of the camera device. Then, a formula is used to calculate the corresponding base station reference timestamp ST. In the formula, ST1 is the base station sending timestamp when the base station sends the first time synchronization data packet, and RT1 is the local timestamp when the camera device receives the data packet. These two timestamps are used as reference points to calibrate subsequent time conversions.
[0054] The (RT-RT1) in the formula represents the time interval from receiving the first time synchronization packet to the current moment. This time interval is multiplied by (1+Ratio) for correction, where Ratio is the clock difference rate calculated previously. In this way, the method takes into account the clock frequency difference between the camera-side device and the base station, thereby improving the accuracy of the conversion.
[0055] Finally, the corrected time interval is added to ST1 to obtain the final base station reference timestamp ST. This ST represents the base station time corresponding to the current local time RT of the camera device.
[0056] The advantage of this approach is that it not only takes into account the initial time difference, but also the difference in clock frequency through the Ratio parameter. This allows the camera-side device to maintain high-precision time synchronization with the base station even after long-term operation.
[0057] For example, using some of the values from the previous example: ST1 (base station send timestamp when the base station sends the first time synchronization packet) = 1000000000 nanoseconds RT1 (local timestamp when the camera receives the first time synchronization packet) = 1000000100 nanoseconds Ratio (calculated clock discrepancy ratio) = -0.0005 Assume that the camera's current local timestamp RT = 1000200000 nanoseconds.
[0058] Use the formula ST = ST1 + (RT - RT1) × (1 + Ratio) for conversion: ST = 1000000000 + (1000200000 - 1000000100) * (1 + (-0.0005)) = 1000000000 + 199900 * 0.9995 = 1000000000 + 199850.05 = 1000199850.05 nanoseconds The conversion result shows that the local timestamp of the camera device, 1000200000 nanoseconds, corresponds to the base station reference timestamp of approximately 1000199850.05 nanoseconds.
[0059] The time difference is about -149.95 nanoseconds, which means that the clock of the camera device is slightly faster than that of the base station.
[0060] This example shows how to use the given formula to convert the local timestamp of the camera device to the reference timestamp of the base station. Through this conversion, the camera device can accurately synchronize its local time with the base station time, thus achieving high-precision time synchronization of the entire multi-camera system.
[0061] This conversion process is carried out continuously. The camera-end device will continuously receive time synchronization data packets from the base station, update the Ratio value, and use the latest parameters for timestamp conversion to maintain continuous synchronization with the base station time. After the conversion, it will be set immediately for the next conversion, that is, the ST obtained from the last conversion is set as the RT in the next conversion formula.
[0062] Compared with simply using the time difference for conversion, this method takes into account the slight difference in clock frequency, so that high-precision time synchronization can be maintained after long-term operation. This is of great significance for application scenarios that require accurate synchronization for a long time, such as long-term vibration testing or precise industrial detection.
[0063] Compared with the existing technology, the advantage of this method is that by introducing the clock difference rate Ratio, the clock frequency difference between devices is taken into account, and more accurate time synchronization can be achieved compared with the simple time difference correction method. This method can adapt to the clock frequency difference between different devices, without the need to use a high-precision crystal oscillator, and reduce hardware costs. Even after long-term operation, high-precision time synchronization can be maintained, which is suitable for application scenarios that require long-term stable operation. This method can be implemented on an ordinary single-chip microcomputer, does not require special hardware support, and reduces the complexity and cost of the system.
[0064] Through this method, the present application achieves high-precision, long-term stable time synchronization, and provides reliable technical support for multi-camera synchronous photography systems.
[0065] Further, in some of the embodiments, the step of controlling the camera in the camera terminal device to perform a photo-taking operation according to the base station reference timestamp includes: Adjust the current local time of the camera device according to the base station reference timestamp, and receive the time synchronization data packet sent by the base station to recalculate the clock difference rate; When |RT-ST|>preset value, the clock of the camera-end device is set to the calculated ST value, so as to synchronize the time of the camera-end device with the time of the base station, so that all the camera-end devices will use the time of the base station as a reference and control the camera in the camera-end device to perform a photo operation according to the set photo interval.
[0066] By continuously adjusting and recalculating the clock difference rate, the accuracy of multi-camera synchronous photography can be further improved. Specifically, after receiving the time synchronization data packet sent by the base station, the camera-side device will adjust its local time according to the base station reference time. This step can initially calibrate the time of the camera-side device to make it closer to the base station time.
[0067] Then, the camera device will continue to receive the time synchronization data packets sent by the base station and recalculate the clock difference rate using these newly received time synchronization data packets. This process can be regarded as an iterative optimization process, and each recalculation will make the clock difference rate more accurate.
[0068] When |RT-ST|>preset value, it means that the time of the camera device has reached a sufficiently high synchronization accuracy with the base station time. At this time, the camera device will control the camera to perform the photo operation. This preset value can be set according to the needs of the specific application scenario, for example, it can be set to 1 nanosecond or less.
[0069] A key advantage of this approach is that it can dynamically adjust and optimize clock synchronization. In practical applications, the clock frequency of the camera device may change slightly due to various factors such as temperature changes and device aging. By continuously recalculating the clock difference rate, this method can capture these changes in a timely manner and make corresponding adjustments to maintain high-precision time synchronization.
[0070] Compared with the existing technology, this method can achieve higher precision time synchronization. Traditional wireless synchronization methods (such as the WIFI-based NTP protocol) can usually only achieve millisecond accuracy, while this method can achieve nanosecond accuracy. Secondly, this method is adaptive and can deal with clock drift problems that may occur in practical applications. Finally, due to the use of wireless communication, this method is very convenient to deploy and expand in large-scale multi-camera systems, avoiding complex wired connections.
[0071] Through this method, this application not only solves the problem of high-precision time synchronization in multi-camera systems, but also provides a practical, flexible and easily scalable solution. This has important practical application value for computer vision applications that require high time accuracy, such as high-speed motion analysis, 3D reconstruction, etc.
[0072] Second, please refer to Figure 2 , the present application proposes a multi-camera synchronous photography system, comprising: Base station 200, used to send a time synchronization data packet, the time synchronization data packet includes a base station sending timestamp; A plurality of camera-end devices 100, each camera-end device 100 comprises: The camera 110 is used to perform a photo taking task; The controller is used to receive a time synchronization data packet and obtain a local timestamp of the received time synchronization data packet, calculate a clock difference rate based on the timestamp sent by the base station and the local timestamp of the received time synchronization data packet, and convert the current local timestamp of the camera-end device 100 into a base station reference timestamp based on the clock difference rate, and control the camera 110 to perform a photo-taking operation.
[0073] The multi-camera synchronous photography system realizes high-precision synchronous photography of multiple cameras 110 through the cooperation of the base station 200 and multiple camera-end devices 100. The base station 200, as the center of time synchronization, provides a unified time reference for all camera-end devices 100 by sending time synchronization data packets containing accurate timestamps. The controller of each camera-end device 100 receives these synchronization data packets and corrects the local time by calculating the clock difference rate, thereby achieving accurate synchronization with the base station 200 time.
[0074] After receiving the time synchronization data packet, the controller first extracts the base station sending timestamp and records the local timestamp of receiving the data packet. By comparing the two timestamps, the controller can calculate the time difference between the camera end device 100 and the base station 200. Then, the controller uses the time information of multiple synchronization data packets to calculate the clock difference rate. This difference rate reflects the frequency difference between the local clock of the camera end device 100 and the clock of the base station 200.
[0075] Based on the calculated clock difference rate, the controller can convert the current local timestamp of the camera device 100 into a base station reference timestamp that is consistent with the base station 200. This conversion ensures that all camera devices 100 work under the same time reference, laying the foundation for subsequent synchronous photo operations.
[0076] After completing the time synchronization, the controller controls the camera 110 to perform the photo-taking operation according to the converted base station reference timestamp. This method ensures that all cameras 110 are triggered to take photos at the same time point, thereby achieving high-precision synchronous photo-taking of multiple cameras 110.
[0077] Furthermore, in some of the embodiments, the base station 200 includes a first UWB module 210 , which is connected to a computer 400 , and the computer 400 is used to control the base station 200 to send time synchronization data packets through the first UWB module 210 , and to monitor all camera-end devices 100 through the base station 200 .
[0078] By introducing the first UWB module 210 as a communication bridge between the base station 200 and the computer 400, high-speed data transmission between the base station 200 and the computer 400 is achieved. As the control center of the entire system, the computer 400 can not only control the base station 200 to send time synchronization data packets, but also monitor the status of all camera-end devices 100 through the base station 200. This design greatly improves the flexibility and controllability of the system.
[0079] Specifically, the first UWB module 210, as a communication interface of the base station 200, can achieve high-speed, low-latency data transmission. UWB technology has high bandwidth and low power consumption, and is very suitable for the transmission of time synchronization data packets. By controlling the base station 200 to send time synchronization data packets, the computer 400 can accurately control the transmission time and frequency of the synchronization signal, thereby ensuring that all camera-end devices 100 can receive the synchronization signal in a timely manner.
[0080] In addition, the computer 400 monitors the functions of all camera devices 100 through the base station 200, further enhancing the reliability and manageability of the system. For example, the computer 400 can monitor the synchronization status, power status, shooting parameters and other information of each camera device 100 in real time. If a camera device 100 is found to be abnormal, the computer 400 can promptly discover and take corresponding measures, such as resending the synchronization signal or notifying the operator to check.
[0081] In practical applications, this system architecture can flexibly adapt to the requirements of synchronous photography of multiple cameras 110 of different scales. For small-scale applications, an ordinary laptop can be used as the control center; for large-scale applications, a high-performance workstation or server can be used as the control center to process data and control instructions of a large number of camera-end devices 100.
[0082] As a preferred implementation, the computer 400 may be equipped with a dedicated software interface for real-time display of status information of each camera device 100, including synchronization accuracy, shooting parameters, power, etc. The operator can quickly understand the operation of the entire system through this interface and make necessary adjustments.
[0083] Through this design, the present application not only solves the time synchronization problem of synchronous photography of multiple cameras 110, but also provides an efficient and reliable system control solution. Compared with the traditional wired synchronization system, the solution of the present application has higher flexibility and scalability, and is particularly suitable for the synchronous photography application of multiple cameras 110 in large-scale and complex environments.
[0084] In a specific embodiment, specially developed multi-camera 110 synchronization control software may be run.
[0085] The control software has the following main functions: Time synchronization data packet generation and transmission control: The software can set the transmission frequency of the time synchronization data packets (e.g., 10 times per second) and control the base station 200 to send these data packets.
[0086] Camera-end device 100 status monitoring: The software receives and displays the synchronization status, power, memory usage and other information of each camera-end device 100 in real time.
[0087] Remote configuration of shooting parameters: The operator can remotely adjust the shooting parameters of each camera 110, such as exposure time, ISO sensitivity, etc., through the software interface.
[0088] Synchronous shooting trigger: The software can send a unified shooting command to ensure that all cameras 110 start shooting at the same time.
[0089] Data collection and preprocessing: After shooting is completed, the software can automatically collect image data from each camera 110 and perform preliminary quality inspection and preprocessing.
[0090] Through this implementation, operators can manage the entire multi-camera synchronous photography system on a centralized control platform, greatly improving the system's operational efficiency and reliability. At the same time, due to the use of wireless communication technology, the deployment and adjustment of the system has become more flexible and can adapt to various complex shooting environments.
[0091] Compared with the prior art, the solution of the present application achieves nanosecond time synchronization accuracy through UWB technology, which far exceeds the synchronization accuracy of traditional Wi-Fi or Bluetooth technology. It avoids complex wired connections and greatly simplifies the deployment and maintenance of the system. The centralized management of the entire system is achieved through a computer 400 and dedicated software, which improves operational efficiency and system reliability. The system architecture supports flexible expansion and can easily cope with the needs of synchronous photography of multiple cameras 110 of different sizes. Compared with traditional solutions that require dedicated synchronization hardware, the solution of the present application uses an ordinary computer 400 and a first UWB module 210, which greatly reduces the system cost.
[0092] In general, the multi-camera synchronous photography system proposed in this application effectively solves the communication and control problems in the synchronous photography of multiple cameras 110 through clever hardware configuration and software design, and provides an efficient and reliable solution for high-precision, large-scale multi-camera 110 synchronous applications.
[0093] Further, in some of the embodiments, the controller includes: The second UWB module 130 is used to receive the time synchronization data packet sent by the first UWB module 210, extract the base station sending timestamp in the time synchronization data packet, and generate a local timestamp of the received time synchronization data packet; The single chip microcomputer 120 is used to calculate the clock difference rate according to the timestamp sent by the base station and the local timestamp of the received time synchronization data packet, and convert the current local timestamp of the camera end device 100 into the base station reference timestamp according to the clock difference rate, and control the camera 110 to perform the photo taking operation.
[0094] By dividing the controller into two functional modules, the second UWB module 130 and the single-chip microcomputer 120, modularization and flexibility of functions are achieved. The second UWB module 130 focuses on receiving and processing time synchronization data packets, while the single-chip microcomputer 120 is responsible for complex calculation and control tasks. This division of labor not only simplifies the system structure, but also improves the overall performance and reliability.
[0095] Specifically, the second UWB module 130, as a dedicated communication interface, can efficiently receive the time synchronization data packet from the base station 200. It extracts key time information, including the base station sending timestamp and the local timestamp. These timestamps are the basic data for subsequent time synchronization calculations.
[0096] The single-chip microcomputer 120, as the control core, receives the time information from the second UWB module 130 and performs the calculation of the clock difference rate. This calculation process involves complex mathematical operations and needs to consider data at multiple time points. By accurately calculating the clock difference rate, the single-chip microcomputer 120 can accurately convert the local timestamp into a reference timestamp consistent with the base station 200. This conversion process is a key step in achieving high-precision synchronization of multiple cameras 110.
[0097] Based on the converted reference timestamp, the microcontroller 120 can accurately control the photo-taking timing of the camera 110. This ensures that all cameras 110 in the system can capture images at the same time point, thereby achieving true synchronous shooting.
[0098] This modular design brings many advantages. First, the maintainability of the system is improved. If a different model of the single-chip microcomputer 120 needs to be replaced, only the corresponding module needs to be replaced without affecting other parts of the entire system. Second, this design enhances the scalability of the system. For example, if new functions need to be added in the future, they can be achieved by updating the program of the single-chip microcomputer 120 without affecting the existing functions.
[0099] In addition, separating UWB communication from computing control is also beneficial to improving the stability of the system. The second UWB module 130 can focus on maintaining high-precision time synchronization communication without being disturbed by complex computing tasks. At the same time, the microcontroller 120 can concentrate resources on calculating the clock difference rate and controlling the camera 110, without affecting its performance due to frequent communication tasks.
[0100] In practical applications, this design can also be flexibly adjusted according to specific needs. For example, microcontrollers 120 of different performance levels can be selected to adapt to multi-camera 110 systems of different scales and complexities. For small systems, microcontrollers 120 with lower performance but lower cost can be used; while for large-scale systems with high precision requirements, microcontrollers 120 with higher performance can be selected to handle more complex synchronization algorithms and more camera 110 control tasks.
[0101] In general, the multi-camera synchronous photography system based on the second UWB module 130 and the single-chip microcomputer 120 proposed in the present application not only solves the problems of complex controller structure and inflexible function implementation, but also provides higher system flexibility and scalability while maintaining high-precision synchronization.
[0102] Specifically, the single chip microcomputer 120 includes: A first calculation unit, used for obtaining a base station sending timestamp ST1 when the base station 200 sends a first time synchronization data packet and a base station sending timestamp ST2 when the base station 200 sends a second time synchronization data packet; Calculate the base station sending timestamp interval ΔST between two time synchronization data packets sent by the base station 200, ΔST=ST2-ST1; Obtaining the local timestamp RT1 of the first time synchronization data packet and the local timestamp RT2 of the second time synchronization data packet received by the camera end device 100; Calculate the local timestamp interval ΔRT between two time synchronization data packets received by the camera end device 100, ΔRT=RT2-RT1; Calculate the clock difference ratio Ratio according to the formula Ratio=(ΔST-ΔRT) / ΔST; A second calculation unit is used to obtain a current local timestamp RT of the camera end device 100; The base station reference timestamp ST is calculated according to the formula ST=ST1+(RT-RT1)×(1+Ratio), where: ST1 is the base station sending timestamp when the base station 200 sends the first time synchronization data packet; RT1 is the local timestamp of the camera device 100 receiving the first time synchronization data packet; Ratio is the clock difference ratio.
[0103] Thirdly, refer to Figure 3 The present application also provides an electronic device, including a processor 310 and a memory 320, wherein the memory 320 stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the above method are executed.
[0104] Through the above technical solution, the processor 310 and the memory 320 are interconnected and communicate with each other through a communication bus and / or other forms of connection mechanisms (not marked), and the memory 320 stores computer-readable instructions executable by the processor 310. When the electronic device is running, the processor 310 executes the computer-readable instructions to execute the method in any optional implementation method of the above embodiment to achieve the following functions: obtain a time synchronization data packet sent by the base station, the time synchronization data packet includes a base station sending timestamp; calculate the clock difference rate between the camera-end device and the base station based on the base station sending timestamp and the local timestamp of the camera-end device receiving the time synchronization data packet; according to the clock difference rate, convert the current local timestamp of the camera-end device into a base station reference timestamp; according to the base station reference timestamp, control the camera in the camera-end device to perform a photo-taking operation.
[0105] In a fourth aspect, the present application also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are executed.
[0106] Through the above technical solution, when the computer program is executed by the processor, the method in any optional implementation method of the above embodiments is executed to achieve the following functions: obtain a time synchronization data packet sent by the base station, the time synchronization data packet includes a timestamp sent by the base station; calculate the clock difference rate between the camera-end device and the base station based on the timestamp sent by the base station and the local timestamp of the time synchronization data packet received by the camera-end device; based on the clock difference rate, convert the current local timestamp of the camera-end device into a base station reference timestamp; based on the base station reference timestamp, control the camera in the camera-end device to perform a photo-taking operation.
[0107] Among them, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0108] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0109] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0110] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0111] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0112] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A multi-camera synchronous photography method, characterized in that: include: Acquire a time synchronization data packet sent by a base station, wherein the time synchronization data packet includes a timestamp sent by the base station; Calculate the clock difference rate between the camera end device and the base station according to the timestamp sent by the base station and the local timestamp of the camera end device receiving the time synchronization data packet; According to the clock difference rate, converting the current local timestamp of the camera end device into a base station reference timestamp; According to the base station reference timestamp, the camera in the camera-end device is controlled to perform a photo-taking operation.
2. A multi-camera synchronous photographing method according to claim 1, characterized in that: The step of calculating the clock difference rate between the camera end device and the base station according to the timestamp sent by the base station and the local timestamp of the camera end device receiving the time synchronization data packet comprises: Obtaining a base station sending timestamp ST1 when the base station sends the first time synchronization data packet and a base station sending timestamp ST2 when the base station sends the second time synchronization data packet; Calculate a base station sending timestamp interval ΔST between two time synchronization data packets sent by the base station, ΔST=ST2-ST1; Obtaining a local timestamp RT1 of the first time synchronization data packet received by the camera end device and a local timestamp RT2 of the second time synchronization data packet; Calculate the local timestamp interval ΔRT between two time synchronization data packets received by the camera end device, ΔRT=RT2-RT1; The clock difference ratio Ratio is calculated according to the formula Ratio=(ΔST-ΔRT) / ΔST.
3. A multi-camera synchronous photographing method according to claim 2, characterized in that: The step of converting the current local timestamp of the camera device into a base station reference timestamp according to the clock difference rate comprises: Get the current local timestamp RT of the camera device; The base station reference timestamp ST is calculated according to the formula ST=ST1+(RT-RT1)×(1+Ratio), where: ST1 is the base station sending timestamp when the base station sends the first time synchronization data packet; RT1 is the local timestamp of the camera device receiving the first time synchronization data packet; Ratio is the clock difference ratio.
4. A multi-camera synchronous photographing method according to claim 3, characterized in that: The step of controlling the camera in the camera-end device to perform a photographing operation according to the base station reference timestamp comprises: Adjusting the current local time of the camera device according to the base station reference timestamp, and receiving a time synchronization data packet sent by the base station to recalculate the clock difference rate; When |RT-ST|>preset value, the clock of the camera-end device is set to the calculated ST value, so as to synchronize the time of the camera-end device with the time of the base station, so that all the camera-end devices will use the time of the base station as a reference and control the camera in the camera-end device to perform a photo operation according to the set photo interval.
5. A multi-camera synchronous photography system, characterized in that: include: A base station, configured to send a time synchronization data packet, wherein the time synchronization data packet includes a base station sending timestamp; A plurality of camera-side devices, each of the camera-side devices comprising: Camera, used to perform photo taking tasks; A controller is used to receive the time synchronization data packet and obtain a local timestamp for receiving the time synchronization data packet, calculate a clock difference rate based on the timestamp sent by the base station and the local timestamp for receiving the time synchronization data packet, and convert the current local timestamp of the camera-end device into a base station reference timestamp based on the clock difference rate, and control the camera to perform a photo-taking operation.
6. A multi-camera synchronous photography system according to claim 5, characterized in that: The base station is connected to a first UWB module, the first UWB module is connected to a computer, and the computer is used to control the base station to send the time synchronization data packet through the first UWB module, and monitor all the camera-end devices through the base station.
7. The multi-camera synchronous photography system according to claim 6, characterized in that: The controller comprises: A second UWB module is used to receive the time synchronization data packet sent by the first UWB module, extract the base station sending timestamp in the time synchronization data packet, and generate a local timestamp for receiving the time synchronization data packet; The single chip microcomputer is used to calculate the clock difference rate according to the timestamp sent by the base station and the local timestamp of the time synchronization data packet received, and convert the current local timestamp of the camera end device into the base station reference timestamp according to the clock difference rate, so as to control the camera to perform a photo-taking operation.
8. The multi-camera synchronous photography system according to claim 7, characterized in that: The single chip microcomputer comprises: A first calculation unit, used for obtaining a base station sending timestamp ST1 when the base station sends the first time synchronization data packet and a base station sending timestamp ST2 when the base station sends the second time synchronization data packet; Calculate a base station sending timestamp interval ΔST between two time synchronization data packets sent by the base station, ΔST=ST2-ST1; Obtaining a local timestamp RT1 of the first time synchronization data packet received by the camera end device and a local timestamp RT2 of the second time synchronization data packet; Calculate the local timestamp interval ΔRT between two time synchronization data packets received by the camera end device, ΔRT=RT2-RT1; The clock difference ratio Ratio is calculated according to the formula Ratio=(ΔST-ΔRT) / ΔST; A second calculation unit is used to obtain the current local timestamp RT of the camera end device; The base station reference timestamp ST is calculated according to the formula ST=ST1+(RT-RT1)×(1+Ratio), where: ST1 is the base station sending timestamp when the base station sends the first time synchronization data packet; RT1 is the local timestamp of the camera device receiving the first time synchronization data packet; Ratio is the clock difference ratio.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 4 are executed.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are executed.