This Python project demonstrates real-time sketch generation from a webcam feed using OpenCV. The program captures video frames, processes them using image processing techniques (e.g., grayscale conversion, Gaussian blur, and Canny edge detection), and generates a sketch-like output.
- Grayscale Conversion and Blur:
- Each frame is converted to grayscale to simplify processing and the grayscale image is blurred to reduce noise and smooth edges.
- Edge Detection:
- Edges are detected using intensity gradients, highlighting key features.
- Thresholding and Output:
- Edges are thresholded and displays live webcam feed with processed sketch like output.
- Grayscale Conversion:
- Converts frames to grayscale using
cv2.cvtColor()
, reducing complexity and focusing on intensity.
- Converts frames to grayscale using
- Gaussian Blur:
- Applies a Gaussian filter to reduce noise and improve edge detection.
- Canny Edge Detection:
- Detects edges using
cv2.Canny()
based on intensity gradients.
- Detects edges using
- Adaptive Thresholding:
- Converts edges into a binary image using
cv2.adaptiveThreshold()
for enhanced sketch effects.
- Converts edges into a binary image using
- Python 3.8+
- Libraries:
opencv-python
This project is licensed under the MIT License. See the LICENSE file for details.