Skip to content

Commit

Permalink
refactor(mkl): generalize mkl for more color channels (e.g., alpha)
Browse files Browse the repository at this point in the history
  • Loading branch information
hahnec committed Aug 25, 2021
1 parent 694420f commit b387c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion color_matcher/mvgd_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def mkl_solver(self):
eig_val_r, eig_vec_r = np.linalg.eig(self.cov_r)
eig_val_r[eig_val_r < 0] = 0
val_r = np.diag(np.sqrt(eig_val_r[::-1]))
vec_r = np.array([eig_vec_r[:, 2] * -1, eig_vec_r[:, 1], eig_vec_r[:, 0] * -1]).T
vec_r = np.array(eig_vec_r[:, ::-1])
inv_r = np.diag(1. / (np.diag(val_r + np.spacing(1))))

mat_c = np.dot(val_r, np.dot(vec_r.T, np.dot(self.cov_z, np.dot(vec_r, val_r))))
Expand Down

0 comments on commit b387c5f

Please sign in to comment.