OpenGV
A library for solving calibrated central and non-central geometric vision problems
methods.hpp
Go to the documentation of this file.
1 /******************************************************************************
2  * Author: Laurent Kneip *
3  * Contact: kneip.laurent@gmail.com *
4  * License: Copyright (c) 2013 Laurent Kneip, ANU. All rights reserved. *
5  * *
6  * Redistribution and use in source and binary forms, with or without *
7  * modification, are permitted provided that the following conditions *
8  * are met: *
9  * * Redistributions of source code must retain the above copyright *
10  * notice, this list of conditions and the following disclaimer. *
11  * * Redistributions in binary form must reproduce the above copyright *
12  * notice, this list of conditions and the following disclaimer in the *
13  * documentation and/or other materials provided with the distribution. *
14  * * Neither the name of ANU nor the names of its contributors may be *
15  * used to endorse or promote products derived from this software without *
16  * specific prior written permission. *
17  * *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"*
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
21  * ARE DISCLAIMED. IN NO EVENT SHALL ANU OR THE CONTRIBUTORS BE LIABLE *
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL *
23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR *
24  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
25  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY *
27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF *
28  * SUCH DAMAGE. *
29  ******************************************************************************/
30 
37 #ifndef OPENGV_RELATIVE_POSE_METHODS_HPP_
38 #define OPENGV_RELATIVE_POSE_METHODS_HPP_
39 
40 #include <stdlib.h>
41 #include <vector>
42 #include <opengv/types.hpp>
44 
48 namespace opengv
49 {
53 namespace relative_pose
54 {
55 
70  const RelativeAdapterBase & adapter,
71  bool unrotate,
72  const std::vector<int> & indices );
73 
92  const RelativeAdapterBase & adapter,
93  bool unrotate,
94  size_t index0 = 0,
95  size_t index1 = 1 );
96 
107  const RelativeAdapterBase & adapter,
108  const std::vector<int> & indices );
109 
122  const RelativeAdapterBase & adapter,
123  size_t index0 = 0,
124  size_t index1 = 1 );
125 
134 rotation_t rotationOnly( const RelativeAdapterBase & adapter );
135 
146  const RelativeAdapterBase & adapter,
147  const std::vector<int> & indices );
148 
160 complexEssentials_t fivept_stewenius( const RelativeAdapterBase & adapter );
161 
176  const RelativeAdapterBase & adapter,
177  const std::vector<int> & indices );
178 
190 essentials_t fivept_nister( const RelativeAdapterBase & adapter );
191 
206  const RelativeAdapterBase & adapter,
207  const std::vector<int> & indices );
208 
220  const RelativeAdapterBase & adapter,
221  const std::vector<int> & indices );
222 
234 essentials_t sevenpt( const RelativeAdapterBase & adapter );
235 
250  const RelativeAdapterBase & adapter,
251  const std::vector<int> & indices );
252 
264 essential_t eightpt( const RelativeAdapterBase & adapter );
265 
280  const RelativeAdapterBase & adapter,
281  const std::vector<int> & indices );
282 
295  const RelativeAdapterBase & adapter,
296  eigensolverOutput_t & output,
297  bool useWeights = false );
298 
313  const RelativeAdapterBase & adapter,
314  const std::vector<int> & indices,
315  eigensolverOutput_t & output,
316  bool useWeights = false );
317 
329  const RelativeAdapterBase & adapter,
330  bool useWeights = false );
331 
344  const RelativeAdapterBase & adapter,
345  const std::vector<int> & indices,
346  bool useWeights = false );
347 
357  const RelativeAdapterBase & adapter );
358 
370  const RelativeAdapterBase & adapter,
371  const std::vector<int> & indices );
372 
385 rotation_t ge(
386  const RelativeAdapterBase & adapter,
387  geOutput_t & output,
388  bool useWeights = false );
389 
404 rotation_t ge(
405  const RelativeAdapterBase & adapter,
406  const std::vector<int> & indices,
407  geOutput_t & output,
408  bool useWeights = false );
409 
421 rotation_t ge( const RelativeAdapterBase & adapter, bool useWeights = false );
422 
435 rotation_t ge(
436  const RelativeAdapterBase & adapter,
437  const std::vector<int> & indices,
438  bool useWeights = false );
439 
452 transformation_t seventeenpt( const RelativeAdapterBase & adapter );
453 
469  const RelativeAdapterBase & adapter,
470  const std::vector<int> & indices );
471 
485 transformation_t optimize_nonlinear( RelativeAdapterBase & adapter );
486 
501  RelativeAdapterBase & adapter,
502  const std::vector<int> & indices );
503 
504 }
505 }
506 
507 #endif /* OPENGV_RELATIVE_POSE_METHODS_HPP_ */
complexEssentials_t fivept_stewenius(const RelativeAdapterBase &adapter)
Compute the complex essential matrices between two central viewpoints using Stewenius&#39; method [5]...
Eigen::Matrix< double, 3, 4 > transformation_t
Definition: types.hpp:82
The namespace of this library.
Definition: AbsoluteAdapterBase.hpp:47
rotations_t sixpt(const RelativeAdapterBase &adapter)
Compute the relative rotation between two non-central viewpoints following Stewenius&#39; method [16]...
Adapter-class for passing bearing-vector correspondences to the relative-pose algorithms.
struct opengv::EigensolverOutput eigensolverOutput_t
essential_t eightpt(const RelativeAdapterBase &adapter)
Compute the essential matrix between two central viewpoints using the eight-point algorithm [9...
Eigen::Matrix3d essential_t
Definition: types.hpp:105
Eigen::Vector3d translation_t
Definition: types.hpp:63
A collection of variables used in geometric vision for the computation of calibrated absolute and rel...
rotation_t eigensolver(const RelativeAdapterBase &adapter, eigensolverOutput_t &output, bool useWeights=false)
Compute the rotation matrix between two central viewpoints as an iterative eigenproblem [11]...
essentials_t sevenpt(const RelativeAdapterBase &adapter)
Compute the essential matrices between two central viewpoints using the seven-point algorithm [8]...
Eigen::Matrix3d rotation_t
Definition: types.hpp:71
std::vector< essential_t, Eigen::aligned_allocator< essential_t > > essentials_t
Definition: types.hpp:109
std::vector< rotation_t, Eigen::aligned_allocator< rotation_t > > rotations_t
Definition: types.hpp:75
std::vector< complexEssential_t, Eigen::aligned_allocator< complexEssential_t > > complexEssentials_t
Definition: types.hpp:119
essentials_t fivept_nister(const RelativeAdapterBase &adapter)
Compute the essential matrices between two central viewpoints using Nister&#39;s method [6]...
struct opengv::GeOutput geOutput_t
rotations_t fivept_kneip(const RelativeAdapterBase &adapter, const std::vector< int > &indices)
Compute the rotation matrices between two central viewpoints using Kneips&#39;s method [7]...
rotation_t rotationOnly(const RelativeAdapterBase &adapter)
Compute the rotation between two central viewpoints with pure rotation change using Arun&#39;s method [13...
translation_t twopt(const RelativeAdapterBase &adapter, bool unrotate, const std::vector< int > &indices)
Compute the translation between two central viewpoints with known relative rotation, and using two correspondences.
transformation_t seventeenpt(const RelativeAdapterBase &adapter)
Compute the relative pose between two non-central viewpoints following Li&#39;s method [12]...
rotation_t twopt_rotationOnly(const RelativeAdapterBase &adapter, const std::vector< int > &indices)
Compute the rotation between two central viewpoints with pure rotation change, using only two corresp...
transformation_t optimize_nonlinear(RelativeAdapterBase &adapter)
Compute the pose between two viewpoints using nonlinear optimization. Using all available corresponde...
rotation_t ge(const RelativeAdapterBase &adapter, geOutput_t &output, bool useWeights=false)
Compute the rotation matrix between two non-central viewpoints as an iterative eigenproblem. Using all available correspondences.