📌  相关文章
📜  如何在opencv中更改图像的颜色 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:27.826000             🧑  作者: Mango

代码示例1
# if you want to change color while reading the image, set flag=0 for Grayscale
img = cv2.imread("example.png", flag=0)

# if you want to change color of a pre-loaded image (Grayscale)
# chnage the code parameter accordingly, here it turns into grayscale
img = cv2.cvtColor(img, code=cv2.COLOR_BGR2GRAY)