蓝猫淘气

Question D of eSports - National 1

 
Overview
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.

DuQnwX5kqMS7epzpZzpjTHMxOBpaFeRlawKB1apb.png

 
programming:
 
Period measurement:
 
GefR4cu5TyvYEhwvm6EKqvdcY8XTQ1k2Mer9ZBAK.png
 
 
The code part uses a frame-by-frame method to obtain the difference image data of the two pictures.
 
sHA3kq0s527G6RpOJAJHm6H8AeDIKGfis4dEILlW.png
 
 
pvv19vYKhvoLiFYE3ds46vtM6vszquUTU5vJOSXs.png
 
 
HNltkh1d25L6ZXpoRlhU5Ujkhfix38QhINpu6Rfv.png
 
 
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:
 
emtBnHdoPuCv1mW74QZq7lpdzMyjNmRiwThlp2RM.png
 
 
Pun1CVol1askahZVxvC8aBdJMJMeXZ6h7eDvaK77.png
 
 
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.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-11 18:47:46

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号