Table of Contents
memc - full-search, block-based motion estimation and compensation
memc [-fp] [-hp] [-qp] [-ep] [-f1 filter1] [-f2 filter2] [-f3 filter3]
[-w window] [-b block_size] [-mc motion_compensated_frame] [-srf subpixel_reference_frame]
[-r residual_frame] reference_frame current_frame mvfile
- -fp
- Full-pixel accuracy.
- -hp
- Half-pixel accuracy.
- -qp
- Quarter-pixel accuracy.
- -ep
- Eighth-pixel accuracy.
- -f1 filter1
- String. Filename of filter to use for
going from full-pixel to half-pixel accuracy.
- -f2 filter2
- String. Filename
of filter to use for going from half-pixel to quarter-pixel accuracy.
- -f3
filter3
- String. Filename of filter to use for going from quarter-pixel
to eighth-pixel accuracy.
- -w window
- Integer. Window size for motion estimation.
Default is 15 pixels.
- -b block_size
- Integer. Block size. Default is 16 pixels.
- -mc motion_compensated_frame
- String. Filename of file to which to write
the motion-compensated frame.
- -srf subpixel_reference_frame
- String. Filename
of file to which to write the reference frame after having been interpolated
to the specified subpixel accuracy.
- -r residual_frame
- String. Filename of
file to which to write the difference between the current frame and the
motion-compensated frame, the residual image from the motion-compensation
process.
memc reads two images, a current_frame and a reference_frame,
performing full-search, block-based motion estimation to estimate motion
from reference_frame to current_frame. That is, for each block in current_frame,
every block in a window surrounding the current-block location in reference_frame
is searched, and the best-matching block chosen. The size of the blocks
to use for matching is given by block_size (default is 16); and the size
of the window in which to perform the block-matching search is window (default
is 15).
memc first interpolates reference_frame to the specified subpixel
accuracy as determined by the -fp, -hp, -qp, or -ep options. In the case that
none of these options are specified, memc defaults to using full-pixel
accuracy. QccVIDMotionEstimationCreateReferenceFrame(3)
is used to perform
the subpixel-accuracy interpolation, with filter1, filter2, and filter3
provided to the latter routine if specified (filter1, filter2, and filter3
should be files whose format is described with QccFilterRead(3)
). Next,
QccVIDMotionEstimationFullSearch(3)
is called to carry out the full-search,
block-based motion estimation. QccVIDMotionVectorsWriteFile(3)
then writes
the resulting motion vectors to mvfile.
If the -mc option is specified,
QccVIDMotionEstimationCreateCompensatedFrame(3)
is called to generate
the motion-compensated frame using the motion vectors that resulted from
the full-search, block-based motion search. This compensated frame is then
written to motion_compensated_frame.
If the -srf option is specified, the
interpolated, subpixel-accurate reference frame (as generated by QccVIDMotionEstimationCreateReferenceFrame(3)
)
is written to reference_frame.
If the -r option is specified, the residual
image between the current frame and the motion-compensated frame is written
to residual_frame. This residual is not the true difference image, but
rather the absolute value of the difference image, in order to avoid negative-valued
pixels.
QccVIDMotionEstimationFullSearch(3)
, QccVIDMotionEstimationCreateReferenceFrame(3)
,
QccVIDMotionEstimationCreateCompensatedFrame(3)
, QccVIDMotionVectorsWriteFile(3)
,
QccFilterRead(3)
, QccPackVID(3)
, QccPackIMG(3)
, QccPack(3)
Copyright
(C) 1997-2021 James E. Fowler
Table of Contents