필터 지우기
필터 지우기

How can I represent my image pixel values inside a HSV cone

조회 수: 2 (최근 30일)
Omair
Omair 2013년 11월 22일
댓글: Omair 2013년 11월 22일
Hello,
I'm trying to develop a colour model for fire in HSV colour space.I have a million sample pixels per channel for the HSV colour space. I want to represent these samples inside the HSV cone to get an idea of how they are distributed. Any thoughts or suggestions on how i could possibly proceed with this? Thanks in anticipation.

채택된 답변

Image Analyst
Image Analyst 2013년 11월 22일
See my attempt at doing it in MATLAB attached below in blue.
A better option is to use the Java code that was originally written for ImageJ but can be called from MATLAB. See my code samples in http://www.mathworks.com/matlabcentral/answers/?search_submit=answers&query=color-inspector&term=color-inspector
  댓글 수: 3
Image Analyst
Image Analyst 2013년 11월 22일
Just create any image. Like (untested)
k = 1;
for row = 1 : 1000
for col = 1 : 1000
hsvImage(row, col, 1) = hsv(k, 1);
hsvImage(row, col, 2) = hsv(k, 2);
hsvImage(row, col, 3) = hsv(k, 3);
k = k + 1;
end
end
% Now convert that to an RGB image
rgbImage = hsv2rgb(hsvImage);
imwrite(rgbImage, fullFileName);
Then import it into the Color Inspector and view the gamut as HSV.
Omair
Omair 2013년 11월 22일
Thanks. That worked like a charm. I should have thought of that sooner.

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

추가 답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2013년 11월 22일
Simply use scatter3?
  댓글 수: 1
Omair
Omair 2013년 11월 22일
I tried scatter3 but since the circular nature of the HSV colour space isn't taken into account the results are not adequate for my needs.

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by