读取yuv分量|matlab
作者:互联网
clc
clear;
Frames=1;
for i=1:Frames
fid=fopen('balloons3.yuv','rb');
%Y=fread(fid,[1024,768],'uint8');
Y=fread(fid,[1024,768],'uint8');%先读取Y分量 再读取U分量 最后读取V分量 接下来进行第二帧读取
U=fread(fid,[1024/2,768/2],'uint8');
V=fread(fid,[1024/2,768/2],'uint8');
%fread(YUV,1,1024*768,fid);
figure;imshow(uint8(Y'));
end
fclose all;
标签:1024,768,读取,fread,uint8,yuv,matlab,fid 来源: https://blog.csdn.net/weixin_46096297/article/details/111564847