Kornia: kornia-imgproc
Image processing algorithms for the Kornia ecosystem.
🚀 Overview
kornia-imgproc provides a collection of standard and advanced image processing algorithms. It is designed to work seamlessly with kornia-image and kornia-tensor, offering high-performance implementations of common computer vision tasks.
🔑 Key Features
- Geometric Transformations: Resize, crop, flip, rotate, and warp images.
- Color Space Conversions: Convert between RGB, BGR, Grayscale, HSV, YUV, and other color spaces.
- Filtering: Box blur, Gaussian blur, Median filter, Sobel, and custom kernels.
- Morphological Operations: Dilation, Erosion, Opening, and Closing for structure aware image transformations.
- Calibration: Camera calibration and image undistortion.
- Normalization: Min/max scaling, mean/std normalization.
- Histograms: Compute and manipulate image histograms.
- Feature Detection: (Experimental) Corner detection and feature extraction.
- Contours: Find image contours and compute their properties.
📦 Installation
Add the following to your Cargo.toml:
[]
= "0.1.0"
🛠️ Usage
Normalizing an Image
use ;
use normalize_mean_std;
Color Conversion
use ;
use ;
🧩 Modules
calibration: Lens distortion correction.color: Color space conversions.contours: Contour finding and properties.core: Basic image operations.crop: Image cropping.draw: Drawing utilities for images.enhance: Image enhancement.features: Feature detection.filter: Convolutions and blurring.flip: Image flipping operations.histogram: Histogram computation.interpolation: Interpolation utilities.metrics: Image processing metrics.morphology: Morphological operations.normalize: Image normalization utilities.padding: Image padding.parallel: Parallelization utilities.pyramid: Pyramid operations.resize: Image resizing with various interpolation methods.threshold: Image thresholding operations.warp: Affine and perspective transformations.
💡 Related Examples
You can find comprehensive examples in the examples folder of the repository:
imgproc: General image processing operations.rotate: Image rotation and warping.color_spaces: Color space conversion.filters: Image filtering (e.g., Sobel, Gaussian).morphology: Morphological operations (e.g., Dilation, Erosion, Opening, and Closing).histogram: Histogram computation.normalize: Image normalization.normalize_ii: Another normalization example.undistort_image: Lens distortion correction.undistort_points_image: Point undistortion.pnp_demo: Uses image processing for PnP.ros-z-nodes: ROS nodes using image processing.
🤝 Contributing
Contributions are welcome! This crate is part of the Kornia workspace. Please refer to the main repository for contribution guidelines.
📄 License
This crate is licensed under the Apache-2.0 License.