ridge and bifurcation point count and location coding for Minutiae matching behalf of bellow code...could anyone help?

%Minutiae extraction
s=size(thin_image);
N=3;%window size
n=(N-1)/2;
r=s(1)+2*n;
c=s(2)+2*n;
double temp(r,c);
temp=zeros(r,c);bifurcation=zeros(r,c);ridge=zeros(r,c);
temp((n+1):(end-n),(n+1):(end-n))=thin_image(:,:);
outImg=zeros(r,c,3);%For Display
outImg(:,:,1) = temp .* 255;
outImg(:,:,2) = temp .* 255;
outImg(:,:,3) = temp .* 255;
for x=(n+1+10):(s(1)+n-10)
for y=(n+1+10):(s(2)+n-10)
e=1;
for k=x-n:x+n
f=1;
for l=y-n:y+n
mat(e,f)=temp(k,l);
f=f+1;
end
e=e+1;
end;
if(mat(2,2)==0)
ridge(x,y)=sum(sum(~mat));
bifurcation(x,y)=sum(sum(~mat));
end
end;
end;
% RIDGE END FINDING
[ridge_x ridge_y]=find(ridge==2);
len=length(ridge_x);
%For Display
for i=1:len
outImg((ridge_x(i)-3):(ridge_x(i)+3),(ridge_y(i)-3),2:3)=0;
outImg((ridge_x(i)-3):(ridge_x(i)+3),(ridge_y(i)+3),2:3)=0;
outImg((ridge_x(i)-3),(ridge_y(i)-3):(ridge_y(i)+3),2:3)=0;
outImg((ridge_x(i)+3),(ridge_y(i)-3):(ridge_y(i)+3),2:3)=0;
outImg((ridge_x(i)-3):(ridge_x(i)+3),(ridge_y(i)-3),1)=255;
outImg((ridge_x(i)-3):(ridge_x(i)+3),(ridge_y(i)+3),1)=255;
outImg((ridge_x(i)-3),(ridge_y(i)-3):(ridge_y(i)+3),1)=255;
outImg((ridge_x(i)+3),(ridge_y(i)-3):(ridge_y(i)+3),1)=255;
end
%BIFURCATION FINDING
[bifurcation_x bifurcation_y]=find(bifurcation==4);
len=length(bifurcation_x);
%For Display
for i=1:len
outImg((bifurcation_x(i)-3):(bifurcation_x(i)+3),(bifurcation_y(i)-3),1:2)=0;
outImg((bifurcation_x(i)-3):(bifurcation_x(i)+3),(bifurcation_y(i)+3),1:2)=0;
outImg((bifurcation_x(i)-3),(bifurcation_y(i)-3):(bifurcation_y(i)+3),1:2)=0;
outImg((bifurcation_x(i)+3),(bifurcation_y(i)-3):(bifurcation_y(i)+3),1:2)=0;
outImg((bifurcation_x(i)-3):(bifurcation_x(i)+3),(bifurcation_y(i)-3),3)=255;
outImg((bifurcation_x(i)-3):(bifurcation_x(i)+3),(bifurcation_y(i)+3),3)=255;
outImg((bifurcation_x(i)-3),(bifurcation_y(i)-3):(bifurcation_y(i)+3),3)=255;
outImg((bifurcation_x(i)+3),(bifurcation_y(i)-3):(bifurcation_y(i)+3),3)=255;
end
figure;imshow(outImg);title('Minutiae');
end

12 comentarios

