Last change
on this file since 9061 was 731, checked in by tbretz, 24 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Line | |
---|
1 | #include "slalib.h"
|
---|
2 | #include "slamac.h"
|
---|
3 | void slaPcd ( double disco, double *x, double *y )
|
---|
4 | /*
|
---|
5 | ** - - - - - - -
|
---|
6 | ** s l a P c d
|
---|
7 | ** - - - - - - -
|
---|
8 | **
|
---|
9 | ** Apply pincushion/barrel distortion to a tangent-plane [x,y].
|
---|
10 | **
|
---|
11 | ** Given:
|
---|
12 | ** disco double pincushion/barrel distortion coefficient
|
---|
13 | ** x,y double tangent-plane coordinates
|
---|
14 | **
|
---|
15 | ** Returned:
|
---|
16 | ** *x,*y double distorted coordinates
|
---|
17 | **
|
---|
18 | ** Notes:
|
---|
19 | **
|
---|
20 | ** 1) The distortion is of the form rp = r*(1 + c*r**2), where r is
|
---|
21 | ** the radial distance from the tangent point, c is the disco
|
---|
22 | ** argument, and rp is the radial distance in the presence of
|
---|
23 | ** the distortion.
|
---|
24 | **
|
---|
25 | ** 2) For pincushion distortion, c is +ve;
|
---|
26 | ** For barrel distortion, c is -ve.
|
---|
27 | **
|
---|
28 | ** 3) For x,y in units of one projection radius (in the case of
|
---|
29 | ** a photographic plate, the focal length), the following
|
---|
30 | ** disco values apply:
|
---|
31 | **
|
---|
32 | ** geometry disco
|
---|
33 | **
|
---|
34 | ** astrograph 0.0
|
---|
35 | ** schmidt -0.3333
|
---|
36 | ** AAT pf doublet +147.069
|
---|
37 | ** AAT pf triplet +178.585
|
---|
38 | ** AAT f/8 +21.20
|
---|
39 | ** JKT f/8 +13.32
|
---|
40 | **
|
---|
41 | ** 4) There is a companion routine, slaUnpcd, which performs
|
---|
42 | ** an approximately inverse operation.
|
---|
43 | **
|
---|
44 | ** Last revision: 15 July 1993
|
---|
45 | **
|
---|
46 | ** Copyright P.T.Wallace. All rights reserved.
|
---|
47 | */
|
---|
48 | {
|
---|
49 | double f;
|
---|
50 |
|
---|
51 | f = 1.0 + disco * ( *x * *x + *y * *y );
|
---|
52 | *x *= f;
|
---|
53 | *y *= f;
|
---|
54 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.