2. Image write

作者: JaedenKil | 来源:发表于2020-01-13 17:41 被阅读0次
    import cv2 as cv2
    
    
    gray_img = cv2.imread('C:\\Users\\zzheng\\Pictures\\tiger.png', cv2.IMREAD_GRAYSCALE)
    status = cv2.imwrite('C:\\Users\\zzheng\\Pictures\\tiger02.png', gray_img)
    print("Image write status: '%s'." % status)
    

    cv2.imwrite('/path/to/destination/image.png',image)
    First Argument is Path to the destination on file system, where image is ought to be saved.
    Second Argument is ndarray containing image
    Returns True is returned if the image is written to file system, else False.

    相关文章

      网友评论

        本文标题:2. Image write

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