Debian Codegraph @

imagery/i.ortho.photo/i.ortho.rectify/equ.c

raw symbols SCIP
1 #include "global.h"
2
3 /* compute target to photo equation */
4 int Compute_ortho_equation(struct Ortho_Image_Group *group)
5 {
6 double e0, e1, e2, n0, n1, n2, z1, z2;
7 int status, i;
8 struct Ortho_Control_Points temp_points;
9
10 /* alloc and fill temp control points */
11 temp_points.count = 0;
12 temp_points.status = NULL;
13 temp_points.e1 = NULL;
14 temp_points.n1 = NULL;
15 temp_points.z1 = NULL;
16 temp_points.e2 = NULL;
17 temp_points.n2 = NULL;
18 temp_points.z2 = NULL;
19
20 /* e0, n0, equal photo coordinates not image coords */
21 for (i = 0; i < group->control_points.count; i++) {
22 status = group->control_points.status[i];
23 e1 = group->control_points.e1[i];
24 n1 = group->control_points.n1[i];
25 z1 = group->control_points.z1[i];
26 e2 = group->control_points.e2[i];
27 n2 = group->control_points.n2[i];
28 z2 = group->control_points.z2[i];
29
30 /* image to photo transformation */
31 I_georef(e1, n1, &e0, &n0, group->E12, group->N12, 1);
32 I_new_con_point(&temp_points, e0, n0, z1, e2, n2, z2, status);
33 }
34
35 group->con_equation_stat = I_compute_ortho_equations(
36 &temp_points, &group->camera_ref, &group->camera_exp, &group->XC,
37 &group->YC, &group->ZC, &group->omega, &group->phi, &group->kappa,
38 &group->M, &group->MI);
39
40 return 0;
41 }
42
43 /* compute photo to image equation */
44 int Compute_ref_equation(struct Ortho_Image_Group *group)
45 {
46 group->ref_equation_stat = I_compute_ref_equations(
47 &group->photo_points, group->E12, group->N12, group->E21, group->N21);
48
49 return 0;
50 }