how to show lab space image

19 Ansichten (letzte 30 Tage)
xiao
xiao am 2 Mai 2018
Kommentiert: Arthur Fernandes am 19 Nov. 2018
lab color space is (0-100),(-128-127),(-128-127), given an image under lab color space, how to show it suitably (imshow is not appropriate)?

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 2 Mai 2018
What about conversion to RGB before displaying.
imshow(lab2rgb(image));
  2 Kommentare
xiao
xiao am 2 Mai 2018
then does this have any difference with imshow(imread(image)) directly? Is this just the way what lab space look like?
Ameer Hamza
Ameer Hamza am 2 Mai 2018

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Image Analyst
Image Analyst am 2 Mai 2018
You can look at each channel one at a time
subplot(3, 1, 1);
imshow(labImage(:, :, 1), []);
title('L Image', 'FontSize', 20);
subplot(3, 1, 2);
imshow(labImage(:, :, 2), []);
title('A Image', 'FontSize', 20);
subplot(3, 1, 3);
imshow(labImage(:, :, 3), []);
title('B Image', 'FontSize', 20);
  3 Kommentare
Image Analyst
Image Analyst am 16 Nov. 2018
If you want a grayscale rendering of the image, not the actual values, you can convert to uint8 and then use a standard format like PNG:
uint8Image = uint8(255 * mat2gray(labImage(:, :, 1)));
imwrite(uint8Image, 'L Channel.PNG');
uint8Image = uint8(255 * mat2gray(labImage(:, :, 2)));
imwrite(uint8Image, 'A Channel.PNG');
uint8Image = uint8(255 * mat2gray(labImage(:, :, 3)));
imwrite(uint8Image, 'B Channel.PNG');
Arthur Fernandes
Arthur Fernandes am 19 Nov. 2018
I didn't know about that mat2gray function, I was wandering if Matlab had someting more direct. But still better than using my on code. Thank you!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by