Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distortion calibration #1415

Merged
merged 38 commits into from
Jun 2, 2023
Merged

Distortion calibration #1415

merged 38 commits into from
Jun 2, 2023

Conversation

mugulmd
Copy link
Contributor

@mugulmd mugulmd commented Apr 17, 2023

Description

The goal of this PR is to provide new tools and workflows for distortion calibration, and for integrating the calibration in reconstruction pipelines.

The new distortion calibration method - cherry-picked from this PR - builds on top of the checkerboard detection software and uses an undistortion model introduced in 3DEqualizer (the Standard Anamorphic4 model).

Since 3DEqualizer's undistortion models can be used in Nuke, we also created an export software to dump the calibration results in the form of an STMaps couple and a Nuke LensDistortion node.

For integrating a calibrated distortion in a reconstruction pipeline, another software has been added for applying the distortion to an exisiting SfMData's intrinsics. Also, calibrated distortion is now taken into account during bundle adjustments.

Corresponding Meshroom PR: alicevision/Meshroom#1986

Features list

  • 3DEqualizer Anamorphic4 undistortion model
  • new distortion calibration method
  • new software for exporting distortion on disk as a Nuke node and/or an STMaps couple
  • new software to apply a calibrated distortion on an existing SfMData
  • usage of calibrated distortion in bundle adjustment
  • json and Alembic IO for undistortion

Implementation remarks

This PR was also an opportunity to clean up and uniformize code in the aliceVision::camera module with some cosmetic changes (e.g. 4 space indent).
One important change in that regard is that previously this module was header-only, hence several cpp files have been added and most methods have been moved in them.

@mugulmd mugulmd self-assigned this Apr 17, 2023
@mugulmd mugulmd force-pushed the mug/undistortionCalibration branch from 869dc24 to 51c0916 Compare April 27, 2023 13:51
@mugulmd mugulmd marked this pull request as ready for review April 28, 2023 09:11
@mugulmd mugulmd added this to the 3.1.0 milestone Apr 28, 2023
@cbentejac cbentejac force-pushed the mug/undistortionCalibration branch 2 times, most recently from 4dc7077 to e2ebda8 Compare May 24, 2023 11:55
cbentejac
cbentejac previously approved these changes May 24, 2023
mugulmd and others added 18 commits May 29, 2023 17:28
This commit drops the changes that were made to `main_exportAnimatedCamera`
in the previous commits, except for the cosmetic changes and, in
particular, the 4-space indentation.

These changes need to be dropped as they are not meant to be added with
the distortion calibration, and may cause errors when exporting the
animated cameras for which the distortion was calibrated.

It additionally harmonizes the comments in the code.
@cbentejac cbentejac force-pushed the mug/undistortionCalibration branch from e2ebda8 to 5c14872 Compare May 29, 2023 16:09
@fabiencastan fabiencastan merged commit 76439f9 into develop Jun 2, 2023
@fabiencastan fabiencastan deleted the mug/undistortionCalibration branch June 2, 2023 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants