Skip to content

Comprehensive documentation improvements across Kornia-rs - #531

Closed
edgarriba with Copilot wants to merge 4 commits into
mainfrom
copilot/propose-docs-improvements
Closed

Comprehensive documentation improvements across Kornia-rs#531
edgarriba with Copilot wants to merge 4 commits into
mainfrom
copilot/propose-docs-improvements

Conversation

Copilot AI commented Nov 2, 2025

Copy link
Copy Markdown
Contributor

Reviewed and enhanced documentation across all 14 crates to improve clarity, completeness, and consistency. Added practical examples, fixed broken links, and established professional reference-quality documentation.

Changes

Crate-level documentation

  • kornia-image: Added memory layout details, type parameter descriptions, and usage patterns for Image<T, C, A>
  • kornia-imgproc: Comprehensive module descriptions with algorithm details and cross-references
  • kornia-io: Documented feature-gated backends (turbojpeg, gstreamer, v4l) with system requirements
  • kornia-apriltag: Quick start guide, supported tag families, and detection pipeline overview
  • kornia-lie: Mathematical context for Lie groups (SO2, SO3, SE2, SE3)
  • kornia-nn, kornia-vlm: Model integration capabilities and hardware acceleration options
  • kornia-3d, kornia-icp, kornia-tensor-ops: Enhanced with geometric and computational context

Module documentation

  • Added domain-specific overviews for all public modules (color, filter, warp, features, metrics, interpolation)
  • Documented interpolation modes, feature detection algorithms, and quality metrics
  • Included performance notes for parallel operations and SIMD optimizations

Function documentation

  • Enhanced 15+ key functions with detailed examples: gray_from_rgb, threshold_binary, draw_line, compute_histogram, crop_image
  • Specified error conditions with explicit error types
  • Added algorithm details (Bresenham line drawing, FAST corners, ICP registration)

Example improvements

Before:

/// Crop an image to a specified region.
pub fn crop_image<T, const C: usize, A1, A2>(
    src: &Image<T, C, A1>,
    dst: &mut Image<T, C, A2>,
    x: usize,
    y: usize,
) -> Result<(), ImageError>

After:

/// Crops a rectangular region from an image.
///
/// Extracts a sub-region from the source image starting at coordinates `(x, y)`
/// with dimensions determined by the destination image size. The operation is
/// performed in parallel for efficiency.
///
/// # Panics
///
/// Panics if the crop region extends beyond the source image boundaries.
/// Ensure that `x + dst.width() <= src.width()` and `y + dst.height() <= src.height()`.
///
/// # Examples
///
/// ```rust
/// let mut cropped = Image::<_, 1, _>::from_size_val(
///     ImageSize { width: 2, height: 2 }, 0u8, CpuAllocator
/// ).unwrap();
/// crop_image(&image, &mut cropped, 1, 1).unwrap();
/// ```

Fixes

  • Typo in README.md and README.zh-CN.md: GoodbyteGoodbye
  • Resolved 14 broken intra-doc link warnings
  • Fixed empty code block warnings in module documentation

Documentation quality

  • Zero doc build warnings across all crates
  • All doc tests passing (verified for kornia-image, kornia-imgproc, kornia-tensor)
  • Consistent terminology and cross-references throughout
Original prompt

can you review all the docs and propose improvements

Note

Custom agent used: docs-specialist
Improves documentation quality, consistency, and developer experience for the Kornia-rs Rust project


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits November 2, 2025 07:30
- Enhanced Image struct documentation with detailed examples and type parameters
- Improved module-level documentation in kornia-imgproc, kornia-io, and kornia-tensor
- Added cross-references between related functions
- Fixed typo in README.md and README.zh-CN.md (Goodbyte -> Goodbye)
- Improved error type documentation
- Added comprehensive descriptions for all public modules
- Fixed unresolved doc link warnings
- All doc tests passing

Co-authored-by: edgarriba <5157099+edgarriba@users.noreply.github.com>
- Enhanced kornia-3d module documentation with detailed descriptions
- Improved kornia-apriltag with comprehensive crate-level docs and examples
- Added documentation for kornia-nn and kornia-vlm
- Enhanced kornia-lie with Lie group mathematical context
- Improved kornia-icp with ICP algorithm overview
- Enhanced kornia-tensor-ops module descriptions
- All doc builds pass without warnings

Co-authored-by: edgarriba <5157099+edgarriba@users.noreply.github.com>
- Enhanced threshold, draw, histogram documentation with detailed examples
- Improved interpolation module with algorithm descriptions
- Added context to features and metrics modules
- Fixed empty code block warnings
- All documentation builds cleanly without warnings
- Added practical usage examples for common functions

Co-authored-by: edgarriba <5157099+edgarriba@users.noreply.github.com>
Copilot AI changed the title [WIP] Review documentation and propose improvements Comprehensive documentation improvements across Kornia-rs Nov 2, 2025
Copilot AI requested a review from edgarriba November 2, 2025 07:43
@edgarriba edgarriba closed this Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants