this code is not working......pls give me a hint ....the input is a fingerprint image

2 views (last 30 days)
clc;
close all; clear all;
[filename, pathname]=uigetfile({'*.bmp;*.jpg;*.tif;*.png;*.gif','All Image Files';... '*.*','All Files' },'mytitle');
a=strcat(pathname ,'/', filename);
I = imread(a);
small_img=I(210:220,210:220);
T=[0 0 0 0 0 0 0 1 0 0 0; 1 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 1 0 0 0 0 0 0 0; 0 1 0 0 0 0 0 0 0 0 0; 0 0 1 0 0 0 0 0 0 0 0; 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0 1 0 0 0 0 0; 0 0 0 0 0 0 1 0 0 0 0; ] figure(1);imshow(small_img); J=mtimes(small_img,T); figure(1);imshow(J);
  1 Comment
Jan
Jan on 24 May 2013
A copy of the error message is much better than just claiminh, that the code does not work.
The brute clearing header "clc, close all; clear all" deletes all breakpoints in the code, such that debugging is impeded. This is a really bad idea, because the debugger is the best friend of the programmer. In addition "clear all" deletes all loaded files from the memory, and reloading them from the disk wastes a lot of time. Therefore it is frightening, how many beginners use this brute header. It seems like an ugly fashion without benefits.

Sign in to comment.

Accepted Answer

Chiranjit
Chiranjit on 23 May 2013
Hi Arul
small_img is 2*2 matrix are you sure you want to use imshow on it? Also can you please specify what error it is exactly producing?
  2 Comments
Arul
Arul on 24 May 2013
Edited: Arul on 24 May 2013
?? Error using ==> mtimes Inner matrix dimensions must agree.
Error in ==> matrix at 31 J=mtimes(small_img,T);
this was the error occured during run this code.....need not to show the small_img...it is for our convenience.......this code is used to interchange the position of matrix values among the image...

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!