feat: add vegetation index module to kornia-imgproc (ExG)
#835 opened on Mar 19, 2026
Repository metrics
- Stars
- (675 stars)
- PR merge metrics
- (PR metrics pending)
Description
🚀 Feature Description
Add a vegetation index module to kornia-imgproc, starting with the Excess Green Index (ExG) — a widely used primitive for agricultural computer vision applications.
📂 Feature Category
Rust Core Library
💡 Motivation
Vegetation indices are fundamental for agricultural CV pipelines — crop monitoring, disease detection, and autonomous drone spraying. Having ExG as a native kornia-imgproc primitive benefits anyone building precision agriculture applications on top of kornia-rs.
💭 Proposed Solution
New module: kornia-imgproc/src/vegetation/ Function: excess_green(src: &Image<f32,3>, dst: &mut Image<f32,1>) Formula: ExG = 2*G - R - B, clamped to [0.0, 1.0] Follows existing kornia-imgproc API patterns (same signature as gray_from_rgb). Implementation already available in PR #833.
📚 Library Reference
Excess Green Index (ExG): Woebbecke et al. (1995) "Color indices for weed identification under various soil, residue, and lighting conditions"
🔄 Alternatives Considered
No response
🎯 Use Cases
- Autonomous drone spraying: identify vegetation in real time
- Crop health monitoring: detect stress and disease regions
- Wildfire detection: isolate green vegetation from burned areas
- Precision agriculture pipelines on edge hardware (Jetson Orin)
📝 Additional Context
No response
🤝 Contribution Intent
- I plan to submit a PR to implement this feature
- I'm requesting this feature but not planning to implement it