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.
Ho to use this script in order to remove background and extract the foreground only from the video. Thanks.
Marjan: I'm not sure why you're seeing NaN. Can you send me the video you're using? firstname.lastname@example.org.
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))
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
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.
What are those NAN in the background_frame2 matrix?