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

1 visualización (últimos 30 días)
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 comentario
Jan
Jan el 24 de Mayo de 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.

Iniciar sesión para comentar.

Respuesta aceptada

Chiranjit
Chiranjit el 23 de Mayo de 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 comentarios
Arul
Arul el 24 de Mayo de 2013
Editada: Arul el 24 de Mayo de 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...
Arul
Arul el 24 de Mayo de 2013
we may use J=small_img*T instead of mtimes(small_img,T);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by