基于视觉的激光投线仪自动检测系统

 2022-09-30 02:09

论文总字数:39664字

摘 要

激光投线仪目前在建筑工程中应用广泛,前景广阔。为解决传统的精度检测方法成本较高、对人眼造成伤害较大、引入人为误差等问题,本文在对激光投线仪精度检测原理深入研究以后,提出了一种以下位机负责图像获取、上位机负责精度检测的激光投线仪自动检测系统。

系统主要采用C/S架构进行开发,多个树莓派作为下位机调用摄像头进行图像获取,通过Socket通信将图像传输到PC端进行图像处理,最后给出检测的精度指标。论文的主要工作如下:

(1)根据激光投线仪精度指标的要求,合理设计了各项精度指标的检测方法,结合系统硬件方案,设计了安放整套系统的支架结构;

(2)根据系统的实际需求,进行了下位机、摄像头、以太网交换机的选型,并设计了单服务器多客户端模式的系统架构;

(3)在下位机端,结合系统的需求,对树莓派进行了一些配置,并以Python为开发工具,开发了客户端程序;

(4)在上位机端,以C#为开发工具,设计了一个Windows应用程序,包含了界面设计、Socket通信等模块;

(5)以HALCON为开发工具,结合激光图像的特点,进行了图像处理算法的开发,最终得到了激光投线仪的各项精度指标。

关键词:激光投线仪,C/S架构,Socket通信,Python,C#,HALCON,图像处理

Abstract

Laser demarcation device is widely used in construction engineering and has a broad prospect. In order to solve the shortcomings of traditional precision measuring method such as high cost, causing injury for eyes of workers and human errors, an automatic measuring system for laser demarcation device is developed, based on lower computer responsible for image capture and host computer responsible for precision measuring after a deep research about the principles to precision measuring of laser demarcation device.

The system is developed based on C/S architecture. This system takes many Raspiberry Pis as lower computers, which capture images by calling cameras. Then it selects Socket communication for image transmission to PC for image processing. Finally, the measuring accuracy index is given by the system. The main work of the paper is as follows:

Firstly, the measuring methods for every accuracy index are designed reasonably based on the requirement of accuracy index for laser demarcation device. And the stent, which is for placing the entire system, is designed after considering the hardware scheme of the system.

Secondly, the hardware selection of lower computer, camera and ethernet switch is completed based on the actual requirement of system. And the architecture of one server and multi-client is designed.

Thirdly, some configurations on Raspberry Pi are completed on lower computer combining the requirement of system. After that, client program is developed based on Python.

Fourth, a windows application program on host computer is developed based on C#, which includes interface design and socket communication.

Finally, in order to get every measuring accuracy index of laser demarcation device, the image processing algorithm is developed combined the characteristics of laser images based on HALCON.

KEY WORDS: laser demarcation device, C/S architecture, Socket communication, Python, C#, HALCON, image processing

目 录

摘 要

Abstract Ⅱ

第一章 绪论 1

1.1 课题研究背景及意义 1

1.2 课题研究现状 2

1.3 研究内容和目标 4

1.4 论文的研究目的与研究内容 5

第二章 系统整体设计 6

2.1 系统需求分析 6

2.2 硬件选型 8

2.2.1 树莓派 8

2.2.2 摄像头 10

2.2.3 以太网交换机 11

2.3 开发工具简介 12

2.3.1 C/S架构 12

2.3.2 PYTHON简介 14

2.3.3 C#简介 14

2.3.4 HALCON概述 15

2.3.5 XSHELL和XFTP概述 15

2.4 本章小结 16

第三章 硬件配置与实现 17

3.1 系统整体方案 17

3.2 硬件配置与实现 21

3.2.1 安装RASPBIAN系统 21

3.2.2 摄像头调用 21

3.2.3 远程登录及文件传输 22

3.2.4 静态IP设置 24

3.2.5 客户端程序实现 25

3.2.6 PYTHON脚本开机自启动 27

3.3 本章小结 28

第四章 服务器程序开发 29

4.1 总体功能分析 29

4.2 SOCKET通信设计与实现 29

4.2.1 框架设计 29

4.2.2 多线程的引入 31

4.2.3 功能测试 35

4.3 命令发送设计与实现 36

4.4 图像接收设计与实现 38

4.4.1 功能设计 38

4.4.2 功能测试 40

4.5 界面设计与实现 42

4.5.1 需求分析 42

4.5.2 实现效果 43

4.6 本章小结 43

第五章 图像处理算法 44

5.1 图像处理的一般流程 44

5.2 激光图像分析 44

5.3 图像预处理方法设计 45

5.4 刻度线提取 50

5.5 激光线提取 53

5.6 距离及激光线宽计算 55

5.7 本章小结 56

第六章 总结与展望 57

6.1 本文主要工作 57

6.2 展望 57

致 谢 58

参考文献 58

附 录 60

第一章 绪论

课题研究背景及意义

激光投线仪,又被称为激光标线仪、激光墨线仪、激光水准仪,它的不同名称,是来自于仪器的各种不同应用领域。它的工作原理是利用波长为635nm的激光去穿透玻璃棒或者柱透镜,从而形成一个扇形激光面,进而投射出多条水平还有竖直的激光线,为其他的工作提供基准,其实物图和示意图如1-1示。目前激光投线仪被广泛应用于建筑工程施工领域。其通过投射出精确的激光线条到物体表面,为施工、标定等过程提供基准。这样使得工程实施时更加方便,更有效率。虽然激光投线仪在实际使用中,并没有太长的时间。但是自从面世以来,就极大地提高了工作效率,并且在各行业中迅速普及[1]

剩余内容已隐藏,请支付后下载全文,论文总字数:39664字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;