画像の輝度を0~256で表すコード
Afficher commentaires plus anciens
jpegFiles = dir('*.jpg');
numfiles = 300; %フォルダ内のファイルの数
mydata = cell(1, numfiles);
T = table((1:numfiles)', zeros(numfiles,1), 'VariableNames', {'Serial_No.', 'meanLuminance'})%表作成
for k = 1:numfiles
mydata{k} = imread(jpegFiles(k).name);
RGB = imread(jpegFiles(k).name);
graying = rgb2gray(RGB);%グレースケール化
meanLuminance = mean(graying,"all")%平均輝度値を求める
T{k,2} = meanLuminance
end
現在、上のコードで複数枚の画像の一枚ずつの平均輝度を求めているのですが、このコードで計算された結果は、0~256の値で表されていますか。
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!