giant.calibration.calibration_class¶
This module provides a subclass of the OpNav
class for performing stellar OpNav and camera calibration.
Interface Description¶
In GIANT, calibration refers primarily to the process of estimating a model to map points in the 3D
world to the observed points in a 2D image. This is done by estimating both a geometric
camera model
along with an optional pointing alignment between the camera frame and the base
frame the knowledge of the camera attitude is tied to (for instance the spacecraft bus frame). For both of these, we
use observations of stars to get highly accurate models.
The Calibration
class is the main interface for performing calibration in GIANT, and in general is all the user
will need to interact with. It is a subclass of the StellarOpNav
class and as such provides a very similar
interface with only a few additional features. It provides direct access to the ImageProcessing
,
StarID
, stellar_opnav.estimators
, and calibration.estimators
objects and automatically
preforms the required data transfer between the objects for you. To begin you simply provide the StellarOpNav
constructor a Camera
instance, either a ImageProcessing
instance or the keyword arguments to create
one, a StarID
instance or the keyword arguments to creation one, the attitude estimation object you wish to
use to perform the attitude estimation, the static alignment estimation object you wish to use to perform the static
alignment estimation, the temperature dependent alignment estimation object you wish to use to perform the temperature
dependent alignment, and the calibration estimation object you wish to use to perform the calibration. You can then use
the Calibration
instance to perform all of the aspects of stellar OpNav and calibration with never having to
interact with the internal objects again.
For example, we could do something like the following (from the directory containing sample_data
):
>>> import pickle
>>> from giant.calibration import Calibration
>>> from giant.rotations import Rotation
>>> with open('sample_data/camera.pickle', 'rb') as ifile:
... camera = pickle.load(ifile)
>>> # Returns the identity to signify the base frame is the inertial frame
>>> def base_frame(*args):
... return Rotation([0, 0, 0, 1])
>>> cal = Calibration(camera, alignment_base_frame_func=base_frame)
>>> cal.id_stars() # id the stars for each image
>>> cal.sid_summary() # print out a summary of the star identification success for each image
>>> cal.estimate_attitude() # estimate an updated attitude for each image
>>> cal.estimate_calibration() # estimate an updated camera model
>>> cal.calib_summary() # print out a summary of the star identification success for each image
>>> cal.estimate_static_alignment() # estimate the alignment between the camera frame and hte base frame
>>> cal.estimate_temperature_dependent_alignment() # estimate the temperature dependent alignment
For a more general description of the steps needed to perform calibration, refer to the calibration
package.
For a more in-depth examination of the Calibration
class see the following API Reference.
Classes
This class serves as the main user interface for performing geometric camera calibration and camera frame attitude alignment. |