I am trying to substract this building brick. .
For that I am using the KNN algorithm provided by opencv 3.0. To initialize the background model I am using 40 frames without the brick.
All in all it works pretty well. (Brick with Shadow)
The only problem is that the algorithm starts loosing the brick around Frame 58
(Image shows frame 62)
After frame 64 I get only black images. I know this wouldn't happen if the brick would move, but unfortunatly there are long sequences where it doesn`t.
Does somebody know a solution to this?
PS: I tried playing around with the history Paramer of
cv::createBackgroundSubtractorKNN(int history,double Threshold, bool detectShadows= true)
But there is no difference between history = 500 or history = 500000