HSV value of a RGB pixel
The first image is the orginal BGR image and second (HSV.jpg) is the HSV color converted image
I opened the original image in GIMP editor and I checked the coordinate (300,300) and in that coordinate following values I found B:74 G:70 R:75 H:312 S:7 V:29
Then the same coordinate (300,300) when I checked in HSV converted image (HSV.jpg) I didn't find these "312,7,29" HSV values instead I found its RGB value.
I know that opencv doesn't display as HSV values, but then through what ways I will be able to get the HSV value of that particular coordinates(300,300) RGB pixel.
I thought conversion of BGR2HSV will do that and will give that values(312,7,29) but it didn't give those values Please help me understand with this.
Thanks in Advance Sarjoon.
I think your answer is here
Check out the answer here, which will display BGR value and corresponding HSV value http://answers.opencv.org/question/30...
And if you want to segment the object then the answer here might be helpful http://answers.opencv.org/question/28...
also, since H has to fit into a [0..255] byte in opencv, the value is divided by 2, so in the [0..180] range, thus your example hsv values would be (156,7,29) in opencv