实时监控fps的linux代码,GitHub - Forec/monitor-recorder: Monitor (实时视频监控、运动检测视频记录)...

Monitor Recorder (运动检测监控记录工具)

This project is a tool similar with those programs executing by monitors. Monitoring somewhere, and recording what happened when actions detected.

Platform

Windows

I wrote these codes with VS Ultimate 2013, version 12.0.21005.1 REL.

To compile these codes, you need to install OpenCV, and configure them in your Visual Studio. Download OpenCV from here, make sure the version you downloaded. The steps are:

Add \build\x64\vc12\bin to your environment path.

Add \build\include, \build\include\opencv and \build\include\opencv2 to your VS including path. Right click the project and select Settings or Attributes, the including path is in VC++ path.

Add all files under \build\x64\vc12\lib to your link inputs. That could be found in LINK -> INPUT. You can also separate the files into two parts by whether having suffix d, and add those files with suffix d into your DEBUG mode, add others into RELEASE mode.

Linux

You need to install OpenCV and other packages based. You can follow this link Install OpenCV in Linux. Also, you can download opencv.sh to install it easily, or follow these steps ( notice that Ubuntu 14.04 may need to append -D BUILD_TIFF=ON when running cmake ).

$ mkdir monitor && cd monitor

$ sudo apt-get install build-essential

$ sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

$ sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev

$ wget https://github.com/Itseez/opencv/archive/2.4.13.zip

$ unzip 2.4.13.zip

$ cd 2.4.13

$ mkdir release && cd release

$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

$ sudo make

$ sudo make install

Configure the link path.

$ sudo nano /etc/ld.so.conf.d/opencv.conf

$ Input /usr/local/lib, press Ctrl + X to exit.

$ sudo ldconfig -v

EXPLANATION

This tool can build your camera capable devices into monitors. It can monitor a place, and detects whether there are unnormal actions. If it detects actions, those actions will be recorded into an .avi file.

Usage

You can download the windows executable file from here, and Linux executable file from here.

The tool will starts after 2s. You need to make sure that when it starts, the first frame it captured is the background you want to monitor. If you don't specify the VIS option, the monitor window won't appear and it will just run background.

Run MonitorRecorder.exe --help to see how to use. The copy of help information is below. You can run MonitorRecorder -vis -mog2 24 10 test.avi to have a try. This command will show what the camera monitors with MOG2 mode and records with fps=24, and will starts recording after 10 frames of unnormal actions detected. The recording file is test.avi. The view of MOG2 mode is put in Example.

----------------------------------------------------------------------------

Usage:

./MonitorRecorder.exe [VIS] [MODE] [FPS] [THRESHOLD] [OUTPUTFILE]

[VIS] : use -vis to show the monitor window, or it will run background.

[MODE] : -src shows the original frame;

-mog1 shows the MOG frame;

-mog2 shows the MOG2 frame.

[FPS] : set the fps of record file, default is 24.

[THRESHOLD]

: set the number x that the monitor will start recording after

x unnormal frames passed.

[OUTPUTFILE]

: assign the output recording file. It must be .avi format.

----------------------------------------------------------------------------

Update-logs

2016-10-05: Add this project.

2016-10-06: Add license.

2016-10-07: Build repository.

2016-10-08: Add Linux version.

2016-10-13: Add authorisation.

License

All codes in this repository are licensed under the terms you may find in the file named "LICENSE" in this directory.

授权声明

我已授权实验楼使用此仓库中的代码并发表此项目教程,你可以在这里查看对应的教程。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值