i have a funtion to unwrapped the image but it is in matlab and i couldnt convert it to c#

here is the function:

% this function converts the localized iris image to a normailzed one
% the input arguments are localized image(gray scale),iris radius,Puble radius,Center x,Center y
% the output is the normailized image (gray scale)

function Nor=Normalize(Loc,Ri,Rp,Xo,Yo)
m=round(2*pi*Ri); %m,n are the sizes of the normailized image before resizing
n=Ri-Rp;
Y=ones(1,n);
X=ones(1,m);
for y=1:n-1
k=1;
step=((y+Rp)/(Ri*pi))*2;
for l=Yo-y-Rp:step:Yo+y+Rp
Y(k)=round(l);
Y(m-k+1)=round(l);
X(k)=round(Xo+sqrt((y+Rp)^2-(l-Yo)^2));
X(m-k+1)=round(Xo-sqrt((y+Rp)^2-(l-Yo)^2));
k=k+1;
end
for x=1:m
try
Nor(x,y)=Loc(X(x),Y(x));
catch
Nor(x,y)=0;
end
end
end
Nor=imresize(Nor,[512 64],'bilinear');%resizing the image to have the required dimensions.
Nor=imrotate(Nor,-90);

Sorry, but you are too far away to discuss it seriously... You will cut the image to have only the iris, which is, by your description, is way too easy (ellipse is already known, suggested by the user, right?), now what? I you even cannot clean the outer area... OK, just one hint: use LockBits.
—SA