preprocess_pan#
Run pre-processing steps for declassified panoramic images (e.g., KH-4 and KH-9 Panoramic Camera). By default, runs all steps (equivalent to “–steps all”):
extract: extracts images from tar files (skips if no tar files are found)
join: joins scanned image halves
filter: use a 1-sigma gaussian filter to smooth the images before cropping
crop: rotate and crop images to remove image frame
balance: use contrast-limited adaptive histogram equalization (clahe) to improve contrast in the image
To run steps individually, use the –steps flag with the corresponding step name(s). For example, to only run the ‘join’ and ‘crop’ steps:
preprocess_pan <flavor> –steps join crop <additional arguments>
usage: preprocess_pan [-h] [--steps STEPS [STEPS ...]]
[--skip SKIP [SKIP ...]] [--tar_ext TAR_EXT] [-r]
[-o OVERLAP] [-k BLOCK_SIZE] [-b] [-m MARKER_SIZE]
[-s FACTOR] [--clip_limit CLIP_LIMIT]
flavor
Positional Arguments#
- flavor
The camera type (KH4 or KH9)
Named Arguments#
- --steps
The pre-processing steps to run (default: all).
Default:
'all'- --skip
The pre-processing steps to skip (default: none).
Default:
'none'- --tar_ext
Extension for tar files (default: .tgz)
Default:
'.tgz'- -r, --is_reversed
Order of image parts is reversed (a is the right side of the image). (default: False)
Default:
False- -o, --overlap
The amount of overlap between image parts to use to search for matches. Default dependson flavor: KH4 -> 8000, KH9 -> 1000
- -k, --block_size
the number of rows each search sub-block should cover (default: 2000).
Default:
2000- -b, --blend
Blend across image halves to prevent a sharp line at edge.
Default:
False- -m, --marker_size
The size of the wagon wheel markers to identify in the image (default: 31 px)
Default:
31- -s, --factor
The number by which to divide the image width and height to scale the image (default: do not scale)
- --clip_limit
Clipping limit, for contrast-limited adaptive histogram equalization. (default: 0.005)
Default:
0.005