1IM_COMPASS(3)              Library Functions Manual              IM_COMPASS(3)
2
3
4

NAME

6       im_compass, im_rank_image, im_lindetect, im_gradient - extract features
7       from an image with a rotating input mask
8

SYNOPSIS

10       #include <vips/vips.h>
11
12       int im_rank_image(in, out, n, index)
13       IMAGE **in;
14       IMAGE *out;
15       int n;
16       int index;
17
18       int im_compass(in, out, mask)
19       IMAGE *in, *out;
20       INTMASK *mask;
21
22       int im_lindetect(in, out, mask)
23       IMAGE *in, *out;
24       INTMASK *mask;
25
26       int im_gradient(in, out, mask)
27       IMAGE *in, *out;
28       INTMASK *mask;
29

DESCRIPTION

31       im_rank_image() sorts the input  images  pixel-wise,  then  outputs  an
32       image in which each pixel is selected from the sorted list by the index
33       parameter. For example, if index is zero, then each output  pixel  will
34       be the minimum of all the corresponding input pixels.  It works for any
35       uncoded, non-complex image type. All input images must match  in  size,
36       format, and number of bands.
37
38       These  functions  convolve the image pointed by the image descriptor in
39       with the mask pointed by mask and put the result in the  image  pointed
40       by out.
41
42       The    mask   structure   INTMASK   is   returned   by   the   function
43       im_read_imask(3), for integer mask  only.   Input  should  be  unsigned
44       char;  processing  is  carried  out using look-up tables. The output is
45       integer.  coefficients.  The size of the output image and the number of
46       channels are the same as the corresponding of the input.
47
48       If  the  sizes of the mask are xm and ym and the sizes of the image are
49       xs and ys, then there is a black border at the output image as follows:
50
51       The top ym/2 lines black, bottom ys-ym/2-ym lines black;  each  of  the
52       remaining  lines  has  the  initial  xm/2 pels blank, and the final xs-
53       xm/2-xm pels black (division over 2 is integer division).   The  output
54       at  each  point is divided by scale and then the offset is added.  Both
55       offset and scale are held in mask.
56
57       im_compass() convolves each point of the input byte image pointed by in
58       with 8 masks.  The first mask is the entered mask and the seven remainā€
59       ing masks are produced by successive rotations of the entered  mask  by
60       45  degrees.   The maximum output of all masks at each point is written
61       to the output integer IMAGE descriptor.  The function expects as  input
62       a square mask of odd size.
63
64       im_lindetect()  convolves each point of the input byte image pointed by
65       in with 4 masks.  The first mask is the  entered  mask  and  the  three
66       remaining  masks  are  produced  by successive rotations of the entered
67       mask by 45 degrees.  The maximum output of all masks at each  point  is
68       written  to  the output integer IMAGE descriptor.  The function expects
69       as input a square mask of odd size.
70
71       im_gradient() convolves each point of the input byte image  pointed  by
72       in with 2 masks; the entered mask and with a 90 degrees rotation of the
73       entered mask.  If g1, g2 are the result of each  convolution  then  for
74       each  point  abs(g1)  +  abs(g2) is written to the output integer IMAGE
75       descriptor.  The function expects as input a square mask of any size.
76

RETURN VALUE

78       All functions returns 0 on success and -1 on error.
79

SEE ALSO

81       im_readmask(3), im_conv(3).
82
84       N. Dessipris
85

AUTHOR

87       N. Dessipris - 02/05/1991
88
89
90
91                                  2 May 1991                     IM_COMPASS(3)
Impressum