新人求助,看了好久还是没懂
opencv吧
全部回复
仅看楼主
level 1
泵刚 楼主
import cv2
img=cv2.imread('D:/111.jpg',0)
cv2.imshow('a',img)
ret,src=cv2.threshold(img,10,255,cv2.THRESH_BINARY_INV)
cv2.imshow('b',src)
refCnts,hierarchy=cv2.findContours(src.copy(),cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE)
tupian3=cv2.drawContours(img,refCnts,-1,(0,255,0),3)
cv2.imshow('c',tupian3)
cv2.waitKey(0)
cv2.destroyAllWindows()
为什么没有轮廓描边,不是应该有绿色的边的嘛
2020年02月03日 10点02分 1
level 1
泵刚 楼主
不要沉啊
2020年02月03日 10点02分 2
level 13
会不会因为图是单通道,只能显示灰度图?
2020年02月03日 12点02分 3
什么意思
2020年02月03日 12点02分
level 1
泵刚 楼主

2020年02月05日 08点02分 4
1