Skip to content

Monitor (实时视频监控、运动检测视频记录)

License

Notifications You must be signed in to change notification settings

xujin8/monitor-recorder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 <OPENCV_PATH>\build\x64\vc12\bin to your environment path.
  • Add <OPENCV_PATH>\build\include, <OPENCV_PATH>\build\include\opencv and <OPENCV_PATH>\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 <OPENCV_PATH>\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 Linx. Also, you can download opencv.sh to install it easily, or follow these steps.
$ 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.
----------------------------------------------------------------------------

Example

  • An screenshot for the command MonitorRecorder -vis -mog2 24 10 test.avi.

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.

授权声明

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

About

Monitor (实时视频监控、运动检测视频记录)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%