Skip to content

Clean up code#30

Open
Gold856 wants to merge 5 commits into
PhotonVision:mainfrom
Gold856:main
Open

Clean up code#30
Gold856 wants to merge 5 commits into
PhotonVision:mainfrom
Gold856:main

Conversation

@Gold856

@Gold856 Gold856 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Focuses on compatibility with newer mrcal and OpenCV versions, but also does some optimizations, like being more precise with headers, killing iostream, and removing 2-3 copies of point structures (which is actually a lot of memory to be shuffling around.)

Comment thread src/mrcal_wrapper.cpp
int *c_imagersizes = imagersize;
auto point_min_range = -1.0, point_max_range = -1.0;
mrcal_problem_constants_t problem_constants = {
.point_min_range = point_min_range, .point_max_range = point_max_range};

@Gold856 Gold856 Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If you follow the logic for this, you'll see this struct is only accessed by function calls in an #ifdef 0 block, so this is never accessed. Future versions of mrcal empty the struct out entirely.

@Gold856

Gold856 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

This diff passes the tests in wpical on Windows.

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.

1 participant