Welcome to the Computer Vision Practice repository! This repository is designed to help beginners learn and implement fundamental computer vision algorithms.
pip install numpy opencv-python matplotlibThe Canny edge detector is a popular edge detection algorithm that follows these steps:
- Gaussian smoothing
- Gradient calculation
- Non-maximum suppression
- Double thresholding
- Edge tracking by hysteresis
To try the Canny edge detector:
import cv2
import numpy as np
from edge_detection.canny import canny_edge_detector
# Read your image
image = cv2.imread('your_image.jpg', 0) # Read as grayscale
# Apply Canny edge detection
edges = canny_edge_detector(image,
low_threshold=50,
high_threshold=150,
sigma=1.0)
# Display results
cv2.imshow('Edges', edges)
cv2.waitKey(0)
cv2.destroyAllWindows()Feel free to contribute to this repository by:
- Adding new computer vision algorithms
- Improving existing implementations
- Adding documentation and examples
- Reporting issues
This project is licensed under the MIT License - see the LICENSE file for details.