Common
Function
This function compares two images and extracts or hides common elements.
Use this to do Difference mattes. The extracted elements are taken if
the difference between the two images is less than the Tolerances you
set. A similar function is ISubA,
which will subtract two images and return the absolute value of these
images.
Parameters
|
Type
|
Defaults
|
Function
|
clipMode |
int
|
0 |
Toggles between foreground (0) and background
resolution (1) |
mode |
int
0 - 5
|
0 |
Tells Shake what to do with common elements
0: "show" keeps common elements only, turning the rest
black.
1: "hide" hides common elements, leaving different elements
untouched.
2: "white" turn the image to black and white, keeping
common elements white.
3: "black" is the inverse of "white".
4: "proportion" takes the difference between the values,
averages them, and then inverts it.
|
Tol |
float
|
0, rTol, rTol,
rTol |
The Tolerance values. If pixels between the two images are less
than the Tolerance value, they are considered common.
|
Synopsis
image Common(
image Foreground,
image Background,
int clipMode,
int mode,
float redTol,
float greenTol,
float blueTol,
float alphaTol
);
Script
image = Common(
Foreground,
Background,
clipMode,
mode,
redTol, greenTol,
blueTol, alphaTol
);
Command Line
shake -common image clipMode "mode" redTol etc...
Example
shake lisa.iff -solarize
.5 -common lisa.iff 1 4 .1
shake lisa.iff
-mmult -common lisa.iff 1 2
See Also
ISub, ISubA
|