Error while evaluating uicontrol Callback

5 visualizaciones (últimos 30 días)
Shahmeer Rosli
Shahmeer Rosli el 15 de Mayo de 2016
Comentada: Shahmeer Rosli el 15 de Mayo de 2016
global GUI1
axes(handles.axes3);
[GUI1,] = uigetfile('*.mp4');
obj = VideoReader(GUI1);
video = obj.read();
axes(handles.axes3);
fps=30;
for i=1:max(video(1,1,1,:))
imshow(video(:,:,:,i));
pause(1/fps);
end
if true
% code
end
%%%%%%%
Error in untitled>Start_Callback (line 93)
imshow(video(:,:,:,i));

Respuesta aceptada

Geoff Hayes
Geoff Hayes el 15 de Mayo de 2016
Shahmeer - please copy and paste the full error message (I suspect there is more to it than what you have pasted above). Also, what does the above correspond to? Is this the body for the Start_Callback function or for something else? Please include the full function signature and body.
Part of the problem may be how you are iterating over video. If you want to iterate over each frame (the fourth dimension) then instead of using max (which will return the maximum value of the video(1,1,1,:)) you should be using size instead to get the array dimension as
numFrames = size(video,4);
for i=1:numFrames
% etc.
end
  6 comentarios
Walter Roberson
Walter Roberson el 15 de Mayo de 2016
hOjects should be hObject
Shahmeer Rosli
Shahmeer Rosli el 15 de Mayo de 2016
Tq

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by