put time stamp on video using videowrite

29 visualizaciones (últimos 30 días)
Hemmings Wu
Hemmings Wu el 21 de Ag. de 2011
Editada: Mr Smart el 3 de Dic. de 2013
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 :)

Respuestas (1)

Chaowei Chen
Chaowei Chen el 21 de Ag. de 2011
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 comentario
Mr Smart
Mr Smart el 3 de Dic. de 2013
Editada: Mr Smart el 3 de Dic. de 2013
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 .

Iniciar sesión para comentar.

Categorías

Más información sobre Display Image en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by