필터 지우기
필터 지우기

Error in extract foreground program,please help

조회 수: 2 (최근 30일)
pratibha rane
pratibha rane 2013년 2월 25일
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
Walter Roberson
Walter Roberson 2013년 2월 25일
What is size(avi) and size(avi(1).cdata) and class(avi(1).cdata) ?

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2013년 2월 25일
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.

추가 답변 (1개)

pratibha rane
pratibha rane 2013년 2월 28일
I am using mixture of Gaussians algorithm for background subtraction,showing me output also, but not clearly distinguishing foreground and background, showing blurred video wherein sometime foreground and background video looks similar , what could be done to show it clearly.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by