matlab读取YUV视频Word文档格式.doc

上传人:wj 文档编号:1451851 上传时间:2023-04-30 格式:DOC 页数:3 大小:13KB
下载 相关 举报
matlab读取YUV视频Word文档格式.doc_第1页
第1页 / 共3页
matlab读取YUV视频Word文档格式.doc_第2页
第2页 / 共3页
matlab读取YUV视频Word文档格式.doc_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

matlab读取YUV视频Word文档格式.doc

《matlab读取YUV视频Word文档格式.doc》由会员分享,可在线阅读,更多相关《matlab读取YUV视频Word文档格式.doc(3页珍藏版)》请在冰点文库上搜索。

matlab读取YUV视频Word文档格式.doc

row=176*2;

col=144*2;

frames=8;

%total=300

forframe=1:

frames

Y=zeros(row,col,frames);

U=zeros(row/2,col/2,frames);

V=zeros(row/2,col/2,frames);

UU=zeros(row,col,frames);

VV=zeros(row,col,frames);

[Y(:

:

frame),count]=fread(fid,[row,col],'

uchar'

);

[U(:

frame),count1]=fread(fid,[row/2,col/2],'

[V(:

frame),count2]=fread(fid,[row/2,col/2],'

%fclose(fid)

%figure,imshow(Y);

UU(1:

2:

row-1,1:

col-1,frame)=U(:

frame);

row-1,2:

col,frame)=U(:

UU(2:

row,1:

row,2:

VV(1:

col-1,frame)=V(:

col,frame)=V(:

VV(2:

R=Y+1.140*(VV-128);

G=Y+0.395*(UU-128)-0.581*(VV-128);

B=Y+2.032*(UU-128);

fori=1:

row

forj=1:

col

ifR(i,j,frame)<

R(i,j,frame)=0;

end

ifR(i,j,frame)>

255

R(i,j,frame)=255;

ifG(i,j,frame)<

G(i,j,frame)=0;

ifG(i,j,frame)>

G(i,j,frame)=255;

ifB(i,j,frame)<

B(i,j,frame)=0;

ifB(i,j,frame)>

B(i,j,frame)=255;

R=R/255;

G=G/255;

B=B/255;

%X=[R'

G'

B'

];

figure,imshow(R(:

frame)'

G(:

B(:

%M(frame)=im2frame(X,map);

%movie(M,10,30)

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 自然科学 > 化学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2