I created an gui and named it as maingui i have a pushbutton, and in the call back function using uigetfile I browse the location of a video. Then in the same callbackfunction I call a function which reads the video and extract a frame from video, but I want to display the extracted frame on that GUI , how can I do that ?
function fntest_final() MW.f = figure('Name','Project','Position', [1 1 700 1000]); setappdata(0,'maingui',gcf); MW.pb2 = uicontrol('Style', 'Pushbutton'..... .... set(MW.pb2, 'Callback', {@loadbutton,MW});end function loadbutton(varargin) MW = varargin{3}; reqfilename = uigetfile(....) readvideofn %%i get error in navigating to this function
end function readvideofn(reqfilename) videoObject = VideoReader(reqfilename); rgbImage = read(videoObject, 3200); %%now I want to display this on the GUI in a particular fixed position
%%how ?
end
when I call the function it says Error while evaluating UIControl Callback
Best Answer