add_hilo
Description
add_hilo is part of the Chavez (1986) spatial-frequency destriping pipeline for ACRES-format Landsat MSS/TM imagery (written by A. Y. / JCU, May 1990). It recombines a high-pass filtered image (<prefix>.high) and a low-pass filtered image (<prefix>.low) generated by lsfilter into a single destriped 8-bit image (<prefix>.des).
CLI Options & Usage
add_hilo -in <prefix>
-in <prefix>: Base filename of the ACRES image. Opens<prefix>.highand<prefix>.lowfor reading and creates<prefix>.des.
Algorithm
- Reads the 90-byte ACRES header from
<prefix>.high(extractingrow = header[4]andcol = header[3]), copies the header to<prefix>.des, and skips the header of<prefix>.low. - For every pixel across all
row à colsamples:- Evaluates
sum = high_pixel + low_pixel - 128(removing the128DC offset added to negative high-pass residuals bylsfilter). - Clamps
sumto[1, 255](0is reserved for masked/cloud pixels wherehigh == 0 && low == 0, which remain0).
- Evaluates
- Writes the reconstructed scanlines to
<prefix>.desfor subsequent artifact limiting vialimit_changeand cloud restoration viareplacecloud.