Getting Started
This guide will help you install and start using ImgVisFeat.
Installation
Requirements
- Python >= 3.10
Install from PyPI
Install ImgVisFeat using pip:
Verify Installation
Verify that ImgVisFeat is installed correctly:
Quick Start
Using the All-in-One Visualizer
The simplest way to use ImgVisFeat is with the Visualizer class, which applies all visualization methods:
import imvf
# Create visualizer instance
visualizer = imvf.Visualizer()
# Visualize all features and save results
visualizer.visualize("path/to/image.jpg")
This will:
- Display all visualizations in OpenCV windows
- Save the results to a directory named after the image (e.g.,
path/to/image/)
Using Individual Visualizers
For more control, use individual visualizers:
import cv2
import imvf
# Load image
image = cv2.imread("path/to/image.jpg")
# Color channel visualization
color_visualizer = imvf.ColorChannelVisualizer()
result = color_visualizer(image)
# Access individual channels
cv2.imshow("Blue Channel", result.blue)
cv2.imshow("Green Channel", result.green)
cv2.imshow("Red Channel", result.red)
cv2.waitKey(0)
Using the Command Line Interface
ImgVisFeat provides a CLI for quick visualizations:
# Visualize all features
imvf path/to/image.jpg
# Visualize specific method
imvf path/to/image.jpg --method hog
Available methods:
all- All visualization methods (default)color_channel- RGB channel visualizationgradient- Gradient visualizationhog- Histogram of Oriented Gradientslbp- Local Binary Patternskeypoint- Keypoint detection (SIFT, AKAZE, ORB)power_spectrum- Power spectrum analysis
Next Steps
- Explore the User Guide for detailed usage of each visualizer
- Check the CLI Reference for command-line options
- Browse the API Reference for complete documentation
Troubleshooting
Import Error
If you encounter import errors, ensure that:
- ImgVisFeat is installed in your current environment
- You're using Python >= 3.10
- All dependencies are installed
OpenCV Display Issues
If images don't display:
- Ensure you have a GUI backend available
- Add
cv2.waitKey(0)aftercv2.imshow()calls - Use
cv2.destroyAllWindows()to close all windows
Getting Help
If you encounter issues:
- Check the documentation
- Search existing GitHub issues
- Open a new issue with details about your problem