Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Scheffler
arosics
Commits
1d576353
Commit
1d576353
authored
Oct 13, 2021
by
Daniel Scheffler
Browse files
Merge branch 'master' into feature/add_multi_projection_support
parents
fafb126b
7cf9768c
Pipeline
#28969
failed with stage
in 4 minutes and 14 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
HISTORY.rst
View file @
1d576353
...
...
@@ -2,6 +2,12 @@
History
=======
1.7.1 (2021-10-13)
------------------
* Added more statistics to Tie_Point_Grid.calc_overall_stats().
1.7.0 (2021-09-30)
------------------
...
...
arosics/Tie_Point_Grid.py
View file @
1d576353
...
...
@@ -516,14 +516,53 @@ class Tie_Point_Grid(object):
- MAE_Y_M: mean absolute error of shift vector length in y-direction in map units
- MAE_X_PX: mean absolute error of shift vector length in x-direction in pixel units
- MAE_Y_PX: mean absolute error of shift vector length in y-direction in pixel units
- MEAN_ABS_SHIFT: mean absolute shift vector length in map units
- MEAN_X_SHIFT_M: mean shift vector length in x-direction in map units
- MEAN_Y_SHIFT_M: mean shift vector length in y-direction in map units
- MEAN_X_SHIFT_PX: mean shift vector length in x-direction in pixel units
- MEAN_Y_SHIFT_PX: mean shift vector length in y-direction in pixel units
- MEAN_ANGLE: mean direction of the shift vectors in degrees from north
- MEDIAN_ANGLE: median direction of the shift vectors in degrees from north
- MEAN_SSIM_BEFORE: mean structural similatity index within each matching window before co-registration
- MEDIAN_SSIM_BEFORE: median structural similatity index within each matching window before co-registration
- MEAN_SSIM_AFTER: mean structural similatity index within each matching window after co-registration
- MEDIAN_RELIABILITY: median tie point reliability in percent
- MEDIAN_SSIM_AFTER: median structural similatity index within each matching window after co-registration
- MEAN_RELIABILITY: mean tie point reliability in percent
- MEDIAN_ABS_SHIFT: median absolute shift vector length in map units
- MEDIAN_X_SHIFT_M: median shift vector length in x-direction in map units
- MEDIAN_Y_SHIFT_M: median shift vector length in y-direction in map units
- MEDIAN_X_SHIFT_PX: median shift vector length in x-direction in pixel units
- MEDIAN_Y_SHIFT_PX: median shift vector length in y-direction in pixel units
- MEDIAN_ANGLE: median direction of the shift vectors in degrees from north
- MEDIAN_SSIM_BEFORE: median structural similatity index within each matching window before co-registration
- MEDIAN_SSIM_AFTER: median structural similatity index within each matching window after co-registration
- MEDIAN_RELIABILITY: median tie point reliability in percent
- STD_ABS_SHIFT: standard deviation of absolute shift vector length in map units
- STD_X_SHIFT_M: standard deviation of shift vector length in x-direction in map units
- STD_Y_SHIFT_M: standard deviation of shift vector length in y-direction in map units
- STD_X_SHIFT_PX: standard deviation of shift vector length in x-direction in pixel units
- STD_Y_SHIFT_PX: standard deviation of shift vector length in y-direction in pixel units
- STD_ANGLE: standard deviation of direction of the shift vectors in degrees from north
- STD_SSIM_BEFORE: standard deviation of structural similatity index within each matching window before
co-registration
- STD_SSIM_AFTER: standard deviation of structural similatity index within each matching window after
co-registration
- STD_RELIABILITY: standard deviation of tie point reliability in percent
- MIN_ABS_SHIFT: minimal absolute shift vector length in map units
- MIN_X_SHIFT_M: minimal shift vector length in x-direction in map units
- MIN_Y_SHIFT_M: minimal shift vector length in y-direction in map units
- MIN_X_SHIFT_PX: minimal shift vector length in x-direction in pixel units
- MIN_Y_SHIFT_PX: minimal shift vector length in y-direction in pixel units
- MIN_ANGLE: minimal direction of the shift vectors in degrees from north
- MIN_SSIM_BEFORE: minimal structural similatity index within each matching window before co-registration
- MIN_SSIM_AFTER: minimal structural similatity index within each matching window after co-registration
- MIN_RELIABILITY: minimal tie point reliability in percent
- MIN_ABS_SHIFT: maximal absolute shift vector length in map units
- MAX_X_SHIFT_M: maximal shift vector length in x-direction in map units
- MAX_Y_SHIFT_M: maximal shift vector length in y-direction in map units
- MAX_X_SHIFT_PX: maximal shift vector length in x-direction in pixel units
- MAX_Y_SHIFT_PX: maximal shift vector length in y-direction in pixel units
- MAX_ANGLE: maximal direction of the shift vectors in degrees from north
- MAX_SSIM_BEFORE: maximal structural similatity index within each matching window before co-registration
- MAX_SSIM_AFTER: maximal structural similatity index within each matching window after co-registration
- MAX_RELIABILITY: maximal tie point reliability in percent
:param include_outliers: whether to include tie points that have been marked as false-positives (if present)
"""
...
...
@@ -538,17 +577,17 @@ class Tie_Point_Grid(object):
tbl
=
tbl
if
include_outliers
else
tbl
[
tbl
[
'OUTLIER'
]
==
0
].
copy
()
if
'OUTLIER'
in
tbl
.
columns
else
tbl
tbl
=
tbl
.
copy
().
replace
(
self
.
outFillVal
,
np
.
nan
)
def
RMSE
(
val
s
):
val
s_sq
=
val
s
**
2
return
np
.
sqrt
(
sum
(
val
s_sq
)
/
len
(
val
s_sq
))
def
RMSE
(
shift
s
):
shift
s_sq
=
shift
s
**
2
return
np
.
sqrt
(
sum
(
shift
s_sq
)
/
len
(
shift
s_sq
))
def
MSE
(
val
s
):
val
s_sq
=
val
s
**
2
return
sum
(
val
s_sq
)
/
len
(
val
s_sq
)
def
MSE
(
shift
s
):
shift
s_sq
=
shift
s
**
2
return
sum
(
shift
s_sq
)
/
len
(
shift
s_sq
)
def
MAE
(
val
s
):
val
s_abs
=
np
.
abs
(
val
s
)
return
sum
(
val
s_abs
)
/
len
(
val
s_abs
)
def
MAE
(
shift
s
):
shift
s_abs
=
np
.
abs
(
shift
s
)
return
sum
(
shift
s_abs
)
/
len
(
shift
s_abs
)
abs_shift
,
x_shift_m
,
y_shift_m
,
x_shift_px
,
y_shift_px
,
angle
,
ssim_before
,
ssim_after
,
reliability
=
\
[
tbl
[
k
].
dropna
().
values
for
k
in
[
'ABS_SHIFT'
,
'X_SHIFT_M'
,
'Y_SHIFT_M'
,
'X_SHIFT_PX'
,
'Y_SHIFT_PX'
,
...
...
@@ -559,31 +598,34 @@ class Tie_Point_Grid(object):
N_VALID_TP
=
len
(
abs_shift
),
N_INVALID_TP
=
n_outliers
,
PERC_VALID_TP
=
(
n_tiepoints
-
n_outliers
)
/
n_tiepoints
*
100
,
RMSE_M
=
RMSE
(
abs_shift
),
RMSE_X_M
=
RMSE
(
x_shift_m
),
RMSE_Y_M
=
RMSE
(
y_shift_m
),
RMSE_X_PX
=
RMSE
(
x_shift_px
),
RMSE_Y_PX
=
RMSE
(
y_shift_px
),
MSE_M
=
MSE
(
abs_shift
),
MSE_X_M
=
MSE
(
x_shift_m
),
MSE_Y_M
=
MSE
(
y_shift_m
),
MSE_X_PX
=
MSE
(
x_shift_px
),
MSE_Y_PX
=
MSE
(
y_shift_px
),
MAE_M
=
MAE
(
abs_shift
),
MAE_X_M
=
MAE
(
x_shift_m
),
MAE_Y_M
=
MAE
(
y_shift_m
),
MAE_X_PX
=
MAE
(
x_shift_px
),
MAE_Y_PX
=
MAE
(
y_shift_px
),
MEAN_ANGLE
=
np
.
mean
(
angle
),
MEDIAN_ANGLE
=
np
.
median
(
angle
),
MEAN_SSIM_BEFORE
=
np
.
mean
(
ssim_before
),
MEDIAN_SSIM_BEFORE
=
np
.
median
(
ssim_before
),
MEAN_SSIM_AFTER
=
np
.
mean
(
ssim_after
),
MEDIAN_SSIM_AFTER
=
np
.
median
(
ssim_after
),
MEAN_RELIABILITY
=
np
.
mean
(
reliability
),
MEDIAN_RELIABILITY
=
np
.
median
(
reliability
)
)
for
stat
,
func
in
zip
([
'mean'
,
'median'
,
'std'
,
'min'
,
'max'
],
[
np
.
mean
,
np
.
median
,
np
.
std
,
np
.
min
,
np
.
max
]):
for
n
in
[
'abs_shift'
,
'x_shift_m'
,
'y_shift_m'
,
'x_shift_px'
,
'y_shift_px'
,
'angle'
,
'ssim_before'
,
'ssim_after'
,
'reliability'
]:
vals
=
locals
()[
n
]
stats
[
f
'
{
stat
}
_
{
n
}
'
.
upper
()]
=
func
(
vals
)
return
stats
def
plot_shift_distribution
(
self
,
...
...
arosics/version.py
View file @
1d576353
...
...
@@ -24,5 +24,5 @@
# limitations under the License.
__version__
=
'1.7.
0
'
__versionalias__
=
'2021-
09-30
_01'
__version__
=
'1.7.
1
'
__versionalias__
=
'2021-
10-13
_01'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment