Skip to content

walkingmug/background-extraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Background Extraction

Description

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.

background

View source

Getting Started

Dependencies

  • Developed with MATLAB R2022b.

Executing program

  1. Put the video source in the same directory as the main file. To test with the original file, download it from here.
  2. Run the file 'background_extraction.m'
  3. The image result is saved in the same directory.

Changing the data

  • A video other than the default one can be segmented by changing the source file:
% read the video
video = VideoReader('700.mp4');

Help

  • 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;

Limitations

  • 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.

Version History

  • 0.1
    • Initial Release

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages