next up previous contents index
Next: fmean Up: Reference Previous: finfo   Contents   Index

fmask

$ \bigcirc$Name


fmask Choose between two Fimages according to a mask value




$ \bigcirc$Command Synopsis


fmask [-v v] [-i] [-c c] out mask A [B ]



-v v : mask transparency value (default 0)

-i : invert: the test mask==v selects A (instead of B)

-c c : take float constant c as value of B

out : output Fimage (at each point, equals A if mask!=v, B else)

mask : mask Cimage

A : first Fimage

B : second Fimage, not needed if -c option is selected




$ \bigcirc$Function Summary


void fmask (mask , A , B , out , i_flag , v , c )

Fimage mask , A , B , out ;

char *i_flag ;

int *v ;

float *c ;




$ \bigcirc$Description


This function uses a mask given by the cimage mask to choose at each point of the result between two images A and B (with B( . ) = c if -c option is used). If the -i option is not selected, the output image out is defined by

out(x, y) = $\displaystyle \left\{\vphantom{ \begin{array}{l}
A(x,y) \mbox{ if } mask(x,y) \neq v,\\
B(x,y) \mbox{ if } mask(x,y) = v.
\end{array}}\right.$$\displaystyle \begin{array}{l}
A(x,y) \mbox{ if } mask(x,y) \neq v,\\
B(x,y) \mbox{ if } mask(x,y) = v.
\end{array}$

If the -i option is selected, the roles of A and B are exchanged.




$ \bigcirc$See Also


lsnakes_demo.


$ \bigcirc$Version 2.0


Last Modification date : Thu Nov 29 20:23:56 2001


$ \bigcirc$Author


Lionel Moisan






next up previous contents index
Next: fmean Up: Reference Previous: finfo   Contents   Index
mw 2004-05-05