17 ms·
Uh, totally related, but can OpenCV do motion detection from a moving camera "out of the box"? If so, how? All the tutorial seems to be static camera motion det
by throw1234651234 3y ago
Uh, totally related, but can OpenCV do motion detection from a moving camera "out of the box"? If so, how? All the tutorial seems to be static camera motion detection.
- mr-wendel 3y agoIt 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.
- throw1234651234 3y agoI 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. If anyone has a starting point, please do share.