Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Tranforming HSV into a linear space

조회 수: 1 (최근 30일)
Lora
Lora 2014년 3월 17일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi i am an absolute new and learning MATLAB i have a question that is how can i convert colorsHsv - [1x3] color in Matlab's HSV space to transform
if true
% Converts a color from Matlab's HSV cube to a linear space (i.e. a cone)
%
%Inputs:
% colorsHsv - [1x3] color in Matlab's HSV space
%
%Outputs:
% colorLinear - [1x3] color in a linear space where Euclidean distances can
% be applied.
function colorLinear=hsvToLinearSpace(colorHsv)
%---Modify this code---%
colorLinear(1) = colorHsv(1);
colorLinear(2) = colorHsv(2);
colorLinear(3) = colorHsv(3);
end it to linear space i-e cone
I am writing a function but cannot go further than this. So in short i am trying to write a function that does Converts a color from Matlab's HSV cube to a linear space (i.e. a cone)
  댓글 수: 1
Lora
Lora 2014년 3월 17일
is this syntax correct to extract H s and V channels ? colorLinear(1) = colorHsv(1); colorLinear(2) = colorHsv(2); colorLinear(3) = colorHsv(3);
Thanks anyways

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by