1摘要随着电子技术和多媒体及网络技术的快速发展,视频监控系统正向嵌入式,数字化,网络化方向发展。嵌入式视频监控系统利用大规模集成电路和网络的科技成果。实现体积小,性能稳定,通讯便利的监控设备。本项目提出了在ARM微处理器平台上移植嵌入式Linux操作系统,并完成视频采集、压缩、控制等任务。系统硬件设备选择采用实验室配备的ARM9微处理器S3C2410作为主处理器,利用USB接口的摄像头作为视频采集设备。为降低产品成本,在此基础上,借助Linux下的开源软件,构建了整个嵌入式视频监控系统。关键词:视频监控嵌入式系统ARM9LinuxV4L视频采集2AbstractWiththerapiddevelopmentoftheelectronictechnology,multimediatechnologyandnetworktechnology,videosurveillancesystemisgoingtotheembedded,digital,networkeddirection.TakingfulladvantageofLSIandnetworksofscientificandtechnologicalachievements,theembeddedvideosurveillancesystemachievesdelicatevolume,stableperformance,facilitatesthecommunicationofthesurveillanceequipment.Theprojectisinarmmicroprocessorplatform,andportingembeddedlinuxsysteminit.Itcompletesvideocapturing,compression,transmissionandcontroltasks.TheharddevicesselecttheARM9(S3C2410)asthemainprocessorinthesystem;andtheUSBcameraasthedeviceofvideocapture.Inordertoreducethecostoftheproduct,Basedonthearchitectureandwiththeopensourcesoftwareinlinux,thewholeembeddedvideosurveillancesystemisimplemented.Keywords:VideoSurveillanceEmbeddedsystemARM9Linuxvideoforlinux3摘要..................................................................................................................................................11绪论...............................................................................................................................................41.1项目背景.............................................................................................................................41.2视频监控系统的发展.................................................................................................................41.3论文的主要研究工作.................................................................................................................52视频监控系统方案设计................................................................................................................52.1系统硬件设计方案.............................................................................................................52.2软件设计方案.....................................................................................................................63软件开发环境的建立....................................................................................................................72.1嵌入式LINUX操作系统..................................................................................................72.2建立交叉编译环境.............................................................................................................92.3BootLoader的移植..................................................................................................................93.4Linux内核编译与移植.................................................................................................103.5文件系统的移植...............................................................................................................114设备驱动程序开发简介..............................................................................................................124.1Linux的驱动程序层次结构............................................................................................124.2字符型设备驱动程序...............................................................................................144.3Linux下驱动程序的实现.........................................................................................144.4USB摄像头选择以及驱动设计...............................................................................155Linux下视频采集.......................................................................................................................165.1视频采集模块的设计.......................................................................................................165.2基于v4l的编程...............................................................................................................175.2.1Video4linux中主要的数据结构............................................................................175.2.2视频数据的读取....................................................................................................185.3在LCD上显示视频图像.................................................................................................196视频网络传输模块研究与实现.................................................................................................206.1TCP/IP协议简介...........................................................................................................206.2基于webserver的视频网络传输模块............................................................................226.3播放视频流.......................................................................................................................2341绪论1.1项目背景随着电子技术和多媒体技术的飞速发展,利用嵌入式设备进行数字处理传送成为可能。嵌入式设备具有体积小、功耗低、数字化、安装方便、价格低廉等优点,因此基于嵌入式的视频采集和监控成为了当前嵌入式应用开发领域的一个热门课题。相比较传统的视频采集监控系统,它具有高可靠性、组网方便、可远程监控等优点,因而更适用于工业控制、银行、政府部门的安防系统中。本文通过建立一个适用于家庭安保、学校等应用场合的嵌入式网络视频监控系统,在实验室环境下针对网络视频监控系统的各项关键技术进行研究,包括嵌入式Linux技术、视频采集、视频图像网络化传输和运动目标检测等。论文工作也将为网络视频监控系统在其它领域的应用起到一定的作用。如环境与安保集中监控系统、移动监控系统等领域以及智能小区、银行、商场等场所。同时为了更好的学习Linux,熟悉Linux移植中的难点、要点。所以选择以Linux作为项目