-嵌入式摄像头抓图系统设计与实现学士学位论文.doc
上传人:斌斌****公主 上传时间:2024-09-11 格式:DOC 页数:57 大小:4.5MB 金币:10 举报 版权申诉
预览加载中,请您耐心等待几秒...

-嵌入式摄像头抓图系统设计与实现学士学位论文.doc

-嵌入式摄像头抓图系统设计与实现学士学位论文.doc

预览

免费试读已结束,剩余 47 页请下载文档后查看

10 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

厦门大学软件学院毕业设计PAGE\*MERGEFORMATii嵌入式摄像头抓图系统设计与实现摘要随着现代科技的飞速发展,我们越来越重视实时通讯,时时刻刻的了解身边发生的一切,这样我们就需要摄像头和Linux来帮助我们实现这一切。本项目以实现嵌入式的摄像头抓图系统为核心,使用V4L2框架完成图像采集。Video4Linux2是基于Linux系统进行图像和影音开发的应用编程接口。本项目的实现过程:服务器端,需要使用C语言,并结合V4L2框架,遵守V4L2的流程,先获取视频设备支持的标准,后设置捕获的视频格式,然后为图像数据分配内存空间,使用mmap将内核空间映射出来,使得应用程序能够访问内核空间,保存捕获的数据,将数据发送到用户空间。使用socket建立网络连接,创建socket,绑定,监听,接受用户请求。使用视频传输http协议,程序运行时加入JPEG库,通过转换格式将yuv转换成JPEG,并使用huffman函数解码打印图片。客户端方面,使用Qt实现客户端的图形化界面,使用QTcpSocket,建立连接,连接到服务器,不停地发送和接受数据,完成视频显示,图像采集,暂停的功能。最后,本文给出了符合V4L2框架的本机摄像头图像数据采集功能,并转换为JPEG格式保存。最后,本系统可以将捕捉到的画面显示在屏幕上并且可以实现抓图的功能。关键词Linux;V4L2;图像采集;摄像头;显示EmbeddedcameracapturesystemdesignandimplementationAbstractWiththerapiddevelopmentofmoderntechnology,weareincreasingemphasisonreal-timecommunication,understandingeverythinghappeningaroundallthetime,soweneedacameraandLinuxtohelpusachievethis.Theprojecttoimplementanembeddedcameracapturesystemasthecore,usingV4L2frameworkofimageacquisition.Video4Linux2isanapplicationprogramminginterfaceunderLinuxtodevelopvideoandimage.Implementationprocessoftheproject:Theprogramcameracapturesystembasedontheembedded,useclanguagetoachievetheserversideandusev4l2framework.First,getthestandardofavideodevicesupport,Thensettheformatofthevideocapture,Thenallocatememoryfortheimage,Addresstranslationmappingsbyusingmmap,savedataandthensendsthedatatotheuserspace.Establishanetworkconnectionbyusingsocket,createasocket,binding,listening,andreceivingauserrequest,usingthehttpprotocolforvideotransmission,addingJPEGlibraryintheruningtime,convertingyuvintoJPEGformatbythetechnologyofconvertingandprintpicturesbyusinghuffmandecodingfunction.UsingQtcreatorgraphicalinterfacetoachieveclient,theclientusingQTcpSockettogetaconnection,andlinktheserver,constantlysendingandreceivingdata,andthencompletethefuctionofvideodisplay,imagecaptureandstopInthispaper,itofferthegatheringfunctionofcameraimagethatconformstheframeworkofV4L2andconverttotheJPEGtosave.Finally,thesystemcancapturethescreendis