giant.camera_modelsΒΆ

This package provides classes and functions for creating/using geometric camera models in GIANT.

In GIANT, a camera model refers to a class that provides a collection of methods for mapping 3D points and directions expressed in the camera frame to 2D points in an image, for mapping 2D points in an image to 3D directions in the camera frame, and provides jacobian matrices for those processes.

These objects are used extensively throughout GIANT and are one of the building blocks of optical navigation. The modules in this package provide a number of the most commonly used camera models for optical navigation, including the pinhole_model, the brown_model, the owen_model, and the opencv_model. In addition, the camera_model module provides an abstract base class and instructions for constructing your own custom camera models.

If you are just starting out, we recommend that you begin with one of the provided camera models as these are adequate for almost all cameras and are generally easy to initialize if you have some basic knowledge about the camera itself. Refer to the documentation for each module to get more details about the models.

While all of the classes and functions in this package are defined in the sub-modules discussed above, they are imported into the package to make access easier; therefore, you can do:

>>> from giant.camera_models import BrownModel, save, load

or:

>>> from giant.camera_models import OwenModel

Modules

camera_model

This module provides an abstract base class (abc) for implementing GIANT camera models.

pinhole_model

This module provides a subclass of CameraModel that implements the distortion free Pinhole camera model.

brown_model

This module provides a subclass of CameraModel that implements the Brown camera model, which adds basic distortion corrections to the Pinhole model.

opencv_model

This module provides a subclass of CameraModel that implements the OpenCV camera model, which adds distortion corrections to the Pinhole model.

owen_model

This module provides a subclass of CameraModel that implements the distortion modeled Owen (or JPL) camera model.

Classes

CameraModel

This is the abstract base class for all camera models in GIANT.

PinholeModel

This class provides an implementation of the pinhole camera model for projecting 3d points onto images.

BrownModel

This class provides an implementation of the Brown camera model for projecting 3D points onto images and performing camera calibration.

OpenCVModel

This class provides an implementation of the OpenCV camera model for projecting 3D points onto images and performing camera calibration.

OwenModel

This class provides an implementation of the Owen camera model for projecting 3D points onto images and performing camera calibration.

ReturnShape

This enumeration is used to specify what should be returned from method undistort_image().

Functions

save

This function is used to save a camera model to a GIANT xml file.

load

This function is used to retrieve a camera model from a GIANT xml file.