square

[ XITE Reference Manual | XITE home ]

Name

square - take the square of each pixel value

Syntax

 square [-s <scale>] <input> <output>

Description

square squares the input image band by band, according to the formula:

 output(x,y) = input(x,y) * input(x,y) * scale

Accepts all pixel types. If the result is outside the domain of the actual pixel type, the nearest possible value is returned. Output image will have the same pixel type as input.

Options

-s scale
Default: 1.0

See also

square(3), squareRoot(1), phase(1), power(1), absValue(1), imag(1), real(1), scale(1), multiply(1), divide(1), biffConvert(1)

Author

Tor Lønnestad, BLAB, Ifi, UiO

Examples

 square mona.img sqmona.img
 square -scale 0.05 mona.img sqmona.img

Id

$Id: square.c,v 1.30 1997/05/27 14:46:25 svein Exp $