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

Magic strings used in CameraXml.cpp, ReadXmlCamera function and later in vicalib #42

Open
Algomorph opened this issue Nov 19, 2015 · 0 comments

Comments

@Algomorph
Copy link
Contributor

The camera "types" appear to be "magic" strings that are manually set in vicalib based on input flags, and also read in the aforementioned calibu function from the XML. However, they are logically linked to the camera models.

Proposal: make type() and flags() const methods of the camera model, enforced by inheriting pure virtual functions. type() would return the same string, while flags() would return the same std::array of strings for each instance of a particular model implementation.

Then we could have some templated factory static function inside calibu that constructs a new camera with "default" camera parameters based on a single string argument. This function would simply retrieve the flags for each model and try to match them to the flag given. The type() method would be used for XML reading/writing.

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

No branches or pull requests

1 participant