フィルターのクリア

how to mix two vedio files according to the height of frame ?

1 回表示 (過去 30 日間)
suresh gunarathna
suresh gunarathna 2018 年 10 月 24 日
回答済み: suresh gunarathna 2018 年 10 月 24 日
function mov = halfmix(fname1,fname2)
video1=playvideo(fname1);
video2=playvideo(fname2);
[h1,w1,c1] = size(video1(1).cdata);
[h2,w2,c2] = size(video2(1).cdata);
if(h1~=h2 && w1~=w2)
disp('dimension are not equal to')
return;
end
framenumbers1 = size(video1,2);
framenumbers2 = size(video2,2);
if(framenumbers1>framenumbers2)
mov = video2;
for i=1:framenumbers2
mov(i).cdata(1:h2,:,:) = video2(i).cdata(1:h2,:,:);
end
else
mov = video1;
for i = 1:framenumbers2
mov(i).cdata(1:h2,:,:) = video1(i).cdata(1:h2,:,:);
end
end
end
this is what i do to hear but finally check the function is correct it response error in my code that point "vediofile" is undefined variable or function plz help if anyone can?
  2 件のコメント
KSSV
KSSV 2018 年 10 月 24 日
How did you run the function?
suresh gunarathna
suresh gunarathna 2018 年 10 月 24 日
halfmix('apalne.mp4','cloude.mp4');

サインインしてコメントする。

採用された回答

suresh gunarathna
suresh gunarathna 2018 年 10 月 24 日
halfmix('apalne.mp4','cloude.mp4');

その他の回答 (0 件)

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by