shareloc.geofunctions.triangulation
This module contains triangulation methods.
Module Contents
Functions
|
triangulation in sensor geometry |
|
distance between points and LOS |
|
LOS triangulation |
|
transform disparity map to matches |
|
epipolar triangulation |
- shareloc.geofunctions.triangulation.sensor_triangulation(matches, geometrical_model_left, geometrical_model_right, left_min_max=None, right_min_max=None, residues=False, fill_nan=False)[source]
triangulation in sensor geometry
- according to the formula:
Delvit J.M. et al. “The geometric supersite of Salon de Provence”, ISPRS Congress Paris, 2006.
- Parameters:
matches (np.array) – matches in sensor coordinates Nx[row (left), col (left), row (right), col (right)]
geometrical_model_left (GeomodelTemplate) – left image geometrical model
geometrical_model_right (GeomodelTemplate) – right image geometrical model
left_min_max (list) – left min/max for los creation, if None model min/max will be used
right_min_max (list) – right min/max for los creation, if None model min/max will be used
residues (boolean) – calculates residues (distance in meters between los and 3D points)
fill_nan (boolean) – fill numpy.nan values with lon and lat offset if true (same as OTB/OSSIM), nan is returned otherwise
- Returns:
intersections in cartesian crs, intersections in wgs84 crs and optionnaly residues
- Return type:
(numpy.array,numpy,array,numpy.array)
- shareloc.geofunctions.triangulation.distance_point_los(los, points)[source]
distance between points and LOS norm of cross product between vector defined by LOS sis and point and LOS vis
- Parameters:
los (shareloc.los) – line of sight
points (numpy.array) – 3D points
- Returns:
distance
- Return type:
numpy.array
- shareloc.geofunctions.triangulation.los_triangulation(left_los, right_los)[source]
LOS triangulation
- Parameters:
left_los (shareloc.los) – left los
right_los (shareloc.los) – right los
- Returns:
intersections in cartesian crs
- Return type:
numpy.array
- shareloc.geofunctions.triangulation.transform_disp_to_matches(disp, mask=None)[source]
transform disparity map to matches
- Parameters:
disp (xarray) – disparity xarray
mask (numpy.array) – mask
- Returns:
epipolar matches and logical non masked values
- Return type:
list of numpy.arrray
- shareloc.geofunctions.triangulation.epipolar_triangulation(matches, mask, matches_type, geometrical_model_left, geometrical_model_right, grid_left, grid_right, left_min_max=None, right_min_max=None, residues=False, fill_nan=False)[source]
epipolar triangulation
- Parameters:
matches (dependent of disp or sift) – matches
mask (numpy.array) – mask for disparity (see transform_disp_to_matches)
matches_type (str) – ‘disp’ or ‘sift’
geometrical_model_left (GeomodelTemplate) – left image geometrical model
geometrical_model_right (GeomodelTemplate) – right image geometrical model
grid_left (str) – left rectification grid filename
grid_right (str) – right rectification grid filename
left_min_max (list) – left min/max for los creation, if None model min/max will be used
right_min_max (list) – right min/max for los creation, if None model min/max will be used
residues (boolean) – calculates residues (distance in meters)
fill_nan (boolean) – fill numpy.nan values with lon and lat offset if true (same as OTB/OSSIM), nan is returned otherwise
- Returns:
intersections in cartesian crs
- Return type:
numpy.array