필터 지우기
필터 지우기

LCH to RGB conversion

조회 수: 16 (최근 30일)
danielle dan
danielle dan 2017년 5월 29일
편집: DGM 2021년 5월 10일
How do i create an image in LCH color space and convert it to RGB through Lab color space?
if true
C_lch2lab= makecform('lch2lab');
im_lab=applycform(im_lch,C_lch2lab);
C_lab2srgb= makecform('lab2srgb');
im_rgb=applycform(im_lab,C_lab2srgb);
end
  댓글 수: 1
John D'Errico
John D'Errico 2017년 5월 29일
편집: John D'Errico 2017년 5월 29일
Since you already know how to do the transformation, then why are you asking? My guess is your question is to understand how those tools work.
lch2lab is just a conversion from cylindrical to cartesian coordinates.
lab2srgb is a conversion from lab to xyz (easy to find the equations online) then a conversion into srgb (also findable online).

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

답변 (1개)

MathReallyWorks
MathReallyWorks 2017년 5월 29일
Hello danielle dan,
Have a look at this: LCH to RGB Conversion Tools
  댓글 수: 1
DGM
DGM 2021년 5월 9일
편집: DGM 2021년 5월 10일
That link no longer works because I deleted that FEX submission when I consolidated things a while back:
This offers bidirectional tools between sRGB and:
HSI
HSL
HSY/HSYp
HuSL/HuSLp
LCH ( LUV, LAB, SRLAB2, OKLAB, YPbPr)
as well as a boundary chroma calculation tool for the cylindrical models.

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

Community Treasure Hunt

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

Start Hunting!

Translated by