Multi-device synchronization method and device and image processing system
By sending a target trigger signal in the image processing system, the master device sends a target trigger signal to reset the frame loop counter of the slave device and calibrates regularly, the problem of image frame aberration caused by synchronization line interference is solved, and the stability and reliability of the system are improved .
Patent Information
- Application Number
- CN202411365030.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-02-14
AI Technical Summary
In an image processing system, the image frames between the master and slave devices are prone to be out of sync due to synchronization line interference, and the prior art lacks effective solutions.
When the count value of the frame loop counter of the master device is a preset value, the master device sends a target trigger signal, resets the frame loop counter of the slave device, and regularly calibrates the frame loop counter of the slave device to ensure that the master and slave device is equipped with a target trigger signal, so as to reset the frame loop counter of the slave device. synchronization.
It effectively solves the problem of image frames of master and slave devices due to synchronization line interference, and improves the stability and reliability of the system.
Smart Images

Figure CN119450131A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a multi-device synchronization method, apparatus and image processing system. Background Art
[0002] In an image processing system, there are usually multiple devices, such as a master device and a slave device. In the process of image processing, synchronization is usually required between the master device and the slave device. Currently, multi-device synchronization is performed by the master device sending a trigger signal based on a synchronization line, and the slave device receives the synchronization signal for triggering. However, when the synchronization line is disturbed, the slave device will lose the trigger signal, resulting in the image frames of the master device and the slave device being out of sync.
[0003] With respect to the problem in the related art that the image frames of the master device and the slave device are out of synchronization when the synchronization line is disturbed, no effective solution has been proposed yet. Summary of the invention
[0004] Based on this, it is necessary to provide a multi-device synchronization method, apparatus and image processing system that can ensure image frame synchronization between a master device and a slave device in order to address the above technical problems.
[0005] In a first aspect, the present application provides a multi-device synchronization method, the method comprising:
[0006] Receive a trigger signal periodically sent by a master device, and detect the trigger signal; wherein, when the count value of the frame cycle counter of the master device is a preset value, the master device sends a target trigger signal to the slave device as the trigger signal;
[0007] When it is detected that the trigger signal is the target trigger signal, frame synchronization processing is performed on the current slave device and the master device; the frame synchronization processing includes setting the value of the frame cycle counter of the slave device of the current frame to be consistent with the value of the frame cycle counter of the master device of the current frame, and the frame cycle counter is used for frame synchronization between the slave device and the master device.
[0008] In one of the embodiments, after the current slave device is frame synchronized with the master device, the method further includes: synchronizing the image frames captured by the current slave device and the image frames captured by the master device according to the value of the frame cycle counter of the current slave device and a preset frame processing strategy.
[0009] In one embodiment, the preset frame processing strategy includes a preset frame loss strategy, and the synchronous processing of the image frame collected by the current slave device and the image frame collected by the master device according to the value of the frame cycle counter of the current slave device and the preset frame processing strategy includes:
[0010] According to the value of the frame cycle counter of the current slave device and a preset frame loss strategy, synchronous frame loss processing is performed on the image frames collected by the current slave device and the image frames collected by the master device.
[0011] In one embodiment, the method further comprises:
[0012] Setting a frame cycle counter of the slave device;
[0013] The frame cycle counter of the slave device is counted according to the frame interval of the image frames collected by the slave device or according to the trigger signal.
[0014] In a second aspect, another multi-device synchronization method is provided in this embodiment, and the method includes:
[0015] Counting the frame cycle counter of the master device according to a preset image frame interval; the preset image frame interval is a frame interval of image frames collected by the master device and / or the slave device;
[0016] periodically sending a trigger signal to the slave device according to a frame cycle counter of the master device;
[0017] In response to a frame synchronization request signal of a control device, when the count value of a frame cycle counter of the master device is a preset value, a target trigger signal is sent to the slave device as the trigger signal; the target trigger signal is used for the slave device to perform frame synchronization processing on the slave device and the master device when the slave device detects that the trigger signal is a target trigger signal.
[0018] In one of the embodiments, after the slave device is frame synchronized with the master device, the method further includes: synchronizing the image frames captured by the master device and the image frames captured by the slave device according to the value of the frame cycle counter of the master device and a preset frame processing strategy.
[0019] In one embodiment, the method further comprises:
[0020] In response to a frame synchronization request signal of a control device, when the count value of a frame cycle counter of the master device is not the preset value, a regular trigger signal is sent to the slave device as the trigger signal; wherein the regular trigger signal has a different pulse number or pulse width from the target trigger signal.
[0021] In a third aspect, a multi-device synchronization apparatus is provided in this embodiment, and the apparatus includes:
[0022] A trigger signal receiving module, used to receive a trigger signal periodically sent by a master device and detect the trigger signal; wherein, when the count value of the frame cycle counter of the master device is a preset value, the master device sends a target trigger signal to the slave device as the trigger signal;
[0023] A frame synchronization processing module is used to perform frame synchronization processing on the current slave device and the master device when it is detected that the trigger signal is a target trigger signal; the frame synchronization processing includes setting the value of the frame cycle counter of the slave device of the current frame to be consistent with the value of the frame cycle counter of the master device of the current frame and then performing frame counting, and the frame cycle counter is used for frame synchronization between the slave device and the master device.
[0024] In a fourth aspect, another multi-device synchronization apparatus is provided in this embodiment, the apparatus comprising:
[0025] A counting module, used for counting the frame cycle counter of the master device according to a preset image frame interval; the preset image frame interval is a frame interval of image frames collected by the master device and / or the slave device;
[0026] A trigger signal sending module, used for periodically sending a trigger signal to the slave device according to the frame cycle counter of the master device;
[0027] A target trigger signal sending module is used to respond to a frame synchronization request signal of a control device and send a target trigger signal to the slave device as the trigger signal when the count value of the frame cycle counter of the master device is a preset value; the target trigger signal is used for the slave device to perform frame synchronization processing on the slave device and the master device when the slave device detects that the trigger signal is a target trigger signal.
[0028] In a fifth aspect, an image processing system is provided in this embodiment, the system comprising: a control device, a master device and a plurality of slave devices, the control device is connected to the master device and the plurality of slave devices respectively, and the master device is connected to the plurality of slave devices respectively;
[0029] The control device is used to send a frame synchronization request signal and a preset frame processing strategy to the master device, and send the preset frame processing strategy to the multiple slave devices;
[0030] The master device is used to execute the multi-device synchronization method described in the second aspect above;
[0031] The multiple slave devices are used to execute the multi-device synchronization method described in the first aspect above.
[0032] The above-mentioned multi-device synchronization method, device and image processing system are derived through the technical features in the patent. When the count value of the frame cycle counter of the master device is a preset value, the master device sends a target trigger signal to reset the value of the frame cycle counter of the slave device, and regularly calibrates the frame cycle counter of the slave device to ensure the synchronization of the master and slave devices, thereby solving the problem of the image frames of the master device and the slave device being out of synchronization when the synchronization line is disturbed in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is a structural block diagram of an image processing system in one embodiment;
[0034] Figure 2 is a structural block diagram of a multi-device synchronization device (master device) in one embodiment;
[0035] Figure 3 A schematic diagram of a flow chart of a multi-device synchronization method running on a master device in one embodiment;
[0036] Figure 4 A schematic diagram of a master device frame counting cycle and a slave device frame counting cycle in one embodiment;
[0037] Figure 5 It is a structural block diagram of a multi-device synchronization apparatus (slave device) in another embodiment;
[0038] Figure 6 A schematic diagram of a flow chart of a multi-device synchronization method running on a slave device in one embodiment;
[0039] Figure 7 A schematic diagram of a flow chart of a multi-device synchronization method running on a slave device in another embodiment;
[0040] Figure 8 The figure is a hardware structure block diagram of a terminal of a multi-device synchronization method in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0043] The tracking and scanning system has multiple devices, namely a master device and multiple slave devices. At present, in the synchronization line of multiple device synchronization, the master device sends a trigger signal, and the slave device receives the synchronization signal for triggering. When two devices need to actively synchronize frame dropping to match different bandwidth requirements, multiple devices each perform cyclic counting on different frames, so that multiple devices can simultaneously drop frames with the same number to ensure synchronization. At present, the process of cyclic counting by multiple devices is open-loop and without feedback. It is possible that due to interference and other factors, the slave device does not receive the trigger signal, which causes the synchronization counting number misalignment problem between multiple devices.
[0044] Based on the analysis of the above problems, in one embodiment, Figure 1 An image processing system is provided, such as Figure 1 As shown, the system includes: a control device 1, a master device 2 and multiple slave devices 3, the control device 1 is connected to the master device 2 and the multiple slave devices 3 respectively, and the master device 2 is connected to the multiple slave devices 3 respectively; wherein the control device 1 is used to send a frame synchronization request signal and a preset frame processing strategy to the master device 2, and send a preset frame processing strategy to the multiple slave devices 3; the master device 2 is used to execute the following Figure 3 The multi-device synchronization method shown; multiple slave devices 3 are used to perform the following Figure 6 The multi-device synchronization method shown.
[0045] The image processing system of this embodiment can be used in scenarios that require multiple devices to work together, such as a tracking and scanning system, a video surveillance system, a large-scale image recognition system, or a multi-camera real-time stitching system.
[0046] Control device 1, as the command center of the entire system, is responsible for coordinating the work of each device. It sends a frame synchronization request signal and a preset frame processing strategy to the master device 2, and also sends these strategies to each slave device 3. This setting ensures that all devices operate in accordance with unified rules.
[0047] The master device 2, as the center of the system, receives the frame synchronization request signal and processing strategy from the control device 1, and executes the corresponding synchronization method according to the information. Taking the tracking and scanning system as an example, the master device 2 can be a tracking head.
[0048] Multiple slave devices 3 are distributed at different acquisition points or processing nodes. They communicate directly with the master device 2 and execute the frame processing strategy issued by the control device 1. Each slave device 3 can undertake different tasks. Taking the tracking and scanning system as an example, the slave device 3 can be a scanning head or a tracking head.
[0049] The master device 2 and the slave device 3 of this embodiment are introduced below respectively.
[0050] In one embodiment, Figure 2 A multi-device synchronization device is provided. The multi-device synchronization device is a master device 2 and includes: a counting module 21 , a trigger signal sending module 22 and a target trigger signal sending module 23 .
[0051] The counting module 21 is used to count the frame cycle counter of the master device 2 according to a preset image frame interval; the preset image frame interval is the frame interval of the image frames collected by the master device 2 and / or the slave device 3.
[0052] The counting module 21 ensures that the master device 2 counts at a predetermined time interval, thereby maintaining a stable counting frequency.
[0053] The trigger signal sending module 22 is used to periodically send a trigger signal to the slave device 3 according to the frame cycle counter of the master device 2.
[0054] The trigger signal sending module 22 maintains synchronization between the slave device 3 and the master device 2 through periodic trigger signals, ensuring that the two perform the same operation at the same time point.
[0055] The target trigger signal sending module 23 is used to respond to the frame synchronization request signal of the control device 1, and when the count value of the frame cycle counter of the master device 2 is a preset value, send a target trigger signal to the slave device 3 as a trigger signal; the target trigger signal is used for the slave device 3 to perform frame synchronization processing on the slave device 3 and the master device 2 when the slave device 3 detects that the trigger signal is a target trigger signal.
[0056] Among them, the target trigger signal sending module 23, when it receives the frame synchronization request signal of the control device 1 and the count value of the frame cycle counter of the master device 2 reaches the preset value, sends the target trigger signal to the slave device 3. The target trigger signal is a special signal used to trigger the slave device 3 to perform frame synchronization processing under specific conditions (for example, when the count value reaches the preset value). When the slave device 3 detects the target trigger signal, it resets its own frame cycle counter to ensure synchronization with the master device 2.
[0057] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0058] Figure 3 A multi-device synchronization method running on a master device 2 is provided, the method comprising the following steps:
[0059] Step S101 , counting the frame cycle counter of the master device 2 according to a preset image frame interval; the preset image frame interval is the frame interval of image frames collected by the master device 2 and / or the slave device 3 .
[0060] In this step, the frame cycle counter of the master device 2 is counted according to the preset image frame interval, so as to ensure that the master device 2 counts according to the preset time interval, thereby maintaining a stable counting frequency.
[0061] Step S102 : periodically sending a trigger signal to the slave device 3 according to the frame cycle counter of the master device 2 .
[0062] In this step, the synchronization between the slave device 3 and the master device 2 is maintained through a periodic trigger signal to ensure that the two perform the same operation at the same time point.
[0063] Step S103, in response to the frame synchronization request signal of the control device 1, when the count value of the frame cycle counter of the master device 2 is a preset value, a target trigger signal is sent to the slave device 3 as a trigger signal; the target trigger signal is used for the slave device 3 to perform frame synchronization processing on the slave device 3 and the master device 2 when the slave device 3 detects that the trigger signal is a target trigger signal.
[0064] In this step, when the master device 2 receives the frame synchronization request signal from the control device 1 and the count value of the frame cycle counter of the master device 2 reaches the preset value, the master device 2 sends a target trigger signal to the slave device 3. The target trigger signal can be a special signal used to trigger the slave device 3 to perform frame synchronization processing under specific conditions (for example, when the count value reaches the preset value). When the slave device 3 detects the target trigger signal, it resets its own frame cycle counter to ensure synchronization with the master device 2.
[0065] In this embodiment, currently, each device will count all image frames in a loop starting from the first frame. By default, the loop counts of all devices are synchronized. When the active synchronous frame loss mechanism needs to be enabled, it is only necessary to configure multiple devices to determine which counted frames need to be lost and which need to be retained. However, when the device synchronization line is disturbed, slave device 3 may lose one or more pulses. At this time, the loop count inside slave device 3 will be out of sync with master device 2. Therefore, it is necessary to calibrate the count of slave device 3 regularly to ensure the synchronization of master and slave devices 3 and improve the robustness of the system.
[0066] In the above steps S102 to S103, when the count value of the frame cycle counter of the master device 2 reaches a preset value, the master device 2 sends a target trigger signal to reset the value of the frame cycle counter of the slave device 3, and the frame cycle counter of the slave device 3 is calibrated regularly to ensure the synchronization of the master and slave devices 3, thereby solving the problem in the related technology that the image frames of the master device 2 and the slave device 3 are out of synchronization when the synchronization line is disturbed, thereby improving the stability and reliability of the system.
[0067] In one embodiment, after the slave device 3 is frame synchronized with the master device 2, the master device 2 will also synchronize the image frames captured by the master device 2 and the image frames captured by the slave device 3 according to the value of the frame cycle counter of the master device 2 and the preset frame processing strategy.
[0068] In this embodiment, Figure 4 A schematic diagram of the master device frame count cycle and the slave device frame count cycle is provided, such as Figure 4 As shown, the master device 2 can calibrate the slave device 3 at the beginning of the frame counting cycle. For example, a total of 100 frames are currently recorded as one cycle, that is, the frame count is in the 0-99 cycle, then the master device 2 sends a calibration signal to the slave device 3 when the counting cycle is 0.
[0069] In one embodiment, the master device 2 will also respond to the frame synchronization request signal of the control device 1, and when the count value of the frame cycle counter of the master device 2 is not a preset value, send a regular trigger signal to the slave device 3 as a trigger signal; wherein the regular trigger signal has a different number of pulses or pulse width from the target trigger signal.
[0070] In this embodiment, the conventional trigger signal refers to a trigger signal that the master device 2 periodically sends to the slave device 3 under normal working conditions. This signal is mainly used to maintain the basic synchronization state of the slave device 3. The conventional trigger signal has a fixed number of pulses or pulse width. For example, the conventional trigger signal is a pulse width signal of 100 microseconds (us), corresponding to a shooting rate of 100 frames per second (fps). The conventional trigger signal is sent at a fixed frequency to maintain the basic synchronization of the slave device 3.
[0071] The target trigger signal refers to a special trigger signal (also called a special pulse) sent by the master device 2 to the slave device 3 under certain conditions. This signal is used to perform synchronization calibration to ensure accurate synchronization between the slave device 3 and the master device 2. The target trigger signal has a different number of pulses or pulse widths so that the slave device 3 can recognize that this is a special signal. For example, the target trigger signal is a 200 microsecond (us) pulse width signal. When the slave device 3 receives the target trigger signal, it will perform specific synchronization calibration operations, such as clearing and resetting its frame cycle counter to ensure synchronization with the master device 2.
[0072] In this embodiment, the target trigger signal can be synchronized and calibrated in the following two ways.
[0073] (1) Synchronous calibration is achieved by increasing the pulse width of the trigger signal. If the regular trigger signal sent by the master device 2 is a 100us pulse width signal (regular shooting, 100 frames / s), the special pulse can be a 200us pulse width signal. When the slave device 3 recognizes a signal with a 200us pulse width, it is considered that the calibration signal has been received, and the internal counting cycle can be cleared and reset to achieve calibration of synchronous counting with the master device 2; if frames are lost during signal transmission, the frame rate can be reduced, the bandwidth can be reduced, and the working conditions can be ensured to be consistent, so that the system is stable and the heat is balanced. Among them, if the PC triggers frame loss, the corresponding code is selected to determine which frames are lost.
[0074] (2) Synchronous calibration is achieved by using a pulse signal in a simple coded form. If the trigger signal sent by the master device 2 is in units of 100us, the conventional trigger signal sent by the master device 2 is a single 100us high level signal, and the calibration signal can be a 100us high level, a 100us low level, and a 100us high level. When the slave device 3 detects a high, low, and high signal in units of 100us, it is considered that the calibration signal has been received. At the same time, this method can realize the transmission of a variety of special signals. In addition to the counting cycle calibration signal, the laser polling position calibration signal can also be transmitted.
[0075] In this embodiment, the slave device 3 can distinguish between the conventional trigger signal and the target trigger signal through different pulse widths or coding forms, and perform corresponding operations according to the type of received signal. This ensures that even if interference or frame loss occurs during signal transmission, the system can still perform regular calibration through the target trigger signal, thereby maintaining synchronization between the master device 2 and the slave device 3.
[0076] In one embodiment, Figure 5 A multi-device synchronization device is provided. The multi-device synchronization device is a slave device 3 , which includes: a trigger signal receiving module 31 and a frame synchronization processing module 32 .
[0077] The trigger signal receiving module 31 is used to receive the trigger signal periodically sent by the master device 2 and detect the trigger signal; wherein, when the count value of the frame cycle counter of the master device 2 is a preset value, the master device 2 sends a target trigger signal to the slave device 3 as a trigger signal.
[0078] The trigger signal receiving module 31 receives the trigger signals periodically sent by the master device 2 and detects these trigger signals so that the slave device 3 can identify the target trigger signal and perform corresponding synchronization operations accordingly.
[0079] The frame synchronization processing module 32 is used to perform frame synchronization processing on the current slave device 3 and the master device 2 when the trigger signal is detected to be the target trigger signal; the frame synchronization processing includes setting the value of the frame cycle counter of the slave device 3 of the current frame to be consistent with the value of the frame cycle counter of the master device 2 of the current frame and then performing frame counting, and the frame cycle counter is used for frame synchronization between the slave device 3 and the master device 2.
[0080] When the trigger signal receiving module 31 detects that the trigger signal is the target trigger signal, the frame synchronization processing module 32 performs frame synchronization processing. The synchronization logic is to set the value of the frame cycle counter of the slave device 3 to be consistent with the value of the frame cycle counter of the master device 2, and then continue to count the frames. In this way, it is ensured that the frame cycle counter of the slave device 3 is consistent with the master device 2, thereby achieving frame synchronization between the two.
[0081] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0082] Figure 6 A multi-device synchronization method running on a slave device 3 is provided, the method comprising the following steps:
[0083] Step S201, receiving the trigger signal periodically sent by the master device 2, and detecting the trigger signal; wherein, when the count value of the frame cycle counter of the master device 2 is a preset value, the master device 2 sends a target trigger signal to the slave device 3 as a trigger signal.
[0084] In this step, the slave device 3 receives the trigger signals periodically sent by the master device 2. These trigger signals are periodically sent by the master device 2 according to the value of its frame cycle counter. The slave device 3 detects the received trigger signal to determine whether it is a target trigger signal. The target trigger signal is a special signal sent when the count value of the frame cycle counter of the master device 2 reaches a preset value.
[0085] Step S202, when it is detected that the trigger signal is the target trigger signal, frame synchronization processing is performed on the current slave device 3 and the master device 2; the frame synchronization processing includes setting the value of the frame cycle counter of the slave device 3 of the current frame to be consistent with the value of the frame cycle counter of the master device 2 of the current frame, and the frame cycle counter is used for frame synchronization between the slave device 3 and the master device 2.
[0086] In this step, if the slave device 3 detects that the received trigger signal is the target trigger signal, it proceeds to the next step for frame synchronization processing. By setting the value of the frame cycle counter of the slave device 3 to be consistent with the value of the frame cycle counter of the master device 2, the slave device 3 will resynchronize its frame count to be consistent with the master device 2.
[0087] In this embodiment, currently, each device will count all image frames in a loop starting from the first frame. By default, the loop counts of all devices are synchronized. When the active synchronous frame loss mechanism needs to be enabled, it is only necessary to configure multiple devices to determine which counted frames need to be lost and which need to be retained. However, when the device synchronization line is disturbed, slave device 3 may lose one or more pulses. At this time, the loop count inside slave device 3 will be out of sync with master device 2. Therefore, it is necessary to calibrate the count of slave device 3 regularly to ensure the synchronization of master and slave devices 3 and improve the robustness of the system.
[0088] In the above steps, when the count value of the frame cycle counter of the master device 2 reaches a preset value, the master device 2 sends a target trigger signal to reset the value of the frame cycle counter of the slave device 3, and the frame cycle counter of the slave device 3 is calibrated regularly to ensure the synchronization of the master and slave devices 3, thereby solving the problem in the related technology that the image frames of the master device 2 and the slave device 3 are out of synchronization when the synchronization line is disturbed.
[0089] In one embodiment, after the current slave device 3 is frame synchronized with the master device 2, the slave device 3 will also synchronize the image frames currently captured by the slave device 3 and the image frames captured by the master device 2 according to the value of the frame cycle counter of the current slave device 3 and the preset frame processing strategy.
[0090] In this embodiment, the preset frame processing strategy includes a preset frame loss strategy. When the image frame currently captured by the slave device 3 and the image frame captured by the master device 2 are synchronously processed according to the value of the frame cycle counter of the current slave device 3 and the preset frame processing strategy, the slave device 3 performs synchronous frame loss processing on the image frame currently captured by the slave device 3 and the image frame captured by the master device 2 according to the value of the frame cycle counter of the current slave device 3 and the preset frame loss strategy. Specifically, the master device 2 can calibrate the slave device 3 at the start position of the frame counting cycle. For example, if a total of 100 frames are currently recorded as one cycle, that is, the frame count is in the 0-99 cycle, the master device 2 sends a calibration signal to the slave device 3 when the counting cycle is 0.
[0091] In one embodiment, the slave device 3 will also set a frame cycle counter of the slave device 3; the frame cycle counter of the slave device 3 is counted according to the frame interval of the image frame collected by the slave device 3 or according to the trigger signal.
[0092] In this embodiment, the slave device 3 not only receives the trigger signal sent by the master device 2 to perform frame synchronization, but is also responsible for setting and maintaining its own frame cycle counter. Specifically, the slave device 3 will perform frame cycle counting according to the following two methods.
[0093] (1) Counting the frame interval of the image frames collected by the slave device 3. The slave device 3 updates the value of the frame cycle counter according to the time interval of the image frames collected by itself. This method can maintain the basic frame count when the slave device 3 is in autonomous operation or without a trigger signal.
[0094] (2) Counting according to the trigger signal. Slave device 3 updates the value of the frame cycle counter according to the received trigger signal. This method is used to synchronize slave device 3 with master device 2 to ensure that the frame cycle counter of slave device 3 is consistent with that of master device 2.
[0095] Figure 7 Another multi-device synchronization method running on slave device 3 is provided, the method comprising the following steps:
[0096] Step S301, slave device 3 receives a trigger signal periodically sent by master device 2;
[0097] Step S302, the slave device 3 detects the received trigger signal to determine whether it is a target trigger signal;
[0098] Step S303: if the slave device 3 detects that the received trigger signal is a target trigger signal, the next step is to perform frame synchronization processing;
[0099] Step S304, setting the value of the frame cycle counter of the slave device 3 to be consistent with the value of the frame cycle counter of the master device 2;
[0100] Step S305, setting and maintaining the frame cycle counter of slave device 3;
[0101] Step S306, slave device 3 sets an initial value as the starting point of the frame cycle counter;
[0102] Step S307: When no trigger signal is received, the slave device 3 updates the value of the frame cycle counter according to the time interval for capturing image frames by itself.
[0103] Step S308: Whenever receiving a trigger signal sent by the master device 2, the slave device 3 will update the value of the frame cycle counter according to the trigger signal. If a target trigger signal is received, frame synchronization processing is performed to set the frame cycle counter value of the slave device 3 to be consistent with that of the master device 2.
[0104] In this embodiment, by combining the image frame interval and the trigger signal, the slave device 3 can maintain the accuracy of the frame count in many cases. Even if the trigger signal cannot be received in some cases, the slave device 3 can still maintain the basic frame count according to its own image frame interval. By periodically receiving the target trigger signal and performing frame synchronization processing according to these signals, the slave device 3 can ensure that it maintains a long-term synchronization state with the master device 2.
[0105] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0106] In one embodiment, the multi-device synchronization method can be executed in a terminal, a computer or a similar computing device, and the master device or the slave device can be a terminal, a computer or a similar computing device. For example, when the method is executed on a terminal, Figure 8 1 is a hardware structure block diagram of a terminal of a multi-device synchronization method according to an embodiment of the present application. Figure 8 As shown, the terminal may include one or more ( Figure 8 Only one is shown in the figure) processor 101 and memory 102 for storing data, wherein processor 101 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 103 and an input and output device 104 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 8 More or fewer components as shown, or with Figure 8 Different configurations shown.
[0107] The memory 102 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the multi-device synchronization method in the present embodiment. The processor 101 executes various functional applications and data processing by running the computer program stored in the memory 102, that is, to implement the above method. The memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 102 may further include a memory remotely arranged relative to the processor 101, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0108] The transmission device 103 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 103 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 103 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0111] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0112] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A multi-device synchronization method, characterized in that: The method comprises: Receive a trigger signal periodically sent by a master device, and detect the trigger signal; wherein, when the count value of the frame cycle counter of the master device is a preset value, the master device sends a target trigger signal to the slave device as the trigger signal; When it is detected that the trigger signal is the target trigger signal, frame synchronization processing is performed on the current slave device and the master device; the frame synchronization processing includes setting the value of the frame cycle counter of the slave device of the current frame to be consistent with the value of the frame cycle counter of the master device of the current frame, and the frame cycle counter is used for frame synchronization between the slave device and the master device.
2. The multi-device synchronization method according to claim 1, characterized in that: After the current slave device is frame synchronized with the master device, the method further includes: synchronizing the image frames captured by the current slave device and the image frames captured by the master device according to the value of the frame cycle counter of the current slave device and a preset frame processing strategy.
3. The multi-device synchronization method according to claim 2, characterized in that: The preset frame processing strategy includes a preset frame loss strategy, and the synchronous processing of the image frame collected by the current slave device and the image frame collected by the master device according to the value of the frame cycle counter of the current slave device and the preset frame processing strategy includes: According to the value of the frame cycle counter of the current slave device and a preset frame loss strategy, synchronous frame loss processing is performed on the image frames collected by the current slave device and the image frames collected by the master device.
4. The multi-device synchronization method according to claim 1, characterized in that: The method further comprises: Setting a frame cycle counter of the slave device; The frame cycle counter of the slave device is counted according to the frame interval of the image frames collected by the slave device or according to the trigger signal.
5. A multi-device synchronization method, characterized in that: The method comprises: Counting the frame cycle counter of the master device according to a preset image frame interval; the preset image frame interval is a frame interval of image frames collected by the master device and / or the slave device; periodically sending a trigger signal to the slave device according to a frame cycle counter of the master device; In response to a frame synchronization request signal of a control device, when the count value of a frame cycle counter of the master device is a preset value, a target trigger signal is sent to the slave device as the trigger signal; the target trigger signal is used for the slave device to perform frame synchronization processing on the slave device and the master device when the slave device detects that the trigger signal is a target trigger signal.
6. The multi-device synchronization method according to claim 5, characterized in that: After the slave device is frame synchronized with the master device, the method further includes: performing synchronization processing on the image frames collected by the master device and the image frames collected by the slave device according to the value of the frame cycle counter of the master device and a preset frame processing strategy.
7. The multi-device synchronization method according to claim 5, characterized in that: The method further comprises: In response to a frame synchronization request signal of a control device, when the count value of a frame cycle counter of the master device is not the preset value, a regular trigger signal is sent to the slave device as the trigger signal; wherein the regular trigger signal has a different pulse number or pulse width from the target trigger signal.
8. A multi-device synchronization device, characterized in that: The device comprises: A trigger signal receiving module, used to receive a trigger signal periodically sent by a master device and detect the trigger signal; wherein, when the count value of the frame cycle counter of the master device is a preset value, the master device sends a target trigger signal to the slave device as the trigger signal; A frame synchronization processing module is used to perform frame synchronization processing on the current slave device and the master device when it is detected that the trigger signal is a target trigger signal; the frame synchronization processing includes setting the value of the frame cycle counter of the slave device of the current frame to be consistent with the value of the frame cycle counter of the master device of the current frame and then performing frame counting, and the frame cycle counter is used for frame synchronization between the slave device and the master device.
9. A multi-device synchronization device, characterized in that: The device comprises: A counting module, used for counting the frame cycle counter of the master device according to a preset image frame interval; the preset image frame interval is a frame interval of image frames collected by the master device and / or the slave device; A trigger signal sending module, used for periodically sending a trigger signal to the slave device according to the frame cycle counter of the master device; A target trigger signal sending module is used to respond to a frame synchronization request signal of a control device and send a target trigger signal to the slave device as the trigger signal when the count value of the frame cycle counter of the master device is a preset value; the target trigger signal is used for the slave device to perform frame synchronization processing on the slave device and the master device when the slave device detects that the trigger signal is a target trigger signal.
10. An image processing system, characterized in that: The system comprises: a control device, a master device and a plurality of slave devices, wherein the control device is connected to the master device and the plurality of slave devices respectively, and the master device is connected to the plurality of slave devices respectively; The control device is used to send a frame synchronization request signal and a preset frame processing strategy to the master device, and send the preset frame processing strategy to the multiple slave devices; The master device is used to execute the multi-device synchronization method according to any one of claims 5 to 7; The plurality of slave devices are used to execute the multi-device synchronization method according to any one of claims 1 to 4.