给定包含2D图像的3D数组如何显示? [英] How to display 3D array given it contains a 2D image?

查看:122
本文介绍了给定包含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.


这篇关于给定包含2D图像的3D数组如何显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