Skip to main content

Image Visualization and Feature Extraction Library

Project description

ImgVisFeat

Project PyPI version Documentation License: MIT
Package Python Versions
Development Build Status Codecov
Community GitHub issues GitHub stars

ImgVisFeat is a Python library for image visualization and feature extraction, providing a comprehensive set of tools for analyzing and visualizing various image features.

Features

ImgVisFeat provides the following visualization and feature extraction capabilities:

  • Color Channel Visualization: Extract and visualize individual RGB color channels
  • Gradient Visualization: Compute and visualize image gradients in X, Y, and combined XY directions
    • ColorGradientVisualizer: For color images
    • GrayGradientVisualizer: For grayscale images
  • HoG (Histogram of Oriented Gradients): Visualize feature descriptors for object detection
  • LBP (Local Binary Patterns): Extract texture descriptors for texture classification
  • Keypoint Detection: Detect and visualize keypoints using SIFT, AKAZE, or ORB algorithms
  • Power Spectrum Analysis: Analyze frequency domain characteristics of images
  • CLI Tool: Command-line interface for quick visualizations

Requirements

  • Python >= 3.10

Installation

Install from PyPI

# Using pip
pip install ImgVisFeat

# Using uv (faster alternative)
uv add ImgVisFeat

Development Installation

For development, we recommend using uv:

git clone https://github.com/chatflip/ImgVisFeat.git
cd ImgVisFeat
uv sync

# Install pre-commit hooks
pre-commit install

Development

This project uses make commands for common development tasks:

# Show available commands
make help

# Run tests
make test

# Format code
make format

# Run linting
make lint

# Build documentation
make builddocs

For more details on development workflows, see CLAUDE.md.

Verify Installation

import imvf
print(imvf.__version__)

Quick Start

Using the All-in-One Visualizer

The Visualizer class provides a convenient way to apply all visualization methods at once:

import imvf

# Create visualizer instance
visualizer = imvf.Visualizer()

# Visualize all features and save results to a directory named after the image
visualizer.visualize("path/to/image.jpg")

This will display all visualizations in OpenCV windows and save the results to a directory named path/to/image/.

Using Individual Visualizers

You can also use individual visualizers for specific analyses:

import cv2
import imvf

# Load image
image = cv2.imread("path/to/image.jpg")

# Color channel visualization
color_channel = imvf.ColorChannelVisualizer()
result = color_channel(image)
cv2.imshow("Blue Channel", result.blue)
cv2.imshow("Green Channel", result.green)
cv2.imshow("Red Channel", result.red)

# Gradient visualization (for color images)
gradient = imvf.ColorGradientVisualizer()
result = gradient(image)
cv2.imshow("Gradient X", result.gradient_x)
cv2.imshow("Gradient Y", result.gradient_y)
cv2.imshow("Gradient XY", result.gradient_xy)

# HoG visualization
hog = imvf.HoGVisualizer()
result = hog(image)
cv2.imshow("HoG", result.hog)

# Keypoint detection
keypoint = imvf.KeypointVisualizer(algorithm="SIFT")  # or "AKAZE", "ORB"
result = keypoint(image)
cv2.imshow("Keypoints", result.keypoint)
cv2.imshow("Rich Keypoints", result.rich_keypoint)

Using the CLI

ImgVisFeat provides a command-line interface for quick visualizations:

# Visualize all features
imvf path/to/image.jpg

# Visualize specific feature (currently all methods are applied)
imvf path/to/image.jpg --method all

Available methods:

  • all: All visualization methods (default)
  • color_channel: Color channel visualization
  • gradient: Gradient visualization
  • hog: HoG visualization
  • lbp: LBP visualization
  • keypoint: Keypoint detection
  • power_spectrum: Power spectrum analysis

Documentation

For full documentation, including API reference and tutorials, please visit our documentation site.

Project Status

ImgVisFeat is a personal project created for learning and experimentation. While it's open-source and you're welcome to use and learn from it, please note that it may not be actively maintained or updated regularly.

Feedback and Questions

This is a practice repository, but I'm always eager to learn. If you have any questions about the project or suggestions for improvement, feel free to open an issue for discussion. Please understand that responses may not be immediate.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

chatflip

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imvf-0.1.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imvf-0.1.1-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file imvf-0.1.1.tar.gz.

File metadata

  • Download URL: imvf-0.1.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for imvf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8bd759cb5b6610b11b9f171c3f45aca711715d9933a91074a7fe01ce45311a10
MD5 feee4c657e362a4a7206c9d406576144
BLAKE2b-256 11be1001787bcd1456d73d06f8a6c1e8f0908c55ca21cfb01ed6d4821fa1c198

See more details on using hashes here.

File details

Details for the file imvf-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: imvf-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for imvf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4afb2d7ebc9584b739633afe9ee826e1a2cf189db3911783b25a77a2fb24b1c1
MD5 5e01d2d2bfd512c5a49d5ae4bb319494
BLAKE2b-256 3d89c57f5acb697b58357c5190145467f1f6a203b7eff475c574e621709ef06d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page