preprocess_kh9_mc#
Run pre-processing steps for KH-9 Hexagon Mapping Camera images. 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
reseau: finds reseau marker locations in the joined image
erase: erases reseau markers from image
resample: resamples images to common size using the reseau marker locations
tapioca: calls mm3d Tapioca MulScale to find tie points
tapas: calls mm3d Tapas to calibrate camera model, find relative image orientation
aperi: calls mm3d AperiCloud to create point cloud using calibrated camera model
Additional optional steps can be included using the ‘option’ argument:
denoise: use bi-lateral denoising to remove grain from the images before resampling.
filter: use a 1-sigma gaussian filter to smooth the images before resampling.
destripe: remove horizontal/vertical scanner-induced stripes from images
- balance: use contrast-limited adaptive histogram equalization (clahe) to improve contrast in the image. Done
after resampling the images.
schnaps: calls mm3d Schnaps to clean/filter tie points. Done after calling Tapioca and before calling Tapas.
To run steps individually, use the –steps flag with the corresponding step name(s). For example, to only run the ‘reseau’ and ‘erase’ steps:
preprocess_kh9_mc –steps reseau erase <additional arguments>
Similarly, to run the ‘reseau’, ‘erase’, and ‘balance’ steps:
preprocess_kh9_mc –steps reseau erase –option balance <additional arguments>
usage: preprocess_kh9_mc [-h] [--steps STEPS [STEPS ...]]
[--skip SKIP [SKIP ...]]
[--option OPTION [OPTION ...]] [-n NPROC] [--add_sfs]
[--cam_csv CAM_CSV] [--tar_ext TAR_EXT] [-r]
[-o OVERLAP] [-k BLOCK_SIZE] [-b] [-s SCALE]
[--clip_limit CLIP_LIMIT] [--res_low RES_LOW]
[--res_high RES_HIGH] [--camera_model CAMERA_MODEL]
[--ori ORI] [--init_cal INIT_CAL] [--lib_foc]
[--lib_pp] [--lib_cd] [--add_params]
Named Arguments#
- --steps
The default pre-processing steps to run (default: all).
Default:
'all'- --skip
The pre-processing steps to skip (default: none).
Default:
'none'- --option
The optional pre-processing steps to skip (default: none).
Default:
'none'- -n, --nproc
The number of sub-processes to use - either an integer value, or max. If max, uses mp.cpu_count() to determine the total number of processors available (default: 1).
Default:
1- --add_sfs
use SFS to help find tie points in low-contrast images
Default:
False- --cam_csv
Name of the CSV file containing camera information (default: camera_defs.csv)
Default:
'camera_defs.csv'- --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: 2000).
Default:
2000- -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- -s, --scale
The scale of the resampled images, in pixels per mm (default: 70).
Default:
70- --clip_limit
Clipping limit, for contrast-limited adaptive histogram equalization. (default: 0.005)
Default:
0.005- --res_low
the size of the largest image axis, in pixels, for low-resolution matching with Tapioca (default: 400).
Default:
400- --res_high
the size of the largest image axis, in pixels, for low-resolution matching with Tapioca (default: 1200).
Default:
1200- --camera_model
The camera calibration model to use for Tapas (default: RadialExtended)
Default:
'RadialExtended'- --ori
The output Ori directory to create using Tapas (default: Relative)
Default:
'Relative'- --init_cal
The initial calibration Ori to use for Tapas (default: Init)
Default:
'Init'- --lib_foc
Use LibFoc=1 for mm3d Tapas
Default:
False- --lib_pp
Use LibPP=1 for mm3d Tapas
Default:
False- --lib_cd
Use LibCD=1 for mm3d Tapas
Default:
False- --add_params
Add decentric and affine parameters to the camera model
Default:
False