Opened 4 years ago

Closed 13 months ago

#8766 closed defect (fixed)

find_rect documentation

Reported by: Michael Koch Owned by:
Priority: minor Component: documentation
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I suggest to add the following to the documentation of the find_rect video filter:

-- If the input video contains multiple instances of the object, find_rect will find only one of them.
-- threshold = 0.01 means only exact matches, threshold = 0.99 means almost everything matches
-- find_rect writes the result to these internal variables:

lavfi.rect.w width of object
lavfi.rect.h height of object
lavfi.rect.x x position of object
lavfi.rect.y y position of object

-- If the threshold value isn't met, then these variables aren't written to.
-- It is possible to write these variables to a file with ffprobe and -show_entries

Examples section:

Find the position of an object in each frame and write it to a log file:
ffprobe -f lavfi movie=test.mp4,find_rect=object=object.pgm:threshold=0.3 -show_entries
frame=pkt_pts_time:frame_tags=lavfi.rect.x,lavfi.rect.y -of csv 1> log.csv

Suggestion for improvement:

Please make also the internal variable "best_score" available, so that it can be written to the log file as well.

Change History (4)

comment:1 by Michael Koch, 4 years ago

Also the meaning of the ‘xmin, ymin, xmax, ymax’ options is unclear and a better documentation is required. Does it mean the top left corner of the object image must be in the specified area, or does it mean the full object image must be in this area?

comment:2 by Carl Eugen Hoyos, 4 years ago

Priority: normalminor
Type: enhancementdefect

Please send your patch - made with git format-patch - to the FFmpeg development mailing list.
As you probably found out by now, suggestions for patches on this bug tracker are mostly ignored.

in reply to:  2 comment:3 by Michael Koch, 4 years ago

Replying to cehoyos:

Please send your patch - made with git format-patch - to the FFmpeg development mailing list.
As you probably found out by now, suggestions for patches on this bug tracker are mostly ignored.

That won't happen soon, because I haven't yet figured out how git works. I have seen the instructions at https://www.ffmpeg.org/git-howto.html but I understand almost nothing of it.

comment:4 by Stefano Sabatini, 13 months ago

Resolution: fixed
Status: newclosed

Should be fixed in commit ee25a434dce2faf6, thanks for the report!

Note: See TracTickets for help on using tickets.