aws.osml.image_processing.sar_complex_imageop module
- aws.osml.image_processing.sar_complex_imageop.image_pixels_to_complex(image_pixels: ndarray, pixel_type: str | None = None, amplitude_table: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None) ndarray [source]
This function converts SAR pixels from SICD imagery into complex values using equations found in SICD Volume 1 Section 4.2.
- Parameters:
image_pixels – the SAR image pixels
pixel_type – “AMP8I_PHS8I”, “RE32F_IM32F”, or “RE16I_IM16I”
amplitude_table – optional lookup table of amplitude values for AMP8I_PHS8I image pixels
- Returns:
- aws.osml.image_processing.sar_complex_imageop.complex_to_power_value(complex_data: ndarray) ndarray [source]
This function converts SAR complex data into the pixel power values (sometimes called pixel intensity) using the equation found in SICD Volume 1 Section 4.10.
- Parameters:
complex_data – the SAR complex image signal with real and imaginary components
- Returns:
the power values
- aws.osml.image_processing.sar_complex_imageop.power_value_in_decibels(power_values: ndarray) ndarray [source]
This function converts SAR power values to decibels using the equation found in SICD Volume 1 Section 4.10.
- Parameters:
power_values – the SAR power values
- Returns:
the power values in decibels
- aws.osml.image_processing.sar_complex_imageop.get_value_bounds(magnitude_values: ndarray) Tuple[float, float] [source]
This function calculates the minimum and maximum of a set of values.
- Parameters:
magnitude_values – SAR magnitude values
- Returns:
(min value, max value)
- aws.osml.image_processing.sar_complex_imageop.linear_mapping(magnitude_values: ndarray) ndarray [source]
This function accepts an array of magnitude values and scales them to be in the range [0:1].
- Parameters:
magnitude_values – SAR magnitude values
- Returns:
the scaled values in range [0:1]
- aws.osml.image_processing.sar_complex_imageop.histogram_stretch_mag_values(magnitude_values: ndarray, scale_factor: float = 8.0)[source]
This function converts image pixel magnitudes to an 8-bit image by scaling the pixels and cropping to the desired range. This is histogram stretching without any gamma correction.
- Parameters:
magnitude_values – SAR magnitude values
scale_factor – a scale factor, default = 8.0
- Returns:
the quantized grayscale image clipped to the range of [0:255]
- aws.osml.image_processing.sar_complex_imageop.quarter_power_mag_values(magnitude_values: ndarray, scale_factor: float = 3.0, precomputed_mean: float | None = None)[source]
This function converts image pixel magnitudes to a Quarter-Power Image using equations found in Section 3.2 of SAR Image Scaling, Dynamic Range, Radiometric Calibration, and Display (SAND2019-2371).
- Parameters:
magnitude_values – SAR magnitude values
scale_factor – a brightness factor that is typically between 5 and 3
precomputed_mean – a precomputed mean of magnitude usually taken from a larger set of pixels
- Returns:
the quantized grayscale image clipped to the range of [0:255]
- aws.osml.image_processing.sar_complex_imageop.histogram_stretch(image_pixels: ndarray, pixel_type: str | None = None, amplitude_table: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, scale_factor: float = 8.0) ndarray [source]
This function converts SAR image pixels to an 8-bit grayscale image by scaling the pixels and cropping to the desired range [0:255]. This is histogram stretching without any gamma correction. The equations are described in Section 3.1 of SAR Image Scaling, Dynamic Range, Radiometric Calibration, and Display (SAND2019-2371).
- Parameters:
image_pixels – the SAR image pixels
pixel_type – “AMP8I_PHS8I”, “RE32F_IM32F”, or “RE16I_IM16I”
amplitude_table – optional lookup table of amplitude values for AMP8I_PHS8I image pixels
scale_factor – a scale factor, default = 8.0
- Returns:
the quantized grayscale image clipped to the range of [0:255]
- aws.osml.image_processing.sar_complex_imageop.quarter_power_image(image_pixels: ndarray, pixel_type: str | None = None, amplitude_table: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, scale_factor: float = 3.0, precomputed_mean: float | None = None) ndarray [source]
This function converts SAR image pixels to an 8-bit grayscale image pixel magnitudes to a Quarter-Power Image using equations found in Section 3.2 of SAR Image Scaling, Dynamic Range, Radiometric Calibration, and Display (SAND2019-2371).
- Parameters:
image_pixels – the SAR image pixels
pixel_type – “AMP8I_PHS8I”, “RE32F_IM32F”, or “RE16I_IM16I”
amplitude_table – optional lookup table of amplitude values for AMP8I_PHS8I image pixels
scale_factor – a brightness factor that is typically between 5 and 3
precomputed_mean – a precomputed mean of magnitude usually taken from a larger set of pixels
- Returns:
the quantized grayscale image clipped to the range of [0:255]