資源簡介
PnP solvers C++版本,包括P3Pf,Epnp等位姿解算算法,

代碼片段和文件信息
//?Copyright?(c)?2009?V.?Lepetit?EPFL
//?All?rights?reserved.
//?Redistribution?and?use?in?source?and?binary?forms?with?or?without
//?modification?are?permitted?provided?that?the?following?conditions?are?met:?
//?1.?Redistributions?of?source?code?must?retain?the?above?copyright?notice?this
//????list?of?conditions?and?the?following?disclaimer.?
//?2.?Redistributions?in?binary?form?must?reproduce?the?above?copyright?notice
//????this?list?of?conditions?and?the?following?disclaimer?in?the?documentation
//????and/or?other?materials?provided?with?the?distribution.?
//?THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND?CONTRIBUTORS?“AS?IS“?AND
//?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE?IMPLIED
//?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE?ARE
//?DISCLAIMED.?IN?NO?EVENT?SHALL?THE?COPYRIGHT?OWNER?OR?CONTRIBUTORS?BE?LIABLE?FOR
//?ANY?DIRECT?INDIRECT?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES
//?(INCLUDING?BUT?NOT?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES;
//?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)?HOWEVER?CAUSED?AND
//?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT?LIABILITY?OR?TORT
//?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY?OUT?OF?THE?USE?OF?THIS
//?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF?SUCH?DAMAGE.
//?The?views?and?conclusions?contained?in?the?software?and?documentation?are?those
//?of?the?authors?and?should?not?be?interpreted?as?representing?official?policies?
//???either?expressed?or?implied?of?the?FreeBSD?Project.
#include?
#include?
using?namespace?std;
#include?“epnp.h“
//copy?constructor
epnp::epnp(const?epnp&?e)
{
//set_internal_parameters(double?uc?double?vc?double?fu?double?fv)
set_internal_parameters(e.uc?e.vc?e.fu?e.fv);
maximum_number_of_correspondences?=?e.maximum_number_of_correspondences;
number_of_correspondences?=?e.number_of_correspondences;
if?(maximum_number_of_correspondences?>?0){
pws?=?new?double[3?*?maximum_number_of_correspondences];
us?=?new?double[2?*?maximum_number_of_correspondences];
alphas?=?new?double[4?*?maximum_number_of_correspondences];
pcs?=?new?double[3?*?maximum_number_of_correspondences];
}
else{
pws?=?0;
us?=?0;
alphas?=?0;
pcs?=?0;
}
if?(number_of_correspondences?>?0){
const?int?length_unit?=?sizeof(double)*?number_of_correspondences;
std::memcpy(pws?e.pws?3?*?length_unit);
std::memcpy(us?e.us?2?*?length_unit);
std::memcpy(alphas?e.alphas?4?*?length_unit);
std::memcpy(pcs?e.pcs?3?*?length_unit);
}
}
//copy?assignment
epnp&?epnp::operator?=?(const?epnp&?e)
{
set_internal_parameters(e.uc?e.vc?e.fu?e.fv);
if?(this?!=?&e){
if?(maximum_number_of_correspondences? if?(pws?!=?0)?delete[]?pws;
if?(us?!=?0)?delete[]?us;
if?(alphas?!=?0)?delete[]?alphas;
if?(pcs?!=?0)?delete[]?pcs;
maximum_number_of_correspondences?=?e.maximum_number_of_co
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-07-29?07:01??PnP_Solvers-master\
?????文件????????1407??2016-07-29?07:01??PnP_Solvers-master\CMakeLists.txt
?????文件????????1314??2016-07-29?07:01??PnP_Solvers-master\README.md
?????文件????????2493??2016-07-29?07:01??PnP_Solvers-master\camera_pose.cc
?????文件????????6542??2016-07-29?07:01??PnP_Solvers-master\camera_pose.h
?????目錄???????????0??2016-07-29?07:01??PnP_Solvers-master\cmake\
?????文件???????10245??2016-07-29?07:01??PnP_Solvers-master\cmake\OptimizeCompilerFlags.cmake
?????文件????????5074??2016-07-29?07:01??PnP_Solvers-master\eigen_helpers.h
?????目錄???????????0??2016-07-29?07:01??PnP_Solvers-master\epnp\
?????文件?????????295??2016-07-29?07:01??PnP_Solvers-master\epnp\CMakeLists.txt
?????文件???????22714??2016-07-29?07:01??PnP_Solvers-master\epnp\epnp.cpp
?????文件????????4580??2016-07-29?07:01??PnP_Solvers-master\epnp\epnp.h
?????文件????????8451??2016-07-29?07:01??PnP_Solvers-master\epnp_example.cc
?????文件???????????0??2016-07-29?07:01??PnP_Solvers-master\p3p_example.cc
?????目錄???????????0??2016-07-29?07:01??PnP_Solvers-master\p3pf\
?????文件?????????123??2016-07-29?07:01??PnP_Solvers-master\p3pf\CMakeLists.txt
?????文件????????1574??2016-07-29?07:01??PnP_Solvers-master\p3pf\LICENSE
?????文件????????4306??2016-07-29?07:01??PnP_Solvers-master\p3pf\README.txt
?????目錄???????????0??2016-07-29?07:01??PnP_Solvers-master\p3pf\ext\
?????文件?????????761??2016-07-29?07:01??PnP_Solvers-master\p3pf\ext\CMakeLists.txt
?????目錄???????????0??2016-07-29?07:01??PnP_Solvers-master\p3pf\ext\p3p_code_kneip\
?????文件????????9632??2016-07-29?07:01??PnP_Solvers-master\p3pf\ext\p3p_code_kneip\P3p.cpp
?????文件????????3229??2016-07-29?07:01??PnP_Solvers-master\p3pf\ext\p3p_code_kneip\P3p.h
?????文件?????????777??2016-07-29?07:01??PnP_Solvers-master\p3pf\ext\p3p_code_kneip\Readme.txt
?????文件????????6878??2016-07-29?07:01??PnP_Solvers-master\p3pf\ext\p3p_code_kneip\p3p.m
?????文件????????2592??2016-07-29?07:01??PnP_Solvers-master\p3pf\ext\p3p_code_kneip\solveQuartic.m
?????目錄???????????0??2016-07-29?07:01??PnP_Solvers-master\p3pf\src\
?????文件????????1043??2016-07-29?07:01??PnP_Solvers-master\p3pf\src\CMakeLists.txt
?????文件????????5429??2016-07-29?07:01??PnP_Solvers-master\p3pf\src\p3p_solver.cc
?????文件????????5851??2016-07-29?07:01??PnP_Solvers-master\p3pf\src\p3p_solver.h
?????文件???????19585??2016-07-29?07:01??PnP_Solvers-master\p3pf\src\p3pf.cc
............此處省略10個文件信息
評論
共有 條評論