Commit bec655b1 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

added new parameter '-max_points' to command line interface

components.CoReg.GeoArray_CoReg:
- removed not neccessary if condition

components.CoReg_local.COREG_LOCAL:
- __init__(): edited docstring

components.Geom_Quality_Grid.Geom_Quality_Grid:
- __init__(): edited docstring

coreg_cmd:
- added new parameter '-max_points' to argparser for local coregistration

- updated __version__
parent c22e185e
......@@ -9,7 +9,7 @@ from .components import utilities
from .components import geometry
__author__ = 'Daniel Scheffler'
__version__= '2016-11-22_02'
__version__= '2016-11-23_01'
__all__=['COREG',
'COREG_LOCAL',
......
......@@ -53,13 +53,7 @@ class GeoArray_CoReg(GeoArray):
progress = CoReg_params['progress']
q = CoReg_params['q'] if not CoReg_params['v'] else False
if isinstance(path_or_geoArr, GeoArray):
self.__dict__ = path_or_geoArr.__dict__
self.nodata = nodata if nodata is not None else self._nodata
self.progress = progress if progress is not None else self.progress
self.q = q if q is not None else self.q
else:
super(GeoArray_CoReg, self).__init__(path_or_geoArr, nodata=nodata, progress=progress, q=q)
super(GeoArray_CoReg, self).__init__(path_or_geoArr, nodata=nodata, progress=progress, q=q)
self.imID = imID
self.imName = 'reference image' if imID == 'ref' else 'image to be shifted'
......
......@@ -41,6 +41,9 @@ class COREG_LOCAL(object):
:param im_tgt(str, GeoArray): source path of image to be shifted (any GDAL compatible image format is supported)
:param grid_res: quality grid resolution in pixels of the target image
:param max_points(int): maximum number of points used to find coregistration tie points
NOTE: Points are selected randomly from the given point grid (specified by
'grid_res'). If the point does not provide enough points, all available points
are chosen.
:param window_size(tuple): custom matching window size [pixels] (default: (256,256))
:param path_out(str): target path of the coregistered image
- if None (default), no output is written to disk
......
......@@ -46,6 +46,9 @@ class Geom_Quality_Grid(object):
:param COREG_obj(object): an instance of COREG class
:param grid_res: grid resolution in pixels of the target image
:param max_points(int): maximum number of points used to find coregistration tie points
NOTE: Points are selected randomly from the given point grid (specified by
'grid_res'). If the point does not provide enough points, all available points
are chosen.
:param outFillVal(int): if given the generated geometric quality grid is filled with this value in case
no match could be found during co-registration (default: -9999)
:param resamp_alg_calc(str) the resampling algorithm to be used for all warping processes during calculation
......
......@@ -74,6 +74,7 @@ def run_local_coreg(args):
path_out = args.path_out,
fmt_out = args.fmt_out,
grid_res = args.grid_res,
max_points = args.max_points,
r_b4match = args.br,
s_b4match = args.bs,
window_size = args.ws,
......@@ -259,6 +260,11 @@ if __name__ == '__main__':
locArg('grid_res', type=int, help='quality grid resolution in pixels of the target image')
locArg('-max_points', nargs='?', type=int,
help="maximum number of points used to find coregistration tie points. NOTE: Points are selected randomly "
"from the given point grid (specified by 'grid_res'). If the point does not provide enough points, all "
"available points are chosen.")
locArg('-o', nargs='?', type=str, dest='path_out', default='auto',
help="target path of the coregistered image. If 'auto' (default): /dir/of/im1/<im1>__shifted_to__<im0>.bsq")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment