Extracts the background from videos with moving objects, and exports it into an image. Takes the median of every pixel value along all frames and assigns the new RGB value to the resulting pixel.
- Developed with MATLAB R2022b.
- Put the video source in the same directory as the main file. To test with the original file, download it from here.
- Run the file 'background_extraction.m'
- The image result is saved in the same directory.
- A video other than the default one can be segmented by changing the source file:
% read the video
video = VideoReader('700.mp4');
- If the produced image is not being accurate, try reducing the frequency at which frames are taken:
% extract every n-th frame
frames_to_skip = 20;
- The positioning of the video system must be stable (i.e. no shaky camera).
- Any portion of the video must be at least half the time unobscured.
- 0.1
- Initial Release