ShowPixelValues

From Avisynth wiki
Revision as of 23:03, 19 May 2013 by Admin (Talk | contribs)

Jump to: navigation, search

This diagnostic filter displays the actual Y U and V (or R G and B) values from pixels within a frame. This can be useful in determining levels or seeing how another filter changes actual pixel values.

It currently supports YUY2 and RGB32 colour spaces.

To examine RGB24, simple use ConvertToRGB32 before this filter.

To examine YV12, use ConvertToYUY2 before this filter but BEWARE YV12/YUY2 INTERLACING/PROGRESSIVE CONVERSION ISSUES!

In YUY2 mode the filter outputs pairs of magnified pixels with their Y U and V values e.g.

19 18

128 131

where 19 = Y1 value, 18 = Y2 value, 128 = U, 131 = V. (if this seems strange it is because each pair of Y value shares its U and V values with each other in YUY2 colourspace). The Y1 value is underlined to make it a bit more obvious which value is which.

In RGB32 mode the filter outputs each magnified pixel with their R G and B values in their respective colours e.g.

74 138 69

where 74 = R value, 138 = G, 69 = B.

Example Avisynth Syntax

LoadPlugin("ShowPixelValues.dll") AVISource("Test.avi") ShowPixelValues()

  1. Show the pixel values at the top left of the frame

The full parameter list is

ShowPixelValues(clip clip[, int Left default=0] [, int Top default=0 ][,bool ShowValues default=true][ , bool ShowArea default=false][, int Bright default=235][, int Dim default=160][,int Threshold default=200][,bool ShowPixels default=true])

Left and Top dictate what part of the frame will be expanded to examine. Left is always adjusted to be an even value. Left and Top are limited to maximum values to prevent trying to magnify an area not in the frame.

ShowValues determines whether the pixel values are displayed.

ShowArea highlights the area that is magnified by drawing a border around it.

Bright (0-255) - Normal brightness of displayed pixel values.

Dim (0-255) - Brightness value used in light areas.

Threshold (0-255) - Threshold for determining light/normal areas.

ShowPixels - if false then it blanks underlying pixel colour to improve value clarity.

Discussion + download: http://forum.doom9.org/showthread.php?t=64192

Personal tools