Foreword: This project is an Internet-based camera measurement system for Question D of the 2021 e-sports competition.
Team introduction: The three members are three sophomore students from the School of Electronic Engineering, University of Electronic Information Engineering.
Project Analysis:
The task is as shown in the figure
Basic requirements:
Analysis of basic items: First of all, the requirement of the question is to use two independent camera nodes and input the camera data to the terminal node. Our solution here is to use Raspberry Pi.
The switch transmits data streams to the terminal node under the same network node.
Play part:
Each module connection:
power supply system:
Program running process:
Physical demonstration:
Physical demonstration of the terminal, displaying real-time images of two nodes at the same time, and using speakers for voice prompts.
Node 1
Node 1 back
Node 2
Node 2 camera
Switch and power module
Schematic circuit analysis:
Since this work does not have high requirements for circuit design, the only power module (12V to 5V) in this work is used to power the Raspberry Pi and the display. A total of 4 power modules are used. The circuit is relatively simple and will not be used here. Too much elaboration.

programming:
Period measurement:
The code part uses a frame-by-frame method to obtain the difference image data of the two pictures.
What is used here is to record the time of the pendulum when it swings at its highest position. The time it takes for the pendulum to reach its highest position every two times is subtracted to get the period. The length of the pendulum is calculated through the period of the pendulum.
Angle measurement:
Determine the three-dimensional coordinates of a point. If you know the three-dimensional coordinates and project it to a two-dimensional plane, then the angle can be easily obtained. First, we added two columns to the code
The table records the coordinates of each highest point. One is used to store the X coordinate, and the other is used to store the Y coordinate. For a simple pendulum, it has two positions at the highest point. For one of them
We can imagine that the node is making an angled pendulum. What node A captures is only a two-dimensional plane with only two coordinates. We only need to obtain the other coordinates besides the Z coordinate.
The outer two coordinates, that is, the XY coordinates, can be used to calculate the angle value through the arctangent function. To determine the X and Y coordinates, we plan to take the difference between the two adjacent highest coordinates as the X and Y coordinates.
An average is taken to prevent accidental errors, so that the angle can be calculated. In our test, if the pendulum system swings normally and does not rotate, the angle error is less than 1°.
It can be said that the effect is very good.
Video demonstration:
Summarize:
A solid foundation is required, the division of labor in the entire topic must be clear, the code must be backed up frequently, and more comments must be written.