Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Fingerprint Image Orientation

Status
Not open for further replies.

Nikhilpanicker

Newbie level 2
Joined
Jan 12, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
I using Raymond Thai's Thesis to do Image orientation but some how i m not getting the desired output.
Can someone tell me if there is an error in the following code

I=double(N); %loading the normalised image
dx = blockproc(I,[ 16 16 ],@sample2); %sobel x-gradient
dy = blockproc(I,[ 16 16 ],@sample3); %sobel y-gradient
imview(I,[]);
imview(dx);
imview(dy);
save dx;
save dy;
[row , col]=size(dx);
vx=zeros(row,col);
vy=zeros(row,col);
theta=zeros(row,col);
phix=zeros(row,col);
phiy=zeros(row,col);
phidashx=zeros(row,col);
phidashy=zeros(row,col);
O=zeros(row,col);
for i=1:row
for j=1:col
for k=i-8:1:i+8
for l=j-8:1:j+8
if k>0 & k<=row & l>0 & l<=col
vx1=2*dx(k,l)*dy(k,l);
vx(i,j)=vx(i,j)+vx1;
vy1=dx(k,l)*dx(k,l)*dy(k,l)*dy(k,l);
vy(i,j)=vy(i,j)+vy1;
end
end
end
if vx(i,j)~=0
theta(i,j)=0.5*atan(vy(i,j)./vx(i,j));
end
phix(i,j)=cos(2*theta(i,j));
phiy(i,j)=sin(2*theta(i,j));
end
end
figure(4),imshow(vx);
figure(5),imshow(vy,[]);
figure(6),imshow(theta,[]);
figure(7),imshow(phix,[]);
figure(8),imshow(phiy,[]);
G = fspecial('gaussian',[16 16]);
for i=1:1:row
for j=1:1:col
for u=-8:1:8
for v=-8:1:8
if(u*16<i & v*16<j & i-16*u<=row & j-16*v<=col)
phidashx1=phix(i-u*16,j-v*16);
phidashy1=phiy(i-u*16,j-v*16);
end
if u>0 & v>0
phidashx1=G(u,v)*phidashx1;
phidashy1=G(u,v)*phidashy1;
phidashx(i,j)=phidashx(i,j)+phidashx1;
phidashy(i,j)=phidashy(i,j)+phidashy1;
end
end
end
if phidashx(i,j)~=0
O(i,j)=0.5*atan(phidashy(i,j)./phidashx(i,j));

end
end
end
imview(O);
 

Attachments

  • RaymondThai.pdf
    3.2 MB · Views: 47

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top