Video synchronization method and system for binocular stereo camera visual ranging system

By dividing the camera into main and auxiliary cameras in the binocular stereo camera visual ranging system, and using synchronous capture signals and upper computer processing logic, the problem of image transmission is solved, and the accuracy of ranging analysis is achieved.

CN116233397BActive Publication Date: 2025-04-15STATE GRID JIANGSU ELECTRIC POWER CO LTD CHANGZHOU BRANCH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310179939.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2025-04-15
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

In the binocular visual ranging system, due to the inconsistent data acquisition time of the two cameras, the image transmission is out of synchronization, affecting the accuracy of the ranging analysis.

Method used

By dividing the two cameras of the binocular stereo camera into main and auxiliary cameras, the main camera sends synchronous capture signals to the auxiliary cameras, and combining the processing logic of the upper computer, it ensures that the sampling data of the two cameras are the same frequency and time synchronization, thereby real-time synchronous display of images.

Benefits of technology

It ensures real-time synchronous display of images in the visual ranging system of binocular stereo cameras, and improves the accuracy of ranging analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233397B_ABST
    Figure CN116233397B_ABST
Patent Text Reader

Abstract

The present invention provides a video synchronization method and system for a binocular stereo camera visual ranging system, the video synchronization method comprising the following steps: a host computer establishes a session with a main camera and an auxiliary camera respectively; the main camera encodes the collected data once at a preset time interval after starting data transmission, and packages and sends the data packets to the host computer after encoding, the main camera sends a synchronous capture signal to the auxiliary camera during each encoding, the auxiliary camera encodes the collected data once when receiving the synchronous capture signal, and packages and sends the data packets to the host computer after encoding; after receiving the data packets of the main and auxiliary cameras, the host computer reassembles, restores and decodes the data packets; and performs ranging analysis and display on the decoded data of the main camera and the auxiliary camera in the display buffer. The present invention can ensure that the sampling frequency of the two cameras is the same and the time is synchronized, thereby ensuring the accuracy of ranging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of binocular stereo cameras, and in particular to a video synchronization method of a binocular stereo camera visual ranging system and a video synchronization system of a binocular stereo camera visual ranging system. Background Art

[0002] The binocular vision ranging system is a non-contact measuring device that uses a camera as an image sensor to collect data. It reconstructs the three-dimensional scene world with a two-dimensional projection image, uses two cameras in different positions to shoot the same scene, calculates the parallax of a spatial point in the image, and then uses the parallax to establish an object distance measurement model to obtain the three-dimensional spatial coordinates of the point. Specifically, it is based on the principle of parallax and the principle of triangulation to obtain three-dimensional information, that is, a triangle is formed between the image planes of the two cameras and the object to be measured. Through the positional relationship between the two cameras, the three-dimensional size of the object in the common field of view of the two cameras and the three-dimensional coordinates of the feature points of the spatial object can be obtained. By calculating the pixel parallax values ​​of the measured target in the "left eye" and "right eye", the three-dimensional coordinates of the point can be calculated by calibration parameters. This method is a point-to-point operation. As long as all points on the plane are stored in the corresponding matching points, the corresponding three-dimensional coordinates can be obtained by calculation.

[0003] The camera provides an IP network-based transmission protocol to ensure the quality of audio and video data network transmission as much as possible. Real-time video streams are transmitted over IP networks and adapt to various complex network transmission environments through a combination of multiple protocols. Binocular visual ranging is based on the principle of parallax. The premise is to ensure that the two cameras collect image information of the same observation point at the same time. However, since there are two cameras, the image sensors collect data at different times, and the upper computer software cannot synchronize the images of the two cameras after network transmission, resulting in the display of real-time images being out of sync and the failure of ranging analysis. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a video synchronization method and system for a binocular stereo camera visual ranging system, which can ensure that the sampling frequency and time of two cameras are the same, thereby ensuring the real-time synchronous display of two groups of images and ensuring the accuracy of the ranging of the binocular stereo camera visual ranging system.

