Can anyone help me understand this code?

조회 수: 1 (최근 30일)
anand rathod
anand rathod 2020년 7월 5일
댓글: anand rathod 2020년 7월 5일
clc;
clear ;
close all;
cl = {'open','close'};
DBL = cell(1,1);
DBR = cell(1,1);
DBM = cell(1,1);
dim = [30 60;
30 60
40 65];
disp('Training left eye');
for ii = 1:2
disp(cl{ii})
fpath = ['C:\Users\DELL\Database\LE\' cl{ii} '/*.bmp'];
D = dir(fpath);
for kk = 1:length(D)
impath = ['C:\Users\DELL\Database\LE\' cl{ii} '/' D(kk).name];
I = imread(impath);
Is = imresize(I,[dim(1,1) dim(1,2)]);
DBL{ii,kk} = Is;
imshow(Is);
pause(0.01)
end
end

채택된 답변

Image Analyst
Image Analyst 2020년 7월 5일
This crude code reads in images and resizes and displays them. It also (for some reason) stores them in a cell array.
  댓글 수: 3
Image Analyst
Image Analyst 2020년 7월 5일
Yes, it put it into one cell of a cell array. Please see the FAQ for an excellent discussion cell arrays.
anand rathod
anand rathod 2020년 7월 5일
Thank you

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by