VisibleFeatureFinder

giant.relative_opnav.estimators.sfn.surface_features:

class giant.relative_opnav.estimators.sfn.surface_features.VisibleFeatureFinder(feature_catalogue, options=None, feature_list=None, off_boresight_angle_maximum=None, gsd_scaling=3, reflectance_angle_maximum=70, incident_angle_maximum=70, percent_in_fov=50)[source]

This class creates a callable which is used to filter features that are visible in an image.

The features are filtered in a number of ways. First, they can be directly filtered by name using the feature_list attribute. Next, the features are filter based on the angle between the line of sight vector to the feature and the camera boresight vector, using the off_boresight_angle_maximum attribute. Then, the features are filtered based on the reflection angle (angle between the line of sight vector and feature normal vector, using the reflectance_angle_maximum attribute. Then, the features are filtered based on the incidence angle (angle between the sun direction vector and the feature normal vector) using the incident_angle_maximum attribute. The the features are filtered based on the ratio of the camera GSD at the feature location and the GSD of the feature, using the gsd_scaling attribute. Finally the features are filtered based on the percentage of the feature that is in the FOV of the camera, using the percent_in_fov attribute. For each of these filtering passes, the only the features that met the preceding filters are considered for efficiency.

After initializing this class with the appropriate data, you can generate a list of the visible feature indices (index into the FeatureCatalogue.features list and related) by calling the result and providing the temperature of the camera. This assumes that the scene/feature catalogue/light source have been appropriately placed in the camera frame already, so typically you should ensure that you provide a reference (not a copy) of the feature catalogue and the scene.

Typically a user will not interact directly with this class and instead it will be managed by the SurfaceFeatureNavigation class. If you do want to use it manually, provide the appropriate inputs to the class constructor, update the scene to place everything in the camera frame at the time you want to identify visible features, and then call the instance of this class providing the camera temperature at the time you want to identify the visible features. The resulting list of indices can be used to index into the FeatureCatalogue.features list and related.

To specify the settings for this class, you can either use keyword arguments or the VisibleFeatureFinderOptions dataclass, which is the preferred method. It is not recommended to mix methods as this can lead to unexpected results

Parameters:
  • feature_catalogue (FeatureCatalogue) – The feature catalogue that specifies the features we care considering

  • options (VisibleFeatureFinderOptions | None) – A dataclass specifying the options to set for this instance. If provided it takes preference over all key word arguments, therefore it is not recommended to mix methods.

  • feature_list (List[str] | None) – A list of feature names to test against (useful for filtering if you only want to use a subset of features

  • off_boresight_angle_maximum (Real | None) – The maximum angle between the boresight and the line of sight to a feature in degrees. This is useful to avoid overflows in the other checks by throwing things out that are way outside the field of view. The default (if left as None) is 1.5*camera_model.field_of_view

  • gsd_scaling (Real) – The ratio allowed between the ground sample distance of the camera and the ground sample distance of the feature.

  • reflectance_angle_maximum (Real) – The maximum reflectance angle (angle between the line of sight vector and the feature normal vector) in degrees.

  • incident_angle_maximum (Real) – The maximum incident angle (angle between the incoming light vector and the feature normal vector) in degrees.

  • percent_in_fov (Real) – The percentage of the feature that is in the field of view based on a bounding box test. This should be between 0 and 100

Summary of Methods

apply_options

This method applies the input options to the current instance.