import cv2
import numpy as np

img = cv2.imread('../Resources/Photos/park.jpg')

b,g,r = cv2.split(img)
# cv2.imshow('Blue',b)
# cv2.imshow('Green',g)
# cv2.imshow('Red',r)

blank = np.zeros(img.shape[:2],dtype='uint8')
blue = cv2.merge([b,blank,blank])
green = cv2.merge([blank,g,blank])
red = cv2.merge([blank,blank,r])

# cv2.imshow('Blue',blue)
# cv2.imshow('Green',green)
# cv2.imshow('Red',red)
# print(f'img -> {img.shape}, b->{b.shape}, g->{g.shape}, r-> {r.shape}')
merged = cv2.merge([b,g,r])
cv2.imshow('Merged',merged)
cv2.waitKey(0)
import cv2
import numpy as np

img = cv2.imread('../Resources/Photos/park.jpg')

b,g,r = cv2.split(img)
# cv2.imshow('Blue',b)
# cv2.imshow('Green',g)
# cv2.imshow('Red',r)

blank = np.zeros(img.shape[:2],dtype='uint8')
blue = cv2.merge([b,blank,blank])
green = cv2.merge([blank,g,blank])
red = cv2.merge([blank,blank,r])

# cv2.imshow('Blue',blue)
# cv2.imshow('Green',green)
# cv2.imshow('Red',red)
# print(f'img -> {img.shape}, b->{b.shape}, g->{g.shape}, r-> {r.shape}')
merged = cv2.merge([b,g,r])
cv2.imshow('Merged',merged)
cv2.waitKey(0)
# cv2.imshow('Blue',b) # cv2.imshow('Green',g) # cv2.imshow('Red',r) # cv2.imshow('Blue',blue) # cv2.imshow('Green',green) # cv2.imshow('Red',red) # print(f'img -> {img.shape}, b->{b.shape}, g->{g.shape}, r-> {r.shape}')