opencv 彩图转灰度图

opencv BGR2Gray

def gray():
    image = cv2.imread("2.jpg")
    image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    cv2.imshow("1", image)
    cv2.waitKey()
文章目录