Alfian Arthur
Alfian Arthur

Reputation: 28

Accessing video frames in specific order MATLAB

i'm using matlab for video processing, vehicle plate detection, this is my code for show video in frame. that code is process all frame in 1 video

   for dataframe=1:obj.NumberOfFrames
        LGi=read(obj,dataframe);

    axes(handles.mpengujianavideo);
    set(imshow(insertObjectAnnotation(LGi, 'rectangle', deteksipelat,'Plat')));
    title(strcat('Frame ke-',mat2str(dataframe)));

the question is, how can i jumping frame, not process all frame, but just process every 3 frame in video??

Upvotes: 0

Views: 45

Answers (1)

HoomanShan
HoomanShan

Reputation: 164

Try this:

for dataframe=1:3:obj.NumberOfFrames
    LGi=read(obj,dataframe);

axes(handles.mpengujianavideo);
set(imshow(insertObjectAnnotation(LGi, 'rectangle', deteksipelat,'Plat')));
title(strcat('Frame ke-',mat2str(dataframe)));

Upvotes: 1

Related Questions