Files
004_comission/vinniesniper-54816/task1/_lab/remove_grass/main.py
louiscklaw b1cd1d4662 update,
2025-01-31 22:56:58 +08:00

14 lines
240 B
Python

import cv2
import numpy as np
# Load the image
img = cv2.imread("image_508.jpg")
# Set the G channel to zero
img[:, :, 1] = 0
# Display the modified image
cv2.imshow("Image without G channel", img)
cv2.waitKey(0)
cv2.destroyAllWindows()