This project integrates a simple face detection system using Python's OpenCV and a web interface powered by PHP. It's designed to be straightforward and easy to execute, demonstrating the seamless integration between Python for face detection and PHP for the web interface.
An advantage of this system is that it provides a solution to avoid opening a separate window for viewing OpenCV captures, while still executing the capture seamlessly within the web interface.
It is also an explanation for organizing the file structure.
- GitHub: Basic Sample PHP Template Example
- GitHub: OpenCV to WebSocket (opencv2ws)
The opencv2ws repository demonstrates how to use WebSockets with OpenCV to stream the video capture directly to a web interface, providing inspiration and additional reference for similar integrations.
- Python 3.x
- PHP (any version supporting
php -S) - OpenCV for Python
- Flask for Python (to handle the web server in Python)
To get started, ensure that PHP is installed on your system. You can download PHP from here or use your system's package manager.
Once PHP is installed, navigate to your project folder and run the following command to start a simple PHP server:
php -S localhost:8000