EllipseMatching.extract_and_pair_limbs

giant.relative_opnav.estimators.ellipse_matching:

EllipseMatching.extract_and_pair_limbs(image, target, target_ind)[source]

Extract and pair limb points in an image to the surface point on a target that created it.

For irregular bodies this is an approximate procedure that depends on the current estimate of the state vector. See Shape.find_limbs() for details.

This technique extracts limbs in 2 ways. If extraction_method is EDGE_DETECTION, then all limbs are extracted from the image using ImageProcessing.identify_subpixel_limbs(). These extracted limbs are then stored and paired to their corresponding targets based on the apparent diameter. This only happens once per image since the extracted limb locations in the image are independent of the relative position of the target to the camera. If extraction_method is LIMB_SCANNING then this will extract and pair the limbs for the requested target using LimbScanner.extract_limbs(). This is performed ever iteration, as the extracted limb locations are dependent on the relative position of the target in the scene.

For both techniques, the paired observed limb location in the image for the target are stored in the appropriate element of observed_bearings as a 2xn array of pixel locations.

Parameters:
  • image (OpNavImage) – The image that the limbs are to be extracted from

  • target (SceneObject) – The target that the extracted limbs are to be paired to

  • target_ind (int) – The index of the target that the extracted limbs are to be paired to

Returns:

The scan center, the scan center direction, the scan directions, the predicted limbs in the camera, and the predicted limbs in the image.

Return type:

Tuple[ndarray, ndarray, ndarray, ndarray, ndarray]