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

1 回表示 (過去 30 日間)
Arul
Arul 2013 年 5 月 23 日
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 件のコメント
Jan
Jan 2013 年 5 月 24 日
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.

サインインしてコメントする。

採用された回答

Chiranjit
Chiranjit 2013 年 5 月 23 日
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 件のコメント
Arul
Arul 2013 年 5 月 24 日
編集済み: Arul 2013 年 5 月 24 日
?? 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 2013 年 5 月 24 日
we may use J=small_img*T instead of mtimes(small_img,T);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by