i am working on a project using opencv in python in which i want to detect the clouds in an image. i have tried a lot of things but i am stuck.i couldn't find the exact range of cloud color values for hsv color space. this is the code i have tried. the following code detect some of the clouds but not all.this is the code.i have also attached an image which i am getting from this code.
import cv2
import numpy as np
img = cv2.imread('E:/sky.jpg', 1)
hsv=cv2.cvtColor(img,cv2.COLOR_BGR2HSV)
white = np.array([255, 255, 255])
lowerBound = np.array([30,30,30])
mask = cv2.inRange(hsv, lowerBound, white)
res = cv2.bitwise_and(img, img, mask=mask)
cv2.imwrite("E:/clouds.jpg",res)
cv2.imshow("mywindow",res)
cv2.waitKey(0)