A lightweight and educational Python toolkit for fundamental feature extraction using Difference of Gaussians (DoG) and Histogram of Oriented Gradients (HoG).
Project description
VisionEdgeFusion 👁️🗨️
A lightweight and educational Python toolkit for fundamental feature extraction using Difference of Gaussians (DoG) and Histogram of Oriented Gradients (HoG).
Overview
VisionEdgeFusion is a Python library designed to provide clear, efficient, and accessible implementations of two cornerstone computer vision algorithms. It empowers users to perform robust edge and blob detection with Difference of Gaussians and to conduct powerful feature description for object detection using the Histogram of Oriented Gradients.
This toolkit is perfect for students, educators, and developers who want to understand and apply these fundamental techniques without the overhead of larger, more complex computer vision libraries.
Installation
Install VisionEdgeFusion easily using pip:
pip install visionedgefusion
Usage
Import the v1 functions to get started.
Difference of Gaussians (DoG)
import cv2
import matplotlib.pyplot as plt
from visionedgefusion.v1 import difference_of_gaussians
from skimage.data import camera # Using a sample image
# Load an image
image = camera()
# Apply the Difference of Gaussians
dog_image = difference_of_gaussians(image, low_sigma=1.0, high_sigma=3.0)
# Display the results
plt.figure(figsize=(12, 6))
plt.subplot(1, 2, 1)
plt.imshow(image, cmap='gray')
plt.title('Original Image')
plt.axis('off')
plt.subplot(1, 2, 2)
plt.imshow(dog_image, cmap='gray')
plt.title('DoG Edges')
plt.axis('off')
plt.show()
Histogram of Oriented Gradients (HoG)
import cv2
import matplotlib.pyplot as plt
from visionedgefusion.v1 import histogram_of_oriented_gradients
from skimage.data import astronaut # Using a sample image
# Load an image
image = astronaut()
image_person = image[0:180, 150:280] # Crop to a person for better HOG viz
# Get HOG features and visualization
hog_features, hog_image = histogram_of_oriented_gradients(image_person, visualize=True)
print(f"HOG Feature Vector Shape: {hog_features.shape}")
print(f"Number of features: {len(hog_features)}")
# Display the results
plt.figure(figsize=(12, 6))
plt.subplot(1, 2, 1)
plt.imshow(image_person)
plt.title('Original Cropped Image')
plt.axis('off')
plt.subplot(1, 2, 2)
plt.imshow(hog_image, cmap='gray')
plt.title('HOG Visualization')
plt.axis('off')
plt.show()
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file visionedgefusion-1.0.0.tar.gz.
File metadata
- Download URL: visionedgefusion-1.0.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
418f4714fd4267dec7ca7ebd3b78257446eb1641480de0c219267b93ed75840b
|
|
| MD5 |
28382f1c67ed563acd6a0839e8e41460
|
|
| BLAKE2b-256 |
82385729a8e8cc81948ef8ee8b4a7794c5c797b5748f5228d5e9e9419060b627
|
File details
Details for the file visionedgefusion-1.0.0-py3-none-any.whl.
File metadata
- Download URL: visionedgefusion-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbcfb60f0b6a4906f275ea849fbbfbda60043cc7e5754e013be2108fbaf766e6
|
|
| MD5 |
70e51a6b9e9837130e13abe9e51a70da
|
|
| BLAKE2b-256 |
a99802d49d8f11c02759efdf950c71babcadd4da374b1edb8cf29b909ec7e77a
|