16370d9a740535c4b9ca85183055acde156d9b31
OpenCam
Real-time object detection application using OpenCV and YOLO, with both Python and C++ implementations.
Features
- Real-time object detection using YOLOv3
- Support for multiple camera inputs
- GPU acceleration with CUDA (optional)
- Cross-platform support (Windows, Linux)
- Modern Qt-based user interface
- Portable Linux AppImage build support
Prerequisites
For C++ Version
- CMake 3.16 or higher
- C++17 compatible compiler
- Qt 5.12 or higher
- OpenCV 4.x with CUDA support (optional)
- CUDA Toolkit 10.0 or higher (optional)
For Python Version
- Python 3.8 or higher
- OpenCV-Python
- PyQt5
- NumPy
Installation
Building from Source (C++)
- Clone the repository:
git clone https://github.com/ZockerKatze/opencam.git
cd opencam/opencamcpp
- Build OpenCV with CUDA (optional):
chmod +x build_opencv.sh
./build_opencv.sh
- Build the application:
mkdir build && cd build
cmake ..
make -j$(nproc)
Creating AppImage (Linux)
- Ensure all dependencies are installed:
sudo apt-get install cmake build-essential qt5-default libopencv-dev librsvg2-bin
- Build the AppImage:
chmod +x build_appimage.sh
./build_appimage.sh
Python Version Setup
- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate # Linux
# or
.venv\Scripts\activate # Windows
- Install dependencies:
pip install opencv-python pyqt5 numpy
Usage
Running the C++ Version
./opencam
Running the Python Version
python main.py
Model Files
The application requires YOLOv3 model files:
yolov3.weightsyolov3.cfgcoco.names
Download the weights file from: https://pjreddie.com/media/files/yolov3.weights
License
MiT
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
Description
Languages
Python
44.2%
C++
23%
Shell
17.9%
CMake
9%
Batchfile
5.9%