-
Notifications
You must be signed in to change notification settings - Fork 960
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
Comments
修正一下,opencv是从4.X之后findContours()就返回两个参数了,出bug的话可以降级到3.X就行了 因为在作者分享的干货里有好几节都用到了cv2.findContours() |
我说明一下,作者其实是翻译了opencv python官方教程,加入了自己的一些干货。不过还是谢谢作者的努力,让我入门opencv。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
首先谢谢作者,分享如此干货
貌似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'单个数字轮廓的情况
The text was updated successfully, but these errors were encountered: