第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

在Matlab中創(chuàng)建視頻的方法

在Matlab中創(chuàng)建視頻的方法

在Matlab中創(chuàng)建視頻的可能性是什么?我經(jīng)過搜索后發(fā)現(xiàn),主要有3個(gè)工具箱可用于該領(lǐng)域,包括圖像處理,圖像采集和視覺控制...但是如果沒有它們,我怎么能做,只是從頭開始創(chuàng)建視頻?我對(duì)概述的各種方法感興趣,但是無法在互聯(lián)網(wǎng)上找到任何不錯(cuò)的教程或一致的信息來源。
查看完整描述

3 回答

?
www說

TA貢獻(xiàn)1775條經(jīng)驗(yàn) 獲得超8個(gè)贊

以下是在(核心)MATLAB中創(chuàng)建電影的一些不同方法。


電影2AVI

(已棄用,請(qǐng)改用VIDEOWRITER)


%# figure

figure, set(gcf, 'Color','white')

Z = peaks; surf(Z);  axis tight

set(gca, 'nextplot','replacechildren', 'Visible','off');


%# preallocate

nFrames = 20;

mov(1:nFrames) = struct('cdata',[], 'colormap',[]);


%# create movie

for k=1:nFrames

   surf(sin(2*pi*k/20)*Z, Z)

   mov(k) = getframe(gca);

end

close(gcf)


%# save as AVI file, and open it using system video player

movie2avi(mov, 'myPeaks1.avi', 'compression','None', 'fps',10);

winopen('myPeaks1.avi')

AVIFILE

(已棄用,請(qǐng)改用VIDEOWRITER)


%# figure

figure, set(gcf, 'Color','white')

Z = peaks; surf(Z);  axis tight

set(gca, 'nextplot','replacechildren', 'Visible','off');


%# create AVI object

nFrames = 20;

aviobj = avifile('myPeaks2.avi', 'fps',10);


%# create movie

for k=1:nFrames

   surf(sin(2*pi*k/20)*Z, Z)

   aviobj = addframe(aviobj, getframe(gca));

end

close(gcf)


%# save as AVI file, and open it using system video player

aviobj = close(aviobj);

winopen('myPeaks2.avi')

視頻制作人

%# figure

figure, set(gcf, 'Color','white')

Z = peaks; surf(Z);  axis tight

set(gca, 'nextplot','replacechildren', 'Visible','off');


%# create AVI object

nFrames = 20;

vidObj = VideoWriter('myPeaks3.avi');

vidObj.Quality = 100;

vidObj.FrameRate = 10;

open(vidObj);


%# create movie

for k=1:nFrames

   surf(sin(2*pi*k/20)*Z, Z)

   writeVideo(vidObj, getframe(gca));

end

close(gcf)


%# save as AVI file, and open it using system video player

close(vidObj);

winopen('myPeaks3.avi')

寫入

(從技術(shù)上講不是電影,而是GIF動(dòng)畫圖片)


%# figure

figure, set(gcf, 'Color','white')

Z = peaks; surf(Z);  axis tight

set(gca, 'nextplot','replacechildren', 'Visible','off');


%# preallocate

nFrames = 20;

f = getframe(gca);

[f,map] = rgb2ind(f.cdata, 256, 'nodither');

mov = repmat(f, [1 1 1 nFrames]);


%# create movie

for k=1:nFrames

    surf(sin(2*pi*k/20)*Z, Z)

    f = getframe(gca);

    mov(:,:,1,k) = rgb2ind(f.cdata, map, 'nodither');

end

close(gcf)


%# create GIF and open

imwrite(mov, map, 'myPeaks4.gif', 'DelayTime',0, 'LoopCount',inf)

winopen('myPeaks4.gif')


查看完整回答
反對(duì) 回復(fù) 2019-11-28
  • 3 回答
  • 0 關(guān)注
  • 763 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)