I have written a matlab project that takes a video as an input, cuts it into frames, and shows the frames to the user one by one, giving him the ability to make changes to each frame.
I want to add a “side bar”, that shows a particular frame to the user, as well as buttons for GUI frames from 1 to 10, when he can press on “->” or “<-” to move to prev\next 10 frames, and can click on a frame to show it in a larger size.
Something like this:
This is the GUI:
.__________________________________. | | | Frame No. i | | | |--------------------------------- | |<-| Frame j|j+1|.....|Frame j+9|->| |__________________________________|
I thought about using “subplot” but didn’t know how to add the ability to show\update prev\next frames on clicking.
Another implementation is something like this:
% The Main Image:
hAx = axes('Position',[0 0.3 1 0.8], 'Parent',hFig);
hMainImg = imshow(img, 'Parent',hAx);
% the slider
hPanel = uipanel('Position',[0 0.04 1 0.26], 'Parent',hFig);
uicontrol('Style','slider', 'Parent',hFig, ...
'Callback',@slider_callback, ...
'Units','normalized', 'Position',[0 0 1 0.04], ...
'Value',1, 'Min',1, 'Max',mx, 'SliderStep',[1 10]./mx);
But then, what about the slider?
Any ideas how can I implement this?
Here is a working example. We open a small video file, and reads all its 141 frames. You can browse through them using the slider, click any small image to display it in the main axis.