IMAGE SEGMENTATION USING HSV COLOR SPACE
# convert image to HSV color space
hsv = cv2.cvtColor(img, cv2.COLOR_RGB2HSV)
#H - 0:30, S - 0:150, V - 0:255
lower1 = np.array([0, 0, 0])
upper1 = np.array([30, 150, 255])
mask1 = cv2.inRange(hsv, lower1, upper1)
#первое облако точек
#H - 126:179, S - 0:50, V - 0:255
lower2 = np.array([126, 0, 0])
upper2 = np.array([179, 50, 255])
mask2 = cv2.inRange(hsv, lower2, upper2)
#второе облако точек
CONCLUSION
Image search based on color similarity.
For example, let's say you have a database of tree images and you want to find images that match
a given query. You can calculate the HSV color histogram for each image and compare them using
the distance metric to find the most similar images