如何创建在MATLAB由多个3D的imageData数组的数组 [英] How do I create an array in matlab consisting of multiple 3d imagedata arrays
本文介绍了如何创建在MATLAB由多个3D的imageData数组的数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有15幅图像,我使用读为imageData = imread('imagename.jpg')
它的大小始终 320 320 3
I have 15 images that I am reading using imagedata = imread('imagename.jpg')
its size is always 320 by 320 by 3
我把数据在数组如何(使用for循环),这样当我访问新数组的第一个元素,我得到的第一个图像I输入的RGB数据?
How do I put the data in an array (using a for for loop) such that when I access the first element of the new array I get the RGB data of the first image I input?
推荐答案
您应该使用细胞
imCell = {};
for i = 1 :15
imCell{i} = imread(num2str(something));
end
和您可以轻松地访问,
for j = 1 : 15
subplot(5,3,j);
imshow(imCell{j});
end
imCell
是大小细胞 1×15
。然而 imCell {I}
是其尺寸阿雷 320x320x3
。
imCell
is a cell with size 1x15
. However imCell{i}
is an arrey with size 320x320x3
.
使用电池将让你甚至可以保存不同大小的数组在里面。
Using cell will allow you to even save arrays of different sizes in it.
这篇关于如何创建在MATLAB由多个3D的imageData数组的数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文