Question

I am using BGR to HSV conversion of image using OpenCV. Since I am new to this field and software, I may sound incorrect so please let me know if I am wrong.

Now, in my school project i want to work with HSV image, which is easily converted using

cvtColor(src, dst, CV_BGR2HSV);

I suppose, that imread() function reads image in a uchar format which is 8bit unsigned image (i suppose). In that case imshow() is also uchar.

But to work with HSV image, I am not sure but I feel i need to convert use Mat3b perhaps for the distinctive H, S and V channels of the image.

Incase if I am wrong, that I want to work with H channel of the HSV image only so how can i print, or modify this channel information.

Many thanks

Was it helpful?

Solution

Perhaps you can use cv::split to devide the HSV to 3 one-channel Mat. I think this topic OpenCV:split HSV image and scan through H channel may solve your problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top