Skip to content

xhttps://github.com/PyImageSearch/imutils/blob/master/bin/range-detector limit range MAX for h in hsv to 179 #291

@pippo1990

Description

@pippo1990

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 :

for i in ["MIN", "MAX"]:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions