1
-
2
- //
3
- // License for compute_P3P_Poses
4
- //
5
- /*
6
- * Copyright (c) 2011, Laurent Kneip, ETH Zurich
7
- * All rights reserved.
8
- *
9
- * Redistribution and use in source and binary forms, with or without
10
- * modification, are permitted provided that the following conditions are met:
11
- * * Redistributions of source code must retain the above copyright
12
- * notice, this list of conditions and the following disclaimer.
13
- * * Redistributions in binary form must reproduce the above copyright
14
- * notice, this list of conditions and the following disclaimer in the
15
- * documentation and/or other materials provided with the distribution.
16
- * * Neither the name of ETH Zurich nor the
17
- * names of its contributors may be used to endorse or promote products
18
- * derived from this software without specific prior written permission.
19
- *
20
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
- * DISCLAIMED. IN NO EVENT SHALL ETH ZURICH BE LIABLE FOR ANY
24
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
- */
31
-
32
- //
33
- // License for the rest of the file
34
- //
35
1
// This file is part of OpenMVG, an Open Multiple View Geometry C++ library.
36
2
3
+ // Copyright (c) 2011, Laurent Kneip.
37
4
// Copyright (c) 2012, 2013 Pierre MOULON.
38
5
39
6
// This Source Code Form is subject to the terms of the Mozilla Public
@@ -176,11 +143,11 @@ inline bool compute_P3P_Poses
176
143
177
144
const std::array<double ,5 > factors = {
178
145
{-f_2_pw2*p_2_pw4 - p_2_pw4*f_1_pw2 - p_2_pw4,
179
-
146
+
180
147
2 .*p_2_pw3*d_12*b +
181
148
2 .*f_2_pw2*p_2_pw3*d_12*b
182
149
-2 .*f_2*p_2_pw3*f_1*d_12,
183
-
150
+
184
151
-f_2_pw2*p_2_pw2*p_1_pw2
185
152
-f_2_pw2*p_2_pw2*d_12_pw2*b_pw2
186
153
-f_2_pw2*p_2_pw2*d_12_pw2
@@ -192,12 +159,12 @@ inline bool compute_P3P_Poses
192
159
+2 .*p_1*p_2_pw2*f_2_pw2*d_12
193
160
-p_2_pw2*d_12_pw2*b_pw2
194
161
-2 .*p_1_pw2*p_2_pw2,
195
-
162
+
196
163
2 .*p_1_pw2*p_2*d_12*b
197
164
+2 .*f_2*p_2_pw3*f_1*d_12
198
165
-2 .*f_2_pw2*p_2_pw3*d_12*b
199
166
-2 .*p_1*p_2*d_12_pw2*b,
200
-
167
+
201
168
-2 .*f_2*p_2_pw2*f_1*p_1*d_12*b
202
169
+f_2_pw2*p_2_pw2*d_12_pw2
203
170
+2 .*p_1_pw3*d_12
0 commit comments