public static class MotionEstimatorAlgorithm.PHASE_CORRELATION extends MotionEstimatorAlgorithm
MotionEstimatorAlgorithm.PHASE_CORRELATION, MotionEstimatorAlgorithm.TEMPLATE_MATCH
Constructor and Description |
---|
PHASE_CORRELATION() |
Modifier and Type | Method and Description |
---|---|
Point2d |
estimateMotion(VideoSubFrame<FImage> img2sub,
VideoSubFrame<FImage>... imagesSub)
Calculate the estimated motion vector between
images
which [0] is first in the sequence and img2 which is
second in the sequence. |
requiredNumberOfFrames
public PHASE_CORRELATION()
public Point2d estimateMotion(VideoSubFrame<FImage> img2sub, VideoSubFrame<FImage>... imagesSub)
images
which [0] is first in the sequence and img2
which is
second in the sequence. This method uses phase correlation - the fact
that translations in space can be seen as shifts in phase in the
frequency domain. The returned vector will have a maximum horizontal
displacement of img2.getWidth()/2
and a minimum
displacement of -img2.getWidth()/2
and similarly for the
vertical displacement and height.img2sub
- The second image in the sequenceimagesSub
- The previous image in the sequencePoint2d
in absolute
x and y coordinates.