[0005] The technical solution adopted by the present invention is as follows:

[0006] A video synchronization method for a binocular stereo camera visual ranging system, in which one camera is a main camera and the other camera is an auxiliary camera, and the video synchronization method comprises the following steps: S1, a host computer establishes a session with the main camera and the auxiliary camera respectively, and sends a data transmission instruction to the main camera and the auxiliary camera respectively to start the data transmission of the main camera and the auxiliary camera; S2, after starting the data transmission, the main camera encodes the collected data once at a preset time interval, and after encoding, the data packet is packaged and sent to the host computer, the main camera sends a synchronous capture signal to the auxiliary camera during each encoding, and the auxiliary camera encodes the collected data once when receiving the synchronous capture signal, and after encoding, the data packet is packaged and sent to the host computer, wherein the time when the main camera sends the synchronous capture signal to the auxiliary camera is used as the timestamp of the corresponding data packet; S3, the host computer receives the synchronous capture signal and sends the data packet to the host computer. After receiving the data packet of the auxiliary camera, the upper computer reassembles, restores and decodes the data packet of the main camera. After decoding, it is determined whether the current time exceeds the preset display time. If the current time does not exceed the preset display time, the decoded data of the main camera is placed in the display buffer; S4, after receiving the data packet of the auxiliary camera, the upper computer reassembles, restores and decodes the data packet of the auxiliary camera. After decoding, it reads the timestamp of the first frame in the display buffer, and determines whether the timestamp of the first frame is less than the timestamp of the current data. If the timestamp of the first frame is not less than the timestamp of the current data, the decoded data of the auxiliary camera is placed in the display buffer; S5, sorting the data in the display buffer according to the timestamp; S6, when the preset display time is reached, it is determined whether the decoded data of the main camera and the auxiliary camera in the display buffer are complete. If they are complete, the decoded data of the main camera and the auxiliary camera in the display buffer are analyzed and displayed for ranging.

[0007] In step S1, the host computer establishes sessions with the main camera and the auxiliary camera respectively through the RTSP protocol, wherein after establishing the session with the main camera, the host computer then establishes a session with the auxiliary camera, and after establishing sessions with both the main camera and the auxiliary camera, the host computer sends data transmission instructions to the main camera and the auxiliary camera respectively to start data transmission between the main camera and the auxiliary camera.

[0008] The preset time interval is 50ms.

[0009] In step S2, the main camera and the auxiliary camera both perform RTP packetization and send the data packets to the host computer through the TCP protocol.

[0010] A video synchronization system of a binocular stereo camera visual ranging system, comprising a main camera, an auxiliary camera and a host computer, wherein the host computer establishes sessions with the main camera and the auxiliary camera respectively, and sends data transmission instructions to the main camera and the auxiliary camera respectively to start data transmission between the main camera and the auxiliary camera; the main camera encodes the collected data once at a preset time interval after starting data transmission, and packages the data packets after encoding and sends them to the host computer, the main camera sends a synchronous capture signal to the auxiliary camera during each encoding, the auxiliary camera encodes the collected data once when receiving the synchronous capture signal, and packages the data packets after encoding and sends them to the host computer, wherein the time when the main camera sends the synchronous capture signal to the auxiliary camera is used as the timestamp of the corresponding data packet; after receiving the data packet from the main camera, the host computer The host computer reorganizes, restores and decodes the data packet of the auxiliary camera, and after decoding, determines whether the current time exceeds the preset display time. If the current time does not exceed the preset display time, the decoded data of the main camera is placed in the display buffer. After receiving the data packet of the auxiliary camera, the host computer reorganizes, restores and decodes the data packet of the auxiliary camera. After decoding, the timestamp of the first frame in the display buffer is read, and determines whether the timestamp of the first frame is less than the timestamp of the current data. If the timestamp of the first frame is not less than the timestamp of the current data, the decoded data of the auxiliary camera is placed in the display buffer. The host computer sorts the data in the display buffer according to the timestamp. When the preset display time is reached, the host computer determines whether the decoded data of the main camera and the auxiliary camera in the display buffer are complete. If they are complete, the decoded data of the main camera and the auxiliary camera in the display buffer are analyzed and displayed for ranging.

