Giter Site home page Giter Site logo

malbertocuao / movedetect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stephanecharette/movedetect

0.0 0.0 0.0 2.24 MB

Library to detect whether movement can be detected between two images or video frames.

Home Page: https://www.ccoderun.ca/programming/doxygen/movedetect/

License: MIT License

C++ 83.72% HTML 6.76% CMake 9.52%

movedetect's Introduction

What is MoveDetect?

MoveDetect is a C++ library that detects movement in video frames and returns a "true" or "false" value.

MoveDetect introduction

License

MoveDetect is open source and published using the MIT license. Meaning you can use it in your commercial application. See license.txt for details.

How to Build MoveDetect

MoveDetect requires OpenCV. On Ubuntu:

sudo apt-get install cmake build-essential libopencv-dev
cd ~/src
git clone https://github.com/stephanecharette/MoveDetect.git
cd MoveDetect
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make package

Example Code

MoveDetect has many configuration settings to modify the detection threshold, and optionally draw the mask output, bounding boxes, and and contour lines.

MoveDetect with bounding boxes and contours

This is how to use it:

// include MoveDetect.hpp and link against MoveDetect and OpenCV
//
MoveDetect::Handler handler;
cv::VideoCapture video("movie.m4v");
while (true)
{
    cv::Mat frame;
    video >> frame;
    if (frame.empty())
    {
        break;
    }
    //
    const bool movement_detected = handler.detect(frame);
    if (movement_detected)
    {
        // ...
    }
}

C++ API Doxygen Output

The official MoveDetect documentation and web site is at https://www.ccoderun.ca/programming/doxygen/movedetect/.

Some links to specific useful pages:

movedetect's People

Contributors

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