View License

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

» Watch video

Highlights from
Background frame extraction

4.5 | 4 ratings Rate this file 34 Downloads (last 30 days) File Size: 1.79 KB File ID: #41033 Version: 1.0
image thumbnail

Background frame extraction



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

| Watch this File

File Information

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.

MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
04 Aug 2016 chfakht chfakht

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

Comment only
15 Jan 2016 Huan Tran

05 Aug 2015 Alexander Farley

Marjan: I'm not sure why you're seeing NaN. Can you send me the video you're using?

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

Comment only
05 Aug 2015 Machmud Roby Alhamidi

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))

23 Jul 2015 marjan ss


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

Comment only
09 Jul 2015 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.

Comment only
09 Jul 2015 marjan ss

What are those NAN in the background_frame2 matrix?

Comment only
15 Apr 2015 Kushal Patel

thank you

11 Jun 2014 ben

ben (view profile)

Contact us