[0011] The host computer establishes sessions with the main camera and the auxiliary camera respectively through the RTSP protocol, wherein after establishing the session with the main camera, the host computer then establishes a session with the auxiliary camera, and after establishing sessions with both the main camera and the auxiliary camera, the host computer sends data transmission instructions to the main camera and the auxiliary camera respectively to start data transmission between the main camera and the auxiliary camera.

[0012] The preset time interval is 50ms.

[0013] The main camera and the auxiliary camera both perform RTP packet grouping and send the data packets to the host computer via the TCP protocol.

[0014] Beneficial effects of the present invention:

[0015] The present invention divides the two cameras of a binocular stereo camera into a main camera and an auxiliary camera respectively, and the main camera sends a synchronous capture signal to the auxiliary camera, and combines the processing logic of a host computer before and after this, so as to ensure that the sampling frequency and time of the two cameras are the same, thereby ensuring the real-time synchronous display of the two groups of images and ensuring the ranging accuracy of the binocular stereo camera visual ranging system. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of a video synchronization method of a binocular stereo camera visual ranging system according to an embodiment of the present invention;

[0017] Figure 2 A flowchart of establishing a session between a host computer and a primary and secondary camera according to an embodiment of the present invention;

[0018] Figure 3 This is a flow chart of the main and auxiliary cameras collecting and transmitting data and the host computer processing data according to an embodiment of the present invention;

[0019] Figure 4 The block diagram of the video synchronization system of the binocular stereo camera visual ranging system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] like Figure 1 As shown, the video synchronization method of the binocular stereo camera visual ranging system according to the embodiment of the present invention comprises the following steps:

[0022] S1, the host computer establishes sessions with the main camera and the auxiliary camera respectively, and sends data transmission instructions to the main camera and the auxiliary camera respectively to start data transmission between the main camera and the auxiliary camera.

[0023] In an embodiment of the present invention, one camera in the binocular stereo camera visual ranging system is called a main camera, the image sensor of the camera is called a main image sensor, and the controller that controls the main image sensor is called a main control; another camera in the binocular stereo camera visual ranging system is called an auxiliary camera, the image sensor of the camera is called an auxiliary image sensor, and the controller that controls the auxiliary image sensor is called an auxiliary control.

[0024] Step S1 is executed by the host computer. The host computer establishes sessions with the main camera and the auxiliary camera respectively through the RTSP protocol, and agrees that the timestamp start time of the two sessions starts from 0. After establishing the session with the main camera, the host computer establishes a session with the auxiliary camera. After establishing the sessions with both the main camera and the auxiliary camera, the host computer sends data transmission instructions to the main camera and the auxiliary camera respectively to start data transmission between the main camera and the auxiliary camera. Specifically, Figure 2 As shown, after starting the method of the embodiment of the present invention, the host computer interacts with the main camera through the RTSP protocol, and interacts with the auxiliary camera through the RTSP protocol. After establishing the main camera session, it is determined whether the auxiliary camera session is established. If the auxiliary camera session is not established, wait for the auxiliary camera session to be established. If the auxiliary camera session is established, that is, after both the main camera session and the auxiliary camera session are established, the main camera data transmission is started. After interacting with the auxiliary camera through the RTSP protocol, it is determined whether the main camera session is established. If the main camera session is not established, wait for the main camera session to be established. If the main camera session is established, establish the auxiliary camera session, and then after both the main camera session and the auxiliary camera session are established, the auxiliary camera data transmission is started.

