필터 지우기
필터 지우기

can someone plz correct my code below! what is wrong with it??? The error that arrises is ("Undefined variable "test1" or function "test1.jpg".") the image i m testing is "oscar linup 2013"

조회 수: 2 (최근 30일)
imgdir = 'C:\Users\afraz\OneDrive\Documents\MATLAB\'
destdir = 'C:\Users\afraz\OneDrive\Documents\MATLAB\'
cd (imgdir)
r = dir;
%get marks
marks = [];
for i = 3:(size(r,1))
t = r(i).name;
[X,map] = imread([ t ]);
figure(1);
colormap gray;
if isfloat(X)
image(gray2ind(mat2gray((X))));
else
image(X);
end
title(test1.jpg);
disp 'Click subjects right eye, left eye, then mouth.'
[m,n] = ginput(3); pos = round([m,n]);
pos = reshape(pos',1,6);
marks = [marks; pos];
end
cd (destdir)
save Labels marks r

답변 (1개)

Guillaume
Guillaume 2016년 1월 2일
Put single quotes around test1.jpg. That is:
title('test1.jpg');

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by