Skip to content

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

@Algomorph

Description

@Algomorph

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions