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

Consistent interface for pixel center #579

Merged
merged 4 commits into from
Nov 4, 2020
Merged

Conversation

varunagrawal
Copy link
Collaborator

Defined u0 and v0 in all camera models for consistent interface.

@varunagrawal varunagrawal self-assigned this Nov 3, 2020
@varunagrawal varunagrawal added bugfix Fixes an issue or bug easy-fix Quick and easy to fix quick-review Quick and easy PR to review labels Nov 3, 2020
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

There is already px and py ?? I do not support to duplicate versions of all these things

@varunagrawal
Copy link
Collaborator Author

varunagrawal commented Nov 3, 2020

though I can make Cal3Bundler have px & py instead?

Yes, please :-)

@swarrier246
Copy link
Contributor

There is already px and py ?? I do not support to duplicate versions of all these things

Cal3Bundler doesn't have px or py so this causes undefined function errors when working with different camera models (e.g. using Cal3_S2 in the main code and then loading from a Cal3Bundler from a BAL file. I figured having u0 and v0 made more sense, though I can make Cal3Bundler have px & py instead?

Wouldn't it be advisable to remove the px and py in the other models and reflect those changes across all places that use it, then? Might cause some avoidable confusion otherwise.

@@ -597,6 +597,7 @@ class Rot3 {
Rot3(double R11, double R12, double R13,
double R21, double R22, double R23,
double R31, double R32, double R33);
Rot3(double w, double x, double y, double z);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this related to this PR? (I'm assuming it's a quaternion rot constructor?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It isn't, but it was minor and I didn't want to create a whole new PR for it.

@varunagrawal
Copy link
Collaborator Author

There is already px and py ?? I do not support to duplicate versions of all these things

Cal3Bundler doesn't have px or py so this causes undefined function errors when working with different camera models (e.g. using Cal3_S2 in the main code and then loading from a Cal3Bundler from a BAL file. I figured having u0 and v0 made more sense, though I can make Cal3Bundler have px & py instead?

Wouldn't it be advisable to remove the px and py in the other models and reflect those changes across all places that use it, then? Might cause some avoidable confusion otherwise.

That would break backwards compatibility. Also a lot of internal code uses the px and py functions.

@dellaert
Copy link
Member

dellaert commented Nov 3, 2020

Please request a re-review after adding px and py to missing Cal. Remove all u0 and v0 that were not there yet. Pls deprecate u0 and v0 if there was any.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

Thanks, pls address comments though.

return v0_;
}

/// @deprecated
Copy link
Member

Choose a reason for hiding this comment

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

No, we have this #ifdef thingy, remember ? :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Uhhh I'm stupid

class SfmTrack {
SfmTrack();

double r;
Copy link
Member

Choose a reason for hiding this comment

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

double r,g,b;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The wrap parser doesn't support this syntax. :(

gtsam/gtsam.i Outdated
double r;
double g;
double b;
//TODO Need to close wrap#10 to allow this to work.
Copy link
Member

Choose a reason for hiding this comment

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

Please use Google-style linting, which should flag an issue here.

Copy link
Contributor

@swarrier246 swarrier246 left a comment

Choose a reason for hiding this comment

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

LGTM!

@varunagrawal
Copy link
Collaborator Author

Will squash and merge once CI passes.

@varunagrawal varunagrawal merged commit 6c6cb96 into develop Nov 4, 2020
@varunagrawal varunagrawal deleted the feature/pixel-center branch November 4, 2020 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixes an issue or bug easy-fix Quick and easy to fix quick-review Quick and easy PR to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants