GreyScale
From Avisynth wiki
(Difference between revisions)
Raffriff42 (Talk | contribs) m (note alternate spelling of filter name) |
|||
Line 1: | Line 1: | ||
Converts the input clip to greyscale (no color), without changing the [[Convert|color format]]. | Converts the input clip to greyscale (no color), without changing the [[Convert|color format]]. | ||
+ | UK (''Gr'''''e'''''yscale'') and US (''Gr'''''a'''''yscale'') spellings are both allowed. | ||
− | {{ | + | |
+ | {{Func2Def | ||
+ | |Greyscale(clip ''clip'' [, string ''matrix'']) | ||
+ | |Grayscale(clip ''clip'' [, string ''matrix'']) | ||
+ | }} | ||
:{{Par2|matrix|string|"Rec601"}} | :{{Par2|matrix|string|"Rec601"}} |
Revision as of 11:35, 17 February 2016
Converts the input clip to greyscale (no color), without changing the color format.
UK (Greyscale) and US (Grayscale) spellings are both allowed.
Greyscale(clip clip [, string matrix])
Grayscale(clip clip [, string matrix])
- string matrix = "Rec601"
- In RGB based formats, the conversion produces the luma using the coefficients given in the matrix parameter.
- "Rec601" : Use Rec.601 coefficients (and keeping luma range unchanged)
- "Rec709" : Use Rec.709 coefficients (and keeping luma range unchanged)
- "AVERAGE" : Use averaged coefficients (Y = (R + G + B) / 3)
- In RGB based formats, the conversion produces the luma using the coefficients given in the matrix parameter.
If clip is YUV, the chroma channels are simply set to grey (128) – matrix is not used and must not be specified otherwise an error will be thrown.
See Color conversions for an explanation of the coefficients. Broadly speaking though,
- using Rec709, green contributes more to the output, compared to the default Rec601;
- using Average, blue contributes more.
In all cases, Luma range is not changed (0-255 in → 0-255 out; 16-235 in → 16-235 out)