How to convert gray image to HSV plane V - value image?

조회 수: 6 (최근 30일)
MR. W
MR. W 2016년 11월 14일
댓글: MR. W 2016년 11월 15일
Hi,
Given my image is a gray image and i don't have the rgb image of this gray image, can i know how can i convert this gray image to the HSV colour plane V - value plane image only?
The gray image and the value plane image looks quite similar but actually their values are quite different so if anyone have any idea on this, please let me know about the possibility.
Thank you in advance.

채택된 답변

Walter Roberson
Walter Roberson 2016년 11월 14일
I used
cam = imread('cameraman.tif');
HSV = cat(3, zeros(size(cam)), zeros(size(cam)), double(cam)./255);
RGB = hsv2rgb(HSV);
imshow(RGB)
It seems to have worked
  댓글 수: 6
Walter Roberson
Walter Roberson 2016년 11월 15일
I am certain that there is no formula to convert between the two methods.
As for testing which method had been used: good question. I do not have an answer for that at this time. I notice that they have different distribution statistics, but I do not know yet how that could be taken advantage of.
If you happened to know that an area was originally bright blue, then if the area shows up bright then the HSV method has been used; if the area shows up dark then the rgb2gray method has been used.
MR. W
MR. W 2016년 11월 15일
Thanks again for the information and appreciate it. I will try to read through some related materials first to check on the possibility.
Have a nice day.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by