GithubHelp home page GithubHelp logo

laurentkneip / opengv Goto Github PK

View Code? Open in Web Editor NEW
1.0K 70.0 353.0 7.61 MB

OpenGV is a collection of computer vision methods for solving geometric vision problems. It is hosted and maintained by the Mobile Perception Lab of ShanghaiTech.

License: Other

C++ 97.12% MATLAB 1.98% CMake 0.66% Python 0.22% Shell 0.03%

opengv's Introduction

library: OpenGV
pages:   http://laurentkneip.github.io/opengv
brief:   OpenGV is a collection of computer vision methods for solving
         geometric vision problems. It contains absolute-pose, relative-pose,
         triangulation, and point-cloud alignment methods for the calibrated
         case. All problems can be solved with central or non-central cameras,
         and embedded into a random sample consensus or nonlinear optimization
         context. Matlab and Python interfaces are implemented as well. The link
         to the above pages also shows links to precompiled Matlab mex-libraries.
         Please consult the documentation for more information.
author:  Laurent Kneip, ShanghaiTech, Mobile Perception Lab (http://mpl.sist.shanghaitech.edu.cn)
contact: [email protected]

opengv's People

Contributors

dvad avatar embeddedandroid avatar fabiencastan avatar helenol avatar jbriales avatar laurentkneip avatar marcorabozzi avatar nikolausdemmel avatar paulinus avatar pmoulon avatar simogasp avatar victorlamoine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opengv's Issues

Quaternion of unit matrix gives wrong result

The opengv::math::rot2quaternion function returns a quaternion with NaN values for an identity matrix, while this should be (1, 0, 0, 0). The function opengv::math::quaternion2rot returns an identity matrix for the quaternion (1, 0, 0, 0). Is this intended behavior or can this be considered as a bug?

Matlab MEX Error: "mxCreateNumericArray" Static Type Issues

Within MATLAB R2017b it is not possible to build the MEX files as explained. A quick successful workaround is at the end of this comment!

Used Hardware and Software:
-> Mac Book Pro (Retina, 15inch, Mid 2014)
-> macOS High Sierra, Version 10.13.1
-> Xcode Version 9.1 (9B55)
-> MATLAB R2017b, Version 9.3.0.713579

I built the binaries with "cmake" as described in the reference.

Then the MATLAB MEX commands were as follows:

  1. mex -setup C++
  2. cd /Applications/opengv/matlab
  3. mex -I../include -I../third_party -I../third_party/eigen3 -L../build/lib -lopengv opengv.cpp

Output of MATLAB was:

Building with 'Xcode Clang++'.
Error using mex
/Applications/opengv/matlab/opengv.cpp:693:17: error: no matching function for call to 'mxCreateNumericArray_730'
plhs[0] = mxCreateNumericArray(2, dims, mxDOUBLE_CLASS, mxREAL);
^~~~~~~~~~~~~~~~~~~~
/Applications/MATLAB_R2017b.app/extern/include/matrix.h:1131:30: note: expanded from macro 'mxCreateNumericArray'
#define mxCreateNumericArray mxCreateNumericArray_730
^~~~~~~~~~~~~~~~~~~~~~~~
/Applications/MATLAB_R2017b.app/extern/include/matrix.h:802:1: note: candidate function not viable: no known conversion from
'int [2]' to 'const size_t *' (aka 'const unsigned long *') for 2nd argument
mxCreateNumericArray_730(size_t ndim, const size_t *dims, mxClassID classid, mxComplexity flag);

There were a lot of similar error messages like this one.
Reason for this is the function "mxCreateNumericArray" that is called several times in "opengv.cpp" (that is located in opengv/matlab).

I assume an upward compatibility issue with more recent MATLAB versions like mine (R2017b). You can find the relevant MATLAB file in "MATLAB_R2017b.app/extern/include", it is named "matrix.h".

In this file the there are two relevant functions:
mxCreateNumericArray_730(size_t ndim, const size_t *dims, mxClassID classid, mxComplexity flag)
and
mxCreateNumericArray_700(int ndim, const int *dims, mxClassID classid, mxComplexity flag).

Suitable pre-processor macros are also implemented in "matrix.h" to call "mxCreateNumericArray_730 " every time "mxCreateNumericArray" is called (without "_7xx" in the name).
As easily seen these two functions have different input argument types. "int" & "const int" in the one case (which are signed types) and "size_t" & "const size_t" in the other case (which are unsigned types).

MATLAB is therefore unable to do a proper type conversion on its own. As a quick workaround in order to prevent you from changing many lines of code I recommend adding following line in the top of the file "opengv.cpp" (that is located in opengv/matlab):
#define mxCreateNumericArray mxCreateNumericArray_700.

That will force MATLAB to use the (older) function "mxCreateNumericArray_700" with proper input argument types.
After doing that everything seems to work fine.

Error in relative pose estimation

`//relative pose
opengv::relative_pose::CentralRelativeAdapter adapter(
bvReference, bvCurrent );

// create a RANSAC object
opengv::sac::Ransac<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem> ransac;
std::cout<<"2.1\n";
// create a CentralRelativePoseSacProblem
// (set algorithm to STEWENIUS, NISTER, SEVENPT, or EIGHTPT)
std::shared_ptr<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>
        relposeproblem_ptr(
        new opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem(
                adapter,
                opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem::EIGHTPT ) );

ransac.sac_model_ = relposeproblem_ptr;
ransac.threshold_ = ego_ransac_threashold_inlers;
ransac.max_iterations_ = iteration_num;
ransac.computeModel();
std::cout<<"2.2\n";
inliers = ransac.inliers_;
//std::cout <<ransac.model_coefficients_<<std::endl;
Crc = ransac.model_coefficients_.block(0,0,2,2);
Rcr = ransac.model_coefficients_.block(0,3,2,3);
std::cout<<inliers.size()<<std::endl;
if(bNonlieanerOpitimize)
{
    opengv::bearingVectors_t bvReferenceNonlinear;
    opengv::bearingVectors_t bvCurrentNonlinear;
    for (int i = 0; i < inliers.size(); ++i) {
        bvReferenceNonlinear.push_back(bvReference[inliers[i]]);
        bvCurrentNonlinear.push_back(bvCurrent[inliers[i]]);
    }
    opengv::relative_pose::CentralRelativeAdapter adapterNolinear(
            bvReferenceNonlinear, bvCurrentNonlinear,Rcr,Crc);
    std::cout<<"2.3\n";
    opengv::transformation_t nonlinear_transformation =
            opengv::relative_pose::optimize_nonlinear(adapterNolinear);
    std::cout<<"2.4\n";
    Crc = nonlinear_transformation.block(0,0,2,2);
    Rcr = nonlinear_transformation.block(0,3,2,3);
}`

I use the above code to estimate relative pose of two image, sometimes error occurs in
opengv::transformation_t nonlinear_transformation =
opengv::relative_pose::optimize_nonlinear(adapterNolinear);

/usr/include/eigen3/Eigen/src/Core/DenseStorage.h:128:Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 32>::plain_array() [with T = double; int Size = 12; int MatrixOrArrayOptions = 0]: 假设 ‘(reinterpret_cast<size_t>(eigen_unaligned_array_assert_workaround_gcc47(array)) & (31)) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****"’ 失败。

Python 3 support

I've been trying to get OpenGV working with Python 3.6 and Boost 1.64.0. Compilation succeeds, but running the tests.py script fails. I have a homebrewed version of boost-python 1.64 installed as $brew install boost-python --c++11 --with-python3 on OS X.

I was successful compiling and testing with Python 2.7, though.

Anyone successful with Boost bindings for Python 3?

Having problems running AbsolutePoseSacProblem::TWOPT

Hi guys,
Im having an issue running AbsolutePoseSacProblem::TWOPT.

Something is non deterministic. My application calls it with the same parameters and sometimes this results in the ground truth solution, and sometimes it converges immediately with
[sm::RandomSampleConsensus::computeModel] Model: 0 size, -2147483647 inliers.

Swapping out the algorithm from KNEIP to TWOPT in the absolute pose ransac test file, results in a crash as this assertion fails.

How to include opengv in my own cmake project?

I would like to use opengv in my own opencv project, but I cannot figure out how to do that.

What method can you recommend to include OpenGV into a cmake project?


What I tried so far

I compiled and installed opengv like this:

mkdir build
cd build
cmake -DINSTALL_OPENGV=ON ..
make 
sudo make install

In my project's CMakeLists.txt I tried to find Opengv, like this

find_package( OpenGV REQUIRED)

but I got the following error (shortened):

[...]
  Could not find a package configuration file provided by "OpenGV" with any
  of the following names:
    OpenGVConfig.cmake
    opengv-config.cmake
[...]
-- Configuring incomplete, errors occurred!

Maybe I make a mistake by using find_package. I tried to read a bit on OpenCV but I could not get my head around it. It looks like if I wanted to use find_package then OpenGV should have a file called OpengvConfig.cmake.in that defines the include directories (see here ).

Library will not compile with eigen_3.34

Hi, I am trying to build on windows, visual studio 2017, using eigen 3.34.

I get errors here:

https://github.com/laurentkneip/opengv/blob/master/src/absolute_pose/modules/main.cpp#L773

like:

Severity	Code	Description	Project	File	Line	Suppression State
Error	C2784	'std::complex<_Other> std::operator *(const _Ty &,const std::complex<_Other> &)': could not deduce template argument for 'const std::complex<_Other> &' from 'const Eigen::Matrix<double,1,10,1,1,10>'	opengv	d:\opengv-master\opengv-master\src\absolute_pose\modules\main.cpp	773	

among others. Is this an eigen issue?

Problem with Eigen3

http://eigen.tuxfamily.org/index.php?title=Main_Page
I had rename the files of eigen3 to eigen in /usr/local/lib/cmake to compile the opengv.

/usr/local/lib/cmake/eigen3/Eigen3Config.cmake to /usr/local/lib/cmake/eigen3/EigenConfig.cmake
/usr/local/lib/cmake/eigen3/UseEigen3.cmake to
/usr/local/lib/cmake/eigen3/UseEigen.cmake

but have some problems to make the opengv.
/usr/local/include/eigen3/unsupported/Eigen/NonLinearOptimization:15:22: fatal error: Eigen/Core: No such file or directory
#include <Eigen/Core>

Dont have support to Eigen3 ?

Issue when I run "make install"

I am using Ubuntu 14.04

[ 35%] Building CXX object CMakeFiles/opengv.dir/src/absolute_pose/modules/upnp2.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions.
make[2]: *** [CMakeFiles/opengv.dir/src/absolute_pose/modules/upnp2.o] Error 4
make[1]: *** [CMakeFiles/opengv.dir/all] Error 2
make: *** [all] Error 2

Sturm.hpp

When I compile under cygwin g++, the compiler complaints about member "Eigen::MatrixXd _C".

It seems to conflict with macro _C.

I modified it to "Eigen::MatrixXd _CC", and added in Sturm.cpp the below
`
#ifdef _C
#undef _C
#define _C _CC
#endif //_C

opengv::math::Sturm::Sturm( const Eigen::MatrixXd & p ) :
_C(Eigen::MatrixXd(p.cols(),p.cols()))
{
...
}
`

and it compiled OK.

Epnp wrong assert()?

Hey,
first I would like to thank you for sharing your great toolbox!

In think the assertion in the epnp method is incorrect
//starting from 4 points, we have a unique solution
assert(indices.size() > 5);

It should probably be:
//starting from 4 points, we have a unique solution
assert(indices.size() >= 4);

Cheers
Steffen

ModuleNotFoundError: No module named 'pyopengv'

Dear,
I have installed successful on ubuntu , python 3.6. And pyopengv.cpython-36m-x86_64-linux-gnu.so can be found at /usr/local/lib/python3/dist-packages/pyopengv.cpython-36m-x86_64-linux-gnu.so.However, pyopengv can't be imported and the tests.py in subfolder of opengv can't run.
Thanks
Yu.He

built python warppers on windows

I have built the python wrappers on Windows with VS2013, and the installed folder structure likes below

C:\Program Files\opengv\lib\python2.7\site-packages\pyopengv.lib
C:\Program Files\opengv\lib\python2.7\site-packages\pyopengv.so
C:\Program Files\opengv\lib\opengv.lib

Besides, the VS outputs like this

2> -- Installing: C:/Program Files/opengv/lib/python2.7/site-packages/pyopengv.so
========== Build: 2 succeeded, 0 failed, 22 up-to-date, 0 skipped ==========

It hints it is already. Then, I tried to import the import pyopengv from the python, but it showed me

import pyopengv
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named pyopengv

On my Ubuntu, it works well, but I do not know why it is wrong on Windows.

pyopengv not found

Hello,

I tried to install OpenGV from scratch. the whole process finished completely. However, there is no pyopengv in both python 2.7 and 3.6. could you please let me know what is the problem?

Thanks.
R

No module named 'pyopengv'

yutoumanman2@ubuntu:$ cd OpenSfM/
yutoumanman2@ubuntu:
/OpenSfM$ bin/opensfm_run_all data/berlin
Running using Python command: python
Traceback (most recent call last):
File "/home/yutoumanman2/OpenSfM/bin/opensfm", line 10, in
from opensfm import commands
File "/home/yutoumanman2/OpenSfM/opensfm/commands/init.py", line 4, in
from . import match_features
File "/home/yutoumanman2/OpenSfM/opensfm/commands/match_features.py", line 9, in
from opensfm import matching
File "/home/yutoumanman2/OpenSfM/opensfm/matching.py", line 3, in
import pyopengv
ImportError: No module named 'pyopengv'

OpenGV building stuck at one point during "make"

I am trying to build the OpenGV on Ubuntu 16.04.1. I have set up the BUILD_PYTHON and INSTALL_OPENGV to "ON" on the CMakeLists.txt. During make, it keep stucks on

[62%] Building CXX object CMakeFiles/opengv.dir/src/point_cloud/MAPointCloud.o

How can I solve this?

Segmentation faults during multiple tests

After succeffully compiling the master branch (latest commit is 306a54e) I receive the following output while running the test suite

Using Eigen version

#define EIGEN_WORLD_VERSION 3
#define EIGEN_MAJOR_VERSION 3
#define EIGEN_MINOR_VERSION 90
[0/1] Running tests...
Test project /home/bidski/Projects/OpenSfM/opengv/build
      Start  1: test_absolute_pose
 1/18 Test  #1: test_absolute_pose ........................***Exception: SegFault  0.02 sec
      Start  2: test_absolute_pose_sac
 2/18 Test  #2: test_absolute_pose_sac ....................   Passed    0.01 sec
      Start  3: test_noncentral_absolute_pose
 3/18 Test  #3: test_noncentral_absolute_pose .............***Exception: SegFault  0.03 sec
      Start  4: test_noncentral_absolute_pose_sac
 4/18 Test  #4: test_noncentral_absolute_pose_sac .........   Passed    0.01 sec
      Start  5: test_multi_noncentral_absolute_pose_sac
 5/18 Test  #5: test_multi_noncentral_absolute_pose_sac ...   Passed    0.00 sec
      Start  6: test_relative_pose
 6/18 Test  #6: test_relative_pose ........................***Exception: SegFault  0.00 sec
      Start  7: test_relative_pose_rotationOnly
 7/18 Test  #7: test_relative_pose_rotationOnly ...........   Passed    0.00 sec
      Start  8: test_relative_pose_rotationOnly_sac
 8/18 Test  #8: test_relative_pose_rotationOnly_sac .......   Passed    0.00 sec
      Start  9: test_relative_pose_sac
 9/18 Test  #9: test_relative_pose_sac ....................***Exception: SegFault  0.01 sec
      Start 10: test_noncentral_relative_pose
10/18 Test #10: test_noncentral_relative_pose .............***Exception: SegFault  0.01 sec
      Start 11: test_noncentral_relative_pose_sac
11/18 Test #11: test_noncentral_relative_pose_sac .........***Exception: SegFault  0.01 sec
      Start 12: test_multi_noncentral_relative_pose_sac
12/18 Test #12: test_multi_noncentral_relative_pose_sac ...***Exception: SegFault  0.01 sec
      Start 13: test_eigensolver_sac
13/18 Test #13: test_eigensolver_sac ......................   Passed    0.02 sec
      Start 14: test_triangulation
14/18 Test #14: test_triangulation ........................   Passed    0.01 sec
      Start 15: test_eigensolver
15/18 Test #15: test_eigensolver ..........................   Passed    0.00 sec
      Start 16: test_point_cloud
16/18 Test #16: test_point_cloud ..........................   Passed    0.01 sec
      Start 17: test_point_cloud_sac
17/18 Test #17: test_point_cloud_sac ......................   Passed    0.00 sec
      Start 18: test_Sturm
18/18 Test #18: test_Sturm ................................   Passed    0.00 sec

61% tests passed, 7 tests failed out of 18

Total Test time (real) =   0.15 sec

The following tests FAILED:
	  1 - test_absolute_pose (SEGFAULT)
	  3 - test_noncentral_absolute_pose (SEGFAULT)
	  6 - test_relative_pose (SEGFAULT)
	  9 - test_relative_pose_sac (SEGFAULT)
	 10 - test_noncentral_relative_pose (SEGFAULT)
	 11 - test_noncentral_relative_pose_sac (SEGFAULT)
	 12 - test_multi_noncentral_relative_pose_sac (SEGFAULT)
Errors while running CTest

Compilation was done in debug mode, so I ran gdb on each of the failing tests to get stack traces

Starting program: /home/bidski/Projects/OpenSfM/opengv/build/bin/test_absolute_pose 
the random position is:
 0.765127
 0.441453
-0.997555

the random rotation is:
  0.926533   0.181778   0.329385
-0.0356344    0.91399  -0.404169
 -0.374523   0.362738   0.853319

the noise in the data is:
0
the outlier fraction is:
0
running Kneip's P2P (first two correspondences)
running Kneip's P3P (first three correspondences)
running Gao's P3P (first three correspondences)
running epnp (all correspondences)
running epnp with 6 correspondences
running upnp with all correspondences

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b902b0 in Eigen::internal::gebp_kernel<double, double, long, Eigen::internal::blas_data_mapper<double, long, 0, 0>, 24, 4, false, false>::operator()(Eigen::internal::blas_data_mapper<double, long, 0, 0> const&, double const*, double const*, long, long, long, double, long, long, long, long) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
(gdb) bt full
#0  0x00007ffff7b902b0 in Eigen::internal::gebp_kernel<double, double, long, Eigen::internal::blas_data_mapper<double, long, 0, 0>, 24, 4, false, false>::operator()(Eigen::internal::blas_data_mapper<double, long, 0, 0> const&, double const*, double const*, long, long, long, double, long, long, long, long) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#1  0x00007ffff7b90d76 in Eigen::internal::general_matrix_matrix_product<long, double, 1, false, double, 0, false, 0>::run(long, long, long, double const*, long, double const*, long, double*, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#2  0x00007ffff7d5e9f1 in opengv::absolute_pose::upnp(opengv::absolute_pose::AbsoluteAdapterBase const&, opengv::Indices const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#3  0x00007ffff7d5f96c in opengv::absolute_pose::upnp(opengv::absolute_pose::AbsoluteAdapterBase const&) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#4  0x0000000000402da7 in main ()
No symbol table info available.
Starting program: /home/bidski/Projects/OpenSfM/opengv/build/bin/test_noncentral_absolute_pose 
the random position is:
-0.286986
 0.917511
  0.19713

the random rotation is:
 0.838301 -0.495837 -0.226709
 0.398252  0.840882 -0.366487
 0.372354  0.216939   0.90238

the noise in the data is:
0
the outlier fraction is:
0
running Kneip's GP3P (using first three correspondences/
running gpnp over all correspondences
running gpnp over 6 correspondences
running upnp over all correspondences

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b902b0 in Eigen::internal::gebp_kernel<double, double, long, Eigen::internal::blas_data_mapper<double, long, 0, 0>, 24, 4, false, false>::operator()(Eigen::internal::blas_data_mapper<double, long, 0, 0> const&, double const*, double const*, long, long, long, double, long, long, long, long) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
(gdb) bt full
#0  0x00007ffff7b902b0 in Eigen::internal::gebp_kernel<double, double, long, Eigen::internal::blas_data_mapper<double, long, 0, 0>, 24, 4, false, false>::operator()(Eigen::internal::blas_data_mapper<double, long, 0, 0> const&, double const*, double const*, long, long, long, double, long, long, long, long) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#1  0x00007ffff7b90d76 in Eigen::internal::general_matrix_matrix_product<long, double, 1, false, double, 0, false, 0>::run(long, long, long, double const*, long, double const*, long, double*, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#2  0x00007ffff7d5e9f1 in opengv::absolute_pose::upnp(opengv::absolute_pose::AbsoluteAdapterBase const&, opengv::Indices const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#3  0x00007ffff7d5f96c in opengv::absolute_pose::upnp(opengv::absolute_pose::AbsoluteAdapterBase const&) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#4  0x000000000040284b in main ()
No symbol table info available.
Starting program: /home/bidski/Projects/OpenSfM/opengv/build/bin/test_relative_pose 
the random position is:
 -0.700883
-0.0493446
 -0.711567

the random rotation is:
  0.804454   0.406782   0.432877
 -0.387699   0.911666  -0.136213
 -0.450049 -0.0582493   0.891102

the noise in the data is:
0
the outlier fraction is:
0
the random essential matrix is:
 -0.179369   0.460741 -0.0996284
 -0.627808  -0.233542   0.223825
  0.220212  -0.437628  0.0826109
running twopt
running fivept_stewenius
running fivept_nister

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
(gdb) bt full
#0  0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#1  0x00007ffff7c0d2c7 in Eigen::internal::general_matrix_matrix_product<long, double, 0, false, double, 0, false, 0>::run(long, long, long, double const*, long, double const*, long, double*, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#2  0x00007ffff7c1f377 in opengv::relative_pose::modules::fivept_nister_main(Eigen::Matrix<double, 9, 4, 0, 9, 4> const&, std::vector<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3, 0, 3, 3> > >&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#3  0x00007ffff7d7a6b8 in opengv::relative_pose::fivept_nister(opengv::relative_pose::RelativeAdapterBase const&, opengv::Indices const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#4  0x00007ffff7d7a7bc in opengv::relative_pose::fivept_nister(opengv::relative_pose::RelativeAdapterBase const&) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#5  0x0000000000402fbb in main ()
No symbol table info available.
Starting program: /home/bidski/Projects/OpenSfM/opengv/build/bin/test_relative_pose_sac 
the random position is:
0.673989
-0.44809
0.587328

the random rotation is:
 0.882153 -0.199475  0.426633
 0.331754  0.906171 -0.262286
-0.334282  0.372914  0.865558

the noise in the data is:
0.5
the outlier fraction is:
0.1
the random essential matrix is:
-0.0318622  -0.494493  -0.165322
  0.525675  -0.260567  -0.235327
  0.437616   0.368661  0.0101769

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
(gdb) bt full
#0  0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#1  0x00007ffff7c0d2c7 in Eigen::internal::general_matrix_matrix_product<long, double, 0, false, double, 0, false, 0>::run(long, long, long, double const*, long, double const*, long, double*, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#2  0x00007ffff7c1c2af in opengv::relative_pose::modules::fivept_stewenius_main(Eigen::Matrix<double, 9, 4, 0, 9, 4> const&, std::vector<Eigen::Matrix<std::complex<double>, 3, 3, 0, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<std::complex<double>, 3, 3, 0, 3, 3> > >&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#3  0x00007ffff7d7a1b8 in opengv::relative_pose::fivept_stewenius(opengv::relative_pose::RelativeAdapterBase const&, opengv::Indices const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#4  0x00007ffff7d7a31c in opengv::relative_pose::fivept_stewenius(opengv::relative_pose::RelativeAdapterBase const&, std::vector<int, std::allocator<int> > const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#5  0x00007ffff7da302d in opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem::computeModelCoefficients(std::vector<int, std::allocator<int> > const&, Eigen::Matrix<double, 3, 4, 0, 3, 4>&) const ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#6  0x000000000040827a in opengv::sac::Ransac<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>::computeModel(int) ()
No symbol table info available.
#7  0x0000000000405f20 in main ()
No symbol table info available.
Starting program: /home/bidski/Projects/OpenSfM/opengv/build/bin/test_noncentral_relative_pose 
the random position is:
0.596556
 1.54307
 1.63705

the random rotation is:
   0.84986   0.520416 -0.0830965
 -0.446243   0.794498   0.411873
  0.280365  -0.312953   0.907444

the noise in the data is:
0
the outlier fraction is:
0
running sixpt with 6 correspondences

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
(gdb) bt full
#0  0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#1  0x00007ffff7c0d2c7 in Eigen::internal::general_matrix_matrix_product<long, double, 0, false, double, 0, false, 0>::run(long, long, long, double const*, long, double const*, long, double*, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#2  0x00007ffff7d1c202 in opengv::relative_pose::modules::sixpt::setupAction(std::vector<Eigen::Matrix<double, 6, 1, 0, 6, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 6, 1, 0, 6, 1> > > const&, std::vector<Eigen::Matrix<double, 6, 1, 0, 6, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 6, 1, 0, 6, 1> > > const&, Eigen::Matrix<double, 64, 64, 0, 64, 64>&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#3  0x00007ffff7c1b0db in opengv::relative_pose::modules::sixpt_main(Eigen::Matrix<double, 6, 6, 0, 6, 6>&, Eigen::Matrix<double, 6, 6, 0, 6, 6>&, std::vector<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3, 0, 3, 3> > >&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#4  0x00007ffff7d73392 in opengv::relative_pose::sixpt(opengv::relative_pose::RelativeAdapterBase const&, opengv::Indices const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#5  0x00007ffff7d734ac in opengv::relative_pose::sixpt(opengv::relative_pose::RelativeAdapterBase const&, std::vector<int, std::allocator<int> > const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#6  0x0000000000402992 in main ()
No symbol table info available.
Starting program: /home/bidski/Projects/OpenSfM/opengv/build/bin/test_noncentral_relative_pose_sac 
the random position is:
-0.837026
-0.275995
  1.36523

the random rotation is:
  0.894444   0.111445   0.433071
-0.0788117   0.992575 -0.0926513
 -0.440181  0.0487404   0.896585

the noise in the data is:
0.3
the outlier fraction is:
0.3

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
(gdb) bt full
#0  0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#1  0x00007ffff7c0d2c7 in Eigen::internal::general_matrix_matrix_product<long, double, 0, false, double, 0, false, 0>::run(long, long, long, double const*, long, double const*, long, double*, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#2  0x00007ffff7d1c202 in opengv::relative_pose::modules::sixpt::setupAction(std::vector<Eigen::Matrix<double, 6, 1, 0, 6, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 6, 1, 0, 6, 1> > > const&, std::vector<Eigen::Matrix<double, 6, 1, 0, 6, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 6, 1, 0, 6, 1> > > const&, Eigen::Matrix<double, 64, 64, 0, 64, 64>&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#3  0x00007ffff7c1b0db in opengv::relative_pose::modules::sixpt_main(Eigen::Matrix<double, 6, 6, 0, 6, 6>&, Eigen::Matrix<double, 6, 6, 0, 6, 6>&, std::vector<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3, 0, 3, 3> > >&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#4  0x00007ffff7d73392 in opengv::relative_pose::sixpt(opengv::relative_pose::RelativeAdapterBase const&, opengv::Indices const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#5  0x00007ffff7d734ac in opengv::relative_pose::sixpt(opengv::relative_pose::RelativeAdapterBase const&, std::vector<int, std::allocator<int> > const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#6  0x00007ffff7da62de in opengv::sac_problems::relative_pose::NoncentralRelativePoseSacProblem::computeModelCoefficients(std::vector<int, std::allocator<int> > const&, Eigen::Matrix<double, 3, 4, 0, 3, 4>&) const ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#7  0x0000000000407daa in opengv::sac::Ransac<opengv::sac_problems::relative_pose::NoncentralRelativePoseSacProblem>::computeModel(int) ()
No symbol table info available.
#8  0x0000000000405c33 in main ()
No symbol table info available.
Starting program: /home/bidski/Projects/OpenSfM/opengv/build/bin/test_multi_noncentral_relative_pose_sac 
the random position is:
  -0.228159
    1.33164
-0.00914746

the random rotation is:
 0.913368  0.373796 -0.161356
-0.399962  0.897868 -0.184018
0.0760911  0.232612  0.969588

the noise in the data is:
0.3
the outlier fraction is:
0.1

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
(gdb) bt full
#0  0x00007ffff7bfc65d in Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 24, 8, 0, false, false>::operator()(double*, Eigen::internal::const_blas_data_mapper<double, long, 0> const&, long, long, long, long) [clone .constprop.560] ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#1  0x00007ffff7c0d2c7 in Eigen::internal::general_matrix_matrix_product<long, double, 0, false, double, 0, false, 0>::run(long, long, long, double const*, long, double const*, long, double*, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#2  0x00007ffff7d1c202 in opengv::relative_pose::modules::sixpt::setupAction(std::vector<Eigen::Matrix<double, 6, 1, 0, 6, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 6, 1, 0, 6, 1> > > const&, std::vector<Eigen::Matrix<double, 6, 1, 0, 6, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 6, 1, 0, 6, 1> > > const&, Eigen::Matrix<double, 64, 64, 0, 64, 64>&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#3  0x00007ffff7c1b0db in opengv::relative_pose::modules::sixpt_main(Eigen::Matrix<double, 6, 6, 0, 6, 6>&, Eigen::Matrix<double, 6, 6, 0, 6, 6>&, std::vector<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3, 0, 3, 3> > >&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#4  0x00007ffff7d73392 in opengv::relative_pose::sixpt(opengv::relative_pose::RelativeAdapterBase const&, opengv::Indices const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#5  0x00007ffff7d734ac in opengv::relative_pose::sixpt(opengv::relative_pose::RelativeAdapterBase const&, std::vector<int, std::allocator<int> > const&) () from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#6  0x00007ffff7db4591 in opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::computeModelCoefficients(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > const&, Eigen::Matrix<double, 3, 4, 0, 3, 4>&) const ()
   from /home/bidski/Projects/OpenSfM/opengv/build/lib/libopengv.so.1.0
No symbol table info available.
#7  0x0000000000407f58 in opengv::sac::MultiRansac<opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem>::computeModel(int) ()
No symbol table info available.
#8  0x0000000000405ddb in main ()
No symbol table info available.

CentralAbsoluteAdapter returns nan

Hi, and thank you for making this code available. i am trying to create a small test case to compare the openCv PnP with your CentralAbsoluteAdapter, and although openCv returns correct results, absolute_pose::epnp is returning nan.

Where am i going wrong in my implementation of your function?

int main(int argc, char **argv) {

//openCV
	cv::Mat matImg = cv::imread("chess.jpg");

		cv::Size boardSize(8, 6);
		//Construct the chessboard model
		double squareSize = 2.80;
		std::vector<cv::Point3f> objectPoints;
		for (int i = 0; i < boardSize.height; i++) {
			for (int j = 0; j < boardSize.width; j++) {
				objectPoints.push_back(
					cv::Point3f(double(j * squareSize), float(i * squareSize), 0));
			}
		}

		cv::Mat rvec, tvec;
		cv::Mat cameraMatrix, distCoeffs;
		cv::FileStorage fs("CalibrationData.xml", cv::FileStorage::READ);
		fs["cameraMatrix"] >> cameraMatrix;
		fs["dist_coeffs"] >> distCoeffs;

			//Found chessboard corners
			std::vector<cv::Point2f> imagePoints;
			bool found = cv::findChessboardCorners(matImg, boardSize, imagePoints, cv::CALIB_CB_FAST_CHECK);

			if (found) {
				cv::drawChessboardCorners(matImg, boardSize, cv::Mat(imagePoints), found);

				//SolvePnP
			
				cv::solvePnP(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec);

				drawAxis(matImg, cameraMatrix, distCoeffs, rvec, tvec, squareSize);
			}

			

			//cv to matrix
			cv::Mat R;
			cv::Rodrigues(rvec, R);

			std::cout << "results from cv:" << R << tvec << std::endl;
//openGV
			bearingVectors_t bearingVectors;
			points_t points;
			rotation_t rotation;

		
			//add points to the gv type
			for (int i = 0; i < objectPoints.size(); ++i)
			{
				point_t pnt;
				pnt.x() =objectPoints[i].x;
				pnt.y() = objectPoints[i].y;
				pnt.z() = objectPoints[i].z;

				points.push_back(pnt);
			}
		

			//image to homogeneous
			std::vector<cv::Point3f> imagePointsH;
			convertPointsToHomogeneous(imagePoints, imagePointsH);


			//multiply by K.Inv
			for (int i = 0; i < imagePointsH.size(); i++)
			{
				cv::Point3f pt = imagePointsH[i];
				cv::Mat ptMat(3, 1, cameraMatrix.type());
				ptMat.at<double>(0, 0) = pt.x;
				ptMat.at<double>(1, 0) = pt.y;
				ptMat.at<double>(2, 0) = pt.z;

				cv::Mat dstMat = cameraMatrix.inv() * ptMat;

				//store as bearing vector		
				bearingVector_t bvec;
				bvec.x() = dstMat.at<double>(0, 0);
				bvec.y() = dstMat.at<double>(1, 0);
				bvec.z() = dstMat.at<double>(2, 0);
                               
                                  //norm
				bvec.normalize();
				bearingVectors.push_back(bvec);

			}


			//create a central absolute adapter
			absolute_pose::CentralAbsoluteAdapter adapter(
				bearingVectors,
				points,
				rotation);

			size_t iterations = 50;

			std::cout << "running epnp (all correspondences)" << std::endl;
			transformation_t epnp_transformation;
			for (size_t i = 0; i < iterations; i++)
				epnp_transformation = absolute_pose::epnp(adapter);

			std::cout << "results from epnp algorithm:" << std::endl;
			std::cout << epnp_transformation << std::endl << std::endl;

			return 0;
}

thank you very much.

Problems building under windows VS2013

I spent a while getting Eigen3 built and getting the paths added to the CMakeList such that I could get a project file.

once I finally got a project file I run into compile errors such as:

C:\projects\opengv\src\absolute_pose\modules\main.cpp(773): error C2784: 'const Eigen::Product<Eigen::Inverse,SparseDerived,2> Eigen::operator *(const Eigen::InverseImpl<PermutationType,Eigen::PermutationStorage> &,const Eigen::SparseMatrixBase &)' : could not deduce template argument for 'const Eigen::InverseImpl<PermutationType,Eigen::PermutationStorage> &' from 'double' [c:\projects\opengv\build\opengv.vcxproj]

Any thoughts?
Thanks!

double free or corruption (out) while using fivept_kneip

opengv::relative_pose::CentralRelativeAdapter adapter(bearing_vectors1, bearing_vectors2);
vector< int > indices;
for(int i=10;i<100;i+=20)
indices.push_back(i);
opengv::rotations_t R;
R = opengv::relative_pose::fivept_kneip(adapter, indices);
cout<<R.size()<<"\n";

Running this gives the following error:
double free or corruption (out)
Aborted (core dumped

Any idea why this happens?

Compiling under VC14 (Visual Studio 2015)

I tried to build OpenGV under VC14

  1. Errors due to Eigen: I wrote a workaroud code for this error, so there are no more error related to Eigen so far (see 2)
  2. Compiling stops and Visual Studio doesn't respont (I can see 'Build failed' on left-down corner of Visual Studio, but cannot see error messages, so not sure what they are related, or even there is one or not). I force-close Visual Studio in this case.
  3. This is not related to VC14, but I want to mention it anyway. Building OpenGV (on VC11) takes really long time, about 2-3 hours on a fairly decent PC.

Boost dependency in relative_pose main.cpp

Building in Ubuntu 14.04 using cmake with shared libraries. Ran into the following error:

In file included from /home/jason/opengv/src/relative_pose/modules/main.cpp:47:0:
/home/jason/opengv/include/opengv/math/Sturm.hpp:43:32: fatal error: boost/shared_ptr.hpp: No such file or directory
 #include <boost/shared_ptr.hpp>

Installing boost solves the problem. You may want to include the dependency in the installation instructions. I didn't check to see if there were any dependencies in other files after getting this build error.

Infinite loop in opengv::math::Sturm::bracketRoots

I am running into an infinite loop in above function.

It seems the problem is that there is a Bracket on the stack that has numberRoots() == 2 but _upperBound == _lowerBound.
So, Bracket::dividable returns true.

Happy to try to create a minimal example of the problem if that would help.

In the meantime, does this modification seem an appropriate fix?

bool
opengv::math::Bracket::dividable( double eps ) const
{
if( numberRoots() == 1 && (_upperBound - _lowerBound ) < eps )
return false;
if( numberRoots() == 0 )
return false;
// BEGIN NEW CODE
if (_upperBound - _lowerBound < 1e-10)
return false;
// END NEW CODE
return true;
}

This causes the Bracket to become "undividable" eventually and the loop breaks.

Opengv installation problem under windows

Hi,

I tried to install opengv under windows in order to use it with Matlab but the installation failed.

I Firstly extracted opengv and cmake in C:\ (C:\cmake and C:\opengv).

Then did:
cd C:\cmake\bin
PATH=%PATH%;%cd%;
After that, I added a build file in opengv directory and did:
cd C:\opengv\build
Then:
cmake -G "Visual Studio 10" ..
as I'm using Visual Studio 2010, the following message appeared:
-- The C compiler identification is MSVC 16.0.40219.1
-- The CXX compiler identification is MSVC 16.0.40219.1
-- Check for working C compiler using: Visual Studio 10 2010
-- Check for working C compiler using: Visual Studio 10 2010 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10 2010
-- Check for working CXX compiler using: Visual Studio 10 2010 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/opengv/build

And finally:
msbuild opengv.sln /p:Configuration=Release
Several warnings appeared (2723) for instance the following ones:

c:\opengv\third_party\eigen\src\core\mapbase.h(145): warning C4710: '__thisca
ll Eigen::MatrixBase<class Eigen::Block<class Eigen::Matrix<double,3,3,0,3,3>,3
,1,1> >::MatrixBase<class Eigen::Block<class Eigen::Matrix<double,3,3,0,3,3>,3,
1,1> >(void)' : fonction non inline [C:\opengv\build\random_generators.vcxproj]

c:\opengv\test\random_generators.cpp(135): warning C4710: 'struct Eigen::Comm
aInitializer<class Eigen::Matrix<double,3,1,0,3,1> > __thiscall Eigen::DenseBas
e<class Eigen::Matrix<double,3,1,0,3,1> >::operator<<(double const &)' : foncti
on non inline [C:\opengv\build\random_generators.vcxproj]

c:\opengv\third_party\eigen\src\core\plainobjectbase.h(422): warning C4710: '
__thiscall Eigen::MatrixBase<class Eigen::Matrix<double,3,1,0,3,1> >::MatrixBas
e<class Eigen::Matrix<double,3,1,0,3,1> >(void)' : fonction non inline [C:\open
gv\build\random_generators.vcxproj]

c:\opengv\third_party\eigen\src\core\plainobjectbase.h(422): warning C4710: '
__thiscall Eigen::DenseStorage<double,3,3,1,0>::DenseStorage<double,3,3,1,0>(vo
id)' : fonction non inline [C:\opengv\build\random_generators.vcxproj]

c:\opengv\third_party\eigen\src\core\products\coeffbasedproduct.h(150): warni
ng C4710: '__thiscall Eigen::MatrixBase<class Eigen::CoeffBasedProduct<class Ei
gen::Matrix<double,3,3,0,3,3> const &,class Eigen::Matrix<double,3,1,0,3,1> con
st &,6> >::MatrixBase<class Eigen::CoeffBasedProduct<class Eigen::Matrix<double
,3,3,0,3,3> const &,class Eigen::Matrix<double,3,1,0,3,1> const &,6> >(void)' :
fonction non inline [C:\opengv\build\random_generators.vcxproj]

c:\opengv\third_party\eigen\src\core\plainobjectbase.h(422): warning C4710: '
__thiscall Eigen::MatrixBase<class Eigen::Matrix<double,3,1,0,3,1> >::MatrixBas
e<class Eigen::Matrix<double,3,1,0,3,1> >(void)' : fonction non inline [C:\open
gv\build\random_generators.vcxproj]

c:\opengv\third_party\eigen\src\core\plainobjectbase.h(422): warning C4710: '
__thiscall Eigen::DenseStorage<double,3,3,1,0>::DenseStorage<double,3,3,1,0>(vo
id)' : fonction non inline [C:\opengv\build\random_generators.vcxproj]

c:\opengv\third_party\eigen\src\core\plainobjectbase.h(439): warning C4710: '
__thiscall Eigen::MatrixBase<class Eigen::Matrix<double,3,1,0,3,1> >::MatrixBas
e<class Eigen::Matrix<double,3,1,0,3,1> >(void)' : fonction non inline [C:\open
gv\build\random_generators.vcxproj]

c:\opengv\third_party\eigen\src\core\plainobjectbase.h(439): warning C4710: '
__thiscall Eigen::DenseStorage<double,3,3,1,0>::DenseStorage<double,3,3,1,0>(in
t,int,int)' : fonction non inline [C:\opengv\build\random_generators.vcxproj]
c:\opengv\third_party\eigen\src\core\cwiseunaryop.h(68): warning C4710: '__th
iscall Eigen::CwiseUnaryOpImpl<struct Eigen::internal::scalar_multiple_op,class Eigen::Matrix<double,3,1,0,3,1> const ,struct Eigen::Dense>::CwiseUnar
yOpImpl<struct Eigen::internal::scalar_multiple_op,class Eigen::Matrix<
double,3,1,0,3,1> const ,struct Eigen::Dense>(void)' : fonction non inline [C:
opengv\build\random_generators.vcxproj]

