FP ridge orientation code only returning 45 or 135 degrees. Please help

Hi all, I am trying calculate fp orientation using equation given the image (Jain 1995). I am only getting two values 2.3562 and 0.7875 rad(45 deg and 135 deg) in the output matrix. Please help me to know where i am going wrong.
clc;clear all;close all;
img1=imread('1_1.png');
img1=normalise(img1);
[m n]=size(img1);
[gx gy]=imgradientxy(img1);
for i=9:m-9
for j=9:n-9
gxy=0;gxx=0;gyy=0;
for i1=-8:+8
for j1=-8:+8
gxy=gxy+((gx(i+i1,j+j1)).*(gy(i+i1,j+j1)));
gxx=gxx+power((gx(i+i1,j+j1)),2);
gyy=gyy+power((gx(i+i1,j+j1)),2);
end
end
Q(i,j)=pi/2+0.5*(atan2(double(2*gxy),double((gxx-gyy))));
end
end

댓글 수: 1

Hello Sam I am new to Fingerprint image processing. I wish to know the steps to reach FG orientation. I am using FVC 2002 fingerprint images. First hw do you thin the images? Then how you locate the singular points? Any help/advice/suggestions would be highly appreciated Thanks a lot in advance rgds ajit

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2013년 9월 23일

2 개 추천

Are gx and gy integers or doubles before you start multiplying them together. If things are being quantized, the first thing I look at is if it's doing integer math instead of floating point math. By the way, you can use ^ to raise to a power instead of calling the power() function.

댓글 수: 1

gx,gy are double.. but looking for class of variables I found a typing error in gyy=gyy+power((gx(i+i1,j+j1)),2); (for gyy power arg should be gy). :|
just one problem remains...cant compute Q's for border regions
Q is 330x240
img1 is 338x248
is there a function where i can pad img1 with 8 cols(on right) and 8 rows on bottom.????

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

Sam
2013년 9월 23일

댓글:

2017년 2월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by