IMAGE(1) IMAGE(1)
NAME
affinewarp, correlate - image processing tools
SYNOPSIS
image/affinewarp [ -Rqp ] [[ -s x y ] [ -r θ ] [ -t x y ] [
-S x y ] ... ]
image/correlate [ -cRp ] kernel [ denom ]
DESCRIPTION
Image processing tools for image(6) files.
Affinewarp applies a sequence of affine image warping trans-
formations to an image read from stdin and writes the result
to stdout. The transformations happen in a left-handed
coordinate system where the origin is the upper-left corner,
and are applied in the order of the arguments. Its options:
-R Replicate the source image over the entire destination
span. Without this option pixels that map outside the
bounds of the image will be set to black; or transpar-
ent for images with an alpha channel.
-q Apply a bilinear filter when sampling the source for a
higher-quality (albeit blurrier) result.
-p Enable parallelism.
-s Scale the picture x times along the x-axis and y times
along the y-axis.
-r Rotate the image θ degrees.
-t Translate the picture x pixels along the x-axis and y
pixels along the y-axis.
-S Shear the image x times along the x-axis and y times
along the y-axis.
Correlate applies a correlation operation between an image
read from stdin and a filtering kernel specified in a file
of the same name, writing the result to stdout. It will
look for the file in the current directory first, and if it
doesn't find it, it will try in /lib/image/filter. A denom
parameter controls the normalizing coefficient applied to
the kernel before doing the operation, and it can be any
real number; by default or when set to zero, it will use the
sum of coefficients in the kernel. Its options:
-c Apply a convolution instead of a correlation.
Page 1 Plan 9 (printed 4/25/26)
IMAGE(1) IMAGE(1)
-R Replicate the source image. This changes the behavior
of the sampler when accessing pixels outside of the
image boundaries, warping the probe point so that it
falls back into the image (a toroidal map).
-p Enable parallelism.
SOURCE
/sys/src/cmd/image
SEE ALSO
crop(1), resample(1), image(6)
Page 2 Plan 9 (printed 4/25/26)