Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于第13节的一些bug调正分享 #9

Open
LINGoodfellow opened this issue Mar 25, 2020 · 2 comments
Open

关于第13节的一些bug调正分享 #9

LINGoodfellow opened this issue Mar 25, 2020 · 2 comments

Comments

@LINGoodfellow
Copy link

首先谢谢作者,分享如此干货
貌似OpenCV 3.X 之后findContours()就返回两个参数了,所以如果出bug,可以尝试改成
contours, hierarchy = cv2.findContours(
thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)

后面得改成for cnt in contours:
cv2.drawContours(img, [cnt], 0, (0, 0, 255), 2)
不然会出现,只识别了‘1’或者'3'单个数字轮廓的情况

@jackgu1
Copy link

jackgu1 commented Aug 22, 2020

修正一下,opencv是从4.X之后findContours()就返回两个参数了,出bug的话可以降级到3.X就行了 因为在作者分享的干货里有好几节都用到了cv2.findContours()

@drongh
Copy link

drongh commented Nov 18, 2020

我说明一下,作者其实是翻译了opencv python官方教程,加入了自己的一些干货。不过还是谢谢作者的努力,让我入门opencv。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants