I basically want to convert the image to hsv and then place boundaries. If it is within the given boundary it should print the color. For example if it is within the hsv region of red which I define, It should return a boolean value like 1 or 0 to another variable and using "if loops", I should be able to check and print it. This was my idea, but If there is any other function or method available plese let me know. any suggestion is valued. I have attached a sample image, if posible please show me a sample code for this, (But I first want to the bgr image convert to hsv).
I was wondering about the cv::inRange function but I don't know as to how it works. Please show me a sample code of how to go about this. I am new to opencv . Thanks a lot in advance.
Sample image :