function [ro,c] = eyepoint(input,kernelsize,sigma,minrad,maxrad,varargin)
%Finds the center of a human eye in
%a grayscale or rgb image using isophote curvature
%Reference: Accurate Eye Center Location and Tracking Using Isophote
%Curvature, Roberto Valenti and Theo Gevers
% %%%%%% Input Arguments
% input = Either Grayscale or RGB image.
% kernelsize = size of Gaussian kernel used for smoothing and filtering the
% image.
% sigma = Standard deviation of gaussian filter.
% minrad = minimum value of magnitude of displacement vector estimated using the method that
% should be used for voting. Values below it are not used for voting.
% maxrad = maximum value of magnitude of displacement vector estimated
% using the method that should be used for voting. Values above it are not
% used for center voting.
% thresh (Not required when using curved method. but required during using
% canny method
%)= threshhold value as required for Canny operator in Edge method. Default
%is 0.37
%scale(optional)=To specify which scale to use. Default is 1.
% method(optional)= Method to be used for determinin center. can be string named
% 'canny' or 'curved'. default is 'curved'.
% %%%%%% Output Arguments
% r = y-coordinates of estimated center.
% c =x-coordinates of estimated center.
% %%%%% Example:
% eyepoint('C:\Singh\Data\faces\BioID\ftp.uni-erlangen.de\pub\facedb\BioID_
% 1152.png',8,3,4,30,0.37,'canny');
% eyepoint('C:\Singh\Data\faces\BioID\ftp.uni-erlangen.de\pub\facesdb\BioID
% _1152.png',8,5,4,30);
%eyepoint('C:\highres\008\008_01.jpg',8,1,4,50,0.5)
%eyepoint('C:\highres\032\032_01.jpg',8,1,5,50,0.43,'canny')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Validate the input arguments
strarray{
1}='curved';
strarray{
2}='canny';
error(nargchk(5,8,nargin));
% If number of input arguments is 8.
if(nargin==8)
method=validatestring(varargin{
3},strarray);
thresh=varargin{
1}(:);
scale=varargin{
2}(:);
end
if(nargin==7
等照度线曲率方法确定人眼中心
最新推荐文章于 2023-05-12 10:21:30 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)