And the following error:
"c:\opengv\build\opengv.sln" (cible par défaut) (1) ->
"c:\opengv\build\opengv.vcxproj.metaproj" (cible par défaut) (3) ->
"c:\opengv\build\opengv.vcxproj" (cible par défaut) (4) ->
(ClCompile cible) ->
..\src\absolute_pose\modules\main.cpp(32): fatal error C1083: Impossible d'ouvrir
le fichier include : 'Eigen/NonLinearOptimization' : No such file or direc
tory [c:\opengv\build\opengv.vcxproj]

    2723 Avertissement(s)
    1 Erreur(s)

    Temps écoulé 00:00:54.18

Help me please to solve it.

Seg fault when using opengv::sac_problems::relative_pose::FrameRotationOnlySacProblem

Calling the computeModel(0) method on that class causes a segfault with the following trace:

#0 __GI___libc_free (mem=0x75) at malloc.c:2951
#1 0x0000000002402fe4 in Eigen::internal::handmade_aligned_free (ptr=) at /home/anton/eigen/Eigen/src/Core/util/Memory.h:98
#2 Eigen::internal::aligned_free (ptr=) at /home/anton/eigen/Eigen/src/Core/util/Memory.h:179
#3 Eigen::internal::conditional_aligned_free (ptr=) at /home/anton/eigen/Eigen/src/Core/util/Memory.h:230
#4 Eigen::internal::conditional_aligned_delete_auto<double, true> (size=, ptr=) at /home/anton/eigen/Eigen/src/Core/util/Memory.h:416
#5 Eigen::DenseStorage<double, -1, -1, -1, 0>::~DenseStorage (this=0x7ffacbe79168, __in_chrg=) at /home/anton/eigen/Eigen/src/Core/DenseStorage.h:391
#6 Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::~PlainObjectBase (this=0x7ffacbe79168, __in_chrg=) at /home/anton/eigen/Eigen/src/Core/PlainObjectBase.h:98
#7 Eigen::Matrix<double, -1, -1, 0, -1, -1>::~Matrix (this=0x7ffacbe79168, __in_chrg=) at /home/anton/eigen/Eigen/src/Core/Matrix.h:178
#8 Eigen::JacobiSVD<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::~JacobiSVD (this=0x7ffacbe790f0, __in_chrg=) at /home/anton/eigen/Eigen/src/SVD/JacobiSVD.h:487
#9 opengv::math::arun (Hcross=...) at /home/anton/okvis-ws/build/okvis_ros/okvis/opengv/src/opengv/src/math/arun.cpp:40
#10 0x000000000221d4d4 in opengv::relative_pose::twopt_rotationOnly (adapter=..., index0=, index1=23)
at /home/anton/okvis-ws/build/okvis_ros/okvis/opengv/src/opengv/src/relative_pose/methods.cpp:120
#11 0x000000000221d5b7 in opengv::relative_pose::twopt_rotationOnly (adapter=..., indices=...) at /home/anton/okvis-ws/build/okvis_ros/okvis/opengv/src/opengv/src/relative_pose/methods.cpp:94
#12 0x00000000022000fe in opengv::sac_problems::relative_pose::RotationOnlySacProblem::computeModelCoefficients (this=, indices=..., outModel=...)
at /home/anton/okvis-ws/build/okvis_ros/okvis/opengv/src/opengv/src/sac_problems/relative_pose/RotationOnlySacProblem.cpp:44
#13 0x0000000001b9f06a in opengv::sac::Ransacopengv::sac_problems::relative_pose::FrameRotationOnlySacProblem::computeModel (this=0x7ffacbe7a290, debug_verbosity_level=0)
at /home/anton/okvis-ws/build/include/opengv/sac/implementation/Ransac.hpp:78

Segfault in gauss jordan

While using the upnp (non-minimal) algorithm from opengv for a noncentral pose problem on some synthetically generated test data, I occassionaly encountered a seg-fault.

I have traced the problem to the employed gauss jordan method (src/math/gauss_jordan.cpp), which is called from src/math/absolute_pose/modules/upnp4.cpp.
Specifically, in the first loop where the largest leading coefficient in a row is searched for (about line 50):

// first iterate through the rows and find the row that has the biggest
// leading coefficient
double maxValue = -1.0;
int row = -1;
for( int tempRow = frontRow; tempRow < rows; tempRow++ )
{
  double value = fabs((*(matrix[tempRow]))[frontRow]);
  if( value > maxValue )
  {
    row = tempRow;
    maxValue = value;
  }
}

//rowIter is now the row that should go in the place of frontRow->swap
std::swap( matrix[row], matrix[frontRow] );

The search fails, as the whole column is 0. This in turn leaves row == -1 which causes the segfault in the std::swap. I am, however, unsure what the mathematical "meaning" of an all zero column (and therefore a singular matrix) is here, and therefore how this case should be handled.

It seems to work alright by simply skipping this row, i.e.

if (row < 0) {
    continue;
}

usage in MATLAB

Hi, I am trying to use it on matlab2017a, but I have some problems. It said

No function or variable is defined :"opengv_donotuse"
Error benchmark_relative_pose_execution_times (line 45)
Out = opengv_donotuse(algorithms{a},indices{a},v1,v2,T_perturbed);

I have dowenload the opengv_donotuse.cpp. but how to make it in matlab? Must I use visual statio2012 to get mex file?Thank you for your answer.

Can't po the variables

When debugging with Xcode, I can't print the value of the variables like rotation or translation. I am in the debug mode, and the optimize level is 0.

Passing custom (newer) C++ standard in cmake

In the cmake configuration the CXX_STANDARD property of the library is set to a fixed value of 11.

CXX_STANDARD 11

I'm building opengv as part of my project and would like to set a different (newer) C++ standard from outside. However, currently passing CMAKE_CXX_STANDARD does nothing and is overwritten. As a workaround I modify the CMakeLists.txt, but ideally I would like to pull in the unmodified upstream version.

Is there currently a way to pass a custom C++ standard version from "outside"?

What would be a good way to implement this? Instead of putting a fixed value of 11, we could check if CMAKE_CXX_STANDARD is set. If yes, we use that, if not, we default to 11. Would that be an acceptable change, or does that have possible downsides?

complile in vs2013

image
it use a lot of time and it seems like it is crashed,but there is no errors

AbsolutePoseSacProblem has no member named inlier_distances_to_model_

Hello,

I am actually trying to build the package aslam_cv_geometric_vision who depends on opengv with catkin build but i don't know why i got an error. It said that :

AbsolutePoseSacProblem has no member named inlier_distances_to_model_

I am working on Ubuntu 16.04 with Ros Kinetic and i have install opengv following this tutorial https://laurentkneip.github.io/opengv/page_installation.html

PS complete error output :

`Errors << aslam_cv_geometric_vision:make /home/joe/catkin_ws/logs/aslam_cv_geometric_vision/build.make.002.log
In file included

from /home/joe/catkin_ws/src/aslam_cv2/aslam_cv_cameras/include/aslam/cameras/camera.h:11:0,

from /home/joe/catkin_ws/src/aslam_cv2/aslam_cv_cameras/include/aslam/cameras/camera-pinhole.h:4,

from /home/joe/catkin_ws/src/aslam_cv2/aslam_cv_geometric_vision/src/pnp-pose-estimator.cc:3:
/home/joe/catkin_ws/src/aslam_cv2/aslam_cv_geometric_vision/src/pnp-pose-estimator.cc: In member function ‘bool aslam::geometric_vision::PnpPoseEstimator::absoluteMultiPoseRansac(const Matrix2Xd&, const std::vector&, const Matrix3Xd&, double, int, aslam::NCamera::ConstPtr, aslam::Transformation*, std::vector, std::vector, int*)’:

/home/joe/catkin_ws/src/aslam_cv2/aslam_cv_geometric_vision/src/pnp-pose-estimator.cc:252:43: error: ‘class opengv::sac::Ransacopengv::sac_problems::absolute_pose::AbsolutePoseSacProblem’ has no member named ‘inlier_distances_to_model_’
CHECK_EQ(ransac.inliers_.size(), ransac.inlier_distances_to_model_.size());
^
/home/joe/catkin_ws/devel/.private/glog_catkin/include/glog/logging.h:746:44: note: in definition of macro ‘CHECK_OP_LOG’
google::GetReferenceableValue(val2),
^
/home/joe/catkin_ws/devel/.private/glog_catkin/include/glog/logging.h:788:30: note: in expansion of macro ‘CHECK_OP’
#define CHECK_EQ(val1, val2) CHECK_OP(EQ, ==, val1, val2)
^
/home/joe/catkin_ws/src/aslam_cv2/aslam_cv_geometric_vision/src/pnp-pose-estimator.cc:252:3: note: in expansion of macro ‘CHECK_EQ’
CHECK_EQ(ransac.inliers.size(), ransac.inlier_distances_to_model_.size());
^
/home/joe/catkin_ws/src/aslam_cv2/aslam_cv_geometric_vision/src/pnp-pose-estimator.cc:270:39: error: ‘class opengv::sac::Ransacopengv::sac_problems::absolute_pose::AbsolutePoseSacProblem’ has no member named ‘inlier_distances_to_model_’
*inlier_distances_to_model = ransac.inlier_distances_to_model_;
^
make[2]: *** [CMakeFiles/aslam_cv_geometric_vision.dir/src/pnp-pose-estimator.cc.o] Error 1
make[1]: *** [CMakeFiles/aslam_cv_geometric_vision.dir/all] Error 2
make: *** [all] Error 2
cd /home/joe/catkin_ws/build/aslam_cv_geometric_vision; catkin build --get-env aslam_cv_geometric_vision | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -`

If anyone have an idea where did it came from ?

Thanks you in advance,

Clement

Question about optimization

I have several cameras and dataset with flat (chessboard) pattern.
My goal is accurately estimate intrinsic, distortion and extrinsic of each camera to track objects in this cameras coordinate space using triangulation.
For each camera I perform single calibration to find intrinsic and distortion. After I make stereo calibration for all camera pair. But the result is unsatisfactory. I did all this with the OpenCV.
Can I use OpenGV
11. non-linear optimization over n correspondences (both central and non-central)
to improving the accuracy of previously found cameras parameters? (Global optimization all camera parameter together.)

central relative pose RANSAC methods caused Matlab 2018b crash

I am using Mac OS 10.14 system with Matlab R2018b.
I installed opengv by compiling using Xcode.
I ran a ransac problem:
X_5pt_ransac=opengv('fivept_nister_ransac',bearing1,bearing2);
and it always crashed my Matlab.
However, running without ransac has no problem.
X_5pt=opengv('fivept_nister',bearing1,bearing2);
and yields the correct solution.

Does anyone know how to fix this?

Segmentation fault during Central Relative Pose model computation in Linux

I am currently using OpenGV in order to find the central relative pose between two stereos.

I have tested the code under OSX and it works but for some reasons the model computation provided by OpenGV throws a segmentation fault when running the code under Linux Ubuntu.

I ran the program with GDB to get an idea of the issue and this is the backtrace that I get

screen shot 2017-06-12 at 10 17 01 am

I am also running Eigen 3.3.3.
Could you help me figure out a way to fix this issue?

Cheers

P3P algorithm fails with coplanar feature/bearing vectors

Hey,

first thanks for developing a new P3P solving algorithm and for this interesting library.

I am currently reading your paper:
"A Novel Parametrization of the Perspective-Three-Point Problem for a Direct Computation of Absolute Camera Position and Orientation"
While running the related code, i found a problem with a specific feature/bearing vector configuration.

Let me use the notation from the paper for problem description:

When all 3 feature vectors f are coplanar (all 3 camera points in a line at sensor plane),
then t(z) will be orthogonal to f(3). This results in a f(3)z (in intermediate camera frame) of zero and the algorithm fails (since we will divide by zero later).

Are you aware of this problem? The current code seems not to be prepared to handle this case.

Cheers

Typo in CMakeLists.txt of python

You missed an 'S' for 'Boost_LIBRARY_DIRS' which makes the installation failed at 98% with error No rule to make target /libboost_python.a, needed by lib/pyopengv.so.

About the solution of 5 points relative pose method

Hi,
I got a question that some paper shows that to determine the Essential matrix by 5-points there are up to ten solution and how can we got the unique solution we want? (it seems many open source 5-points method result in an unique solution for essential matrix)
Thanks,
Miller

ROS dependency for build in Ubuntu ?

Hi,

Trying to build the lib under ubuntu 12.04, I get errors. Everything is installed as it should, but when I run cmake I get the following error :

CMake Error at CMakeLists.txt:31 (find_package):
Could not find module FindEigen.cmake or a configuration file for package
Eigen.

Line 31 is actually "find_package(Eigen REQUIRED)". In Ubuntu (and maybe other distros) there is no provided FindEigen.cmake script system-wide, hence the error.

Now, I saw that there was a manifest.xml file and a Makefile.ros in the main folder, so I tried to build in a ros-aware shell (by sourcing the ros config files) and it builds flawlessly. Reason is that ROS (groovy for me) comes with a FindEigen.cmake file in its config. Both rosbuild and a simple cmake + make in a ros-aware shell work.

I don't have time now to make a patch and submit, but a simple solution could be to have a cmake subfolder containing a FindEigen.cmake script and add this line in the CMakeLists.txt :

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

On my config, using the FindEigen.cmake provided in ROS here works : https://code.ros.org/svn/ros-pkg/stacks/laser_pipeline/trunk/laser_geometry/cmake/FindEigen.cmake

Cheers,

Beuh

Adopt a standard License template

GitHub will identify the license type and using your library is not easy as it doesn't identify as one of the standard requirement types anywhere? e.g. if it were MIT or BSD or APACHE etc we could use this, but we can't work out which one you map to or maybe it is custom type?

Problem in installing opengv

I am on Ubuntu 16.04.1. I have successfully make opengv, and make test. When I make install it, I got this error.

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libopengv.a
CMake Error at cmake_install.cmake:36 (file):
  file INSTALL cannot copy file
  "/home/hilman-dayo/opengv/build/lib/libopengv.a" to
  "/usr/local/lib/libopengv.a".


Makefile:61: recipe for target 'install' failed
make: *** [install] Error 1

How can I fix this? I already set the INSTALL_OPENGV to ON during cmake.

Issue when building with Ubuntu 16.04

Hi,

I am trying to build with ubunutu 16.04 and getting the following:

[ 98%] Building CXX object python/CMakeFiles/pyopengv.dir/pyopengv.cpp.o
In file included from /usr/include/c++/5/random:35:0,
                 from /home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:46,
                 from /home/david/opengv/include/opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp:42,
                 from /home/david/opengv/python/pyopengv.cpp:9:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /home/david/opengv/include/opengv/sac/Ransac.hpp:42:0,
                 from /home/david/opengv/python/pyopengv.cpp:8:
/home/david/opengv/include/opengv/sac/SampleConsensus.hpp:113:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr<PROBLEM_T> sac_model_;
        ^
In file included from /home/david/opengv/include/opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp:42:0,
                 from /home/david/opengv/python/pyopengv.cpp:9:
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:104:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr< std::vector<int> > getIndices() const;
        ^
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:218:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr< std::vector<int> > indices_;
        ^
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:224:8: error: ‘mt19937’ in namespace ‘std’ does not name a type
   std::mt19937 rng_alg_;
        ^
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:227:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr< std::uniform_int_distribution<> > rng_dist_;
        ^
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:230:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr< std::function<int()> > rng_gen_;
        ^
In file included from /home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:237:0,
                 from /home/david/opengv/include/opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp:42,
                 from /home/david/opengv/python/pyopengv.cpp:9:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In constructor ‘opengv::sac::SampleConsensusProblem<MODEL_T>::SampleConsensusProblem(bool)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:38:3: error: ‘rng_dist_’ was not declared in this scope
   rng_dist_.reset(new std::uniform_int_distribution<>( 0, std::numeric_limits<int>::max() ));
   ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:38:28: error: ‘uniform_int_distribution’ in namespace ‘std’ does not name a template type
   rng_dist_.reset(new std::uniform_int_distribution<>( 0, std::numeric_limits<int>::max() ));
                            ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:38:53: error: expected primary-expression before ‘>’ token
   rng_dist_.reset(new std::uniform_int_distribution<>( 0, std::numeric_limits<int>::max() ));
                                                     ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:41:5: error: ‘rng_alg_’ was not declared in this scope
     rng_alg_.seed(static_cast<unsigned> (std::time(0)));
     ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:43:5: error: ‘rng_alg_’ was not declared in this scope
     rng_alg_.seed(12345u);
     ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:3: error: ‘rng_gen_’ was not declared in this scope
   rng_gen_.reset(new std::function<int()>(std::bind(*rng_dist_, rng_alg_)));
   ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:27: error: ‘function’ in namespace ‘std’ does not name a template type
   rng_gen_.reset(new std::function<int()>(std::bind(*rng_dist_, rng_alg_)));
                           ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:43: error: ‘bind’ is not a member of ‘std’
   rng_gen_.reset(new std::function<int()>(std::bind(*rng_dist_, rng_alg_)));
                                           ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:43: note: suggested alternatives:
In file included from /usr/include/boost/bind.hpp:22:0,
                 from /usr/include/boost/python/exception_translator.hpp:10,
                 from /usr/include/boost/python.hpp:28,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/bind/bind.hpp:2016:1: note:   ‘boost::bind’
 BOOST_BIND( M T::*f, A1 a1 )
 ^
In file included from /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37:0,
                 from /usr/include/boost/mpl/bind_fwd.hpp:32,
                 from /usr/include/boost/mpl/bind.hpp:23,
                 from /usr/include/boost/mpl/lambda.hpp:18,
                 from /usr/include/boost/mpl/apply.hpp:25,
                 from /usr/include/boost/python/object/pointer_holder.hpp:27,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp:18:8: note:   ‘boost::mpl::bind’
 struct bind;
        ^
In file included from /home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:237:0,
                 from /home/david/opengv/include/opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp:42,
                 from /home/david/opengv/python/pyopengv.cpp:9:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:65: error: ‘rng_alg_’ was not declared in this scope
   rng_gen_.reset(new std::function<int()>(std::bind(*rng_dist_, rng_alg_)));
                                                                 ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘virtual void opengv::sac::SampleConsensusProblem<MODEL_T>::getSamples(int&, std::vector<int>&)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:90:7: error: ‘indices_’ was not declared in this scope
   if (indices_->size() < (size_t)getSampleSize())
       ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: At global scope:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:120:6: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
 std::shared_ptr< std::vector<int> >
      ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘virtual void opengv::sac::SampleConsensusProblem<MODEL_T>::getDistancesToModel(const model_t&, std::vector<double>&)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:131:53: error: ‘indices_’ was not declared in this scope
   getSelectedDistancesToModel( model_coefficients, *indices_, distances );
                                                     ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘void opengv::sac::SampleConsensusProblem<MODEL_T>::setUniformIndices(int)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:138:3: error: ‘indices_’ was not declared in this scope
   indices_.reset( new std::vector<int>() );
   ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘void opengv::sac::SampleConsensusProblem<MODEL_T>::setIndices(const std::vector<int>&)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:150:3: error: ‘indices_’ was not declared in this scope
   indices_.reset( new std::vector<int>(indices) );
   ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘int opengv::sac::SampleConsensusProblem<MODEL_T>::rnd()’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:159:13: error: ‘rng_gen_’ was not declared in this scope
   return ((*rng_gen_)());
             ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘virtual void opengv::sac::SampleConsensusProblem<MODEL_T>::selectWithinDistance(const model_t&, double, std::vector<int>&)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:171:16: error: ‘indices_’ was not declared in this scope
   dist.reserve(indices_->size());
                ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘virtual int opengv::sac::SampleConsensusProblem<MODEL_T>::countWithinDistance(const model_t&, double)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:189:16: error: ‘indices_’ was not declared in this scope
   dist.reserve(indices_->size());
                ^
In file included from /home/david/opengv/python/pyopengv.cpp:14:0:
/home/david/opengv/python/types.hpp: In function ‘int pyopengv::numpy_typenum()’:
/home/david/opengv/python/types.hpp:16:51: warning: no return statement in function returning non-void [-Wreturn-type]
 template <typename T> inline int numpy_typenum() {}
                                                   ^
/home/david/opengv/python/types.hpp: In function ‘const char* pyopengv::type_string()’:
/home/david/opengv/python/types.hpp:29:57: warning: no return statement in function returning non-void [-Wreturn-type]
 template <typename T> inline const char *type_string() {}
                                                         ^
/home/david/opengv/python/pyopengv.cpp: In function ‘boost::python::api::object pyopengv::absolute_pose::ransac(boost::python::numeric::array&, boost::python::numeric::array&, std::__cxx11::string, double, int)’:
/home/david/opengv/python/pyopengv.cpp:303:3: error: ‘shared_ptr’ is not a member of ‘std’
   std::shared_ptr<AbsolutePoseSacProblem>
   ^
/home/david/opengv/python/pyopengv.cpp:303:3: note: suggested alternative:
In file included from /usr/include/boost/throw_exception.hpp:42:0,
                 from /usr/include/boost/function/detail/prologue.hpp:15,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /usr/include/boost/python/errors.hpp:13,
                 from /usr/include/boost/python/handle.hpp:11,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/exception/exception.hpp:148:11: note:   ‘boost::shared_ptr’
     class shared_ptr;
           ^
/home/david/opengv/python/pyopengv.cpp:303:41: error: expected primary-expression before ‘>’ token
   std::shared_ptr<AbsolutePoseSacProblem>
                                         ^
/home/david/opengv/python/pyopengv.cpp:305:55: error: ‘absposeproblem_ptr’ was not declared in this scope
         new AbsolutePoseSacProblem(adapter, algorithm));
                                                       ^
In file included from /home/david/opengv/python/pyopengv.cpp:8:0:
/home/david/opengv/include/opengv/sac/Ransac.hpp: In instantiation of ‘class opengv::sac::Ransac<opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem>’:
/home/david/opengv/python/pyopengv.cpp:308:47:   required from here
/home/david/opengv/include/opengv/sac/Ransac.hpp:71:37: error: no members matching ‘opengv::sac::SampleConsensus<opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem>::sac_model_’ in ‘class opengv::sac::SampleConsensus<opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem>’
   using SampleConsensus<problem_t>::sac_model_;
                                     ^
/home/david/opengv/python/pyopengv.cpp:310:10: error: ‘class opengv::sac::Ransac<opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem>’ has no member named ‘sac_model_’
   ransac.sac_model_ = absposeproblem_ptr;
          ^
/home/david/opengv/python/pyopengv.cpp: In function ‘boost::python::api::object pyopengv::relative_pose::ransac(boost::python::numeric::array&, boost::python::numeric::array&, std::__cxx11::string, double, int)’:
/home/david/opengv/python/pyopengv.cpp:509:3: error: ‘shared_ptr’ is not a member of ‘std’
   std::shared_ptr<CentralRelativePoseSacProblem>
   ^
/home/david/opengv/python/pyopengv.cpp:509:3: note: suggested alternative:
In file included from /usr/include/boost/throw_exception.hpp:42:0,
                 from /usr/include/boost/function/detail/prologue.hpp:15,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /usr/include/boost/python/errors.hpp:13,
                 from /usr/include/boost/python/handle.hpp:11,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/exception/exception.hpp:148:11: note:   ‘boost::shared_ptr’
     class shared_ptr;
           ^
