update,
This commit is contained in:
13
vinniesniper-54816/task1/_lab/remove_grass/main.py
Normal file
13
vinniesniper-54816/task1/_lab/remove_grass/main.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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()
|
Reference in New Issue
Block a user