register_relative#
Register a relative DEM or orthoimage to a reference DEM and/or orthorectified image.
usage: register_relative [-h] [-ref FN_REF] [-ort FN_ORTHO]
[-glacmask GLACMASK] [-landmask LANDMASK]
[-footprints FOOTPRINTS]
[-im_subset IM_SUBSET [IM_SUBSET ...]] [-b BLOCK_NUM]
[--subscript SUBSCRIPT] [-ori ORI]
[-ortho_res ORTHO_RES] [-imgsource IMGSOURCE]
[-strategy STRATEGY] [-density DENSITY] [-no_allfree]
[-useortho] [-max_iter MAX_ITER] [-use_cps]
[-cp_frac CP_FRAC] [-o] [-fn_gcps FN_GCPS]
dirmec fn_dem
Positional Arguments#
- dirmec
the name of the MEC directory to read the relative DEM from (e.g., MEC-Relative)
- fn_dem
path to reference DEM
Named Arguments#
- -ref, --fn_ref
path to reference orthorectified image (optional)
- -ort, --fn_ortho
path to relative orthoimage (optional)
- -glacmask
path to shapefile of glacier outlines (i.e., an exclusion mask)
- -landmask
path to shapefile of land outlines (i.e., an inclusion mask)
- -footprints
path to shapefile of image outlines. If not set, will look for Footprints.gpkg in the current directory. If this file does not exist, will attempt to download from USGS using imgsource.
- -im_subset
subset of raw images to work with (default: all)
- -b, --block_num
block number to use if processing multiple image blocks.
- --subscript
optional subscript to use for output filenames.
- -ori
name of orientation directory (after Ori-) (default: Relative).
Default:
'Relative'- -ortho_res
approx. ground sampling distance (pixel resolution) of ortho image. (default: 8 m)
Default:
8- -imgsource
USGS dataset name for images (default: DECLASSII).
Default:
'DECLASSII'- -strategy
strategy for generating GCPs. Must be one of: grid, random, or chebyshev. Note that if ‘random’ is used, density is the approximate number of points, rather than the distance between grid points (default: grid).
Default:
'grid'- -density
pixel spacing to look for GCPs (default: 200)
Default:
200- -no_allfree
run Campari with AllFree set to False
Default:
True- -useortho
use the orthomosaic in Ortho-{dirmec} rather than the DEM. If fn_ortho is set, uses that file instead (default: False).
Default:
False- -max_iter
the maximum number of Campari iterations to run (default: 5)
Default:
5- -use_cps
split the GCPs into GCPs and checkpoints (CPs), to quantify the uncertainty of the camera model (default: False).
Default:
False- -cp_frac
the fraction of GCPs to use as CPs when splitting into GCPs and CPs (default: 0.2)
Default:
0.2- -o, --use_orb
use skimage.feature.ORB to identify GCP locations in the reference image (default: use points generated by strategy)
Default:
False- -fn_gcps
(optional) shapefile or CSV of GCP coordinates to use. Column names should be [(name | id), (z | elevation), x, y]. If CSV is used, x,y should have the same CRS as the reference image.