skvideo.motion.globalEdgeMotion
skvideo.motion.globalEdgeMotion¶Global motion estimation using edge features
Given two frames, find a robust global translation vector found using edge information. Frames must be luminance, RGB, or edge masks.
first input frame. Edge mask if dtype=bool, else luminance or rgb image. shape (1, M, N, C), (1, M, N), (M, N, C) or (M, N)
second input frame. Edge mask if dtype=bool, else luminance or rgb image. shape (1, M, N, C), (1, M, N), (M, N, C) or (M, N)
Search radius for measuring correspondences.
“hamming” –> use Hamming distance when measuring edge correspondence distances. The distance used in the census transform. [1]
“hausdorff” –> use Hausdorff distance when measuring edge correspondence distances. [2]
The motion to minimize edge distances by moving frame2 with respect
to frame1. Returns [0, 0] when either frame contains no edges
(no edge correspondence to minimize), so a blank/edgeless frame
yields “no detected motion” rather than a spurious or crashing
result.
References