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