cars.applications.ground_truth_reprojection.ground_truth_reprojection_tools
This module contains the abstract direct_localization application class.
Module Contents
Functions
|
Computes ground truth in epipolar and sensor geometry. |
|
Resample classification map in epipolar geometry |
|
Interpolate position |
- cars.applications.ground_truth_reprojection.ground_truth_reprojection_tools.get_ground_truth(geom_plugin, grid, sensor, disp_to_alt_ratio, target, window, geom_plugin_dem_median=None, reverse=False)[source]
Computes ground truth in epipolar and sensor geometry.
- Parameters
geom_plugin_dem_median (geometry_plugin) – path to initial dem
geom_plugin (GeometryPlugin) – Geometry plugin with user’s DSM used to generate epipolar grids.
grid (CarsDataset) – Grid left.
sensor (dict) – sensor data Dict must contain keys: “image”, “color”, “geomodel”, “no_data”, “mask”. Paths must be absolute.
disp_to_alt_ratio (float) – Disp to altitude ratio used for performance map.
target (str) – sensor, epipolar or both outputs geometry
window (np.ndarray) – size of tile
geom_plugin_dem_median – Geometry plugin with dem median
reverse (bool) – true if right-> left
- cars.applications.ground_truth_reprojection.ground_truth_reprojection_tools.resample_auxiliary_values(ground_position, auxiliary_input, window, interpolation_method='nearest', keep_band=False)[source]
Resample classification map in epipolar geometry
- Parameters
ground_position (2D np.darray) – Direct localization result (lon, lat, alt)
auxiliary_input (string) – Path to auxiliary_value
window (list) – the tile window
interpolation_method (string) – interpolation method
keep_band (bool) – bool to see if we keep the band
- cars.applications.ground_truth_reprojection.ground_truth_reprojection_tools.interpolate(points, values, positions, method='linear', fill_value=None)[source]
Interpolate position
- Parameters
points (np.darray) – Points defining the grid
values (2D np.darray, or 3D np.darray (band, row, col)) – Data
positions (np.darray) – Positions to interpolate
method (string : {'linear', 'nearest'}) – interpolation method
fill_value (float) – value to use for points outside of the interp domain
- Returns
interpolated positions
- Return type
1D np.darray or 2D np.darray (band, interpolated positions)