Main Video Demo for this project:
For more videos on this project click here.
- Aaron Pan
- Abhishek Uddaraju
Task Number | Function Location |
---|---|
Task 1 | main.cpp |
Task 2 | preprocess_classification.cpp |
Task 3 | process_featureExtract.cpp |
Task 4 | process_featureExtract.cpp |
Task 5 | main.cpp |
Task 6 | preprocess_classification.cpp |
Task 9 KNN | preprocess_classification.cpp |
- bin/
- Debug/
- include/
- preprocess_classification.h
- process_featureExtract.h
- csv_util.h
- kmeans.h
- src/
- preprocess_classification.cpp
- process_featureExtract.cpp
- dnnexample.cpp
- kmeans.cpp
- main.cpp
- object_detection.cpp
- utils/
- csv_util.cpp
- .gitignore
- CMakeLists.txt
- README.md
This project introduces methods to compare image frames within a video sequence for object recognition. We use region-based object recognition methods such as moments, percent fill, etc to compare objects. The program takes a training database of at least 5 objects of multiple points to then compare to new objects (known or unknown), if the objects are known the system will classify the object. With comparison, multiple distance metrics can be used to compare objects, such as L2 distance and KNN classification, which we will use in this project.
$ git clone https://github.com/U-Abhishek/Real-time-2D-object-detection.git
$ cd /project location
You need a C++ compiler installed on your system to build and run this project. If you don't have one installed, follow the instructions below:
- Windows: Install MinGW or Visual Studio with C++ development tools.
- Mac: Install Xcode command-line tools or GCC through Homebrew.
- Linux: Install GCC through your package manager (e.g.,
sudo apt install g++
on Ubuntu).
Visual Studio Code is a lightweight but powerful source code editor that runs on your desktop. To set up Visual Studio Code for C++ development:
- Download and install Visual Studio Code.
- Install the C/C++ extension by Microsoft from the Extensions view (
Ctrl+Shift+X
). - Open your project folder in Visual Studio Code.
- Download opencv-4.5.1-vc14_vc15.exe from the latest release: https://github.com/opencv/opencv/releases/tag/4.5.1
- unpack to
C:\opencv
- edit environment variables. Win search "Environment variables"
- append to Path the path to OpenCV:
C:\opencv\bin
- restart computer
- open cmd
echo %Path%
output should contain a new path
$ cd directory_of_executable
$ .\executable_name.exe "database_csv_path"
This will start the program you will be able to see all the results and intermediate processed images.
- place the object in front of the camera
- Press "n" after clicking on the window where the frames are displayed
- Type the name of the object in the terminal
- Press "k" after clicking on the window where the frames are displayed
- Press "l" after clicking on the window where the frames are displayed