Error in extract foreground program,please help
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Code:
video='ATMvid.avi'
if ischar(video)
% Load the video from an avi file.
avi = aviread(video);
pixels = double(cat(4,avi(1:frameSkip:end).cdata))/255;
clear avi
else
% Compile the pixel data into a single array
pixels = double(cat(4,video{1:frameSkip:end}))/255;
clear video
end;
Error-??? Error using ==> double
Maximum variable size allowed by the program is exceeded.
Error in ==> extractForeground at 80
pixels = double(cat(4,avi(1:frameSkip:end).cdata))/25;
1 Kommentar
Akzeptierte Antwort
Image Analyst
am 25 Feb. 2013
Read it a frame at a time using VideoReader() and read(). Don't try to suck up the whole movie at once into the program. Some videos can be huge - like gigabytes and won't fit into memory. Most likely you can get by with having just a few frames in memory at one time.
0 Kommentare
Weitere Antworten (1)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!