It definitely cannot. Even doing static camera motion detection takes some work, and from my experience boils down to some kind of manual heuristics. OpenCV does provide a great set of "primitives", however.
For example, I like to compare snapshots to a rolling greyscale 3s average image and extract contours around large diffs. This still yields lots of noise (moving shadows are the worst!), but I don't need realtime answers and have a relatively fixed domain. This let me add models like CLIP to search out specific known false positives (and known good positives) to improve detection quality.
A moving camera, obviously has no fixed frame of reference to detect motion. As such, your heuristics need to change, and they'll get considerably more complex (and computationally expensive). Honestly, I wouldn't even know where to start, and likely wouldn't even be based on OpenCV.
I really appreciate the answer. It seems like most tutorials do rely on simple heuristics like you mentioned, from the gimicky - like trying to filter out objects by dominant color, to the fairly complex like identifying contours.
For example, I like to compare snapshots to a rolling greyscale 3s average image and extract contours around large diffs. This still yields lots of noise (moving shadows are the worst!), but I don't need realtime answers and have a relatively fixed domain. This let me add models like CLIP to search out specific known false positives (and known good positives) to improve detection quality.
A moving camera, obviously has no fixed frame of reference to detect motion. As such, your heuristics need to change, and they'll get considerably more complex (and computationally expensive). Honestly, I wouldn't even know where to start, and likely wouldn't even be based on OpenCV.