資源簡介
分別讀取YUV視頻特定幀的Y、U、V分量。
代碼片段和文件信息
function?[YUV]=yuv_import(filenamedimsnumfrmstartfrm)
%Imports?YUV?sequence?into?Matlab
%[YUV]=yuv_import(filenamedimsnumfrmstartfrm)
%Version:?2.01?Date:?2006/05/25?author:?Nikola?Sprljan
%
%Input:
%?filename?-?YUV?sequence?file
%?dims?-?dimensions?of?the?frame?[width?height]
%?numfrm?-?number?of?frames?to?read
%?startfrm?-?[optional?default?=?0]?specifies?from?which?frame?to?start?reading
%????????????with?the?convention?that?the?first?frame?of?the?sequence?is?denoted?
%????????????with?0
%
%Output:
%?Y?U?V?-?cell?arrays?of?Y?U?and?V?components??
%
%Example:
%?[Y?U?V]?=?yuv_import(‘FOREMAN_352x288_30_orig_01.yuv‘[352?288]2);
%?image_show(Y{1}2561‘Y?component‘);
fid=fopen(filename‘r‘);
if?(fid?0)?
????error(‘File?d
- 上一篇:SOM matlab
- 下一篇:牛拉法潮流計算Matlab程序
評論
共有 條評論