image = cv2.imread('midoria.jpg')
- We need change to RGB
rgb_image_copy = cv2.cvtColor(image_copy, cv2.COLOR_BGR2RGB)
lower_blue = np.array([0, 0, 100])
upper_blue = np.array([50, 90, 255])
mask = cv2.inRange(rgb_image_copy, lower_blue, upper_blue)
masked_image = np.copy(rgb_image_copy)
masked_image[mask != 0] = [0,0,0]
background_image = cv2.imread('space.jpg')
background_image = cv2.cvtColor(background_image, cv2.COLOR_BGR2RGB)
crop_backgroundimg = background_image[0:720 , 0:1280]
crop_backgroundimg[mask == 0] = [0, 0, 0]
complete_image = crop_backgroundimg + masked_image