Skip to content

Add Connected Components for AprilTag detection#406

Merged
edgarriba merged 10 commits intomainfrom
as1100k/apriltag-segmentation
Jun 21, 2025
Merged

Add Connected Components for AprilTag detection#406
edgarriba merged 10 commits intomainfrom
as1100k/apriltag-segmentation

Conversation

@AS1100K
Copy link
Copy Markdown
Member

@AS1100K AS1100K commented Jun 19, 2025

Part 1 of the Segmentation Process

@AS1100K AS1100K requested a review from Copilot June 19, 2025 20:14

This comment was marked as outdated.

@AS1100K AS1100K force-pushed the as1100k/apriltag-segmentation branch from 8448cb7 to 5885543 Compare June 20, 2025 09:59
@AS1100K AS1100K requested review from cjpurackal and edgarriba June 20, 2025 10:02
@AS1100K AS1100K requested a review from Copilot June 20, 2025 16:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces connected component segmentation for AprilTag detection as part of the segmentation process.

  • Adds a UnionFind data structure for connected component tracking.
  • Implements a connected components algorithm in segmentation.rs that uses union-find.
  • Updates error handling and exposes new modules from lib.rs.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/data/apriltag_pixel_representatives.txt Adds expected pixel representative values for testing segmentation.
crates/kornia-apriltag/src/union_find.rs Introduces a UnionFind implementation with union, find (with path compression), and reset functions.
crates/kornia-apriltag/src/segmentation.rs Implements connected components detection over a binary image using union-find.
crates/kornia-apriltag/src/lib.rs Exports the newly added segmentation and union_find modules.
crates/kornia-apriltag/src/errors.rs Adds an error variant for mismatched UnionFind size.
Comments suppressed due to low confidence (1)

crates/kornia-apriltag/src/union_find.rs:11

  • Consider adding a comment explaining that 'usize::MAX' is used as a sentinel value to denote an unset parent.
            parent: vec![usize::MAX; len],

Comment thread crates/kornia-apriltag/src/segmentation.rs Outdated
Comment thread crates/kornia-apriltag/src/segmentation.rs Outdated
Comment thread crates/kornia-apriltag/src/segmentation.rs Outdated
Comment thread crates/kornia-apriltag/src/union_find.rs
Comment thread crates/kornia-apriltag/src/union_find.rs Outdated
Comment thread crates/kornia-apriltag/src/union_find.rs
Comment thread crates/kornia-apriltag/src/union_find.rs Outdated
Comment thread crates/kornia-apriltag/src/union_find.rs
Comment thread crates/kornia-apriltag/src/union_find.rs
Comment thread crates/kornia-apriltag/src/segmentation.rs
Comment thread crates/kornia-apriltag/src/union_find.rs Outdated
@sonarqubecloud
Copy link
Copy Markdown

@edgarriba edgarriba merged commit 53ca858 into main Jun 21, 2025
14 checks passed
@edgarriba edgarriba deleted the as1100k/apriltag-segmentation branch June 21, 2025 19:09
andrew-shc pushed a commit to andrew-shc/kornia-rs that referenced this pull request Aug 2, 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.

4 participants