import cv2image = cv2.imread('download.jpg')b = image.copy()# set green and red channels to 0b[:, :, 1] = 0b[:, :, 2] = 0g = image.copy()# set blue and red channels to 0g[:, :, 0] = 0g[:, :, 2] = 0r = image.copy()# set blue and green channels to 0r[:, :, 0] = 0r[:, :, 1] = 0# RGB - Bluecv2.imshow('B-RGB', b)# RGB - Greencv2.imshow('G-RGB', g)# RGB - Redcv2.imshow('R-RGB', r)cv2.waitKey(0)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)