MarcoForte / closed-form-matting

Python implementation of A. Levin D. Lischinski and Y. Weiss. A Closed Form Solution to Natural Image Matting. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), June 2006, New York
MIT License
435 stars 107 forks source link

some confuse about covariance formular #11

Closed chaomaer closed 5 years ago

chaomaer commented 6 years ago

I have read your code. I am confused with this line, why not compute the covariance using built-in function np.cov directly. Can you explain why the covariance is written this way ? thanks.

MarcoForte commented 6 years ago

From what I read on https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.cov.html, np.cov only works for 1D or 2D arrays.