Colud we get a limit on MAX h for hsv image of 179/180 instead of 255 as range-detector.py is doing right now : https://github.com/PyImageSearch/imutils/blob/9f740a53bcc2ed7eba2558afed8b4c17fd8a1d4c/bin/range-detector#L22 def setup_trackbars(range_filter): cv2.namedWindow("Trackbars", 0) for i in ["MIN", "MAX"]: v = 0 if i == "MIN" else 255 for j in range_filter: cv2.createTrackbar("%s_%s" % (j, i), "Trackbars", v, 255, callback) see https://stackoverflow.com/questions/16685707/why-is-the-range-of-hue-0-180-in-opencv https://forum.opencv.org/t/does-color-bgr2hsv-full-really-yield-more-granular-hue-values/4778 and https://answers.opencv.org/question/207229/how-to-get-full-hsv-hue-value-range0-360-or-0-1-in-double-in-python/ differences between cv2.COLOR_BGR2HSV or cv2.COLOR_BGR2HSV_FULL