APPLRT

Apply radiometric transformations


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Algorithm :: Acknowledgements :: References

Back to top

Description


Applies a sequence of one or more radiometric transformations to an image data set and outputs the transformed image data to a disk. The gain and offset values for each transformation are obtained from the image metadata stored with the input image data set. The sequence of transformations up to the specified level are applied.
Back to top

Parameters


Name Type Length Value range
Input: Input raster channel(s) Raster port 0 - 1024  
Output: Output raster channel(s) Raster port 0 - 1024  
Input Window Integer 0 - 4 Xoffset, Yoffset, Xsize, Ysize
Radiometric Transformation Level Integer 0 - 1  
Wavelength Interval Float 0 - 2  
Valid Bands Only String 0 - 1 YES | NO
Default: NO
Datatype String 0 - 1 8U | 16S | 16U | 32R
Default: 32R
Back to top

Parameter descriptions

Input: Input raster channel(s)

Specifies a subset of the input channels to which the image band selection is restricted. The image metadata indicates which channels store data set bands. By default, all data set band channels are specified.

Output: Output raster channel(s)

Specifies the output channels in an existing output file to receive the radiometrically transformed selected input bands.

By default, the first N channels of the output file, where N is the number of selected input bands, are specified.

Input Window

Specifies a rectangular window within the input image that is to be radiometrically transformed and generated. If this parameter is not specified, the entire image is transformed and generated.

Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

Radiometric Transformation Level

Specifies the radiometric transformations associated with the data set that is applied to the stored pixel values. By default, the full sequence of transformations is specified.

Wavelength Interval

Specifies that the selected bands are to be restricted to those whose center wavelength is either inside or outside a closed interval, specified in nanometers. The default is no restriction.

The wavelength interval may be specified as follows:

This parameter has no effect if the input file contains no band center wavelength metadata.

Valid Bands Only

Specifies whether the selected bands are to be restricted to those with "plot" or "bmask" (begin mask) quality values. The default is NO.

This parameter has no effect if the input file contains no band-validity metadata.

Datatype

Specifies the data type of the output channel to receive the transformed image values.

Supported datatypes are:
Back to top

Details

A sequence of radiometric transformations can be represented in metadata for an image data set. A gain and an offset value are stored for each transformation function t(x) = gain*x + offset. The output of transformation i in the sequence is the input to transformation i+1.

Often, a desired overall radiometric image adjustment or correction can be determined by applying a sequence of operations to the original and transformed image values, each of which computes a gain and an offset value. The ability to store the sequence of gain and offset values and apply all or part of the transformation sequence during data input provides a convenient and efficient alternative to generating and storing intermediate image data sets. APPLRT can be used to generate a radiometrically transformed data set for input into these older programs.

APPLRT is used to apply a stored sequence of gains and offsets to produce a transformation output image data set. APPLRT internally composes multiple transformations so that a final transformation result may be obtained without generating intermediate image data sets.

If the specified output image file exists:
If the specified output image file does not already exist:

If the input data set contains band response profile metadata, the transformed bands are written to the output channels in order of increasing center wavelength value and increasing channel number: the transformed band corresponding to the smallest center wavelength value is written to the smallest numbered output channel, the transformed band corresponding to the second-smallest center wavelength values are written to the second-smallest numbered output channel, and so on. Also, the band response profile metadata for the selected bands is written to the output file if it is of a type that can store image metadata.

If the input data set does not contain band response profile metadata, the transformed bands are written to the output channels in order of increasing source and destination channel number (in this case, the parameter WLENINT is ignored).

If the data type of the output channel is compatible with the data type of the input channel, the transformation output values are written to the output channels without scaling. No radiometric transformations are stored in the output file.

If the data type of the output channel is not compatible with the data type of the input channel, the transformation output values are scaled to the full range of the data type before writing, according to:

y = min + (x - cmin) * (max - min) / (cmax - cmin)
where:

Also, one radiometric transformation, with a gain of:

gain = (cmax - cmin) / (max - min)

and an offset of:

offset = cmin - min * gain

when cmax != cmin or

gain = 1.0

and an offset of

offset = cmax - clip

where clip is the clipping value

clip = min if cmin < min
clip = max if cmin > max

when cmin = cmax, is stored in the output file, if it is a file that can store image metadata.

The output radiometric quantity type associated with a transformation that is represented in the output file is the same as that of the last transformation in the input sequence (as specified by RTLEVEL).

If the output file contains radiometric transformation metadata before APPLRT runs, that metadata is deleted.

Back to top

Algorithm

Let (G0,O0), (G1,O1), ..., (Gn,On) be a sequence of n (gain, offset) pairs (each pair representing a single radiometric transformation), and let V be a DN image value from one band.

These gains and offsets can be applied to V as a sequence of n radiometric transformations as follows:

(...(((G0*V + O0)*G1 + O1)*G2 + O2)...+ On-1)*Gn + On .

This expands to:

G0*G1*...*Gn*V + O0*G1*G2*...*Gn + O1*G2*G3*...*Gn +...+ On .

Therefore, a single composite (gain, offset) pair that represents the sequence of n separate radiometric transformationscan be computed as follows:

G = Prod_i=0^n Gi,
O = (Sum_i=0^n-1(Oi * Prod_j=i+1^n Gi)) + On

For efficiency, APPLRT precomputes a single (gain, offset) pair in the above manner for each selected input band and uses this pair to compute the transformation output values.

Back to top

Acknowledgements

PCI Geomatics received financial support from the Canadian Space Agency/L'Agence Spatiale Canadienne through the Earth Observation Application Development Program (EOADP) for the development of this software, under contract 9F028-0-4902/12.

Back to top

References

Berk, A. et al., 1999, "Modtran4 User's Manual", Air Force Research Laboratory, Space Vehicles Directorate, Air Force Materiel Command, Hanscom AFB, MA

Schott, J. (2007) Remote Sensing: The Image Chain Approach, USA.Oxford University Press

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.