fMeow / document-scanner

A opencv4 and scikit-image based python digital image document scanner.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Expected cv::UMat for argument 'mat'

crapthings opened this issue · comments

raceback (most recent call last):
  File "scripts/scan_demo.py", line 102, in <module>
    cv2.imshow('intensity contour', intensity)
TypeError: Expected cv::UMat for argument 'mat'

搞清楚了 #1 ,通过 python3 setup.py install 执行过后,再运行这个演示脚本提示的

osx 10.14.5
Python 3.7.3

看上去是瞬间出一个框里边黑色的,然后就出这个了

image

我注释掉这个现在演示可以运行了

cv2.imshow('intensity contour', intensity)

里边现在显示的都是 轮廓,但是看上去不像是纸张或者书本的轮廓。

image

不注释掉的情况,加这个可以运行了

--show mpl

python3 scripts/scan_demo.py --show mpl