RefImage
- class pybsm.simulation.ref_image.RefImage(*, img: np.ndarray, gsd: float, pix_values: np.ndarray | None = None, refl_values: np.ndarray | None = None, name: str = 'ref_image')
Reference image.
- Attributes:
- img (np.ndarray):
The reference image data.
- gsd (float):
The ground sampling distance in meters.
- pix_values (np.ndarray):
The pixel count values for interpolation.
- refl_values (np.ndarray):
The reflectance values associated with ‘pix_values’.
- name (str):
The name of the reference image.
Methods
Estimate the scenario and sensor parameters that are consistent with this image.
Plots this image.
- __init__(*, img: np.ndarray, gsd: float, pix_values: np.ndarray | None = None, refl_values: np.ndarray | None = None, name: str = 'ref_image') None
Initializes a reference image.
- Parameters:
img – Reference image.
gsd – Spatial sampling for ‘img’ in meters. Each pixel in ‘img’ is assumed to capture a ‘gsd’ x ‘gsd’ square of some world surface. We assume the sampling is isotropic (x and y sampling are identical) and uniform across the whole field of view. This is generally a valid assumption for remote sensing imagery.
pix_values – Pixel count values within ‘img’ that should be associated with the corresponding reflectance values in ‘refl_values’ by linear interpolation. This is used to convert raw image values into an assumed spectral reflectance of the scene being viewed.
refl_values – Reflectance values associated with the corresponding pixel count values in ‘pix_values’ used to convert raw image values into an assumed spectral reflectance of the scene being viewed.
name – Name of the image.
- Raises:
ValueError if pix_values is provided, but refl_values is missing
- __weakref__
list of weak references to the object (if defined)
- estimate_capture_parameters(altitude: float = 2000000) tuple[Sensor, Scenario]
Estimate the scenario and sensor parameters that are consistent with this image.
This provides a no-degradation baseline from which to alter parameters to explore further degradation.
- show() None
Plots this image.