Display videoPlayer in axes GUIDE
Afficher commentaires plus anciens
Hello, I would like to display my video in axes named handles.Video. The problem is that I would like to display step(videoPlayer,out) in my axes. My code is :
runloop=1;
while runloop
frame=getsnapshot(vid);
frame=frame(pos(2):(pos(2)+pos(4)),pos(1):(pos(1)+pos(3)),1);
point(1,:) = step(pointTracker,frame);
% Inserer physique sur la vidéo un marqueur
out = insertMarker(frame,point,'x');
% Calcule de la distance entre les 2 markers (norme)
Norme=sqrt(abs(((point(2,2) - point(1,2))).^2+abs((point(2,1) - point(1,1))).^2));
% Calcul de la distance en micro et microrad
Dmili=Norme*PixelNum*0.001;
Drad=(Dmili/FocaleNum)*1000;
% Affiche la distance entre les 2 points
set(handles.dist,'String',num2str(Drad));
set(handles.dist2,'String',num2str(Dmili));
% Affichage de la vidéo
axes(handles.Video)
step(videoPlayer,out)
end
2 commentaires
Walter Roberson
le 7 Sep 2017
Please show the code creating the videoplayer object
Arnaud Tullio
le 7 Sep 2017
Réponse acceptée
Plus de réponses (1)
Sarah Mohamed
le 15 Sep 2017
Try using the function 'imshow'.
Assuming you've captured a frame in the variable 'out':
imshow(out, 'Parent', handles.Video);
Catégories
En savoir plus sur Animation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!