https://github.com/headless-start/livesketch_opencv
Real Time Sketch Generation using Adaptive Thresholding.
https://github.com/headless-start/livesketch_opencv
adaptivethreshold canny-edge-detection gaussian-filter opencv python3
Last synced: 4 months ago
JSON representation
Real Time Sketch Generation using Adaptive Thresholding.
- Host: GitHub
- URL: https://github.com/headless-start/livesketch_opencv
- Owner: headless-start
- License: mit
- Created: 2025-01-10T13:00:53.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-01T06:08:56.000Z (4 months ago)
- Last Synced: 2025-02-01T06:20:04.840Z (4 months ago)
- Topics: adaptivethreshold, canny-edge-detection, gaussian-filter, opencv, python3
- Language: Jupyter Notebook
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Real-Time Sketch Generation using Adaptive Thresholding
## 📌 Project Overview
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.---
## 🚀 Key Features
1. **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.
2. **Edge Detection**:
- Edges are detected using intensity gradients, highlighting key features.
3. **Thresholding and Output**:
- Edges are thresholded and displays live webcam feed with processed sketch like output.---
## 🔍 How It Works
1. **Grayscale Conversion**:
- Converts frames to grayscale using `cv2.cvtColor()`, reducing complexity and focusing on intensity.
2. **Gaussian Blur**:
- Applies a Gaussian filter to reduce noise and improve edge detection.
3. **Canny Edge Detection**:
- Detects edges using `cv2.Canny()` based on intensity gradients.
4. **Adaptive Thresholding**:
- Converts edges into a binary image using `cv2.adaptiveThreshold()` for enhanced sketch effects.---
## 🛠 System Requirements
### Dependencies
- Python 3.8+
- Libraries: `opencv-python`---
## 📄 License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.