In case it’s not clear why my first approach to setting pixels to white isn’t working.
this is the result for the first approach
So i tried using the bitwise idea.
Here i converted the image to hsv to get a better understanding of which pixels are set to blue or light blue
The HSV plot is shown below
from this i think the light blue lower and upper ranges are
(77,90,0) and (125,250,225)
Using this i created the bitwise mask and obtained this beauty
code for masking
Code for masking
mask = cv2.inRange(hsv_img, light_b, high_b)
result = cv2.bitwise_and(img, img, mask=mask)
plt.subplot(1, 2, 1)
plt.imshow(mask, cmap="gray")
plt.subplot(1, 2, 2)
plt.imshow(result)
plt.show()
Not sure why the sky is jet black here.
Would appreciate it if some kind soul could help me.Chris i am looking at you as you have always helped me out.