节点文献
基于ARM和OpenCV的视频监控系统的设计与实现
The Design and Implementation of Video Surveillance System Based on ARM and OpenCV
【作者】 王力;
【作者基本信息】 西安电子科技大学 , 工程硕士(专业学位), 2019, 硕士
【摘要】 随着社会高速发展的需要,视频监控系统越来越多的应用于生活中的各个方面,但目前的视频监控系统多采用PC机作为平台,使用摄像头进行长期不间断的录制。这样不仅功耗高,便携性差,并且对存储设备的损耗也极为巨大,而且在事后回溯视频查找关键信息时,面对复杂海量的冗余数据,将会是极为繁琐的工作。本文深入研究了OpenCV算法以及嵌入式Linux的系统架构,基于嵌入式ARM处理器,构建出了一整套完整的嵌入式系统,并在此系统上运行本文所设计的一种基于OpenCV的移动检测及标记跟踪算法。能够实现驱动通用的USB摄像头,对目标区域进行监控,仅在有物体移动时才对视频数据进行存储,并在视频中将其轮廓进行标记跟踪。这样在解决了功耗以及便携性的基础上,还能显著的降低对存储设备的损耗、占用以及处理复杂度。本论文的主要研究内容和成果如下:1.设计了一整套完整的、与本设计强相关的嵌入式系统架构。根据本系统的功能设计需求,编译时仅配置加入了系统运行所必须的V4L2驱动、触摸屏驱动、USB存储器驱动等驱动模块,使得内核镜像尽可能精简的同时,编译得到一整套包括U-boot、内核以及文件系统在内的嵌入式Linux系统镜像文件。2.设计出一种基于帧差法并进行优化的移动检测及标记跟踪算法。能够驱动USB摄像头,实现对目标区域进行移动物体检测以及动态标记,并在视频帧中添加时间信息,最后对视频文件进行存储。通过对关键参数的计算、调整以及测试,得到了在本嵌入式系统中输出帧率最高、运行效率最快的算法。3.设计出一整套OpenCV算法运行所需的依赖库体系。针对系统算法运行、视频播放以及存储等功能的需求,对OpenCV源码以及ffmpeg等第三方依赖库进行配置以及交叉编译,最后得到了支持本系统在嵌入式设备上运行的依赖库文件,大大提升了本系统的可移植性。4.设计一个集显示及控制功能于一体的图形用户界面。基于Qt/E框架,将所有功能模块嵌入到框架内,实现视频播放的同时,用户还可通过对触摸屏上的按键选择,来对系统的运行、暂停以及退出状态进行控制,大大提升了本系统的完整性和可操作性。最后本文对所设计的嵌入式系统进行了实物测试以及分析,通过测试,本系统所有功能模块工作正常,与普通视频监控系统相比较,输出帧率良好,可达到25FPS,视频存储文件大小缩减率平均可达到62%,性能优良,具有广阔的实际应用价值。
【Abstract】 With the rapid development of society,video surveillance systems are increasingly used in all aspects of life,but the current video monitoring system usually uses PC as a platform,and using the camera for long-term uninterrupted recording.This not only caused high power consumption,poor portability,but also a huge loss to the storage device,however,it is extremely cumbersome to face complicated and redundant data when looking back at the video to find key information.In this paper,deeply researched the Open CV algorithm and the embedded Linux system architecture.Based on the embedded ARM processor,a complete set of embedded system is built,and the Open CV-based motion detection and mark tracking algorithm are designed in this paper.While system is running,it can drive a universal USB camera to monitor the target area,store the video data only when there is an object moving,and mark its contour in the video.This can significantly reduce the loss,occupation and processing complexity of the storage device on the basis of solving the power consumption and portability.The main research contents and results of this thesis are as follows:1.Design a complete set of embedded system architectures that are strongly relevant to this design.According to the functional design requirements of the system,only the V4L2 driver,touch screen driver,USB memory driver and other driver modules necessary for the system operation are added during compiling,so that the kernel image is compiled as much as possible,and a complete set including U-boot is compiled.Embedded Linux system image files including kernel and file system.2.Design a motion detection and marker tracking algorithm based on frame difference method and optimized.It can drive the USB camera to detect and dynamically mark the moving object in the target area,add time information to the video frame,and finally store the video file.Through the calculation,adjustment and testing of key parameters,the algorithm with the highest output frame rate and the fastest operating efficiency in this embedded system is obtained.3.Design a set of dependent library systems required for the Open CV algorithm to run.For the requirements of system algorithm operation,video playback and storage,the Open CV source code and third-party dependencies such as ffmpeg are configured and cross-compiled.Finally,the dependent library files supporting the system running on the embedded device are obtained,which greatly improves the library file.The portability of this system.4.Design a graphical user interface that combines display and control functions.Based on the Qt/E framework,all functional modules are embedded in the framework to realize video playback.At the same time,the user can control the operation,pause and exit status of the system by selecting the buttons on the touch screen,which greatly enhances the system.Integrity and operability.Finally,the physical testing and analysis of the embedded system is carried out.Through testing,all the functional modules of the system work normally.Compared with the ordinary video monitoring system,the output frame rate is good,which can reach 25 FPS and the video storage file size reduction rate is better,which average can reach 62%.The performance is excellent,which has a wide practical value.
【Key words】 Embedded System; OpenCV; Motion Detection; Mark Tracking; Qt;