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

NAME

6       im_similarity_area,  im_similarity - apply a similarity transform to an
7       image
8

SYNOPSIS

10       #include <vips/vips.h>
11
12       int im_similarity_area(in, out, s, a, dx, dy, x, y, w, h)
13       IMAGE *in, *out;
14       double s, a, dx, dy;
15       int x, y;
16       int w, h;
17
18       int im_similarity(in, out, s, a, dx, dy)
19       IMAGE *in, *out;
20       double s, a, dx, dy;
21
22

DESCRIPTION

24       im_similarity_area() applies a similarity transformation on  the  image
25       held  by  the  IMAGE  descriptor in and puts the result at the location
26       pointed by the IMAGE descriptor out. in many have any number of  bands,
27       be any size, and have any non-complex type.
28
29       The  transformation  is  described by s, a, dx, dy.  The point (x,y) in
30       the input is mapped onto point (X,Y) in the output by
31
32            X = s * x - a * y + dx      Y = a * x + s * y + dy
33
34       s and a do not correspond to scale and angle of the transformation; the
35       actual scale and angle are given by the equations:
36
37            scale = sqrt(s*s + a*a)      angle = arctan(s/a).
38
39       The area of the output image given by x, y, w, h is generated. (0,0) is
40       the position of the  transformed  top-left-hand  corner  of  the  input
41       image.   Function  im_similarity_area  resamples  the transformed image
42       using bilinear interpolation.
43
44       im_similarity works exactly as im_similarity_area, but calculates x, y,
45       w, h for you such that the rectangle described just encloses all of the
46       transformed input pixels.
47

RETURN VALUE

49       The functions return 0 on success and -1 on error.
50

BUGS

52       As with most resamplers, im_similarity performs poorly at the edges  of
53       images.
54

SEE ALSO

56       similarity(1), similarity_area(1)
57

AUTHORS

59       N. Dessipris - 13/01/1992
60       J.Ph. Laurent - 12/12/92
61       J. Cupitt - 22/02/93
62
63
64
65                                13 January 1992          IM_SIMILARITY_AREA(3)
Impressum