/home/david/opengv/python/pyopengv.cpp:509:48: error: expected primary-expression before ‘>’ token
   std::shared_ptr<CentralRelativePoseSacProblem>
                                                ^
/home/david/opengv/python/pyopengv.cpp:511:62: error: ‘relposeproblem_ptr’ was not declared in this scope
         new CentralRelativePoseSacProblem(adapter, algorithm));
                                                              ^
In file included from /home/david/opengv/python/pyopengv.cpp:8:0:
/home/david/opengv/include/opengv/sac/Ransac.hpp: In instantiation of ‘class opengv::sac::Ransac<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>’:
/home/david/opengv/python/pyopengv.cpp:514:54:   required from here
/home/david/opengv/include/opengv/sac/Ransac.hpp:71:37: error: no members matching ‘opengv::sac::SampleConsensus<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>::sac_model_’ in ‘class opengv::sac::SampleConsensus<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>’
   using SampleConsensus<problem_t>::sac_model_;
                                     ^
/home/david/opengv/python/pyopengv.cpp:516:10: error: ‘class opengv::sac::Ransac<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>’ has no member named ‘sac_model_’
   ransac.sac_model_ = relposeproblem_ptr;
          ^
/home/david/opengv/python/pyopengv.cpp: In function ‘boost::python::api::object pyopengv::relative_pose::ransac_rotationOnly(boost::python::numeric::array&, boost::python::numeric::array&, double, int)’:
/home/david/opengv/python/pyopengv.cpp:535:3: error: ‘shared_ptr’ is not a member of ‘std’
   std::shared_ptr<RotationOnlySacProblem>
   ^
/home/david/opengv/python/pyopengv.cpp:535:3: note: suggested alternative:
In file included from /usr/include/boost/throw_exception.hpp:42:0,
                 from /usr/include/boost/function/detail/prologue.hpp:15,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /usr/include/boost/python/errors.hpp:13,
                 from /usr/include/boost/python/handle.hpp:11,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/exception/exception.hpp:148:11: note:   ‘boost::shared_ptr’
     class shared_ptr;
           ^
/home/david/opengv/python/pyopengv.cpp:535:41: error: expected primary-expression before ‘>’ token
   std::shared_ptr<RotationOnlySacProblem>
                                         ^
/home/david/opengv/python/pyopengv.cpp:537:44: error: ‘relposeproblem_ptr’ was not declared in this scope
         new RotationOnlySacProblem(adapter));
                                            ^
In file included from /home/david/opengv/python/pyopengv.cpp:8:0:
/home/david/opengv/include/opengv/sac/Ransac.hpp: In instantiation of ‘class opengv::sac::Ransac<opengv::sac_problems::relative_pose::RotationOnlySacProblem>’:
/home/david/opengv/python/pyopengv.cpp:540:47:   required from here
/home/david/opengv/include/opengv/sac/Ransac.hpp:71:37: error: no members matching ‘opengv::sac::SampleConsensus<opengv::sac_problems::relative_pose::RotationOnlySacProblem>::sac_model_’ in ‘class opengv::sac::SampleConsensus<opengv::sac_problems::relative_pose::RotationOnlySacProblem>’
   using SampleConsensus<problem_t>::sac_model_;
                                     ^
/home/david/opengv/python/pyopengv.cpp:542:10: error: ‘class opengv::sac::Ransac<opengv::sac_problems::relative_pose::RotationOnlySacProblem>’ has no member named ‘sac_model_’
   ransac.sac_model_ = relposeproblem_ptr;
          ^
In file included from /home/david/opengv/include/opengv/sac/Ransac.hpp:98:0,
                 from /home/david/opengv/python/pyopengv.cpp:8:
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp: In instantiation of ‘bool opengv::sac::Ransac<PROBLEM_T>::computeModel(int) [with PROBLEM_T = opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem]’:
/home/david/opengv/python/pyopengv.cpp:315:23:   required from here
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:68:5: error: ‘sac_model_’ was not declared in this scope
     sac_model_->getSamples( iterations_, selection );
     ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:141:3: error: ‘sac_model_’ was not declared in this scope
   sac_model_->selectWithinDistance( model_coefficients_, threshold_, inliers_ );
   ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp: In instantiation of ‘bool opengv::sac::Ransac<PROBLEM_T>::computeModel(int) [with PROBLEM_T = opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem]’:
/home/david/opengv/python/pyopengv.cpp:521:23:   required from here
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:68:5: error: ‘sac_model_’ was not declared in this scope
     sac_model_->getSamples( iterations_, selection );
     ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:141:3: error: ‘sac_model_’ was not declared in this scope
   sac_model_->selectWithinDistance( model_coefficients_, threshold_, inliers_ );
   ^[ 98%] Building CXX object python/CMakeFiles/pyopengv.dir/pyopengv.cpp.o
In file included from /usr/include/c++/5/random:35:0,
                 from /home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:46,
                 from /home/david/opengv/include/opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp:42,
                 from /home/david/opengv/python/pyopengv.cpp:9:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /home/david/opengv/include/opengv/sac/Ransac.hpp:42:0,
                 from /home/david/opengv/python/pyopengv.cpp:8:
/home/david/opengv/include/opengv/sac/SampleConsensus.hpp:113:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr<PROBLEM_T> sac_model_;
        ^
In file included from /home/david/opengv/include/opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp:42:0,
                 from /home/david/opengv/python/pyopengv.cpp:9:
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:104:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr< std::vector<int> > getIndices() const;
        ^
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:218:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr< std::vector<int> > indices_;
        ^
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:224:8: error: ‘mt19937’ in namespace ‘std’ does not name a type
   std::mt19937 rng_alg_;
        ^
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:227:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr< std::uniform_int_distribution<> > rng_dist_;
        ^
/home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:230:8: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   std::shared_ptr< std::function<int()> > rng_gen_;
        ^
In file included from /home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:237:0,
                 from /home/david/opengv/include/opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp:42,
                 from /home/david/opengv/python/pyopengv.cpp:9:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In constructor ‘opengv::sac::SampleConsensusProblem<MODEL_T>::SampleConsensusProblem(bool)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:38:3: error: ‘rng_dist_’ was not declared in this scope
   rng_dist_.reset(new std::uniform_int_distribution<>( 0, std::numeric_limits<int>::max() ));
   ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:38:28: error: ‘uniform_int_distribution’ in namespace ‘std’ does not name a template type
   rng_dist_.reset(new std::uniform_int_distribution<>( 0, std::numeric_limits<int>::max() ));
                            ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:38:53: error: expected primary-expression before ‘>’ token
   rng_dist_.reset(new std::uniform_int_distribution<>( 0, std::numeric_limits<int>::max() ));
                                                     ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:41:5: error: ‘rng_alg_’ was not declared in this scope
     rng_alg_.seed(static_cast<unsigned> (std::time(0)));
     ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:43:5: error: ‘rng_alg_’ was not declared in this scope
     rng_alg_.seed(12345u);
     ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:3: error: ‘rng_gen_’ was not declared in this scope
   rng_gen_.reset(new std::function<int()>(std::bind(*rng_dist_, rng_alg_)));
   ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:27: error: ‘function’ in namespace ‘std’ does not name a template type
   rng_gen_.reset(new std::function<int()>(std::bind(*rng_dist_, rng_alg_)));
                           ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:43: error: ‘bind’ is not a member of ‘std’
   rng_gen_.reset(new std::function<int()>(std::bind(*rng_dist_, rng_alg_)));
                                           ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:43: note: suggested alternatives:
In file included from /usr/include/boost/bind.hpp:22:0,
                 from /usr/include/boost/python/exception_translator.hpp:10,
                 from /usr/include/boost/python.hpp:28,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/bind/bind.hpp:2016:1: note:   ‘boost::bind’
 BOOST_BIND( M T::*f, A1 a1 )
 ^
In file included from /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37:0,
                 from /usr/include/boost/mpl/bind_fwd.hpp:32,
                 from /usr/include/boost/mpl/bind.hpp:23,
                 from /usr/include/boost/mpl/lambda.hpp:18,
                 from /usr/include/boost/mpl/apply.hpp:25,
                 from /usr/include/boost/python/object/pointer_holder.hpp:27,
                 from /usr/include/boost/python/to_python_indirect.hpp:10,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:25,
                 from /usr/include/boost/python.hpp:11,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp:18:8: note:   ‘boost::mpl::bind’
 struct bind;
        ^
In file included from /home/david/opengv/include/opengv/sac/SampleConsensusProblem.hpp:237:0,
                 from /home/david/opengv/include/opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp:42,
                 from /home/david/opengv/python/pyopengv.cpp:9:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:45:65: error: ‘rng_alg_’ was not declared in this scope
   rng_gen_.reset(new std::function<int()>(std::bind(*rng_dist_, rng_alg_)));
                                                                 ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘virtual void opengv::sac::SampleConsensusProblem<MODEL_T>::getSamples(int&, std::vector<int>&)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:90:7: error: ‘indices_’ was not declared in this scope
   if (indices_->size() < (size_t)getSampleSize())
       ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: At global scope:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:120:6: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
 std::shared_ptr< std::vector<int> >
      ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘virtual void opengv::sac::SampleConsensusProblem<MODEL_T>::getDistancesToModel(const model_t&, std::vector<double>&)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:131:53: error: ‘indices_’ was not declared in this scope
   getSelectedDistancesToModel( model_coefficients, *indices_, distances );
                                                     ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘void opengv::sac::SampleConsensusProblem<MODEL_T>::setUniformIndices(int)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:138:3: error: ‘indices_’ was not declared in this scope
   indices_.reset( new std::vector<int>() );
   ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘void opengv::sac::SampleConsensusProblem<MODEL_T>::setIndices(const std::vector<int>&)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:150:3: error: ‘indices_’ was not declared in this scope
   indices_.reset( new std::vector<int>(indices) );
   ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘int opengv::sac::SampleConsensusProblem<MODEL_T>::rnd()’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:159:13: error: ‘rng_gen_’ was not declared in this scope
   return ((*rng_gen_)());
             ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘virtual void opengv::sac::SampleConsensusProblem<MODEL_T>::selectWithinDistance(const model_t&, double, std::vector<int>&)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:171:16: error: ‘indices_’ was not declared in this scope
   dist.reserve(indices_->size());
                ^
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp: In member function ‘virtual int opengv::sac::SampleConsensusProblem<MODEL_T>::countWithinDistance(const model_t&, double)’:
/home/david/opengv/include/opengv/sac/implementation/SampleConsensusProblem.hpp:189:16: error: ‘indices_’ was not declared in this scope
   dist.reserve(indices_->size());
                ^
In file included from /home/david/opengv/python/pyopengv.cpp:14:0:
/home/david/opengv/python/types.hpp: In function ‘int pyopengv::numpy_typenum()’:
/home/david/opengv/python/types.hpp:16:51: warning: no return statement in function returning non-void [-Wreturn-type]
 template <typename T> inline int numpy_typenum() {}
                                                   ^
