给定包含2D图像的3D数组如何显示?
大家好
今天,我正在玩MATLAB,并将QCIF YUV文件读入工作区.
如果只看一帧,我会得到:
<已移除border ="1">
名称值类别
u< 1x72x88 uint8> uint8
v< 1x72x88 uint8> uint8
y< 144x176> uint8
但是,如果我看一连串的帧说(1-3),我会得到:
<已移除border ="1">
名称值类别
u< 3x72x88 uint8> uint8
v< 3x72x88 uint8> uint8
y< 3x144x176> uint8
"imshow(y)"命令不适用于第二个表.所以我想我的问题是使我能够查看x图片并显示它的命令是什么?
<已移除border ="1">
第一维第二维第三维
帧号图片行图片列
Hello everyone
Today I was playing around with MATLAB, and reading a QCIF YUV file into the workspace.
If I only look at one frame I get:
<removed border="1">
Name Value Class
u <1x72x88 uint8> uint8
v <1x72x88 uint8> uint8
y <144x176> uint8
However if i look at a sequence of frames say (1-3), I get:
<removed border="1">
Name Value Class
u <3x72x88 uint8> uint8
v <3x72x88 uint8> uint8
y <3x144x176> uint8
The "imshow(y)" command doesn''t work for the second table. So I guess my question is what is the command that enables me to look at the x picture and display it?
<removed border="1">
1st Dimension 2nd Dimension 3rd Dimension
Frame number picture row picture column
可以使用squeeze命令实现
This can be achieved using the squeeze command
B=squeeze(y(i,:,:);
imshow(B)
//% or you could do image processing on B
如果您对此感兴趣,也可以在mathworks上的eig上进行类似的矩阵调整.
If you''re interested in this, and similar matrix adjustments look at eig on mathworks too.