[0025] S2, after starting data transmission, the main camera encodes the collected data once at a preset time interval, and packages it after encoding and sends the data packet to the host computer. The main camera sends a synchronous capture signal to the auxiliary camera during each encoding. When the auxiliary camera receives the synchronous capture signal, it encodes the collected data once, and packages it after encoding and sends the data packet to the host computer. The time when the main camera sends the synchronous capture signal to the auxiliary camera is used as the timestamp of the corresponding data packet.

[0026] Step S2 is performed by the main camera and the auxiliary camera. The specific execution process of the main camera and the auxiliary camera is as follows: Figure 3 As shown. In a specific embodiment of the present invention, the preset time interval is 50ms. Both the main camera and the auxiliary camera perform RTP packet grouping and send the data packet to the host computer through the TCP protocol. The synchronous capture signal is a level signal. According to the synchronous capture signal, the data collection and encoding of the auxiliary camera can be consistent with the main camera.

[0027] S3, after receiving the data packet of the main camera, the upper computer reassembles, restores and decodes the data packet of the main camera. After decoding, it determines whether the current time exceeds the preset display time. If the current time does not exceed the preset display time, the decoded data of the main camera is placed in the display buffer.

[0028] S4, after receiving the data packet of the auxiliary camera, the upper computer reassembles, restores and decodes the data packet of the auxiliary camera. After decoding, it reads the timestamp of the first frame in the display buffer and determines whether the timestamp of the first frame is less than the timestamp of the current data. If the timestamp of the first frame is not less than the timestamp of the current data, the decoded data of the auxiliary camera is placed in the display buffer.

[0029] S5, sorting the data in the display buffer according to the timestamp.

[0030] S6, when the preset display time is reached, determine whether the decoded data of the main camera and the auxiliary camera in the display buffer are complete, and if complete, perform ranging analysis and display on the decoded data of the main camera and the auxiliary camera in the display buffer.

[0031] Steps S3 to S6 are executed by the host computer, and the specific execution process is as follows: Figure 3 As shown. In step S3, if the current time exceeds the preset display time, the data of the main camera is discarded; in step S4, if the timestamp of the first frame is less than the timestamp of the current data, the data of the auxiliary camera is discarded. In step S5, the data is sorted according to the time sequence of the timestamps. In step S6, if the decoded data of the main camera and the auxiliary camera in the display buffer are incomplete, the decoded data of the main camera and the auxiliary camera in the display buffer are discarded.

[0032] According to the video synchronization method of the binocular stereo camera visual ranging system of the embodiment of the present invention, by dividing the two cameras of the binocular stereo camera into a main camera and an auxiliary camera respectively, the main camera sends a synchronous capture signal to the auxiliary camera, and combined with the processing logic of the host computer before and after this, it can be ensured that the sampling frequency and time of the two cameras are the same, thereby ensuring the real-time synchronous display of the two groups of images and ensuring the accuracy of the ranging of the binocular stereo camera visual ranging system.

[0033] Corresponding to the video synchronization method of the binocular stereo camera visual ranging system of the above embodiment, the present invention also proposes a video synchronization system of the binocular stereo camera visual ranging system.

