MATLAB Answers

How do I convert rgb to Lab and display only a* layer with matlab?

조회 수: 1(최근 30일)
MH K 17 Jul 2019
댓글: MH K 16 Aug 2019
I want to get a* layer to continue processing.

  댓글 수: 0

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

채택된 답변

Jarrod Dowdall
Jarrod Dowdall 16 Aug 2019
Perhaps the easiest way would be to use the function rgb2lab() in matlab. Note that you will need the Image Processing Toolbox.
Lab = rgb2lab(rgb);
a = Lab(:,:,2);
I hope that helps you get started.

  댓글 수: 2

Image Analyst
Image Analyst 16 Aug 2019
And then, to display:
imshow(a, []);
axis('on', 'image');
title('a channel', 'FontSize', 20);

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by