Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|||||||
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 | Link |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,822
|
selectivecolour - highly experimental clone of Photoshop's Selective Colour as filter
WARNING: This filter is highly experimental, and also probably very badly written. It was written by me for very specific purposes, but I thought it might just be useful to somebody, somewhere.
Update: the filter's now written a bit better, doesn't suffer from pitch problems, and is multithreaded. This filter partially copies the actions of Photoshop's "Selective colour" image adjustment action. Apart from an input clip (which must be RGB32) it takes 19 arguments. The first 18 are floats in the range -1 to 1 (other values are accepted, but that behaviour is not well defined). These are in groups of three, representing the Cyan, Magenta, and Yellow %ages (normalised) present in Photoshop's Selective Color dialogue for each of the six colour sections (reds, yellows, greens, cyans, blues, magentas). The last is a boolean to choose either relative (false) or absolute (true) mode, as per the Photoshop dialogue box. Usage: Code:
avisource("...")
converttorgb32
selectivecolour(last,\
0.5,0,0,\
0.25,0.1,0,\
1,-0.5,-0.25,\
-0.5,0.5,-0.5,\
0.1,0.2,0.3,\
-0.1,-0.2,-0.3,\
true)
Reds: those pixels where R>G and B Yellows: R and G>B Greens: G>R and B Cyans: G and B>R Blues: B>R and G Magentas: R and B>G The first number in a triple alters the Red channel, the second the Green channel, the third the Blue channel. Because Photoshop calls these values Cyan, Magenta and Yellow, the numbers work backwards - if you want to increase the intensity of a channel, use a negative number, and vice versa. The filter doesn't currently implement the "Black" value in Photoshop. The filter may fail to work correctly when a clip has been cropped horizontally (because source and destination may not have the same pitch). This bit no longer true! Any use to anyone? David Last edited by wonkey_monkey; 8th October 2011 at 22:57. |
|
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|