The Median was used as a background subtractor. This repository includes 2 types of foreground analyse. It is created in the first type by basic frame and median background differences. In the second, it was applied this article. It was offered in this article; that if we apply an edge algorithm on the frame and background and find differenence image, we can handle illumination changes in the frame like leaf move or shadow.
https://github.com/kondukberna/BackgroundSubtraction.git
mkdir build && build
cmake ..
make
For basic foreground
./bgsubtraction -image_path video/video03.avi -folder_path folders -threshold_value 50
If you want to try edge you have to add -edge flag.
./bgsubtraction -image_path video/video03.avi -folder_path folders -threshold_value 50 -edge
Frame
Basic Foreground
Using Edge Foreground