ChannelMixer: Difference between revisions

From Avisynth wiki
Jump to navigationJump to search
Archived Downloads
m Examples: space
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{FilterCat|External_filters|Adjustment_filters|Levels and Chroma}}
{{FilterCat4|External_filters|Plugins|Adjustment_filters|Levels_and_Chroma_filters}}
{{Filter3
{{Filter3
|Gustaf Ullberg
|Gustaf Ullberg
Line 5: Line 5:
|{{Plugin/ChannelMixer}}
|{{Plugin/ChannelMixer}}
|Levels and Chroma
|Levels and Chroma
| }}
|
<br>
|6=[http://forum.videohelp.com/threads/278516-Nice-Results-With-Avisynth-Color-Channel-Mixer VideoHelp Thread]}}
 
== Description ==
== Description ==
:An AviSynth filter similar to the Channel Mixer in Adobe Photoshop CS2. 9 Adjustments are possible, 3 for each color channel.
An AviSynth filter similar to the Channel Mixer in Adobe Photoshop CS2. 9 Adjustments are possible, 3 for each color channel.<br/>
:ChannelMixer computes the following formula:
ChannelMixer computes the following formula:
<blockquote><pre style="width: 18%;"> |Rout|            |RR RG RB| |Rin|
<blockquote style="width: 29%;"><pre>|Rout|            |RR RG RB| |Rin|
|    |            |        | |  |
|    |            |        | |  |
|Gout| = (1/100) * |GR GG GB| |Gin|
|Gout| = (1/100) * |GR GG GB| |Gin|
|    |            |        | |  |
|    |            |        | |  |
|Bout|            |BR BG BB| |Bin|</pre></blockquote>
|Bout|            |BR BG BB| |Bin|</pre></blockquote>
<br>
<br>
== Requirements: ==
== Requirements==
:- AviSynth 2.5.8 or later
* AviSynth 2.5.8 or later
:- [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only  
* [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only  
:- Supported color formats: [[RGB24]], [[RGB32]]
* Supported color formats: [[RGB24]], [[RGB32]]
<br>
<br>
== Syntax and Parameters ==
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef|ChannelMixer (''clip'', ''float'' "RR", ''float'' "RG", ''float'' "RB", ''float'' "GR", ''float'' "GG", ''float'' "GB", ''float'' "BR", ''float'' "BG", ''float'' "BB")}}
:{{Template:FuncDef|ChannelMixer (''clip'', ''float'' "RR", ''float'' "RG", ''float'' "RB", ''float'' "GR", ''float'' "GG", ''float'' "GB", ''float'' "BR", ''float'' "BG", ''float'' "BB")}}
<br>
<br>
Line 45: Line 46:
::::Blue-Red, Blue-Green, and Blue-Blue.
::::Blue-Red, Blue-Green, and Blue-Blue.
<br>
<br>
:::Range for all parameters: -255.0 - 255.0
:::*Range for '''all''' parameters: -255.0 - 255.0
<br>
<br>
== Examples ==
== Examples ==
ChannelMixer with the following settings is identical to the input. In other words; a very slow no-op.
ChannelMixer with the following settings is identical to the input. In other words; a very slow no-op.
Line 57: Line 59:
[[File:ChannelMixer Before&After.png]]
[[File:ChannelMixer Before&After.png]]
<br>
<br>
<br>
== Changelog ==
== Changelog ==
  Version      Date            Changes<br>
  Version      Date            Changes<br>
Line 73: Line 77:
|}
|}
<br>
<br>
== Links ==
==External Links ==
*[http://forum.doom9.org/showthread.php?p=1002616#post1002616 Doom9 Forum] - Initial release.
*[http://forum.doom9.org/showthread.php?p=1002616#post1002616 Doom9 Forum] - Initial release.
*[http://forum.videohelp.com/threads/278516-Nice-Results-With-Avisynth-Color-Channel-Mixer VideoHelp Forum] - ChannelMixer discussion.
*[http://forum.videohelp.com/threads/278516-Nice-Results-With-Avisynth-Color-Channel-Mixer VideoHelp Forum] - ChannelMixer discussion.
<br>
<br>
<br>
<br>
<br>
-----------------------------------------------
-----------------------------------------------
'''Back to [[External_filters#Levels_and_Chroma|External Filters]] &larr;'''
'''Back to [[External_filters#Levels_and_Chroma|External Filters]] &larr;'''

Latest revision as of 20:05, 10 July 2016

Abstract
Author Gustaf Ullberg
Version v1.0
Download channelmixer_v1_0.zip
Category Levels and Chroma
License
Discussion VideoHelp Thread

Description

An AviSynth filter similar to the Channel Mixer in Adobe Photoshop CS2. 9 Adjustments are possible, 3 for each color channel.
ChannelMixer computes the following formula:

|Rout|             |RR RG RB| |Rin|
|    |             |        | |   |
|Gout| = (1/100) * |GR GG GB| |Gin|
|    |             |        | |   |
|Bout|             |BR BG BB| |Bin|


Requirements


ChannelMixer (clip, float "RR", float "RG", float "RB", float "GR", float "GG", float "GB", float "BR", float "BG", float "BB")


Red
float  RR = 0.0
float  RG = 0.0
float  RB = 0.0
Red-Red, Red-Green, and Red-Blue.


Green
float  GR = 0.0
float  GG = 0.0
float  GB = 0.0
Green-Red, Green-Green, and Green-Blue.


Blue
float  BR = 0.0
float  BG = 0.0
float  BB = 0.0
Blue-Red, Blue-Green, and Blue-Blue.


  • Range for all parameters: -255.0 - 255.0


Examples

ChannelMixer with the following settings is identical to the input. In other words; a very slow no-op.

AviSource("blah.avi")
ChannelMixer(RR=100.0, RG=0.0, RB=0.0, GR=0.0, GG=100.0, GB=0.0, BR=0.0, BG=0.0, BB=100.0)


Removing blue tint with ChannelMixer:

AviSource("blah.avi")
ChannelMixer(RR=100.0, RG=20.0, RB=-5.0, GR=0.0, GG=100.0, GB=0.0, BR=-20.0, BG=0.0, BB=100.0)



Changelog

Version      Date            Changes
v1.0 2007/04/30 - Initial release


Archived Downloads

Version Download Mirror
v1.0 channelmixer_v1_0.zip channelmixer_v1_0.zip





Back to External Filters