ConstraintMatchingOptions

giant.relative_opnav.estimators.constraint_matching:

class giant.relative_opnav.estimators.constraint_matching.ConstraintMatchingOptions(match_against_template=True, match_across_images=False, min_constraints=5, compute_constraint_positions=False, brdf=<factory>, rays=None, grid_size=1, template_overflow_bounds=-1, max_time_difference=None, feature_matcher=<factory>)[source]

This dataclass serves as one way to control the settings for the ConstraintMatching class.

You can set any of the options on an instance of this dataclass and pass it to the ConstraintMatching class at initialization (or through the method ConstraintMatching.apply_options()) to set the settings on the class. This class is the preferred way of setting options on the class due to ease of use in IDEs.

Parameters:
  • match_against_template (bool)

  • match_across_images (bool)

  • min_constraints (int)

  • compute_constraint_positions (bool)

  • brdf (IlluminationModel)

  • rays (Rays | None | List[Rays | None])

  • grid_size (int)

  • template_overflow_bounds (int)

  • max_time_difference (timedelta | None)

  • feature_matcher (FeatureMatcher)

match_against_template: bool = True

A flag to match keypoints between the image and a rendered template.

match_across_images: bool = False

A flag to match keypoints across multiple images.

min_constraints: int = 5

Minimum number of matched constraints in order for the constraint matching to be considered successful.

compute_constraint_positions: bool = False

A flag to compute the constraint target-fixed positions.

brdf: IlluminationModel

The illumination model that transforms the geometric ray tracing results (see ILLUM_DTYPE) into an intensity values. Typically this is one of the options from the illumination module).

rays: Rays | None | List[Rays | None] = None

The rays to use when rendering the template. If None then the rays required to render the template will be automatically computed. Optionally, a list of Rays objects where each element corresponds to the rays to use for the corresponding template in the Scene.target_objs list. Typically this should be left as None.

grid_size: int = 1

The subsampling to use per pixel when rendering the template. This should be the number of sub-pixels per side of a pixel (that is if grid_size=3 then subsampling will be in an equally spaced 3x3 grid -> 9 sub-pixels per pixel). If rays is not None then this is ignored

template_overflow_bounds: int = -1

The number of pixels to render in the template that overflow outside of the camera field of view. Set to a number less than 0 to accept all overflow pixels in the template. Set to a number greater than or equal to 0 to limit the number of overflow pixels.

max_time_difference: timedelta | None = None

Maximum time difference between image observation dates for keypoints to be matched between images. Set to a datetime.timedelta type. If None, then a maximum time difference will not be applied.

feature_matcher: FeatureMatcher

The feature matcher instance to use