https://github.com/abdullahselek/visionary
Various types of detection and tracking implementations with OpenCV and C++
https://github.com/abdullahselek/visionary
camera eye-detection face-detection image motion-detection opencv tracking video
Last synced: 15 days ago
JSON representation
Various types of detection and tracking implementations with OpenCV and C++
- Host: GitHub
- URL: https://github.com/abdullahselek/visionary
- Owner: abdullahselek
- License: mit
- Created: 2017-06-06T13:22:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-12T20:35:15.000Z (over 7 years ago)
- Last Synced: 2025-03-25T03:34:34.859Z (about 1 month ago)
- Topics: camera, eye-detection, face-detection, image, motion-detection, opencv, tracking, video
- Language: C++
- Homepage:
- Size: 2.9 MB
- Stars: 6
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# visionary
[](https://travis-ci.org/abdullahselek/visionary)
Various types of detection implementations with OpenCV and C++.
## Building Repository
To build the repository you need CMake. You can download from [here](https://cmake.org/download/).
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](https://youtu.be/xgXo35C3IQE)
[Face Detection](https://youtu.be/bf5NtpbNbYg)
[Face & Eyes Detection](https://youtu.be/GFfjjkKZwhs)### Images

### NOTE
OpenCV should be installed to your computer before running, take a look at [.travis.yml](https://github.com/abdullahselek/visionary/blob/master/.travis.yml) file for sample installation for macOS and Linux.