フィルターのクリア

How do I use VideoWriter with videoinput object in MATLAB 7.11 (R2010b)?

2 ビュー (過去 30 日間)
Sanchali Purandare
Sanchali Purandare 2011 年 1 月 16 日
I would like to use VideoWriter with videoinput object in MATLAB.

回答 (1 件)

Sanchali Purandare
Sanchali Purandare 2011 年 1 月 16 日
In order to do this, first create the file loggerFcn.m with the following contents:
function loggerFcn(vidObj, eventData, logger)
writeVideo(logger, getdata(vidObj, 1));
Then use the following code to create and configure the objects:
% Create videoinput object with appropriate paramaters.
vid = videoinput(...);
vid.FramesPerTrigger = 10000;
% Create a VideoWriter object.
logger = VideoWriter('myfile.avi', 'Uncompressed AVI');
open(logger);
vid.FramesAcquiredFcn = {@loggerFcn, logger};
vid.FramesAcquiredFcnCount = 1;
start(vid);

カテゴリ

Help Center および File ExchangeWeb Services についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by