Epigraph:The steering mechanism of the tank is used for turning left, right, and other directions.
:-)
Here is what I would advise: don't do background subtraction, and even less try to get the object outline. Do something, in a way, opposite: blob detection:
http://www.learnopencv.com/blob-detection-using-opencv-python-c[
^].
For a blob, you can get a
convex hull. As it is
convex, it makes it trivial to calculate if some point is inside the blob of not. Please see:
http://docs.opencv.org/trunk/doc/tutorials/imgproc/shapedescriptors/hull/hull.html[
^].
Now, it's quite unclear what do you mean "objects have moved past a particular point". It depends on how they moved and what are the criteria. But anyway, with convex hull, it's trivial to determine of some point is, say, is left of the object, top of it, left, and so on.
—SA