How to display 70 128*128 images in Matlab from a mat file

3 ビュー (過去 30 日間)
Zhongze Chen
Zhongze Chen 2018 年 10 月 29 日
回答済み: Oliver Woodford 2018 年 10 月 30 日
I have a mat file which has 128*128*70 dimensions, which is 70 slices 128*128 images. Now, I want to display the first 10 images in these 70 images, how can I do that?

回答 (2 件)

madhan ravi
madhan ravi 2018 年 10 月 30 日

Oliver Woodford
Oliver Woodford 2018 年 10 月 30 日
The imdisp method in the sc FEX submission allows you to display multiple images easily.
In your case, assuming that the array is called "stack", you would call it as follows:
imdisp(permute(stack, [1 2 4 3]), 'Size', [4 5]);
This will display the first 20 frames in a 4x5 grid. However, you can then use the arrow keys to scroll through the rest. The call to permute is required to get the slices stacked along the 4th dimension (the 3rd is reserved for colour).

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by