MATLAB Answers

Get different time stamps from movie with keypress while advancing with rightarrow

1 view (last 30 days)
Chiara Pivetta
Chiara Pivetta on 4 May 2019
I am trying to get the time stamps from a movie (2 different once) and store them in 2 different arrays. I am playing the movie with implay and I would like to advance frame by frame with the rightarrow key while collecting my timestamps with other keys. This is how far I got for the moment but I need to run the script everytime I want to collect a time stamp(which is not ideal). I have tryed with a callback function but I did not mange...any suggestion?
fig= implay('video1_side.avi');
fig2 = fig.Parent;
keyR = '1'
keyE = '2'
key = get(fig2,'CurrentCharacter')
if strcmp(key,keyR)
current_timepointR = fig.DataSource.Controls.CurrentFrame;
if strcmp(key,keyE)
current_timepointE = fig.DataSource.Controls.CurrentFrame;
Thanks a lot for the help!!


Sign in to comment.

Answers (0)

Sign in to answer this question.