From b7282f3c47da87df17c18fe3f628f75350432d63 Mon Sep 17 00:00:00 2001 From: hahnec Date: Thu, 4 Nov 2021 14:18:02 +0100 Subject: [PATCH] chore(vars): remove redundant variable declaration --- color_matcher/mvgd_matcher.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/color_matcher/mvgd_matcher.py b/color_matcher/mvgd_matcher.py index 30757ab..2f9352d 100644 --- a/color_matcher/mvgd_matcher.py +++ b/color_matcher/mvgd_matcher.py @@ -190,9 +190,8 @@ def w2_img_dist(self, img_a: np.ndarray, img_b:np.ndarray): :rtype: float """ - img_src, img_ref = img_a, img_b - mu_a, mu_b = np.mean(img_src, axis=(0, 1)), np.mean(img_ref, axis=(0, 1)) - cov_a, cov_b = np.cov(img_src.reshape(-1, 3).T), np.cov(img_ref.reshape(-1, 3).T) + mu_a, mu_b = np.mean(img_a, axis=(0, 1)), np.mean(img_b, axis=(0, 1)) + cov_a, cov_b = np.cov(img_a.reshape(-1, 3).T), np.cov(img_b.reshape(-1, 3).T) w2_img_dist = self.w2_dist(mu_a, mu_b, cov_a, cov_b) return w2_img_dist