kornia/kornia-rs

[Feature]: otsu thresholding

Open

#638 opened on Jan 11, 2026

View on GitHub
 (3 comments) (0 reactions) (1 assignee)Rust (188 forks)auto 404
enhancementhelp wantedtriage

Repository metrics

Stars
 (675 stars)
PR merge metrics
 (PR metrics pending)

Description

🚀 Feature Description

This is currently listed in the todos, not really difficult to implement, very well could follow openCV implementation. however i would suggest if we want to allow for multilevel otsu thresholding, then we should also offer non-trad method like the one ill attach down below, because as the no of levels grows, the histogram search becomes more and more expensive for the calculation of threshold. this makes the algo run fuch faster at the cost of a bit of deviation from trad otsu result, definitely a consideration imo. https://www.researchgate.net/publication/352067523_Multilevel_thresholding_of_images_with_improved_Otsu_thresholding_by_black_widow_optimization_algorithm

i'd be happy to work on this, do lmk

📂 Feature Category

Rust Core Library

💡 Motivation

currently otsu is not yet implemented, leaving users only with constant thresholding, need adaptive thresholding.

💭 Proposed Solution

implement opencv version for the trad otsu, provide a diff option for faster thresholding

📚 Library Reference

OpenCV

🔄 Alternatives Considered

No response

🎯 Use Cases

No response

📝 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

Contributor guide