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

1 visualizzazione (ultimi 30 giorni)
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 Commento
Jan
Jan il 24 Mag 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.

Accedi per commentare.

Risposta accettata

Chiranjit
Chiranjit il 23 Mag 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 Commenti
Arul
Arul il 24 Mag 2013
Modificato: Arul il 24 Mag 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...

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by