File Exchange

image thumbnail

Background frame extraction

version 1.0 (1.79 KB) by

Calculate background frame from video by averaging a subset of frames across entire video.

32 Downloads

Updated

View License

The video is downsampled and averaged from beginning to end. This yields a background image which can be subtracted from each frame of the video to yield a movement frame.

Comments and Ratings (9)

Ho to use this script in order to remove background and extract the foreground only from the video. Thanks.

Huan Tran

Alexander Farley

Marjan: I'm not sure why you're seeing NaN. Can you send me the video you're using? alexander.s.farley@gmail.com.

Also, forget about the background_fram2 stuff, it's not very useful. background_frame is the one you want.

first, great work.
second, what the method did you use in this implementation?
third, how to play the video? what function did you use? (movie(...) or release(video))
thanks.

marjan ss

Hi,

Can you please explain what are those NAN values in the background_frame2 matrix? I need to know which pixels are fixed among all video frames. thanks

marjan ss

I need to extract the background for each frame in the video. Can you please explain a bit about the background_frame2 matrix? I think that's background of the whole video. Therefore, by subtracting it from each frame I can get the motion parts. what about background of each frame?How can I get the background pixels index? Thank you.

marjan ss

What are those NAN in the background_frame2 matrix?

Kushal Patel

thank you

ben

ben (view profile)

MATLAB Release
MATLAB 7.12 (R2011a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video