Monochrome
Function
This makes any image black-and-white. Default values are weighed according
to the eye's different sensitivity to Red, Green, and Blue, but you can
override the weights. Notice that it will reduce a 3-channel image (RGB)
to a 1-channel image (BW), and a 4-channel (RGBA) to a 2-channel image
(BWA). If the 3 color channels are identical, it is more efficient to
use a Reorder with a value of rrr, since only the red channel would
be read in. Monochrome reads all 3 channels in, and therefore has
more I/O activity.
Parameters
|
Type
|
Defaults
|
Function
|
r,g,bWeight |
float
|
.3, .59, .11
|
The defaults are set according to the eye's
sensitivity to color, but you can balance the colors differently if
you want to push a certain channel. |
Synopsis
image Monochrome( image,
float rWeight,
float gWeight,
float bWeight
);
Script
image = Monochrome( image, rWeight, gWeight, bWeight);
Command Line
shake -monochrome rWeight gWeight bWeight
|