Opened 11 years ago
Closed 9 years ago
#3026 closed enhancement (fixed)
support vectorscope graticule in histogram color modes
Reported by: | dave rice | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avfilter |
Version: | git-master | Keywords: | histogram |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the enhancement request:
A vectorscope graticule overlay option would allow for easier measurements and readings when using the color and color2 modes of the histogram filter and allow for the emulation of some broadcast equipment. An example of a vectorscope graticule overlay for NTSC is here http://upload.wikimedia.org/wikipedia/commons/7/7b/Vectorscope_graticule.png.
A very rough un-aligned example can be produce via:
ffmpeg -i Vectorscope_graticule.png -f lavfi -i smptebars -filter_complex "[0:v]scale=-1:256[a];[1:v]histogram=mode=color,transpose=cclock[b];[b][a]overlay[c]" -map "[c]"
Slightly better looking and aligned to center, but still unaligned at color points.
ffmpeg -i Vectorscope_graticule.png -f lavfi -i smptebars -filter_complex "[0:v]null[a];[1:v]histogram=mode=color,transpose=cclock,scale=680:680,negate[b];[b][a]overlay=24:44[c]" -map "[c]" -f nut -c:v rawvideo - | ffplay -
Change History (5)
comment:1 by , 11 years ago
Priority: | normal → wish |
---|
comment:2 by , 11 years ago
comment:3 by , 9 years ago
I think best way to do graticule is to generate one and then use an overlay filter.
comment:4 by , 9 years ago
@richardpl, that's probably true. I was originally inspired to post this, when seeing that the video mode of the ebur128 filter had something like a graticule.
comment:5 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Lite digital version implemented. Maybe will add text later.
If you want emulation of analog vectorscope open new ticket.
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 vectorscope.
Here's a one-liner application in ffplay to plot the testsrc source.