Video-luma Grayscale


Accurate grayscale for NTSC and PAL videos

VirtualDub’s built-in grayscale filter is apparently not optimized for NTSC and PAL clips.  Composite video uses rather peculiar weightings:


 video_luma =  0.299 * R     +     0.587 * G     +     0.114 * B


Although this equation is rather antiquated, these weightings must be used when converting from NTSC and PAL.  Any equation that doesn’t account for the peculiarities of composite video will generate inaccurate shades of gray.



Oops!  Someone helpfully pointed out that VirtualDub’s built-in “TV Filter” can do the same thing as this filter.  Just configure it for ‘Y Channel (luminance)’.

The discussion on this page remains valid, but you don’t really need my filter to do it!


Fig 1 Standard color bars:

A standard set of color bars.  When viewed on a b&w television, it should appear as gray bars, ranging from bright to dark in uniform steps.

Fig 2 Grayscale capture:

This is a perfect rendition in grayscale, as captured by a Bt878 with the “enable color” box unchecked.  Since this is a capture setting, you can’t use this method to convert existing video files into grayscale.

Fig 3 VirtualDub’s Grayscale:

This image was converted from Fig 1 with VirtualDub’s built-in grayscale filter.  The bars on the left are too bright, the ones on the right are too dim.  None of the bars were converted into medium-gray shades.

Fig 4 Video-luma Grayscale:

The Video-luma Grayscale plug-in filter converted Fig 1 using the weightings specified for NTSC/PAL.  It closely matches the ideal image in Fig 2.



VirtualDub’s grayscale filter yields acceptable-looking results, but introduces trouble in a few specific situations.  Spurious rainbow effects often appear in NTSC, and even more often in PAL.


Here’s a black & white photograph of Andy Worhol that appeared in a documentary.   A rainbow spuriously appeared in his tie, and the colors shift from one frame to the next.  If the clip is converted to grayscale with VirtualDub’s built-in grayscale filter, the different colors in each frame are interpreted as different shades of gray.  Andy Worhol’s tie seems to “crawl” in the converted clip, even though the rest of the picture is stationary.  (The image at right is an animated GIF, taken from the actual clip.)





When the clip is converted to grayscale using the Video-luma Grayscale plug-in, it no longer exhibits frame-to-frame variations.  And the pattern of Andy Worhol’s tie is more accurately revealed, too!