MomentAlgorithm.estimate

giant.relative_opnav.estimators.moment_algorithm:

MomentAlgorithm.estimate(image, include_targets=None)[source]

This method extracts the observed center of figure for each requested target object from the supplied image.

This method works by first predicting the location of the center-of-figure of the target objects in the image, then segmenting the current image into foreground/background objects using segment_image(), matching the expected targets with the segmented foreground objects using a nearest neighbor search, using a moment algorithm to compute a more accurate observed center-of-brightness for each target, and then finally correcting the observed center of brightness to the center of figure using a phase correction, if requested. The results are stored into the computed_bearings, observed_bearings, and details attributes. If a target object cannot be matched to an observed foreground object then a warning is printed and NaN values are stored. For a more in depth description of what is happening refer to the class documentation.

Warning

Before calling this method be sure that the scene has been updated to correspond to the correct image time. This method does not update the scene automatically.

Parameters:
  • image (OpNavImage) – The image the unresolved algorithm should be applied to as an OpNavImage

  • include_targets (List[bool] | None) – An argument specifying which targets should be processed for this image. If None then all are processed (no, the irony is not lost on me…)