Scroll to navigation

OSSIM-EQUATION(1) User Commands OSSIM-EQUATION(1)

NAME

ossim-equation - ossim-equation

SYNOPSIS

ossim-equation "<equation spec>" <input_file1> <input_file2> <input_file...> <output_file>

DESCRIPTION

Description: ossim-equation Takes a list of images and performs the specified equation. The inputsmust be in the same projection as the operations are done at the pixellevel with no renderer in th chain. The output file will contain the samegeospatial header info as the first image in the input list.

OPTIONS

Adds a property to send to the writer. format is name=value
Display this information
keyword list to load from
output a keyword list template
Writer type (tiff_strip, jpeg, etc... see ossim-info --writers) (default=tiff_strip)

Equation Specification:

sin(x) takes the sine of the input sind(x) takes the sin of the input and assumes degree input cos(x) takes cosine of input cosd(x) takes the cosine of input and assumes input in degrees sqrt(x) takes square root of input log(x) takes the natural log of input log10(x) takes the log base 10 of the input exp(x) takes the e raised to the passed in argument abs(x) takes the absolute value of the passed in value min(x1, x2, ... xn) takes the min of all values in the list max(x1, x2, ... xn) takes the max of all values in the list.

clamp(image_data, min, max)

will set anything less than min to min and anythin larger than max to max

band(image_data, num) returns a single band image object

Note
and the second argument must be a number

shift(index, num_x, num_y)

variable(i1, i2, ... in) and x, and y must b numbers indicating the delta in that direction to shift the input.

blurr(index, rows, cols)

rows-by-cols kernel. All values are equal weight. Note the fist argument must by an image variable (ex: i1, i2,....in).

conv(index, rows, cols, <row ordered list of values> )

The
<row ordered list of values> is a comma separated
list of constant values.

assign_band(image_data, num1, data2, num2)

band num1 in data 1.

assign_band(image_data, num1, data2)

band num1 in data 1.

assign_band(image_data, num1, num2)

will assin to band num1 of data 1 the value of num2

x1 * x2 will multiply x1 and x2 x1 + x2 will add x1 and x2 x1 - x2 will subtract x1 and x2 x1 / x2 will divide x1 and x2 x1 ^ x2 will do a power, raises x1 to x2 x1 | x2 will do a bitwise or operation

( will do it in unisgned char precision)

x1 & x2 will do a bitwise and operation

( will do it in unsigned char precision)

~x1 will do the ones complement of the input

x1 xor x2 will do an xclusive or operation

(will do it in unsigned char precision)

- x1 will negative of x1

Boolean ops: 1=true, 0=false x1 > x2 x1 >= x2 x1 == x2 x1 <= x2 x1 < x2 x1 <> x2

Note:

Currently an image input is reference by the variable in[<I>] where <I> is the input image index beginning at 0. So 1 referes to the second image in the input list.

(in[0] + in[1])/2 Will take image 1 and add it to image 2 and average them.

exp(sqrt(in[0])/4) Will take the root of the image and divide by 4 and then raise e to that amount.

128 Will return a constant value of 128 for all input bands.

min(1,in[2],in[3], max(in[1],in[0]))

shift(0, 1, 1) - i1 Will shift input 0 by 1 pixel along the diagonal and then subtract it from input 1.

assign_band(in[0], 1, blurr(in[0], 5, 5), 2) Will assign to the first band of i1 the 2nd band of the 5x5 blurr of i1.

conv(0, 3, 3, -1, -2, -1, 0, 0, 0, 1, 2, 1) Will convolve the first input connection with a 3x3 matrix. The args are row ordered:

-1, -2, -1
0, 0, 0 1, 2, 1

NDVI: N=(in[0]-in[1])/(in[0]+in[1])

For indexed-type values,like NDVI, (with limited values) it is better to rescale between 0.0 and 1.0 and use type NormalizedFloat.

Rescaled NDVI between 0 and 1: (N+1)/2 = in[0]/(in[0]+in[1])

SEE ALSO

The full documentation for ossim-equation is maintained as a Texinfo manual. If the info and ossim-equation programs are properly installed at your site, the command

info ossim-equation

should give you access to the complete manual.

December 2015 ossim-equation 1.8.20