at first image, everything is normal, I get the alpha map.
then, the process stops at the second image:
Traceback (most recent call last):
File "knn_matting.py", line 88, in <module>
main(args)
File "knn_matting.py", line 75, in main
alpha = knn_matte(img, trimap)
File "knn_matting.py", line 39, in knn_matte
D_script = scipy.sparse.diags(np.ravel(A.sum(axis=1)))
File "/home/lzw/.local/lib/python3.5/site-packages/scipy/sparse/base.py", line 1015, in sum
np.ones((n, 1), dtype=res_dtype))
File "/home/lzw/.local/lib/python3.5/site-packages/numpy/matrixlib/defmatrix.py", line 68, in asmatrix
return matrix(data, dtype=dtype, copy=False)
File "/home/lzw/.local/lib/python3.5/site-packages/numpy/matrixlib/defmatrix.py", line 118, in __new__
PendingDeprecationWarning, stacklevel=2)
PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
Hi, I find a strange phenomenon when I process more than one image like this:
at first image, everything is normal, I get the alpha map. then, the process stops at the second image: