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

NAME

6       im_rank, im_rank_raw - rank filter
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_rank(in, out, xsize, ysize, n)
12       IMAGE *in, *out;
13       int xsize, ysize, n;
14
15       int im_rank_raw(in, out, xsize, ysize, n)
16       IMAGE *in, *out;
17       int xsize, ysize, n;
18
19

DESCRIPTION

21       im_rank()  does  rank  filtering on an image. A window of size xsize by
22       ysize is passed over the image. At each position, the pixels inside the
23       window  are  sorted into ascending order and the pixel at the nth posi‐
24       tion is output. n numbers from 0.
25
26       It works for any non-complex image type, with any number of  bands.   A
27       black  border  is added to the output image to make it the same size as
28       the input.
29
30       im_rank_raw() works just as im_rank(), but does not add the border.
31

EXAMPLES

33       For a median filter with mask size m (3 for 3x3, 5 for 5x5, etc.) use
34
35          im_rank( in, out, m, m, m * m / 2 );
36
37       The special cases n == 0 and n == m * m  -  1  are  useful  dilate  and
38       expand operators.
39
40

RETURN VALUE

42       The function returns 0 on success and -1 on error.
43

SEE ALSO

45       im_conv(3), im_fastcor(3).
46
48       1989-1996 The National Gallery and Birkbeck College
49
50
51
52                                  19 Aug 1996                       IM_RANK(3)
Impressum