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 local orientation field extraction

Status
Not open for further replies.

sambezi

Newbie level 4
Joined
Aug 16, 2015
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
42
I am extracting local orientation field of a grayscale fingerprint image using Rao's algorithm. I need urgent help to the correction of this error message that appears each time I run the code.
The error message is:

Index exceeds matrix dimensions.
Error in fp_local_orientation (line 21)
m.i.j=image(i:(i+3), j:(j+3)); % create sub image (such regions) of size...

Here is the code


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function img_orient = fp_local_orientation(image)
% image is passed to this function as argument
image(:,209:210)=255;
 
rows_image=size(image,1);
cols_image=size(image,2);
 
 
 
a=[]; 
for i = 1:4:rows_image % step in 5 down the image rows
 
    b=[];
    for j= 1:4:cols_image % step in 32 over the image columns
 
        m.i.j=image(i:(i+3), j:(j+3)); % create sub images (sub regions) of size...
 
                Gx = edge(m.i.j, 'sobel', 0.1112, 'horizontal');
                Gy = edge(m.i.j, 'sobel', 0.0677, 'vertical');
                angleT = 0.5 * atan((2*Gx.*Gy)./((Gx.^2) - (Gy.^2)));
                 angleT = angleT + pi/2;
 
        b=[b angleT];
    end
    a=[a; b];
end
  img_orient=a;

 
Last edited by a moderator:

This code was really written in MATLAB ?

I had never seen such a ternary operation with the matrix operator "." especially getting the result of another operation, as well did not see any mention to a previous charge of value in the variable "m" at the code above.
 

OK, thanks. Could that possibly be the error with the code?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top