[0034] like Figure 4As shown, the video synchronization system of the binocular stereo camera visual ranging system of the embodiment of the present invention includes a main camera 10, an auxiliary camera 20 and a host computer 30. The host computer 30 establishes a session with the main camera 10 and the auxiliary camera 20 respectively, and sends a data transmission instruction to the main camera 10 and the auxiliary camera 20 respectively to start the data transmission of the main camera 10 and the auxiliary camera 20. After starting the data transmission, the main camera 10 encodes the collected data once at a preset time interval, and after encoding, it packages and sends the data packet to the host computer 30. The main camera 10 sends a synchronous capture signal to the auxiliary camera 20 during each encoding. When the auxiliary camera 20 receives the synchronous capture signal, it encodes the collected data once, and after encoding, it packages and sends the data packet to the host computer 30, wherein the time when the main camera 10 sends the synchronous capture signal to the auxiliary camera 20 is used as the timestamp of the corresponding data packet. After receiving the data packet from the main camera 10, the upper computer 30 reassembles, restores and decodes the data packet of the main camera 10. After decoding, it determines whether the current time exceeds the preset display time. If the current time does not exceed the preset display time, the decoded data of the main camera 10 is placed in the display buffer. After receiving the data packet from the auxiliary camera 20, the upper computer 30 reassembles, restores and decodes the data packet of the auxiliary camera 20. After decoding, it reads the timestamp of the first frame in the display buffer and determines whether the timestamp of the first frame is less than the timestamp of the current data. If the timestamp of the first frame is not less than the timestamp of the current data, the decoded data of the auxiliary camera 20 is placed in the display buffer. The upper computer 30 sorts the data in the display buffer according to the timestamp. When the preset display time is reached, the upper computer 30 determines whether the decoded data of the main camera 10 and the auxiliary camera 20 in the display buffer are complete. If they are complete, the decoded data of the main camera 10 and the auxiliary camera 20 in the display buffer are analyzed and displayed for ranging.

[0035] In one embodiment of the present invention, the host computer 30 establishes sessions with the main camera 10 and the auxiliary camera 20 respectively through the RTSP protocol, wherein after establishing the session with the main camera 10, the host computer 30 then establishes a session with the auxiliary camera 20, and after establishing sessions with both the main camera 10 and the auxiliary camera 20, the host computer 30 sends data transmission instructions to the main camera 10 and the auxiliary camera 20 respectively to start data transmission of the main camera 10 and the auxiliary camera 20.

[0036] In a specific embodiment of the present invention, the preset time interval is 50 ms. The main camera 10 and the auxiliary camera 20 both perform RTP packetization and send the data packets to the host computer 30 through the TCP protocol.

[0037] According to the video synchronization system of the binocular stereo camera visual ranging system of the embodiment of the present invention, by dividing the two cameras of the binocular stereo camera into a main camera and an auxiliary camera respectively, the main camera sends a synchronous capture signal to the auxiliary camera, and combined with the processing logic of the host computer before and after this, it can ensure that the sampling frequency and time of the two cameras are the same, thereby ensuring the real-time synchronous display of the two groups of images and the accuracy of the ranging of the binocular stereo camera visual ranging system.

[0038] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.

[0039] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0040] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0041] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0042] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0043] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0044] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0045] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0046] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0047] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A video synchronization method for a binocular stereo camera visual ranging system, characterized in that: In the binocular stereo camera visual ranging system, one camera is a main camera and the other camera is an auxiliary camera, and the video synchronization method comprises the following steps: S1, the host computer establishes a session with the main camera and the auxiliary camera respectively, and sends a data transmission instruction to the main camera and the auxiliary camera respectively to start the data transmission between the main camera and the auxiliary camera; S2, after starting data transmission, the main camera encodes the collected data once at a preset time interval, and after encoding, packages the data and sends the data packets to the host computer, the main camera sends a synchronous capture signal to the auxiliary camera during each encoding, and the auxiliary camera encodes the collected data once upon receiving the synchronous capture signal, and after encoding, packages the data and sends the data packets to the host computer, wherein the time when the main camera sends the synchronous capture signal to the auxiliary camera is used as the timestamp of the corresponding data packet; S3, after receiving the data packet of the main camera, the host computer reassembles, restores and decodes the data packet of the main camera, and after decoding, determines whether the current time exceeds the preset display time, and if the current time does not exceed the preset display time, puts the decoded data of the main camera into the display buffer; S4, after receiving the data packet of the auxiliary camera, the host computer reassembles, restores and decodes the data packet of the auxiliary camera, reads the timestamp of the first frame in the display buffer after decoding, and determines whether the timestamp of the first frame is less than the timestamp of the current data; if the timestamp of the first frame is not less than the timestamp of the current data, the decoded data of the auxiliary camera is placed in the display buffer; S5, sorting the data in the display buffer according to timestamps; S6, when the preset display time is reached, determine whether the decoded data of the main camera and the auxiliary camera in the display buffer are complete, and if complete, perform ranging analysis and display on the decoded data of the main camera and the auxiliary camera in the display buffer.

