SurfaceFeatureNavigation.render

giant.relative_opnav.estimators.sfn.sfn_class:

SurfaceFeatureNavigation.render(target_ind, target, temperature=0)[source]

This method renders each visible feature for the current target according to the current estimate of the relative position/orientation between the target and the camera using single bounce ray tracing.

The illumination values are computed by (a) determining the rays to trace through the scene (either user specified or by a call to compute_rays()), (b) performing a single bounce ray trace through the scene using a call to Scene.get_illumination_inputs() with only the feature being processed “turned on”, (c) converting the results of the ray trace into illumination values using brdf, and then summing the intensity of each ray into a 2D template array. The rendered templates are store in the templates attribute.

Additionally, this method also produces a 2D boolean array specifying which pixels in the template had rays which actually struck the surface of the feature (True) and which hit empty space (False) for use in the correlation of the template with the image. Finally, it also computes the computed_bearings for each visible template by projecting the template center onto the image using the camera model and storing it in a 2xn array.

Note that before calling this method you must have set the visible feature list in the image to the visible_features attribute.

Typically this method is not used directly by the user and instead is called by the estimate() method automatically.

Parameters:
  • target_ind (int) – index into the Scene.target_objs list of the target being rendering

  • target (SceneObject) – the SceneObject for the target being rendered

  • temperature (Real) – The temperature of the camera at the time the scene is being rendered.

Returns:

The intersect masks as a list of 2D boolean arrays and the location of the feature center in each template as a 2xn array.

Return type:

Tuple[List[ndarray], ndarray]