1keyspillm0pup 2 3This plugin removes the residual key color fringing, which can 4remain after chroma key compositing. 5 6 7Written by Marko Cebokli, apr 2012, and released under GNU GPL 8 9 10RELEASE NOTES 11 12** apr 2012 13Version 0.1 14"pre-alpha" (throw it out and see what happens... :-) 15 16 17 18DESCRIPTION 19 20After some experimentation with chroma keying, it looked to me that 21there is no single method of key cleaning, that works in all 22situations, like keyspill on bright, keyspill on dark, etc. 23So I included several cleaning options, which can be used alone 24or in combination. 25In short, it offers three ways of pixel selection (masking), that 26can be combined with four types of color changing operations. 27The three selection / masking modes are based on 28- similarity to key color 29- transparency 30- closeness to the edge 31and the four things that can be done to the selected pixels are 32- move away from the key color (De-Key) 33- move towards an target color (Target) 34- desaturate 35- luma (brightness) adjust. 36 37 38MASKS 39 40Color difference masks are based on the color of the image, and do 41not depend on the alpha from the preceding keying, except for 42ignoring the 100% transparent areas, to increase speed. 43 44Transparency and Edge masks are based on the alpha channel from the 45preceding keying operation. 46Transparency masks will affect only the parts that are neither 100% 47opaque nor 100% transparent, based on the alpha values from the 48preceding keying operation. The effect will be proportional to the 49transparency. 50NOTE: if a "hard key" was used in the preceding keying, there will be 51no areas that T operations could affect. 52Edge maskss will affect only pixels close to the edge, with the effect 53diminishing away from the edge. The outer edge is the edge of the 54fully opaque part, where the alpha from the preceding keying 55is 1.0 (255). 56NOTE: the edge masking algorithm is not yet what I would like it 57to be. I will have to look some more into this, and improve it, so 58consider it a "temporary solution" that will change in the future. 59 60All masks can be further pruned with two parameters: an "hue gate", 61which will limit the mask to hues close to the key hue, and an 62"saturation threshold", which will limit the mask to areas with 63color saturation above a threshold. 64 65 66CASCADING 67 68This plugin can be cascaded, but it is not possible to get the same 69color based mask in the second instance, because the colors will be 70changed by the first instance. To enable two operations with the 71same mask, each plugin instance can do two opertions. 72With transparency and edge masks, cascading is a bit easier. 73If the hue gate and saturation threshold are not used, transparency 74and edge masks can be exactly the same in cascaded plugins. 75 76 77PARAMETERS: 78 79Key color: 80This should be the same or similar to the key color used for the 81preceding keying operation. 82 83Target color: 84This is only used when "Target" operation is used with one of the 85masks. The colors in the affected areas will be moved towards this 86color, according to the "Amount" parameter. 87 88Mask type: 89Selects the type of mask that will determine where the color 90altering operations will occur. 91 92Tolerance: 93For the color difference mask, the range of colors around the key, 94that will be 100% affected. 95For the transparency mask, the "amplification". 96For the edge mask, the width of the affected area. 97 98Slope: 99For the color difference mask, the range of colors outside of 100"Tolerance", that will be gradually less affected. 101No function for the transparency and edge masks. 102 103Hue gate: 104Reduces the mask according to difference from key hue, to prevent 105change to pixels that are within the mask, but not polluted by key. 106 107Saturation threshold: 108Reduces the mask according to color saturation, to avoid affecting 109the neutral areas. 110 111Operation 1: 112Selects which of the four possible operations will be done on the 113mask-selected pixels. Apart from no operation, there are four 114possibilities: De-key, Target, De-saturate and Luma adjust. 115 116Amount 1: 117The amount of the selected operation 1, how much the colors will 118change. 119 120Operation 2, Amount 2: 121Enable a second operation to be performed with the same mask. 122 123Show mask: 124This will show the selected mask as a greyscale image, to help with 125fine tuning of the masks. Shoud be OFF for the final render. 126 127Mask to Alpha: 128Copies the active mask to the alpha channel. 129For all normal spill cleaning operations, this should be OFF. 130By seting it ON, the keyspillm0pup itself can be used as a keyer, 131or to generate some special effects. 132