Skip to content

Return partial used corners for calibration - #31

Merged
mcm001 merged 5 commits into
PhotonVision:mainfrom
thatcomputerguy0101:partial-observations-corners-used
Aug 2, 2026
Merged

Return partial used corners for calibration#31
mcm001 merged 5 commits into
PhotonVision:mainfrom
thatcomputerguy0101:partial-observations-corners-used

Conversation

@thatcomputerguy0101

@thatcomputerguy0101 thatcomputerguy0101 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Previously, calibrateCamera would return used corner info for all corners of a board, including those that were not part of the observation. This corrects the problem by changing the input to a list to be able to map the skipped corner info back to the same subset and order that was provided in the parameters. AbstractList can be used on the caller's side to perform on the fly conversion if needed.

@thatcomputerguy0101

thatcomputerguy0101 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

I'm not a big fan of the extra int array for storing ids, but I don't see a better option. AbstractList seems like a better option than iterators for the input data.

@thatcomputerguy0101
thatcomputerguy0101 force-pushed the partial-observations-corners-used branch from 5da6576 to 52e591c Compare July 30, 2026 17:23
@thatcomputerguy0101
thatcomputerguy0101 force-pushed the partial-observations-corners-used branch from 52e591c to 14729e6 Compare July 30, 2026 17:38
@thatcomputerguy0101
thatcomputerguy0101 force-pushed the partial-observations-corners-used branch from 14729e6 to 047ddb6 Compare July 30, 2026 18:09
Comment thread src/main/java/org/photonvision/mrcal/MrCalJNI.java
@mcm001
mcm001 merged commit ba8e332 into PhotonVision:main Aug 2, 2026
5 checks passed
mcm001 added a commit to PhotonVision/photonvision that referenced this pull request Sep 11, 2026
)

## Description

**What changed?**

This updates to a fixed version of mrcal-java that returns a list of
corners used corresponding to the same subset of corners it was
provided. Additionally, this persists the corner ids so that further
processing of the board knows which subset of corners it is working
with, and updates one of the test calibrations with the ids. The storage
space could probably be optimized slightly by dropping the list of ids
if all corners are detected, but that gets slightly complicated if the
ids are unsorted so it wasn't implemented yet.

**Why?**

#2344 depends on the stored calibration point information being
accurate. It wasn't before.

## Testing

- [x] I have tested this change locally
- [ ] Test evidence (screenshots, videos, or test results):
## Related Issues

Blocked on PhotonVision/mrcal-java#31.

## AI Disclosure

- [x] This PR was authored entirely by me
- [ ] This PR includes AI-generated code (e.g., from GitHub Copilot,
ChatGPT)
  - [ ] If yes, I have reviewed all AI-generated code for correctness
  - [ ] If yes, please describe which parts were AI-assisted:

Describe AI involvement here if applicable

---

## Merge Checklist

- [x] PR title is a [short, imperative
summary](https://cbea.ms/git-commit/) of changes
- [x] PR description documents the *what* and *why*


### Additional Checks (if applicable)

- [ ] **User-facing changes?** User documentation is updated
- [ ] **Breaking changes?** Migration guide is included in description
- [ ] **Bug fix?** Regression test is added
- [ ] **New dependency?** License compatibility is verified and steps
have been taken to follow it
- [ ] **Serde changes?** All messages are regenerated with no unexpected
hash changes
- [ ] **Configuration changes?** Changes are backwards compatible with
previous season's last release
- [ ] **Pipeline/data exchange changes?** Frontend types are updated in
`./photon-client/src/types`

---------

Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
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