ChanMix

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m
m (Examples)
Line 26: Line 26:
 
<br>
 
<br>
 
== Examples ==
 
== Examples ==
ChanMix with default settings.
+
ChanMix with default settings:
 
  [[AviSource]]("blah.avi")
 
  [[AviSource]]("blah.avi")
 
  chanmix(r=1.0, g=1.0, b=1.0)
 
  chanmix(r=1.0, g=1.0, b=1.0)
Line 43: Line 43:
 
  chanmix(r=0.333333, g=0.333333, b=0.333333)
 
  chanmix(r=0.333333, g=0.333333, b=0.333333)
 
<br>
 
<br>
 +
ChanMix with luma coefficients from [http://en.wikipedia.org/wiki/Rec._2020#Luma_coefficients Rec. 2020]:
 +
 +
[[AviSource]]("blah.avi")
 +
chanmix(r=0.2627, g=0.6780, b=0.0593)
 +
<br>
 +
 
== Changelog ==
 
== Changelog ==
 
  Version        Date            Changes<br>
 
  Version        Date            Changes<br>

Revision as of 21:30, 16 March 2014

Abstract
Author E-Male
Version 2005/02/28
Download chanmix.zip
Category Levels and Chroma
License


Contents

Description

Creates a greyscale image from an RGB24 source, it has 3 parameters to specify how much of each color channel is used.


Requirements

- AviSynth 2.5.8 or later
- Progressive input only
- Supported color formats: RGB24


Syntax and Parameters

chanmix (clip, float "r", float "g", float "b")


float  r = 1.0
float  g = 1.0
float  b = 1.0
The weight of each color channel.
Gray = (red*r + green*g + blue*b) / (r+g+b)


Examples

ChanMix with default settings:

AviSource("blah.avi")
chanmix(r=1.0, g=1.0, b=1.0)


Here are some examples where ChanMix is identical (but slower) to Greyscale:

# Identical to Greyscale(matrix="Rec601") 
AviSource("blah.avi")
chanmix(r=0.299, g=0.587, b=0.114)
# Identical to Greyscale(matrix="Rec709")
AviSource("blah.avi")
chanmix(r=0.2126, g=0.7152, b=0.0722)
# Identical to Greyscale(matrix="Average")
AviSource("blah.avi")
chanmix(r=0.333333, g=0.333333, b=0.333333)


ChanMix with luma coefficients from Rec. 2020:

AviSource("blah.avi")
chanmix(r=0.2627, g=0.6780, b=0.0593)


Changelog

Version         Date            Changes
2005/02/28 2005/02/28 - Initial release


Links





Back to External Filters

Personal tools