summaryrefslogtreecommitdiffstats
path: root/demos/qualitymetrics.py
diff options
context:
space:
mode:
authorTomas Kulhanek <tomas.kulhanek@stfc.ac.uk>2019-02-22 07:50:37 -0500
committerTomas Kulhanek <tomas.kulhanek@stfc.ac.uk>2019-02-22 07:50:37 -0500
commit755b74b26f07f91fbffd19f3476da1f6ac16d774 (patch)
tree4bb4cf8c7576aa1773f0f5e8aa9600fc5a01ea64 /demos/qualitymetrics.py
parentc237d292999c93df09ca3679876d225896dd0ff9 (diff)
parent9b4058fbf779221ed7d37bfc6e7c838b294c5965 (diff)
downloadregularization-755b74b26f07f91fbffd19f3476da1f6ac16d774.tar.gz
regularization-755b74b26f07f91fbffd19f3476da1f6ac16d774.tar.bz2
regularization-755b74b26f07f91fbffd19f3476da1f6ac16d774.tar.xz
regularization-755b74b26f07f91fbffd19f3476da1f6ac16d774.zip
Merge remote-tracking branch 'remotes/origin/master' into newdirstructure
Conflicts: demos/demoMatlab_denoise.m demos/qualitymetrics.py
Diffstat (limited to 'demos/qualitymetrics.py')
-rw-r--r--demos/qualitymetrics.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/demos/qualitymetrics.py b/demos/qualitymetrics.py
index 850829e..e69de29 100644
--- a/demos/qualitymetrics.py
+++ b/demos/qualitymetrics.py
@@ -1,18 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-"""
-Created on Wed Feb 21 13:34:32 2018
-# quality metrics
-@authors: Daniil Kazantsev, Edoardo Pasca
-"""
-import numpy as np
-
-def nrmse(im1, im2):
- rmse = np.sqrt(np.sum((im2 - im1) ** 2) / float(im1.size))
- max_val = max(np.max(im1), np.max(im2))
- min_val = min(np.min(im1), np.min(im2))
- return 1 - (rmse / (max_val - min_val))
-
-def rmse(im1, im2):
- rmse = np.sqrt(np.sum((im1 - im2) ** 2) / float(im1.size))
- return rmse