Basic operations on image
Image properties
img.shape gives 3-tuple
<number of rows>, <number of columns>, <channels>
img.size gives Total number of pixels
img.dtype gives datatype of the Image
b,g,r = cv2.split(img) The B,G,R channels of an image is split into their individual planes
img = cv2.merge((b,g,r)) to merge individual channels to BGR image
Image Addition
You can add two images by cv2.add() or by res = img1 + img2.
Weighted addition can be use to add transparency
Blend= cv2.addWeighted(img1,0.7,img2,0.3,0)