I am working on tracking moving object using OpenCV, python. The code that I have right now works well for a hardcoded set of lower and upper bounds of HSV values.
blueLower = (100, 50, 50)
blueUpper = (150, 255, 255)
Now, I want to feed the lower and upper HSV values dynamically for the cropped section of an image (the image will be the first frame of a video). I am able to get the cropped section of image and its dominant RGB value.
Is it possible to get lower and upper range of HSV with a dynamic RGB value?
If not, how can I get the range of HSV with the help of the cropped image?
Note:- The cropped image will have the object to track, hence I will have majority of color that belongs to that object.