基于Verilog HDL的虚拟键盘设计

 2023-03-01 10:03

论文总字数:19205字

摘 要

随着信息时代的发展,个人计算机以及笔记本电脑以及普及到了各家各户。作为计算机的必备外设,键盘也有着很大的改变。键盘作为一种传统的人机交互的设备,他有着一个巨大的缺点,体积太大,携带十分不方便,并且占用的地方比较大,在使用时有着一定的局限性,因此现代的一些便携式的设备都倾向于了触摸屏式的虚拟键盘。尽管这样的触摸屏减去了实体键盘的包袱,但是却受制于设备屏幕的大小,容易出现误操作。针对这样的现状,本课题提出了一种更加合理且便捷的虚拟键盘的设计——基于摄像头的虚拟键盘。

论文首先介绍课题的研究背景,虚拟键盘的发展和现状。然后通过方案的论证提出一个系统的设计框架,分别由图像采集、格式转换、图像二值化、手指按键判断四个部分组成。本课题选择了Altera公司的TRDB-D5M摄像头模块进行视频图像采集,Altera公司的Cyclone IV E系列的FPGA EP4CE115F29C7NZUO作为系统的主控芯片。由于需要通过VGA的显示进行测试,并且直观的将按键操作显示在显示屏上以便调试,本课题用了一块D/A芯片ADV7123以及一片SDRAM(64M*16bit)来完成VGA的显示。

具体的实现过程如下:首先对TRDB-D5M摄像头进行IIC总线配置,使摄像头在设定的输出模式下工作;将采集到的Bayer型数据转换成RGB格式;多次测试,总结出手指的灰度值的大概范围,并以该范围将RGB格式的数据进行图像二值化,从而实现手指与背景的分离;由手指所占的像素点的大小来判断按键操作,若手指按下,在摄像头拍摄到的图像中的手指所占的像素点就会变小,本课题利用这一现象来捕捉按键操作。

整个系统的实现,关键是FPGA中模块的设计。这部分利用Verilog HDL来完成,并在Quartus II开发平台利用signal tap ii的在线调试功能以及VGA的显示来完成调试和完善,最终可以实现手指操作的按键判定。

关键词:虚拟键盘;便携;触摸屏;摄像头

Virtual keyboard design based on Verilog HDL

Abstract

With the development of the information era, personal computer and notebook computer and spread to the families. As the necessary peripheral equipment of computer, keyboard also has the very big change. The keyboard, as a traditional human-computer interaction device, has a huge drawback, the volume is too large, which is convenient to carry, and a relatively large area occupied. When in use,it also has a certain limitations. So some modern portable devices tend to touch screen virtual keyboard. Although this touch screen keyboard minus the burden of the volume, it depends on the size of the device"s screen,which can properly prone to misuse. In view of the present situation, this paper proposes a more reasonable and convenient virtual keyboard design, which is based on the camera.

this Paper firstly introduces the background of the research and the development and status of the virtual keyboard.Then the arguments of the scheme give a design framework of system, respectively including the image acquisition’s module,the format conversion’s module,the image binarization’s module and the typing judgment’s module. This topic has chosen the Altera corporation’s TRDB - D5M video image acquisition as the camera and the Altera company’s Cyclone IV E series FPGA EP4CE115F29C7NZUO as the main controller of the system.Because of the need to test with the VGA display and intuitively displayed the keystrokes on the LCD screen for debugging, this topic uses a D/A chip ADV7123 and A SDRAM with 64 m * 16 bit storage to achieve the VGA display.

Specific process of the implementation is as follows: Firstly,using the IIC bus to configure TRDB - D5M camera,to set the camera in the output mode of work;Secondly,convert RGB format of Bayer data collected ;Thirdly, with Many times test, summing up the fingers about range of grey value, and use the range to do image binarization with the data of RGB format,to realize the separation of the fingers and the background;lastly, By the finger of the pixels to determine the size of the button operation, if the finger press, in the camera to the image in pixels of the finger will become smaller, this topic using this phenomenon to capture keystrokes.

the key of The implementation of the whole system is the design of the module in FPGA.This part use Verilog HDL to complete, and the putted in the Quartus II development platform to use the signal tap II online debugging to test.and displayed on the VGA to complete debugging and improvement of judge can finally realize your fingers to operate the buttons.

Keywords: virtual keyboard; convenient; touch screen; camera

目 录

摘要 I

Abstract II

第一章 绪 论 1

1.1 课题研究的背景及意义 1

1.2 虚拟键盘的国内外研究现状 1

1.3 主要工作 2

1.4 论文的章节安排 2

第 二 章 基础知识和相关技术 3

2.1 Verilog HDL语言 3

2.1.1 Verilog HDL语言的发展历程 3

2.1.2 Verilog HDL的主要功能 3

2.2 DE2-115平台 4

2.3 视频图像处理的相关知识 4

2.3.1 Bayer型图像数据处理 4

2.3.2 图像的二值化 5

2.3.3 手指动作的判定 5

2.4 IIC总线 6

2.4.1 IIC总线的数据传送 6

2.4.2 数据传送的格式 7

2.5 VGA显示时序 8

2.5.1 显示器的扫描方式 8

2.5.2 VGA显示的专有名词 8

2.5.3 VGA时序分析 9

2.6 本章小结 9

第 三 章 系统设计方案以及实现 11

3.1 视频图像的采集 11

3.1.1 摄像头的初始化寄存器 12

3.2 视频图像数据的格式转换 14

3.3 图像的二值化 15

3.4 视频图像按键操作的判定 16

3.5 视频图像显示(测试用) 17

3.6本章小结 17

第 四 章 系统的调试 19

4.1 系统的调试 19

4.1.1 摄像头采集图像部分 19

4.1.2 VGA的图像显示 19

4.1.3 系统整体的测试 19

4.2 本章小结 20

总结和展望 21

致 谢 22

参考文献 23

第一章 绪 论

1.1 课题研究的背景及意义

键盘作为一种传统的人机交互设备,人们都对其非常熟悉。但是由于其尺寸比较大携带不方便,且十分占用地方,在实际使用时有一定的局限性。所以现代的便携式设备都转向了虚拟键盘。而虚拟键盘的推出也有一定的过程。

起初,虚拟键盘是应用在我们的触摸屏上的,我们经常会遇到虚拟键盘面积过大,导致遮盖住了背景,影响我们的可操作性。针对这种情况,人们想到了透明化处理的方案,但是透明化固然可以看到了背景,按键也被淡化了,这是一个很大的问题。

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

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

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