put time stamp on video using videowrite

조회 수: 29 (최근 30일)
Hemmings Wu
Hemmings Wu 2011년 8월 21일
편집: Mr Smart 2013년 12월 3일
Dear all,
I'm using videowrite function to capture video from usb cams (4 simultaneously). I would like to know if it's possible to superimpose a time stamp on this video (I'm sure it's possible, but just don't know how).
Any suggestion/comment/solution is welcome :)

답변 (1개)

Chaowei Chen
Chaowei Chen 2011년 8월 21일
clc;clear;close all
vid = videoinput('winvideo', 1);
set(vid,'TriggerRepeat',Inf);
vid.FrameGrabInterval = 1;
vid_src = getselectedsource(vid);
figure; start(vid)
while true %(vid.FramesAcquired<=100) % Stop after 100 frames
data=getdata(vid,1);
imshow(data);
text(10,10,datestr(now),'color','white')
end
stop(vid)
  댓글 수: 1
Mr Smart
Mr Smart 2013년 12월 3일
편집: Mr Smart 2013년 12월 3일
Hello.... Mr.Chaowei Chen . I run this code...but movie does not stop...for a long time. How can I set movie time about (10 sec). My aim was to record movie from laptop webcam to computer in matlab with duration (10 sec or can change). If you know , please help me.. thanks Mr.Chaowei Chen .

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Display Image에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by