aws.osml.photogrammetry.rpc_sensor_model module
- class aws.osml.photogrammetry.rpc_sensor_model.RPCPolynomial(coefficients: List[float])[source]
Bases:
object
- evaluate(normalized_world_coordinate: WorldCoordinate) float [source]
This function evaluates the polynomial for the given world coordinate by summing up the result of applying each coefficient to the world coordinate components. Note that these polynomials are usually defined with the assumption that the world coordinate has been normalized.
- Parameters:
normalized_world_coordinate – the world coordinate
- Returns:
the resulting value
- class aws.osml.photogrammetry.rpc_sensor_model.RPCSensorModel(err_bias: float, err_rand: float, line_off: float, samp_off: float, lat_off: float, long_off: float, height_off: float, line_scale: float, samp_scale: float, lat_scale: float, long_scale: float, height_scale: float, line_num_poly: RPCPolynomial, line_den_poly: RPCPolynomial, samp_num_poly: RPCPolynomial, samp_den_poly: RPCPolynomial)[source]
Bases:
SensorModel
A Rational Polynomial Camera (RPC) sensor model is one where the world to image transform is approximated using a ratio of polynomials. The polynomials capture specific relationships between the latitude, longitude, and elevation and the image pixels.
These cameras were common approximations for many years but started to be phased out in 2014 in favor of the more general Replacement Sensor Model (RSM). It is not uncommon to find historical imagery or imagery from older sensors still operating today that contain the metadata for these sensor models.
- world_to_image(geodetic_coordinate: GeodeticWorldCoordinate) ImageCoordinate [source]
This function transforms a geodetic world coordinate (longitude, latitude, elevation) into an image coordinate (x, y).
- Parameters:
geodetic_coordinate – the world coordinate (longitude, latitude, elevation)
- Returns:
the resulting image coordinate (x,y)
- image_to_world(image_coordinate: ImageCoordinate, elevation_model: ElevationModel | None = None, options: Dict[str, Any] | None = None) GeodeticWorldCoordinate [source]
This function implements the image to world transform by iteratively invoking world to image within a minimization routine to find a matching image coordinate. The longitude and latitude parameters are searched independently while the elevation of the world coordinate comes from the elevation model.
- Parameters:
image_coordinate – the image coordinate (x, y)
elevation_model – an optional elevation model used to transform the coordinate
options – optional hints, supports initial_guess and initial_search_distance
- Returns:
the corresponding world coordinate