sir after two image result i want to compare both output whether the output is matched or not...i write a code under recognition button...but error will occur code is bellow
[ S ] = match( M1, M2, display_flag )
if nargin==2; display_flag=0; end
M1=M1(M1(:,3)<5,:);
M2=M2(M2(:,3)<5,:);
count1=size(M1,1); count2=size(M2,1);
bi=0; bj=0; ba=0; % Best i,j,alpha
S=0; % Best Similarity Score
for i=1:count1
T1=transform(M1,i);
for j=1:count2
if M1(i,3)==M2(j,3)
T2=transform(M2,j);
for a=-5:5 %Alpha
T3=transform2(T2,a*pi/180);
sm=score(T1,T3);
if S<sm
S=sm;
bi=i; bj=j; ba=a;
end
end
end
end
end
if display_flag==1
figure, title(['Similarity Measure : ' num2str(S)]);
T1=transform(M1,bi);
T2=transform(M2,bj);
T3=transform2(T2,ba*pi/180);
plot_data(T1,1);
plot_data(T3,2);
end
end
You did not include a copy of the error message.
this error will occur
Error: File: new.m Line: 308 Column: 4
The function "Cancle_Callback" was closed with an 'end', but at least one other function definition was not. To avoid confusion
when using nested functions, it is illegal to use both conventions in the same file.
sir ,i remove the final end but again error will occur when pushbutton click. error message is bellow
Undefined function or variable "M1".
Error in new>Recognation_Callback (line 270)
[ S ] = match( M1, M2, display_flag )
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in new (line 45)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)new('Recognation_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
You appear to be missing a "function" keyword at the beginning of that line. But we are guessing, as you have not posted complete code.
Note: in your original code you have
double temp(r,c);
That does the same thing as
double('temp(r,c)');
That is, it takes the string 'temp(r,c)' and converts the characters to double producing a vector such as [115 101 109 ...] . Then because of the ';' at the end of the line, it discards the result of that computation.
That line does not declare temp to be an array of type double() with size r by c. If that was your purpose then you would use
temp = zeros(r,c);
sir i send the code in bellow
% --- Executes on button press in Recognation.
function Recognation_Callback(hObject, eventdata, ~)
% hObject handle to Recognation (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[ S ] = match( M1, M2, display_flag )
if nargin==2; display_flag=0; end
M1=M1(M1(:,3)<5,:);
M2=M2(M2(:,3)<5,:);
count1=size(M1,1); count2=size(M2,1);
bi=0; bj=0; ba=0; % Best i,j,alpha
S=0; % Best Similarity Score
for i=1:count1
T1=transform(M1,i);
for j=1:count2
if M1(i,3)==M2(j,3)
T2=transform(M2,j);
for a=-5:5 %Alpha
T3=transform2(T2,a*pi/180);
sm=score(T1,T3);
if S<sm
S=sm;
bi=i; bj=j; ba=a;
end
end
end
end
end
if display_flag==1
figure, title(['Similarity Measure : ' num2str(S)]);
T1=transform(M1,bi);
T2=transform(M2,bj);
T3=transform2(T2,ba*pi/180);
plot_data(T1,1);
plot_data(T3,2);
end
sir i want if m1 and m2 similarity is maximum then when recognation push button will click it show a message the image are match.how to do sir?
At the time you execute the line
[ S ] = match( M1, M2, display_flag )
you have not defined M1 or M2
sir ,i cannot understand where i will define M1 and M2

Iniciar sesión para comentar.

 Respuesta aceptada

Posting multiple copies of your question is not going to result in faster response.
Asking a specific question would help you get a response sooner.
No, we are NOT going to write ridge point detection code for you. Some people might be willing to answer questions about the code if you have questions like "I ran it with this particular input and it produced this error message". We are probably not going to go read a bunch of papers and suggest algorithms for you either.
You do the research to find an algorithm. You make an attempt to implement it in MATLAB. You encounter an error in the MATLAB code that you cannot solve, and you post about that issue, including your code and the error message and a description of what you were doing. Someone might answer. (It will not be me; I do not do fingerprint recognition.)

Más respuestas (1)

hello,can anyone tell how this minutiae extraction algorithm works,i need an explanation please because am trying to use but having problems while matching,thanks

Categorías

Más información sobre Share and Distribute Software en Centro de ayuda y File Exchange.

Preguntada:

el 29 de Jun. de 2017

Respondida:

el 1 de Nov. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by