필터 지우기
필터 지우기

How to convert Lab to RGB image and its matlab code?

조회 수: 2 (최근 30일)
somasekar jalari
somasekar jalari 2015년 10월 28일
댓글: Image Analyst 2017년 1월 4일
In my program,first converted rgb image to lab but after processing the image , i want convert Lab to rgb image. so i request you, pls provide matlab code for converting lab to rgb image?

채택된 답변

Thorsten
Thorsten 2015년 10월 28일
help cform tells you
rgb = imread('peppers.png');
cform = makecform('srgb2lab');
lab = applycform(rgb, cform);
  댓글 수: 7
Stephen23
Stephen23 2017년 1월 4일
@zee falcon: what output do you expect? How are you checking it?
Image Analyst
Image Analyst 2017년 1월 4일
zee, you can also use rgb2lab(). But like Steven asked, what output are you expecting? You get an image. And do see that image you can use imshow(), or you can just look at it's values in the variable editor in the workspace. But no output will get "shown" unless you do one of those two things. Otherwise all you get is a new variable.

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

추가 답변 (2개)

Image Analyst
Image Analyst 2015년 10월 28일
Try this
labImage = rgb2lab(rgbImage);
  댓글 수: 3
somasekar jalari
somasekar jalari 2015년 10월 30일
thank you
zee falcon
zee falcon 2017년 1월 4일
I want to convert rgb images to lab. But above code is not working.It not shows any output after the conversion.Help me out

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


Stalin Samuel
Stalin Samuel 2015년 10월 28일
  댓글 수: 2
somasekar jalari
somasekar jalari 2015년 10월 28일
i am getting error after compile the above matalb code: ??? Error using ==> times Integers can only be combined with integers of the same class, or scalar doubles.
Error in ==> Lab2RGB at 34 fY = (~YT) .* (L / 903.3) + YT .* fY;
somasekar jalari
somasekar jalari 2015년 10월 30일
thank u

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

카테고리

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