# 【全国一等奖】F题：智能送药小车，2021年全国大学生电子设竞赛

01

[En]

Because, the title clearly shows that each project is only tested once. In other words, if the car goes wrong, it will score 0, and there will be no chance to test it again.

[En]

The second question: the problem of car patrol. When it comes to line patrol, everyone must think of the tracking module (color recognition sensor). This is no problem, it can be used or a camera can be used to track tracks.

[En]

However, in the process of movement, the line needs to be patrolled all the time, the requirements of the camera or tracking module are relatively high, and the light requirements of the environment are relatively stable.

[En]

In order to improve the stability of the patrol line, I think we can directly use the motor encoder to write the closed loop, fix the distance of the car movement directly, and then identify the number after walking a fixed straight distance, and the turn can also be directly fixed, after all, it is 90 degrees.

[En]

Of course, color recognition module or camera tracking is definitely needed to assist in this process.

【全国一等奖】F题：智能送药小车

[En]

By the way, due to the direct closed loop of the motor, the speed of the car in this video can continue to be improved.

02

2.0 摘要

[En]

After testing, it is found that the design has the advantages of fast recognition speed, high recognition accuracy, stable transportation and high efficiency.

2.1 方案设计

### 2.1.2 机械结构方案

2.2 数字识别方法

[En]

The main method is to first find the bounding box of the number, and then scale and stretch based on the wide and high school side, so that it can occupy the entire matrix representing a single sample.

[En]

Then the image binarization, corrosion segmentation, the previous learning generated a classifier, but we input the number in the image can not be directly used as test input. Digital strokes in images are sometimes irregular and may overlap each other.

[En]

Next, the image can be segmented. Since our classifier can only recognize numbers one by one, we have to segment each number first. After the segmentation, we can use the previously trained classifier to identify the segmentation results.

### 2.3 自动寻径方法

[En]

First of all, the image is preprocessed, and noise may be generated in the process of image acquisition and transmission, and the interference to image processing is reduced by image graying and image filtering.

Otsu算法的基本思想是用某一假定灰度值t将图像的灰度分成两组，当两组的类间方差最大时，此灰度值t就是图像二值化的最佳阈值。

03

### 3.1 程序设计思路

3.1.1 小车1的程序设计思路

[En]

After identifying the target ward number, determine whether it is near-end, if it is near-end, turn to the corresponding direction at the first intersection directly, otherwise go straight to the second intersection to determine whether it is the target number.

3.1.2 小车2的程序设计思路

04

[En]

By the way, we will continue to open source all the topics of the video game in the near future, interested friends can pay attention to it.

[En]

Of course, if you want to share your experience in video games, you can add me Wechat and contribute. Once hired, there will be a fee.

Original: https://blog.csdn.net/best_xiaolong/article/details/122183365
Author: 张巧龙
Title: 【全国一等奖】F题：智能送药小车，2021年全国大学生电子设竞赛

(0)