combine

[ XITE Reference Manual | XITE home ]

Name

combine - combine two images

Syntax

combine <inp1><inp2><outp><expr1><expr2><expr3><expr4><relop>

Description

The program combines two images into a new image according to the following algorithm:

 FOR (every pixel) DO
   IF (expr1 RELOP expr2)
   THEN output = expr3
   ELSE output = expr4

The program requires the following arguments:

 input 1 - first image to combine
 input 2 - second image to combine
 output  - name of output image
 expr1, expr2, expr3 & expr4 - one of the values:
       -1 for inputimage1[y][x]
       -2 for inputimage2[y][x]
       0..255 - the constant values 0..255
 relop - one of (EQ, NE, LT, LE, GT, GE)

Restrictions

The input images should have UNS_BYTE pixels and equal sizes.

Author

Tor Lønnestad, BLAB, ifi, UiO.

Examples

 combine mona.img lena.img res.img -1 -2 50 -2 LT

-which does the following:

 FOR (every pixel (x,y)) DO
   IF ( mona[y][x] LT lena[y][x] )
   THEN res[y][x] = 50
   ELSE res[y][x] = lena[y][x]

Id

$Id: combine.c,v 1.24 1997/01/08 10:11:55 svein Exp $