Image normalization using Daugman Rubber sheet model
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
Hello everyone. i have segmenated image of iris and i need to normalize it using daugman rubber sheet model. i tried using https://www.mathworks.com/matlabcentral/fileexchange/51246-pupil-limbus-detection-and-daugman-normalization but i cannot get the output.
here's the error. can expalin how to use it?
i also put declaration like this; and dont get the output
% % Input parameters
% xPosPupil = 625;
% yPosPupil = 306;
% rPupil = 70;
% xPosIris = 625;
% yPosIris = 306;
% rIris = 250;

채택된 답변
Frank Martin
2019년 4월 15일
You are calling the daugmanCircleDetection function which complains that it cannot find the class ASSStack. To solve this you should make sure that Matlab can find the class (https://github.com/frankcorneliusmartin/IrisAlgorithms/blob/master/Classes/ASSStack.m) . However: The function daugmanCircleDetection is used to segment the limbus and pupil, and not for normalization.
You should call the function rubberSheetNormalisation instead to perform the normalization, which is defined in https://github.com/frankcorneliusmartin/IrisAlgorithms/blob/master/Segmentation/rubberSheetNormalisation.m
Too see how this function works see example:https://github.com/frankcorneliusmartin/IrisAlgorithms/blob/master/Examples/RubbersheetModel.m
댓글 수: 5
syahira samsudin
2019년 4월 15일
편집: syahira samsudin
2019년 4월 15일
That would be a valid way to do this yes.
this is how i insert the coding. is it correct?
function image = rubberSheetNormalisation( img, xPosPupil, yPosPupil, rPupil , xPosIris , yPosIris , rIris , varargin )
%rubberSheetNormalisation, function that normalizes the iris region. This is
%the region between the pupil boundary and the limbus. This is done
%according to the rubber sheet model proposed by Daugman (1).
%
% SYNOPSIS
% - image = rubberSheetNormalisation( img, xPosPupil, yPosPupil, rPupil , xPosIris , yPosIris , rIris )
% - image = rubberSheetNormalisation( img, xPosPupil, yPosPupil, rPupil , xPosIris , yPosIris , rIris , 'DebugMode' , 1 )
%
% INPUTS
% - img <double>
% Eye image from the cassini, preferably a NIR image. If no image
% is supplied, a pop up will ask to select one.
% - xPosPupil <integer>, yPosPupil <integer>, rPupil <integer>
% The x,y-position of the pupil center and the pupil radius
% - xPosIris <integer>, yPosIris <integer>, rIris <integer>
% The x,y-position of the iris center and the iris radius
% - varargin <optional>, input scheme
% 'DebugMode': {0: off, 1: on} - if set to 1 shows extra info
% 'AngleSamples': <integer> - number of radial samples
% 'RadiusSamples': <integer> - number of radius samples
% 'UseInterpolation': <boolean> - if 1, the samples will be
% interpolated else nearest neighbor interpolation is used.
%
% OUTPUT
% - image, containing the normalized iris region
%
% DEPENDANCIES
% - Communications Toolbox
% - Computer Vision System Toolbox (for debugmode)
%
% HISTORY
% - 26th may 2017: removed Communications Toolbox
% - 19th June 2016: added the interpolation option
%
% REFERENCES
% (1) How iris recognition works, Daugman, J.G.
%
% AUTHOR
% F.C. Martin <frank@grafikus.nl>
% 19th of May 2015 - 26th may 2017
%
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Load the image
img = imread('1.jpg');
% Input parameters
xPosPupil = 1007;
yPosPupil = 947;
rPupil = 503;
xPosIris = 313;
yPosIris = 323;
rIris = 156;
% Normalize the iris region according to daugmans model
irisRegion = rubberSheetNormalisation( img, xPosPupil, yPosPupil, rPupil , xPosIris , yPosIris , rIris, 'DebugMode', 1 );
%todo: remove for-loop for line detection
if(size(img, 3) == 3) % if RGB image is inputted
img = rgb2gray(img);
end
% parse input
p = inputParser();
addRequired( p , 'xPosPupil' , @isnumeric );
addRequired( p , 'yPosPupil' , @isnumeric );
addRequired( p , 'rPupil' , @isnumeric );
addRequired( p , 'xPosIris' , @isnumeric );
addRequired( p , 'yPosIris' , @isnumeric );
addRequired( p , 'rIris' , @isnumeric );
addOptional( p , 'AngleSamples', 360 ,@isnumeric );
addOptional( p , 'RadiusSamples', 360 ,@isnumeric );
addOptional( p , 'DebugMode', 0, @isnumeric );
addOptional( p , 'UseInterpolation', 1, @isnumeric );
parse( p , xPosPupil, yPosPupil, rPupil , xPosIris , yPosIris , rIris , varargin{:} )
% Normalize the iris region according to daugmans model
% irisRegion = rubberSheetNormalisation( img, xPosPupil, yPosPupil, rPupil , xPosIris , yPosIris , rIris, 'DebugMode', 1 );
% Note that internally matrix coordinates are used
xp = p.Results.yPosPupil;
yp = p.Results.xPosPupil;
rp = p.Results.rPupil;
xi = p.Results.yPosIris;
yi = p.Results.xPosIris;
ri = p.Results.rIris;
angleSamples = p.Results.AngleSamples;
RadiusSamples = p.Results.RadiusSamples;
debug = p.Results.DebugMode;
interpolateQ = p.Results.UseInterpolation;
% Initialize samples
angles = (0:pi/angleSamples:pi-pi/angleSamples) + pi/(2*angleSamples);%avoiding infinite slope
r = 0:1/RadiusSamples:1;
nAngles = length(angles);
% Calculate pupil points and iris points that are on the same line
x1 = ones(size(angles))*xi;
y1 = ones(size(angles))*yi;
x2 = xi + 10*sin(angles);
y2 = yi + 10*cos(angles);
dx = x2 - x1;
dy = y2 - y1;
slope = dy./dx;
intercept = yi - xi .* slope;
xout = zeros(nAngles,2);
yout = zeros(nAngles,2);
for i = 1:nAngles
[xout(i,:),yout(i,:)] = linecirc(slope(i),intercept(i),xp,yp,rp);
end
% Get samples on limbus boundary
xRightIris = yi + ri * cos(angles);
yRightIris = xi + ri * sin(angles);
xLeftIris = yi - ri * cos(angles);
yLeftIris = xi - ri * sin(angles);
% Get samples in radius direction
xrt = (1-r)' * xout(:,1)' + r' * yRightIris;
yrt = (1-r)' * yout(:,1)' + r' * xRightIris;
xlt = (1-r)' * xout(:,2)' + r' * yLeftIris;
ylt = (1-r)' * yout(:,2)' + r' * xLeftIris;
% Create Normalized Iris Image
if interpolateQ
image = uint8(reshape(interp2(double(img),[yrt(:);ylt(:)],[xrt(:);xlt(:)]),length(r), 2*length(angles))');
else
image = reshape(img(sub2ind(size(img),round([xrt(:);xlt(:)]),round([yrt(:);ylt(:)]))),length(r), 2*length(angles));
end
% Show all points on original input image
if debug
img = insertShape(img, 'circle', [yrt(:),xrt(:),2*ones(size(xrt(:)))],'Color','r');
img = insertShape(img, 'circle', [ylt(:),xlt(:),2*ones(size(xrt(:)))],'Color','r');
figure('name','Sample scheme of the rubber sheet normalization');
imshow(img);
drawnow;
end
% Show Resulting image
figure(2);
imshow(irisRegion);
end

I feel this is no longer in the scope of providing support for my script, as these are more general Matlab questions. I recommend you follow some basic Matlab tutorials from:
okay thank you sir
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Tracking and Motion Estimation에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
