资源简介
CMVS和PMVS的源代码,利用SFM等实现 WINDOWS版
代码片段和文件信息
// This file is part of Eigen a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2013 Gauthier Brun
// Copyright (C) 2013 Nicolas Carre
// Copyright (C) 2013 Jean Ceccato
// Copyright (C) 2013 Pierre Zoppitelli
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file You can obtain one at http://mozilla.org/MPL/2.0/
// Bench to compare the efficiency of SVD algorithms
#include
#include
#include
using namespace Eigen;
using namespace std;
// number of computations of each algorithm before the print of the time
#ifndef REPEAT
#define REPEAT 10
#endif
// number of tests of the same type
#ifndef NUMBER_SAMPLE
#define NUMBER_SAMPLE 2
#endif
template
void bench_svd(const MatrixType& a = MatrixType())
{
MatrixType m = MatrixType::Random(a.rows() a.cols());
BenchTimer timerJacobi;
BenchTimer timerBDC;
timerJacobi.reset();
timerBDC.reset();
cout << “ Only compute Singular Values“ < for (int k=1; k<=NUMBER_SAMPLE; ++k)
{
timerBDC.start();
for (int i=0; i {
BDCSVD bdc_matrix(m);
}
timerBDC.stop();
timerJacobi.start();
for (int i=0; i {
JacobiSVD jacobi_matrix(m);
}
timerJacobi.stop();
cout << “Sample “ << k << “ : “ << REPEAT << “ computations : Jacobi : “ << fixed << timerJacobi.value() << “s “;
cout << “ || “ << “ BDC : “ << timerBDC.value() << “s “ <
if (timerBDC.value() >= timerJacobi.value())
cout << “KO : BDC is “ << timerJacobi.value() / timerBDC.value() << “ times faster than Jacobi“ < else
cout << “OK : BDC is “ << timerJacobi.value() / timerBDC.value() << “ times faster than Jacobi“ <
}
cout << “ =================“ < std::cout<< std::endl;
timerJacobi.reset();
timerBDC.reset();
cout << “ Computes rotaion matrix“ < for (int k=1; k<=NUMBER_SAMPLE; ++k)
{
timerBDC.start();
for (int i=0; i {
BDCSVD bdc_matrix(m ComputeFullU|ComputeFullV);
}
timerBDC.stop();
timerJacobi.start();
for (int i=0; i {
JacobiSVD jacobi_matrix(m ComputeFullU|ComputeFullV);
}
timerJacobi.stop();
cout << “Sample “ << k << “ : “ << REPEAT << “ computations : Jacobi : “ << fixed << timerJacobi.value() << “s “;
cout << “ || “ << “ BDC : “ << timerBDC.value() << “s “ <
if (timerBDC.value() >= timerJacobi.value())
cout << “KO : BDC is “ << timerJacobi.value() / timerBDC.value() << “ times faster than Jacobi“ < else
cout << “OK : BDC is “ << timerJacobi.value() /
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-01-27 20:38 CMVS-PMVS-master\
文件 1032 2017-01-27 20:38 CMVS-PMVS-master\README
文件 1984 2017-01-27 20:38 CMVS-PMVS-master\Readme.txt
目录 0 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\
目录 0 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\OutputLinux32-gcc4.4.1\
文件 947776 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\OutputLinux32-gcc4.4.1\cmvs
文件 30706 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\OutputLinux32-gcc4.4.1\genOption
文件 1305554 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\OutputLinux32-gcc4.4.1\pmvs2
目录 0 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win32-VS2010\
文件 2174 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win32-VS2010\Readme.txt
文件 987648 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win32-VS2010\cmvs.exe
文件 28160 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win32-VS2010\genOption.exe
文件 1396736 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win32-VS2010\pmvs2.exe
目录 0 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win64-VS2010\
文件 2174 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win64-VS2010\Readme.txt
文件 1161728 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win64-VS2010\cmvs.exe
文件 33280 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win64-VS2010\genOption.exe
文件 607568 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win64-VS2010\msvcp100.dll
文件 827728 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win64-VS2010\msvcr100.dll
文件 1678336 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win64-VS2010\pmvs2.exe
文件 296448 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\Win64-VS2010\ws2_32.dll
目录 0 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\mac_osx_fat\
文件 3758828 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\mac_osx_fat\cmvs
文件 44844 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\mac_osx_fat\genOption
文件 4678332 2017-01-27 20:38 CMVS-PMVS-master\binariesWin-Linux\mac_osx_fat\pmvs2
目录 0 2017-01-27 20:38 CMVS-PMVS-master\license\
文件 36 2017-01-27 20:38 CMVS-PMVS-master\license\GPL.readme
文件 1997 2017-01-27 20:38 CMVS-PMVS-master\license\libgfx-license.html
目录 0 2017-01-27 20:38 CMVS-PMVS-master\program\
文件 3084 2017-01-27 20:38 CMVS-PMVS-master\program\CMakeLists.txt
目录 0 2017-01-27 20:38 CMVS-PMVS-master\program\ba
............此处省略3534个文件信息
评论
共有 条评论