Giter Club home page Giter Club logo

monitor-recorder's Introduction

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 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.

授权声明

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

monitor-recorder's People

Contributors

forec avatar

Watchers

James Cloos avatar zjz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.