6. Edge detection

作者: JaedenKil | 来源:发表于2020-01-14 14:43 被阅读0次
    import cv2
    
    
    img = cv2.imread("C:\\Users\\zzheng\\Pictures\\tiger.png", cv2.IMREAD_UNCHANGED)
    edges = cv2.Canny(img, 100, 200, True)
    cv2.imshow("Edge Detection", edges)
    cv2.waitKey(0)
    cv2.destroyAllWindows()
    

    edges = cv2.Canny('/path/to/img', minVal, maxVal, apertureSize, L2gradient)
    /path/to/img (Mandatory): File Path of the image
    minVal (Mandatory): minVal (Mandatory)
    maxVal (Mandatory): Maximum intensity gradient
    apertureSize (Optional):
    L2gradient (Optional) (Default Value : false): If true, Canny() uses a much more computationally expensive equation to detect edges, which provides more accuracy at the cost of resources.

    相关文章

      网友评论

        本文标题:6. Edge detection

        本文链接:https://www.haomeiwen.com/subject/xucaactx.html