GithubHelp home page GithubHelp logo

abdullahselek / visionary Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 6.0 2.97 MB

Various types of detection and tracking implementations with OpenCV and C++

License: MIT License

CMake 39.28% C++ 58.58% C 0.51% Shell 1.64%
eye-detection face-detection motion-detection opencv camera image video tracking

visionary's Introduction

visionary

Build Status

Various types of detection implementations with OpenCV and C++.

Building Repository

To build the repository you need CMake. You can download from here. You can create a shortcut cmake command for macOS as below

sudo mkdir -p /usr/local/bin
sudo /Applications/CMake.app/Contents/bin/cmake-gui --install=/usr/local/bin

After cloning repository to your own local machine go to project root folder and run

cmake .

and then

cmake --build .

to run unit tests for UNIX machines

cd test
./visionary-test --gtest_color=yes

Sample Usage

Motion-Detection

To detect motions from camera

MotionDetector motionDetector;
motionDetector.setCeil(15);
motionDetector.openCamera();
motionDetector.run();

To detect motions from given local video

MotionDetector motionDetector;
motionDetector.setCeil(15);
motionDetector.setVideoPath("YOUR_VIDEO_PATH");
motionDetector.openCamera();
motionDetector.run();

Face-Detection

To detect face from camera

FaceDetector faceDetector("YOUR_CASCADE_PATH",
                          source::type::camera,
                          nullptr);
faceDetector.run();

To detect face from given local video

FaceDetector faceDetector("YOUR_CASCADE_PATH",
                          source::type::video,
                          "YOUR_VIDEO_PATH");
faceDetector.run();

To detect face from given image

FaceDetector faceDetector("YOUR_CASCADE_PATH",
                          source::type::image,
                          "YOUR_IMAGE_PATH");
faceDetector.run();

Face & Eye Detection

To detect eye and face from given image

EyeDetector eyeDetector;
eyeDetector.setEyeCascadePath("YOUR_EYE_CASCADE_PATH");
eyeDetector.setFaceCascadePath("YOUR_FACE_CASCADE_PATH");
eyeDetector.setSourcePath("YOUR_IMAGE_PATH");
eyeDetector.setSourceType(source::type::image);
eyeDetector.run();

To detect eye and face from camera

EyeDetector eyeDetector("YOUR_EYE_CASCADE_PATH",
                        "YOUR_FACE_CASCADE_PATH",
                        source::type::camera,
                        nullptr);
eyeDetector.run();

To detect eye and face from given local video

EyeDetector eyeDetector("YOUR_EYE_CASCADE_PATH",
                        "YOUR_FACE_CASCADE_PATH",
                        source::type::video,
                        "YOUR_VIDEO_PATH");
eyeDetector.run();

Object Tracking

Object tracking from camera

ObjectTracker objectTracker(tracker::type::mil,
                            source::type::camera,
                            nullptr);
cv::Rect2d boundingBox(x, y, width, height);
objectTracker.run(boundingBox);

Object tracking from given local video

ObjectTracker objectTracker(tracker::type::mil,
                            source::type::video,
                            "YOUR_VIDEO_PATH");
cv::Rect2d boundingBox(x, y, width, height);
objectTracker.run(boundingBox);

Sample Videos & Images

Videos

Motion Detection
Face Detection
Face & Eyes Detection

Images

Face Detection
Face & Eyes Detection

NOTE

OpenCV should be installed to your computer before running, take a look at .travis.yml file for sample installation for macOS and Linux.

visionary's People

Contributors

abdullahselek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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