[FFmpeg-trac] #3026(avfilter:new): support vectorscope graticule in histogram color modes

FFmpeg trac at avcodec.org
Sun Mar 9 03:11:55 CET 2014

#3026: support vectorscope graticule in histogram color modes
             Reporter:  dericed      |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  wish         |                Component:  avfilter
              Version:  git-master   |               Resolution:
             Keywords:  histogram    |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |

Comment (by dericed):

 Here's an example of a graticule made via drawbox. I scaled it to 512 to
 increase the resolution of the boxes. I put a color for each of the 6
 color points (r,g,b,c,y,m) and placed them at 100% and 75% levels. The
 100% boxes are listed first and at 0.6 transparency while the 75% boxes
 are at 0.8 transparency. At 123 degrees I added the last four sienna boxes
 to indicate a skin tone line.
 Within the drawbox commands, the x values are subtracted by 2 and the y
 values by 3 to accomodate centering the box around the color point. I
 added draw grid lines which helped verify all the placements. Also I added
 transpose=2 so that the vectorscope is aligned to a traditional analog

 -vf 'histogram=mode=color2,\
     drawgrid=w=32:h=32:t=1:c=white at 0.2,\
     drawgrid=w=256:h=256:t=1:c=white at 0.3,\
     drawgrid=w=8:h=8:t=1:c=white at 0.1,\
     drawbox=w=5:h=5:t=1:x=180-2:y=512-480-3:c=red at 0.6,\
     drawbox=w=5:h=5:t=1:x=108-2:y=512-68-3:c=green at 0.6,\
     drawbox=w=5:h=5:t=1:x=480-2:y=512-220-3:c=blue at 0.6,\
     drawbox=w=5:h=5:t=1:x=332-2:y=512-32-3:c=cyan at 0.6,\
     drawbox=w=5:h=5:t=1:x=404-2:y=512-444-3:c=magenta at 0.6,\
     drawbox=w=5:h=5:t=1:x=32-2:y=512-292-3:c=yellow at 0.6,\
     drawbox=w=5:h=5:t=1:x=199-2:y=512-424-3:c=red at 0.8,\
     drawbox=w=5:h=5:t=1:x=145-2:y=512-115-3:c=green at 0.8,\
     drawbox=w=5:h=5:t=1:x=424-2:y=512-229-3:c=blue at 0.8,\
     drawbox=w=5:h=5:t=1:x=313-2:y=512-88-3:c=cyan at 0.8,\
     drawbox=w=5:h=5:t=1:x=367-2:y=512-397-3:c=magenta at 0.8,\
     drawbox=w=5:h=5:t=1:x=88-2:y=512-283-3:c=yellow at 0.8,\
     drawbox=w=5:h=5:t=2:x=160-2:y=512-404-3:c=sienna at 0.8,\
     drawbox=w=5:h=5:t=2:x=184-2:y=512-366-3:c=sienna at 0.8,\
     drawbox=w=5:h=5:t=2:x=208-2:y=512-330-3:c=sienna at 0.8,\
     drawbox=w=5:h=5:t=2:x=232-2:y=512-292-3:c=sienna at 0.8'

 Here's a one-liner application in ffplay to plot the testsrc source.

 ffplay -f lavfi -i testsrc -vf 'histogram=mode=color2, transpose=dir=2,
 scale=512:512, drawgrid=w=32:h=32:t=1:c=white at 0.2,
 drawgrid=w=256:h=256:t=1:c=white at 0.3, drawgrid=w=8:h=8:t=1:c=white at 0.1,
 drawbox=w=5:h=5:t=1:x=180-2:y=512-480-3:c=red at 0.6,
 drawbox=w=5:h=5:t=1:x=108-2:y=512-68-3:c=green at 0.6,
 drawbox=w=5:h=5:t=1:x=480-2:y=512-220-3:c=blue at 0.6,
 drawbox=w=5:h=5:t=1:x=332-2:y=512-32-3:c=cyan at 0.6,
 drawbox=w=5:h=5:t=1:x=404-2:y=512-444-3:c=magenta at 0.6,
 drawbox=w=5:h=5:t=1:x=32-2:y=512-292-3:c=yellow at 0.6,
 drawbox=w=5:h=5:t=1:x=199-2:y=512-424-3:c=red at 0.8,
 drawbox=w=5:h=5:t=1:x=145-2:y=512-115-3:c=green at 0.8,
 drawbox=w=5:h=5:t=1:x=424-2:y=512-229-3:c=blue at 0.8,
 drawbox=w=5:h=5:t=1:x=313-2:y=512-88-3:c=cyan at 0.8,
 drawbox=w=5:h=5:t=1:x=367-2:y=512-397-3:c=magenta at 0.8,
 drawbox=w=5:h=5:t=1:x=88-2:y=512-283-3:c=yellow at 0.8,
 drawbox=w=5:h=5:t=2:x=160-2:y=512-404-3:c=sienna at 0.8,
 drawbox=w=5:h=5:t=2:x=184-2:y=512-366-3:c=sienna at 0.8,
 drawbox=w=5:h=5:t=2:x=208-2:y=512-330-3:c=sienna at 0.8,
 drawbox=w=5:h=5:t=2:x=232-2:y=512-292-3:c=sienna at 0.8'

Ticket URL: <https://trac.ffmpeg.org/ticket/3026#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list