SurfaceFeatureNavigationOptions¶
giant.relative_opnav.estimators.sfn.sfn_class
:
- class giant.relative_opnav.estimators.sfn.sfn_class.SurfaceFeatureNavigationOptions(brdf=None, rays=None, grid_size=1, peak_finder=<function quadric_peak_finder_2d>, min_corr_score=0.5, blur=True, search_region=10, run_pnp_solver=False, pnp_ransac_iterations=0, second_search_region=None, measurement_sigma=1, position_sigma=None, attitude_sigma=None, state_sigma=None, max_lsq_iterations=None, lsq_relative_error_tolerance=1e-08, lsq_relative_update_tolerance=1e-08, cf_results=None, cf_index=None, show_templates=False)[source]¶
This dataclass serves as one way to control the settings for the
SurfaceFeatureNavigation
class.You can set any of the options on an instance of this dataclass and pass it to the
SurfaceFeatureNavigation
class at initialization (or through the methodSurfaceFeatureNavigation.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
brdf (Optional[giant.ray_tracer.illumination.IlluminationModel]) –
rays (Union[giant.ray_tracer.rays.Rays, None, List[Optional[giant.ray_tracer.rays.Rays]]]) –
grid_size (int) –
peak_finder (Callable[[numpy.ndarray, bool], numpy.ndarray]) –
min_corr_score (float) –
blur (bool) –
search_region (int) –
run_pnp_solver (bool) –
pnp_ransac_iterations (int) –
second_search_region (Optional[int]) –
measurement_sigma (Union[Sequence, numpy.ndarray, numbers.Real]) –
position_sigma (Optional[Union[Sequence, numpy.ndarray, numbers.Real]]) –
attitude_sigma (Optional[Union[Sequence, numpy.ndarray, numbers.Real]]) –
state_sigma (Optional[Union[Sequence, numpy.ndarray]]) –
max_lsq_iterations (Optional[int]) –
lsq_relative_error_tolerance (float) –
lsq_relative_update_tolerance (float) –
cf_results (Optional[numpy.ndarray]) –
cf_index (Optional[List[int]]) –
show_templates (bool) –
- Return type
None
- min_corr_score: float = 0.5¶
The minimum correlation score to accept for something to be considered found in an image. The correlation score is the Pearson Product Moment Coefficient between the image and the template. This should be a number between -1 and 1, and in nearly every cast a number between 0 and 1. Setting this to -1 essentially turns the minimum correlation score check off.
- search_region: int = 10¶
The number of pixels to search around the a priori predicted center for the peak of the correlation surface.
- run_pnp_solver: bool = False¶
A flag specifying whether to use the PnP solver to correct errors in the initial relative state between the camera and the target body
- pnp_ransac_iterations: int = 0¶
The number of RANSAC iterations to attempt in the PnP solver. Set to 0 to turn the RANSAC component of the PnP solver
- second_search_region: Optional[int] = None¶
The distance around the nominal location to search for each feature in the image after correcting errors using the PnP solver.
- measurement_sigma: Union[Sequence, numpy.ndarray, numbers.Real] = 1¶
The uncertainty to assume for each measurement in pixels. This is used to set the relative weight between the observed landmarks are the a priori knowledge in the PnP problem. See the
measurement_sigma
documentation for a description of valid inputs.
- position_sigma: Optional[Union[Sequence, numpy.ndarray, numbers.Real]] = None¶
The uncertainty to assume for the relative position vector in kilometers. This is used to set the relative weight between the observed landmarks and the a priori knowledge in the PnP problem. See the
position_sigma
documentation for a description of valid inputs. If thestate_sigma
input is notNone
then this is ignored.
- attitude_sigma: Optional[Union[Sequence, numpy.ndarray, numbers.Real]] = None¶
The uncertainty to assume for the relative orientation rotation vector in radians. This is used to set the relative weight between the observed landmarks and the a priori knowledge in the PnP problem. See the
attitude_sigma
documentation for a description of valid inputs. If thestate_sigma
input is notNone
then this is ignored.
- state_sigma: Optional[Union[Sequence, numpy.ndarray]] = None¶
The uncertainty to assume for the relative position vector and orientation rotation vector in kilometers and radians respectively. This is used to set the relative weight between the observed landmarks and the a priori knowledge in the PnP problem. See the
state_sigma
documentation for a description of valid inputs. If this input is notNone
then theattitude_sigma
andposition_sigma
inputs are ignored.
- max_lsq_iterations: Optional[int] = None¶
The maximum number of iterations to make in the least squares solution to the PnP problem.
- lsq_relative_error_tolerance: float = 1e-08¶
The relative tolerance in the residuals to signal convergence in the least squares solution to the PnP problem.
- lsq_relative_update_tolerance: float = 1e-08¶
The relative tolerance in the update vector to signal convergence in the least squares solution to the PnP problem
- cf_results: Optional[numpy.ndarray] = None¶
A numpy array containing the center finding residuals for the target that the feature catalogue is a part of. If present this is used to correct errors in the a priori line of sight to the target before searching for features in the image.
- cf_index: Optional[List[int]] = None¶
A list that maps the features catalogues contained in the
scene
(in order) to the appropriate column of thecf_results
matrix. If left blank the mapping is assumed to be in like order
- show_templates: bool = False¶
A flag to show the rendered templates for each feature “live”. This is useful for debugging but in general should not be used.
Summary of Methods
This function returns a numpy array containing the (x, y) location of the maximum surface value which corresponds to the peak of the fitted quadric surface to subpixel accuracy. |