opencv knowledge point 1

11. Edge detection

cv2.Canny(img,50,100)

Insert image description here
Insert image description here

12. Image outline

Insert image description here
To copy the image and then draw the outline to prevent the original image from changing
- 1 means to draw all the outlines

draw_img=img.copy()
res=cv2.drawContours(draw_img,contours,-1,(0,0,255),2)

おすすめ

転載: blog.csdn.net/weixin_72050316/article/details/133280249