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

Image kernel distortion #98

Merged
merged 12 commits into from
Jun 19, 2024
Merged

Image kernel distortion #98

merged 12 commits into from
Jun 19, 2024

Conversation

Robin271828
Copy link
Contributor

@Robin271828 Robin271828 commented Jun 9, 2024

Started adding radtan distortion.

  • Not ready to merge yet - needs to be tested in sim.
  • will then add other distortions (plumb_bob, ...)

@Robin271828 Robin271828 requested a review from mktk1117 June 9, 2024 20:19
@Robin271828 Robin271828 requested a review from JonasFrey96 June 10, 2024 20:19
@Robin271828
Copy link
Contributor Author

  • currently get an error loading the plugins on my pc

@Robin271828 Robin271828 requested a review from RyoWatanabes June 10, 2024 20:25
@Robin271828 Robin271828 changed the title Start adding distortion, not tested yet Image kernel distortion Jun 10, 2024
@Robin271828 Robin271828 marked this pull request as ready for review June 11, 2024 21:09
@mktk1117 mktk1117 changed the base branch from dev/nature_hiking/dev to main June 11, 2024 21:36
Copy link
Collaborator

@mktk1117 mktk1117 left a comment

Choose a reason for hiding this comment

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

Once we test this on robot, we can merge this.

float radial_distortion = 1 + k1 * r2 + k2 * r2 * r2 + k3 * r2 * r2 * r2;
float x_corrected = x * radial_distortion + 2 * p1 * x * y + p2 * (r2 + 2 * x * x);
float y_corrected = y * radial_distortion + 2 * p2 * x * y + p1 * (r2 + 2 * y * y);
u = (x_corrected * (image_width / 2.0)) + (image_width / 2.0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can get fx, cx from P

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you mean from K

@mktk1117 mktk1117 merged commit 3ebf196 into main Jun 19, 2024
2 of 3 checks passed
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.

3 participants