Add OpenCV-style calib3d module scaffold for Milestone 4#52
Merged
Conversation
Member
|
@copilot create a new module section called calib3d as in OpenCV. |
Agent-Logs-Url: https://github.com/webarkit/purecv/sessions/38005598-60bc-4ebd-967c-f0aa8ac3425f Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
Agent-Logs-Url: https://github.com/webarkit/purecv/sessions/38005598-60bc-4ebd-967c-f0aa8ac3425f Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
Contributor
Author
Done: I added a new top-level |
Copilot
AI
changed the title
[WIP] Implement functions for Milestone 4: findHomography, Rodrigues, solvePnP, solvePnPRansac
[WIP] Add OpenCV-style calib3d module scaffold for Milestone 4
May 7, 2026
…_pnp_ransac Agent-Logs-Url: https://github.com/webarkit/purecv/sessions/5fc1b86e-5d0e-46ea-a26c-d3af094c49f6 Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
…ments Agent-Logs-Url: https://github.com/webarkit/purecv/sessions/5fc1b86e-5d0e-46ea-a26c-d3af094c49f6 Co-authored-by: kalwalt <1275858+kalwalt@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new OpenCV-style calib3d module to purecv, providing initial pure-Rust implementations for homography estimation, Rodrigues conversions, and PnP pose estimation (including RANSAC), plus tests and an example for Milestone 4.
Changes:
- Introduces
src/calib3d.rswith submodules forhomography,geometry,pose, and internallinalghelpers. - Exposes
find_homography,rodrigues,solve_pnp, andsolve_pnp_ransacvia the crate prelude. - Adds unit tests and a runnable pose-estimation example.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib.rs | Registers calib3d module and re-exports new APIs + Point3f in the prelude. |
| src/calib3d.rs | New top-level calib3d module entry point with submodules and re-exports. |
| src/calib3d/geometry.rs | Implements rodrigues and rotation-vector/matrix conversions. |
| src/calib3d/homography.rs | Implements find_homography via normalized DLT + optional RANSAC. |
| src/calib3d/linalg.rs | Adds internal linear algebra helpers (Jacobi eigen, null-space, 3×3 SVD, RNG). |
| src/calib3d/pose.rs | Implements solve_pnp and solve_pnp_ransac with DLT init + Gauss-Newton refinement. |
| src/calib3d/simd.rs | Adds a placeholder module doc for future SIMD helpers (feature-gated). |
| src/calib3d/tests.rs | Adds unit tests covering linalg, Rodrigues, homography, and PnP. |
| examples/pose_estimation.rs | Adds an example demonstrating solve_pnp + rodrigues usage. |
- Add robust error handling and strict flag checks in PnP - Enforce 6-point minimum bounds for DLT PnP - Normalize reprojection thresholds by focal lengths - Improve singular matrix handling in undistort_points - Add tests covering SVD, homography, and PnP functionality Closes #51
kalwalt
added a commit
that referenced
this pull request
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR integrates the new
calib3dmodule, fulfilling Milestone 4 requirements. It introduces functions for camera calibration and 3D geometry processing.Key Additions
solve_pnp) and RANSAC-based robust estimation (solve_pnp_ransac).find_homography).rodrigues.linalg.rs.Fixes & Improvements Addressed from Review
src/calib3d/tests.rscovering SVD, homography, and PnP functionality.src/lib.rsprelude to export the newcalib3dmodule andPoint3f.cargo fmtandcargo clippywith zero warnings.Closes #51