EdgeVisionCam is a real-time edge detection camera application built with Python and Pygame. It captures live video from your webcam, processes the frames with an enhanced edge detection algorithm, and displays the result on your screen.
- Real-Time Edge Detection: Captures live video from your webcam and applies an edge detection algorithm in real-time.
- Customizable Parameters: Easily adjust the Gaussian blur sigma, low and high threshold values for edge detection.
- Simple and Intuitive UI: Display the processed video feed with a straightforward Pygame-based interface.
- Python 3.x
- Pygame
- NumPy
- SciPy
-
Clone the repository:
git clone https://github.com/nomadsdev/edge-vision-cam.git cd EdgeVisionCam
-
Install the required Python packages:
pip install pygame numpy scipy
-
Run the application:
python main.py
main.py
: The main entry point of the application, handling the camera feed and displaying the processed images.camera_handler.py
: Handles the webcam input using Pygame's camera module.display_handler.py
: Manages the display of images on the Pygame window.edge_detection.py
: Contains the edge detection algorithm that processes each frame.
- Start the application by running
main.py
. - The camera feed will open, and the edges of objects in the frame will be highlighted.
- To stop the application, close the window or press
Ctrl+C
in the terminal.
You can adjust the parameters for edge detection directly in the main.py
file:
ed = detect_edges(img, sigma=1.5, low_threshold=50, high_threshold=150)
- sigma: Controls the Gaussian blur. Higher values lead to more blur.
- low_threshold and high_threshold: Determine the thresholds for edge detection. Adjust these to control which edges are detected.
This project is licensed under the MIT License
Contributions are welcome! If you have any improvements or suggestions, feel free to create a pull request or open an issue.