1IM_SIGN(3) Library Functions Manual IM_SIGN(3)
2
3
4
6 im_sign - find the unit vector in the direction of value
7
9 #include <vips/vips.h>
10
11 int im_sign( in, out )
12 IMAGE *in, *out;
13
15 im_sign(3) finds the unit vector in the direction of the pixel value.
16 For non-complex images, it returns a signed char image with values -1,
17 0, and 1 for negative, zero and positive pixels. For complex images it
18 returns a complex normalised to length 1.
19
21 The function returns 0 on success and -1 on error.
22
24 im_abs(3), im_cmulnorm(3), im_c2amph(3)
25
26
27
28 July 2002 IM_SIGN(3)