Error regarding imresize.m
이전 댓글 표시
function [template, mask] = createiristemplate(eyeimage_filename)
eyeimage_filename='aeval2.bmp';
% path for writing diagnostic images
global DIAGPATH
DIAGPATH = 'diagnostics';
%normalisation parameters
radial_res = 20;
angular_res = 240;
% with these settings a 9600 bit iris template is
% created
%feature encoding parameters
nscales=1;
minWaveLength=18;
mult=1; % not applicable if using nscales = 1
sigmaOnf=0.5;
eyeimage = imread(eyeimage_filename);
savefile = [eyeimage_filename,'-houghpara.mat'];
[stat,mess]=fileattrib(savefile);
if stat == 1
% if this file has been processed before
% then load the circle parameters and
% noise information for that file.
load(savefile);
else
% if this file has not been processed before
% then perform automatic segmentation and
% save the results to a file
[circleiris circlepupil imagewithnoise] = segmentiris(eyeimage);
save(savefile,'circleiris','circlepupil','imagewithnoise');
end
% WRITE NOISE IMAGE
%
imagewithnoise2 = uint8(imagewithnoise);
imagewithcircles = uint8(eyeimage);
%get pixel coords for circle around iris
[x,y] = circlecoords([circleiris(2),circleiris(1)],circleiris(3),size(eyeimage));
ind2 = sub2ind(size(eyeimage),double(y),double(x));
%get pixel coords for circle around pupil
[xp,yp] = circlecoords([circlepupil(2),circlepupil(1)],circlepupil(3),size(eyeimage));
ind1 = sub2ind(size(eyeimage),double(yp),double(xp));
% Write noise regions
imagewithnoise2(ind2) = 255;
imagewithnoise2(ind1) = 255;
% Write circles overlayed
imagewithcircles(ind2) = 255;
imagewithcircles(ind1) = 255;
w = cd;
cd(DIAGPATH);
imwrite(imagewithnoise2,[eyeimage_filename,'-noise.jpg'],'jpg');
imwrite(imagewithcircles,[eyeimage_filename,'-segmented.jpg'],'jpg');
cd(w);
% perform normalisation
[polar_array noise_array] = normaliseiris(imagewithnoise, circleiris(2),...
circleiris(1), circleiris(3), circlepupil(2), circlepupil(1), circlepupil(3),eyeimage_filename, radial_res, angular_res);
% WRITE NORMALISED PATTERN, AND NOISE PATTERN
w = cd;
cd(DIAGPATH);
imwrite(polar_array,[eyeimage_filename,'-polar.jpg'],'jpg');
imwrite(noise_array,[eyeimage_filename,'-polarnoise.jpg'],'jpg');
cd(w);
% perform feature encoding
[template mask] = encode(polar_array, noise_array, nscales, minWaveLength, mult, sigmaOnf);
댓글 수: 9
Umme Tania
2013년 12월 2일
편집: Matt J
2013년 12월 2일
Walter Roberson
2013년 12월 2일
In particular, that routine is returning the empty matrix for the third output
Umme Tania
2013년 12월 2일
Umme Tania
2013년 12월 2일
Walter Roberson
2013년 12월 2일
You need a directory named "diagnostics" under the directory you start running the program in.
balender kumar
2015년 2월 15일
편집: balender kumar
2015년 2월 15일
@Umme Tania ..can anyone plz tell me how resolve previous error" @IMRESIZE expected its first input, A, to be nonempty" facing same problem
balender kumar
2015년 2월 15일
편집: balender kumar
2015년 2월 15일
@Walter Roberson @Umme Tania , If i am applying J=imread('e.bmp'); I = histeq(J); %h=fspecial('gaussian'); h = fspecial('gaussian', [5 5], 3); I=imfilter(I,h); [cc]=segmentiris(I) then it showing the error ..if i simply call [cc]=segmentiris('e.bmp') then its work fine ..
balender kumar
2015년 2월 17일

답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Object Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!