How do I display the contours of an image using OpenCV Python?

前端 未结 3 880
逝去的感伤
逝去的感伤 2020-12-31 09:23

I followed this tutorial from official documentation. I run their code:

import numpy as np
import cv2

im = cv2.imread(\'test.jpg\')
imgray = cv2.cvtColor(im         


        
3条回答
  •  轮回少年
    2020-12-31 10:02

    Add these 2 lines at the end:

    cv2.imshow("title", im)
    cv2.waitKey()
    

    Also, be aware that you have img instead of im in your last line.

提交回复
热议问题