I've searched and searched but couldn't find:
When I use cv.InRanges
I need to place a min and max HSV values. In all the examples I have seen so far they use Cv.Scalar
on constants
i tried using it myself but couldnt figure what should be there i tried a list, a tuple and numpy.array all with three values and i keep getting errors.
"a float is requierd" for a list
"a float is required" for tuple
"only length -1 arrays can be converted to python scalars" for numpy.array
Though come to think of it array and list should be the same....
Can anyone please tell me how to use it properly, this is a sample of one of many tries:
def thresh(img, pixel):
hsv_min = pixel
hsv_min[0] = hsv_min[0] - 5
hsv_min[1] = hsv_min[1] - 20
hsv_min[2] = hsv_min[2] - 20
hsv_max[0] = hsv_max[0] + 5
hsv_max[1] = 255
hsv_max[2] = 255
cv.InRangeS(ingHSV, cv.Scalar(hsv_min), cv,Scalar(hsv_max), imgThreshold)