Sorry for double-posting, but I'll also mention this in the thread that Hove started, to ask if he's already using this (since drone-flying people would likely be especially interested in getting undesired noise out of motion vectors)...
...but here's what I found: automatic exposure produces noisy motion vectors. To get quality and regularity, use the command line switch "-ex off". If the image looks poor (dark, uncontrastful), apply a fixed amount of brightness (e.g. "-br 70") or a fixed amount of contrast, but don't switch on auto-exposure.
As for total darkness, I now have quality darkness with no motion detected.
I'll say it again, please remember that these motion vectors are for optimising the video encoding, and as such it is just looking for the area that will give the best compression efficiency.
Any change in exposure or gain will cause the whole scene to change. The motion vector search looks for the region that closest matches the new macroblock.
Contrast and brightness are processing steps done in the YUV domain. Mess around with them too much and you'll get a noisy image which will again screw up your motion vectors. You're much better off altering the shutter speed (-ss option).
And disabling auto exposure will only be viable if you have a fairly tightly controlled scene, otherwise areas will become either saturated or black very easily.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.