Thanks for your test and the feedback
Exactly. It's a very simple (and fast) algorithm which has the advantage that its result is predictable by users once I explained how it works. For that reason I try to explain it now:
Assume you pour green paint over the whole image and the detected motion is a barrier for the green paint.
If an area is completely surrounded by motion, the green paint can not flow out. If there is a gap (a single pixel without motion is enough) it can flow out to the next area and so on. If the paint manages to flow to a border pixel of the image which is not a pixel detected as motion, it will flow out of the image.
Btw: May I use your
moving van file for a tutorial?