I am doing some work regarding tracking a person, I am using this dataset. I am trying right now to extract foreground using background subtraction method i.e. Mean Filter
My background is like
and if I try to subtract my current frame like this
so after subtraction I am getting image like this
and after thresholding of 0.15 or 38
I get this mask
So if you notice this mask, it is splitting this foreground in to two pieces because of occlusion of person and chair. I dont know how to solve this problem. Any suggestions?
It's also not a perfect solution. Please reduce the number of frames to create background image in background subtraction method it may help you. Or initialize the background subtraction structure frequently.