-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlens-correct.h
39 lines (35 loc) · 1.34 KB
/
lens-correct.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _LENS_CORRECT_H_
#define _LENS_CORRECT_H_
/* Struct containing the correction parameters a,b,c,d for a lens color channel.
* These parameters as the same as used in the Panotools system.
* For a detailed explanation, please consult http://wiki.panotools.org/Lens_correction_model
*
* Normally a, b, and c are close to zero, and d is close to one.
* Note that d is the parameter that's approximately equal to 1 - a - b - c, NOT one of the image
* shift parameters as used in some GUIs.
*/
typedef struct
{
gfloat a, b, c, d;
} ChannelCorrectionModel;
/* Struct containing all the information required for lens correction. It includes the total size
* of the image plus the correction parameters for each color channel.
*/
typedef struct
{
GeglRectangle BB; /* Bounding box of the imaged area. */
gfloat cx, cy; /* Coordinates of lens center within the imaged area. */
gfloat rscale; /* Scale of the image (1/2 of the shortest side). */
ChannelCorrectionModel red, green, blue, alpha; /* Correction parameters for each color channel. */
} LensCorrectionModel;
typedef struct
{
gdouble centre_x;
gdouble centre_y;
gdouble mult_sq;
gdouble mult_qd;
gdouble rescale;
gdouble brighten;
gdouble norm;
} OldLensDistort;
#endif