/home/david/opengv/python/types.hpp: In function ‘const char* pyopengv::type_string()’:
/home/david/opengv/python/types.hpp:29:57: warning: no return statement in function returning non-void [-Wreturn-type]
 template <typename T> inline const char *type_string() {}
                                                         ^
/home/david/opengv/python/pyopengv.cpp: In function ‘boost::python::api::object pyopengv::absolute_pose::ransac(boost::python::numeric::array&, boost::python::numeric::array&, std::__cxx11::string, double, int)’:
/home/david/opengv/python/pyopengv.cpp:303:3: error: ‘shared_ptr’ is not a member of ‘std’
   std::shared_ptr<AbsolutePoseSacProblem>
   ^
/home/david/opengv/python/pyopengv.cpp:303:3: note: suggested alternative:
In file included from /usr/include/boost/throw_exception.hpp:42:0,
                 from /usr/include/boost/function/detail/prologue.hpp:15,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /usr/include/boost/python/errors.hpp:13,
                 from /usr/include/boost/python/handle.hpp:11,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/exception/exception.hpp:148:11: note:   ‘boost::shared_ptr’
     class shared_ptr;
           ^
/home/david/opengv/python/pyopengv.cpp:303:41: error: expected primary-expression before ‘>’ token
   std::shared_ptr<AbsolutePoseSacProblem>
                                         ^
/home/david/opengv/python/pyopengv.cpp:305:55: error: ‘absposeproblem_ptr’ was not declared in this scope
         new AbsolutePoseSacProblem(adapter, algorithm));
                                                       ^
In file included from /home/david/opengv/python/pyopengv.cpp:8:0:
/home/david/opengv/include/opengv/sac/Ransac.hpp: In instantiation of ‘class opengv::sac::Ransac<opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem>’:
/home/david/opengv/python/pyopengv.cpp:308:47:   required from here
/home/david/opengv/include/opengv/sac/Ransac.hpp:71:37: error: no members matching ‘opengv::sac::SampleConsensus<opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem>::sac_model_’ in ‘class opengv::sac::SampleConsensus<opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem>’
   using SampleConsensus<problem_t>::sac_model_;
                                     ^
/home/david/opengv/python/pyopengv.cpp:310:10: error: ‘class opengv::sac::Ransac<opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem>’ has no member named ‘sac_model_’
   ransac.sac_model_ = absposeproblem_ptr;
          ^
/home/david/opengv/python/pyopengv.cpp: In function ‘boost::python::api::object pyopengv::relative_pose::ransac(boost::python::numeric::array&, boost::python::numeric::array&, std::__cxx11::string, double, int)’:
/home/david/opengv/python/pyopengv.cpp:509:3: error: ‘shared_ptr’ is not a member of ‘std’
   std::shared_ptr<CentralRelativePoseSacProblem>
   ^
/home/david/opengv/python/pyopengv.cpp:509:3: note: suggested alternative:
In file included from /usr/include/boost/throw_exception.hpp:42:0,
                 from /usr/include/boost/function/detail/prologue.hpp:15,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /usr/include/boost/python/errors.hpp:13,
                 from /usr/include/boost/python/handle.hpp:11,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/exception/exception.hpp:148:11: note:   ‘boost::shared_ptr’
     class shared_ptr;
           ^
/home/david/opengv/python/pyopengv.cpp:509:48: error: expected primary-expression before ‘>’ token
   std::shared_ptr<CentralRelativePoseSacProblem>
                                                ^
/home/david/opengv/python/pyopengv.cpp:511:62: error: ‘relposeproblem_ptr’ was not declared in this scope
         new CentralRelativePoseSacProblem(adapter, algorithm));
                                                              ^
In file included from /home/david/opengv/python/pyopengv.cpp:8:0:
/home/david/opengv/include/opengv/sac/Ransac.hpp: In instantiation of ‘class opengv::sac::Ransac<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>’:
/home/david/opengv/python/pyopengv.cpp:514:54:   required from here
/home/david/opengv/include/opengv/sac/Ransac.hpp:71:37: error: no members matching ‘opengv::sac::SampleConsensus<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>::sac_model_’ in ‘class opengv::sac::SampleConsensus<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>’
   using SampleConsensus<problem_t>::sac_model_;
                                     ^
/home/david/opengv/python/pyopengv.cpp:516:10: error: ‘class opengv::sac::Ransac<opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem>’ has no member named ‘sac_model_’
   ransac.sac_model_ = relposeproblem_ptr;
          ^
/home/david/opengv/python/pyopengv.cpp: In function ‘boost::python::api::object pyopengv::relative_pose::ransac_rotationOnly(boost::python::numeric::array&, boost::python::numeric::array&, double, int)’:
/home/david/opengv/python/pyopengv.cpp:535:3: error: ‘shared_ptr’ is not a member of ‘std’
   std::shared_ptr<RotationOnlySacProblem>
   ^
/home/david/opengv/python/pyopengv.cpp:535:3: note: suggested alternative:
In file included from /usr/include/boost/throw_exception.hpp:42:0,
                 from /usr/include/boost/function/detail/prologue.hpp:15,
                 from /usr/include/boost/function/function_template.hpp:13,
                 from /usr/include/boost/function/detail/maybe_include.hpp:13,
                 from /usr/include/boost/function/function0.hpp:11,
                 from /usr/include/boost/python/errors.hpp:13,
                 from /usr/include/boost/python/handle.hpp:11,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from /home/david/opengv/python/pyopengv.cpp:1:
/usr/include/boost/exception/exception.hpp:148:11: note:   ‘boost::shared_ptr’
     class shared_ptr;
           ^
/home/david/opengv/python/pyopengv.cpp:535:41: error: expected primary-expression before ‘>’ token
   std::shared_ptr<RotationOnlySacProblem>
                                         ^
/home/david/opengv/python/pyopengv.cpp:537:44: error: ‘relposeproblem_ptr’ was not declared in this scope
         new RotationOnlySacProblem(adapter));
                                            ^
In file included from /home/david/opengv/python/pyopengv.cpp:8:0:
/home/david/opengv/include/opengv/sac/Ransac.hpp: In instantiation of ‘class opengv::sac::Ransac<opengv::sac_problems::relative_pose::RotationOnlySacProblem>’:
/home/david/opengv/python/pyopengv.cpp:540:47:   required from here
/home/david/opengv/include/opengv/sac/Ransac.hpp:71:37: error: no members matching ‘opengv::sac::SampleConsensus<opengv::sac_problems::relative_pose::RotationOnlySacProblem>::sac_model_’ in ‘class opengv::sac::SampleConsensus<opengv::sac_problems::relative_pose::RotationOnlySacProblem>’
   using SampleConsensus<problem_t>::sac_model_;
                                     ^
/home/david/opengv/python/pyopengv.cpp:542:10: error: ‘class opengv::sac::Ransac<opengv::sac_problems::relative_pose::RotationOnlySacProblem>’ has no member named ‘sac_model_’
   ransac.sac_model_ = relposeproblem_ptr;
          ^
In file included from /home/david/opengv/include/opengv/sac/Ransac.hpp:98:0,
                 from /home/david/opengv/python/pyopengv.cpp:8:
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp: In instantiation of ‘bool opengv::sac::Ransac<PROBLEM_T>::computeModel(int) [with PROBLEM_T = opengv::sac_problems::absolute_pose::AbsolutePoseSacProblem]’:
/home/david/opengv/python/pyopengv.cpp:315:23:   required from here
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:68:5: error: ‘sac_model_’ was not declared in this scope
     sac_model_->getSamples( iterations_, selection );
     ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:141:3: error: ‘sac_model_’ was not declared in this scope
   sac_model_->selectWithinDistance( model_coefficients_, threshold_, inliers_ );
   ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp: In instantiation of ‘bool opengv::sac::Ransac<PROBLEM_T>::computeModel(int) [with PROBLEM_T = opengv::sac_problems::relative_pose::CentralRelativePoseSacProblem]’:
/home/david/opengv/python/pyopengv.cpp:521:23:   required from here
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:68:5: error: ‘sac_model_’ was not declared in this scope
     sac_model_->getSamples( iterations_, selection );
     ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:141:3: error: ‘sac_model_’ was not declared in this scope
   sac_model_->selectWithinDistance( model_coefficients_, threshold_, inliers_ );
   ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp: In instantiation of ‘bool opengv::sac::Ransac<PROBLEM_T>::computeModel(int) [with PROBLEM_T = opengv::sac_problems::relative_pose::RotationOnlySacProblem]’:
/home/david/opengv/python/pyopengv.cpp:547:23:   required from here
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:68:5: error: ‘sac_model_’ was not declared in this scope
     sac_model_->getSamples( iterations_, selection );
     ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:141:3: error: ‘sac_model_’ was not declared in this scope
   sac_model_->selectWithinDistance( model_coefficients_, threshold_, inliers_ );
   ^
python/CMakeFiles/pyopengv.dir/build.make:62: recipe for target 'python/CMakeFiles/pyopengv.dir/pyopengv.cpp.o' failed
make[2]: *** [python/CMakeFiles/pyopengv.dir/pyopengv.cpp.o] Error 1
CMakeFiles/Makefile2:159: recipe for target 'python/CMakeFiles/pyopengv.dir/all' failed
make[1]: *** [python/CMakeFiles/pyopengv.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp: In instantiation of ‘bool opengv::sac::Ransac<PROBLEM_T>::computeModel(int) [with PROBLEM_T = opengv::sac_problems::relative_pose::RotationOnlySacProblem]’:
/home/david/opengv/python/pyopengv.cpp:547:23:   required from here
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:68:5: error: ‘sac_model_’ was not declared in this scope
     sac_model_->getSamples( iterations_, selection );
     ^
/home/david/opengv/include/opengv/sac/implementation/Ransac.hpp:141:3: error: ‘sac_model_’ was not declared in this scope
   sac_model_->selectWithinDistance( model_coefficients_, threshold_, inliers_ );
   ^
python/CMakeFiles/pyopengv.dir/build.make:62: recipe for target 'python/CMakeFiles/pyopengv.dir/pyopengv.cpp.o' failed
make[2]: *** [python/CMakeFiles/pyopengv.dir/pyopengv.cpp.o] Error 1
CMakeFiles/Makefile2:159: recipe for target 'python/CMakeFiles/pyopengv.dir/all' failed
make[1]: *** [python/CMakeFiles/pyopengv.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

My guess is either an issue related to: This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. or from reading the log perhaps a problem with boost. Any help would be very appreciated.

Cheers.

package.xml for ROS compatibility?

Hi,
I was wondering if you would be willing to include a package.xml for ROS compatibility. This allows to simply clone your repo into the catkin workspace and compile with no problems. I have an XML I can supply which works directly. I think it is only needed to add an install rule of this file in the CMakeLists.txt, which would also allow for releasing this package into ROS directly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.