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

NAME

6       im_fastcor, im_spcor - correlate two images
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_fastcor(in, ref, out)
12       IMAGE *in, *ref, *out;
13
14       int im_spcor(in, ref, out)
15       IMAGE *in, *ref, *out;
16

DESCRIPTION

18       These  functions  calculate  spatial  correlation  between two one-band
19       images held by the image descriptors in and  ref.   The  sizes  of  ref
20       should be smaller than the sizes of in.  The correlation is carried out
21       by overlapping ref on the top left corner of in and moving it over  in.
22       The size of out is the same as in; however there out has a black (zero)
23       border dictated by the sizes of ref according to the rules  adopted  by
24       im_conv(3).
25
26       im_spcor()  calculates the spatial correlation between in and ref using
27       the correlation coefficient from Niblack "An  Introduction  to  Digital
28       Image  Processing,", Prentice/Hall, pp 138.  The resultant coefficients
29       are written as float numbers in out. The images must be char, short  or
30       ushort.
31
32       im_fastcor()  calculates  the  spatial  correlation between in and ref.
33       The correlation is calculated by overlapping the ref on  the  top  left
34       corner of in and moving it all over in, pixel by pixel. The correlation
35       is calculated by taking absolute differences  pixel  by  pixel  without
36       calculating  the  correlation  coefficient.  The resultant coefficients
37       are written as unsigned int numbers in out which has a size of in.
38
39

BUGS

41       The functions do not check for integer overflow.
42

RETURN VALUE

44       The function returns 0 on success and -1 on error.
45

SEE ALSO

47       im_conv(3), im_lrmosaic(3).
48
50       The National Gallery and Birkbeck College, 1990-1997.
51
52
53
54                                  14 May 1991                    IM_FASTCOR(3)
Impressum