Tools for geo-spatial images handling and visualization.
Functions
histogram_equalized_lut(hist[, dtype, fill]) | Compute a histogram equalized LUT. |
linear_lut([vmin, vmax, dtype, fill, omin, omax]) | Compute a linear LUT. |
log_lut([dtype]) | |
root([dtype]) | |
square([dtype]) |
Classes
BaseStretcher([vmin, vmax, dtype]) | Base class for stretcher objects. |
LUTStretcher([offset, vmin, vmax, dtype, fill]) | Stretch using LUT. |
LinearStretcher([scale, offset, vmin, vmax, ...]) | Linear stretch. |
LogarithmicStretcher([scale, offset, base, ...]) | Linear stretch. |
Bases: object
Base class for stretcher objects.
The base implementation of the __call__ method just performs clipping and type conversion (both are optional).
Note
outout extrema (min and max) have to be compatible with the data type (dtype) set.
Example:
data = np.arange(.10, 300.)
stretch = BaseStretch(0, 255, 'uint8')
data = stretch(data)
data type for output data
the maximum value for output data
the minimum value for output data
Bases: gsdview.imgutils.BaseStretcher
Stretch using LUT.
Perform an arbitrary scaling on unsigned data using a look-up table (LUT).
An optional offset is applied before LUT application.
Bases: gsdview.imgutils.BaseStretcher
Linear stretch.
Perform linear scaling (including offest application) and clipping.
Note
offset is applyed before scaling:
Bases: gsdview.imgutils.BaseStretcher
Linear stretch.
Perform logarithmic stretching and clipping:
Note
both base and scale default to 10 while the default value for offset is 0 so the strecher returns values expressed in dB:
Compute a histogram equalized LUT.
Parameters: |
|
---|---|
Returns: | the llok up table (LUT) |
Compute a linear LUT.
The returned LUT maps the imput domain (vmin, vmax) onto the output one (0, vout) using a linear low. The value of vout depends on dtype: 2**8-1 if dtype=’uint8’, 2**16-1 dtype=’uint16’
The fill parameter can be used to controll the length of returned LUT (see below).
Parameters: |
|
---|---|
Returns: | the look up tabe (LUT) |