フォルダー内の画像の​lab値を読み取り,​それぞれの値を変数l​,a,bに代入する.

フォルダー内の画像を読み取る.
画像のlab値を読み取る.
変数l,a,bを定義し,画像のlab値をそれぞれ対応するものに代入する.

 Akzeptierte Antwort

Akira Agata
Akira Agata am 24 Apr. 2022

0 Stimmen

以下のような処理のイメージでしょうか?
% フォルダー内の画像を読み取る.
I = imread('peppers.png');
% 画像のlab値を読み取る.
Ilab = rgb2lab(I);
% 変数l,a,bを定義し,画像のlab値をそれぞれ対応するものに代入する.
l = Ilab(:,:,1);
a = Ilab(:,:,2);
b = Ilab(:,:,3);
% 念のため確認
figure
tiledlayout('flow')
nexttile
imshow(I)
title('Original')
nexttile
imshow(l,[])
title('L')
nexttile
imshow(a,[])
title('a')
nexttile
imshow(b,[])
title('b')

1 Kommentar

周也 寺内
周也 寺内 am 4 Mai 2022
本件ありがとうございます.
無事動作いたしました.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2022a

Tags

Community Treasure Hunt

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

Start Hunting!