学士学位论文___最新版嵌入式摄像头抓图系统设计与实现.doc
文本预览下载声明
嵌入式摄像头抓图系统设计与实现
摘 要
随着现代科技的飞速发展,我们越来越重视实时通讯,时时刻刻的了解身边发生的一切,这样我们就需要摄像头和Linux来帮助我们实现这一切。
本项目以实现嵌入式的摄像头抓图系统为核心,使用V4L2框架完成图像采集。Video4Linux2是基于Linux系统进行图像和影音开发的应用编程接口。本项目的实现过程:服务器端,需要使用C语言,并结合V4L2框架,遵守V4L2的流程,先获取视频设备支持的标准,后设置捕获的视频格式,然后为图像数据分配内存空间,使用mmap将内核空间映射出来,使得应用程序能够访问内核空间,保存捕获的数据,将数据发送到用户空间。使用socket建立网络连接,创建socket,绑定,监听,接受用户请求。使用视频传输 http协议,程序运行时加入JPEG库,通过转换格式将yuv转换成JPEG,并使用huffman函数解码打印图片。客户端方面,使用Qt实现客户端的图形化界面,使用QTcpSocket,建立连接,连接到服务器,不停地发送和接受数据,完成视频显示,图像采集,暂停的功能。最后,本文给出了符合V4L2框架的本机摄像头图像数据采集功能,并转换为JPEG格式保存。
最后,本系统可以将捕捉到的画面显示在屏幕上并且可以实现抓图的功能。
Linux;V4L2;图像采集摄像头显示
Embedded camera capture system design and implementation
Abstract
With the rapid development of modern technology, we are increasing emphasis on real-time communication, understanding everything happening around all the time, so we need a camera and Linux to help us achieve this.
The project to implement an embedded camera capture system as the core, using V4L2 framework of image acquisition.Video4Linux2 is an application programming interface under Linux to develop video and image. Implementation process of the project:The program camera capture system based on the embedded,use c language to achieve the server side and use v4l2 framework.First, get the standard of a video device support,Then set the format of the video capture,Then allocate memory for the image,Address translation mappings by using mmap,save data and then sends the data to the user space.Establish a network connection by using socket,create a socket,binding, listening,and receiving a user request,using the http protocol for video transmission,adding JPEG library in the runing time ,converting yuv into JPEG format by the technology of converting and print pictures by using huffman decoding function.Using Qt creator graphical interface to achieve client,the client using QTcpSocket to get a connection, and link the server, constantly sending and receiving data,and then complete the fuction of video display, image capture and stop In this p
显示全部