how display a array of image using a for loop
6 ビュー (過去 30 日間)
古いコメントを表示
i have stored 10 images in a array im=[im1,im2......],bt when i try to display it, it is not getting displaying i.e for i=1:10 figure, imshow(im(i)) plz can anyone help in figure out this problem
0 件のコメント
回答 (1 件)
Image Analyst
2012 年 4 月 14 日
You're using linear indexing, which in effect only shows the first pixel of each image plane. If your images are grayscale images in a 3D array, you can do this:
for slice = 1 : size(im, 3)
imshow(im(:,:,slice), []);
drawnow;
pause(0.5); % Wait 1/2 second to show each one.
end
The colon means " all rows" or " all columns" so I'm taking all rows and all columns of each slice and displaying that entire slice.
2 件のコメント
Image Analyst
2012 年 4 月 14 日
編集済み: Walter Roberson
2012 年 8 月 10 日
Since eyes will be so different from one person the the next, I think it would be hard to compare images directly, for example through subtraction. I think you'd be better off analyzing each image and getting a feature vector of things, like "pupil present", "skin area fraction", "iris detected", etc. You should study up here to get some idea of how people do eye detection/tracking: http://iris.usc.edu/Vision-Notes/bibliography/contentspeople.html#Face%20Recognition,%20Detection,%20Tracking,%20Gesture%20Recognition,%20Fingerprints,%20Biometrics
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!