FFmpeg 6.0.1
Since* 2.7
#

Find a rectangular object

It accepts the following options:

object

Filepath of the object image, needs to be in gray8.

threshold

Detection threshold, default is 0.5.

mipmaps

Number of mipmaps, default is 3.

xmin, ymin, xmax, ymax

Specifies the rectangle in which to search.

discard

Discard frames where object is not detected. Default is disabled.

#

Examples

  • Cover a rectangular object by the supplied image of a given video using ffmpeg:

    ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv