about mmreader'sproperty thanks!

i want to ask about mmreader that could control the "fps" ???!!! please tell me! thanks~

Respuestas (1)

Andreas Goser
Andreas Goser el 16 de Jul. de 2012
Editada: Andreas Goser el 16 de Jul. de 2012

0 votos

xyloObj = mmreader('xylophone.mpg', 'Tag', 'My reader object');
get(xyloObj)
xyloObj.FrameRate
Note: MMREADER will be removed in a future release. Use VideoReader instead. The mmreader class has been renamed VideoReader.

3 comentarios

Pan
Pan el 16 de Jul. de 2012
hi,may I ask you a question .
beacuse my part code is that
function f1() clear all;
obj1 = mmreader('book750.avi'); vid1 = read(obj1); frame1 = 1; f4 = 1; hst1=0;
h = figure('Name','Video ', 'NumberTitle','off','Color',[1,1,1],'Toolbar','none','Visible','on', 'Position',[30 40 1000 700],... 'Resize','on','menu','none');
hstat1 = uicontrol('unit','pixel','style','checkbox','value',0,'position',... [50 420 25 25],'units','normalized');
hplay1 = uicontrol('unit','pixel','style','pushbutton','string','藥罐_PLAY',... 'position',[50 420 70 40],'backgroundColor',[0.3,0.7,1],'units','normalized','callback',{@play1_callback});
hstop1 = uicontrol('unit','pixel','style','pushbutton','string','藥罐_STOP',... 'position',[50 320 70 40],'backgroundColor',[0.2,1,0],'units','normalized','callback',@stop1_callback);
hexit = uicontrol('unit','pixel','style','pushbutton','string','EXIT',... 'position',[50 220 70 40],'backgroundColor',[1,0,0],'units','normalized','callback',@exit_callback);
while (1)
if hst1==1 subplot(1,1,1); vid(1,'FrameRate'); imshow(vid1(:,:,:,frame1)); title('keyframe video'); if frame1 < size(vid1,4) frame1 = frame1+1; else frame1 = 1; end
end
drawnow; if f4 ==2 break; % else f4 = f4+1; end end
function play1_callback(hObject0,eventdata0) set(hstat1,'value',1); hst1=1; set(hplay1 ,'backgroundColor',[1,1,0],'string','藥罐_播放中'); %close h1; end
function stop1_callback(hObject,eventdata) set(hstat1,'value',0); hst1=0; set(hplay1 ,'backgroundColor',[0.3,0.7,1],'string','藥罐_PLAY'); frame1 end
function exit_callback(hObject,eventdata) f4=2; stop1_callback; close gcf; end
end
Pan
Pan el 16 de Jul. de 2012
I didn't use that
xyloObj = mmreader('xylophone.mpg', 'Tag', 'My reader object'); get(xyloObj)
so I also didn't know that controling "FrameRate"
Pan
Pan el 16 de Jul. de 2012
Thank~~ Thaank~

La pregunta está cerrada.

Preguntada:

Pan
el 16 de Jul. de 2012

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by