2. The video synchronization method of the binocular stereo camera visual ranging system according to claim 1, characterized in that: In step S1, the host computer establishes sessions with the main camera and the auxiliary camera respectively through the RTSP protocol, wherein after establishing the session with the main camera, the host computer then establishes a session with the auxiliary camera, and after establishing sessions with both the main camera and the auxiliary camera, the host computer sends data transmission instructions to the main camera and the auxiliary camera respectively to start data transmission between the main camera and the auxiliary camera.

3. The video synchronization method of the binocular stereo camera visual ranging system according to claim 1, characterized in that: The preset time interval is 50ms.

4. The video synchronization method of the binocular stereo camera visual ranging system according to claim 1, characterized in that: In step S2, the main camera and the auxiliary camera both perform RTP packetization and send the data packets to the host computer through the TCP protocol.

5. A video synchronization system for a binocular stereo camera visual ranging system, characterized in that: It includes the main camera, auxiliary camera and host computer, among which: The host computer establishes a session with the main camera and the auxiliary camera respectively, and sends a data transmission instruction to the main camera and the auxiliary camera respectively to start the data transmission between the main camera and the auxiliary camera; The main camera encodes the collected data once at a preset time interval after starting data transmission, and packages the data after encoding and sends the data packets to the host computer. The main camera sends a synchronous capture signal to the auxiliary camera during each encoding. The auxiliary camera encodes the collected data once upon receiving the synchronous capture signal, and packages the data after encoding and sends the data packets to the host computer, wherein the time when the main camera sends the synchronous capture signal to the auxiliary camera is used as the timestamp of the corresponding data packet; After receiving the data packet of the main camera, the host computer reassembles, restores and decodes the data packet of the main camera. After decoding, it determines whether the current time exceeds the preset display time. If the current time does not exceed the preset display time, the decoded data of the main camera is placed in the display buffer. After receiving the data packet of the auxiliary camera, the host computer reassembles, restores and decodes the data packet of the auxiliary camera. After decoding, it reads the timestamp of the first frame in the display buffer and determines whether the timestamp of the first frame is less than the timestamp of the current data. If the timestamp of the first frame is not less than the timestamp of the current data, the decoded data of the auxiliary camera is placed in the display buffer. The host computer sorts the data in the display buffer according to the timestamp. When the preset display time is reached, the host computer determines whether the decoded data of the main camera and the auxiliary camera in the display buffer are complete. If they are complete, the decoded data of the main camera and the auxiliary camera in the display buffer are analyzed and displayed for ranging.

6. The video synchronization system of the binocular stereo camera visual ranging system according to claim 5, characterized in that: The host computer establishes sessions with the main camera and the auxiliary camera respectively through the RTSP protocol, wherein after establishing the session with the main camera, the host computer then establishes a session with the auxiliary camera, and after establishing sessions with both the main camera and the auxiliary camera, the host computer sends data transmission instructions to the main camera and the auxiliary camera respectively to start data transmission between the main camera and the auxiliary camera.

7. The video synchronization system of the binocular stereo camera visual ranging system according to claim 5, characterized in that: The preset time interval is 50ms.

8. The video synchronization system of the binocular stereo camera visual ranging system according to claim 5, characterized in that: The main camera and the auxiliary camera both perform RTP packet grouping and send the data packets to the host computer via the TCP protocol.

Citation Information

Patent Citations

  • Time division type binocular stereo display method and time division type binocular stereo display system

    CN101765021A

  • Image processing method and device

    CN107948520A