资源简介
三维重建。跟踪。ORB SLAM2 源码。
代码片段和文件信息
/**
* File: BowVector.cpp
* Date: March 2011
* Author: Dorian Galvez-Lopez
* Description: bag of words vector
* License: see the LICENSE.txt file
*
*/
#include
#include
#include
#include
#include
#include “BowVector.h“
namespace DBoW2 {
// --------------------------------------------------------------------------
BowVector::BowVector(void)
{
}
// --------------------------------------------------------------------------
BowVector::~BowVector(void)
{
}
// --------------------------------------------------------------------------
void BowVector::addWeight(WordId id WordValue v)
{
BowVector::iterator vit = this->lower_bound(id);
if(vit != this->end() && !(this->key_comp()(id vit->first)))
{
vit->second += v;
}
else
{
this->insert(vit BowVector::value_type(id v));
}
}
// --------------------------------------------------------------------------
void BowVector::addIfNotExist(WordId id WordValue v)
{
BowVector::iterator vit = this->lower_bound(id);
if(vit == this->end() || (this->key_comp()(id vit->first)))
{
this->insert(vit BowVector::value_type(id v));
}
}
// --------------------------------------------------------------------------
void BowVector::normalize(LNorm norm_type)
{
double norm = 0.0;
BowVector::iterator it;
if(norm_type == DBoW2::L1)
{
for(it = begin(); it != end(); ++it)
norm += fabs(it->second);
}
else
{
for(it = begin(); it != end(); ++it)
norm += it->second * it->second;
norm = sqrt(norm);
}
if(norm > 0.0)
{
for(it = begin(); it != end(); ++it)
it->second /= norm;
}
}
// --------------------------------------------------------------------------
std::ostream& operator<< (std::ostream &out const BowVector &v)
{
BowVector::const_iterator vit;
std::vector::const_iterator iit;
unsigned int i = 0;
const unsigned int N = v.size();
for(vit = v.begin(); vit != v.end(); ++vit ++i)
{
out << “<“ << vit->first << “ “ << vit->second << “>“;
if(i < N-1) out << “ “;
}
return out;
}
// --------------------------------------------------------------------------
void BowVector::saveM(const std::string &filename size_t W) const
{
std::fstream f(filename.c_str() std::ios::out);
WordId last = 0;
BowVector::const_iterator bit;
for(bit = this->begin(); bit != this->end(); ++bit)
{
for(; last < bit->first; ++last)
{
f << “0 “;
}
f << bit->second << “ “;
last = bit->first + 1;
}
for(; last < (WordId)W; ++last)
f << “0 “;
f.close();
}
// --------------------------------------------------------------------------
} // namespace DBoW2
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-10-11 04:43 ORB_SLAM2-master\
文件 552 2017-10-11 04:43 ORB_SLAM2-master\.gitignore
文件 2932 2017-10-11 04:43 ORB_SLAM2-master\CMakeLists.txt
文件 1789 2017-10-11 04:43 ORB_SLAM2-master\Dependencies.md
目录 0 2017-10-11 04:43 ORB_SLAM2-master\Examples\
目录 0 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\
文件 1855 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC.yaml
目录 0 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\
文件 73640 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\MH01.txt
文件 60800 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\MH02.txt
文件 54000 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\MH03.txt
文件 40660 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\MH04.txt
文件 45460 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\MH05.txt
文件 58240 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\V101.txt
文件 34200 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\V102.txt
文件 42980 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\V103.txt
文件 45600 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\V201.txt
文件 46960 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\V202.txt
文件 38440 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\EuRoC_TimeStamps\V203.txt
文件 1820 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\KITTI00-02.yaml
文件 1821 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\KITTI03.yaml
文件 1822 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\KITTI04-12.yaml
文件 1875 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\TUM1.yaml
文件 1876 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\TUM2.yaml
文件 1813 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\TUM3.yaml
文件 4547 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\mono_euroc.cc
文件 4606 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\mono_kitti.cc
文件 4457 2017-10-11 04:43 ORB_SLAM2-master\Examples\Monocular\mono_tum.cc
目录 0 2017-10-11 04:43 ORB_SLAM2-master\Examples\RGB-D\
文件 2075 2017-10-11 04:43 ORB_SLAM2-master\Examples\RGB-D\TUM1.yaml
文件 2076 2017-10-11 04:43 ORB_SLAM2-master\Examples\RGB-D\TUM2.yaml
............此处省略224个文件信息
相关资源
- JM沟通社交交友app完整源码.zip
- 彩票开发源码.zip
- ecstore2.4源码
- 新版千月在线聚合VIP影视源码app
- LMI 3D相机采图
- 试客系统 试用网站源码 免费试用程序
- 20180704全彩种彩票网站源码.rar
- 完整网站源码+数据库
- 深入理解Nginx模块开发与架构解析第
- 可可通直拨系统完整源码
- 网上商城系统源码
- 图片旋转特效示意源码
- unity全民飞机大战源码.zip
- unity多人类LOL推塔游戏源码.zip
- unity3D战争塔防源码.zip
- 甜品消消乐资源+工程源码
- tc358749xbg数据手册和驱动源码
- 新闻管理系统源码
- Scratch 62节课 教案设计和源码.rar
-
actionsc
ript for multipla yer Games and v - 仿通达OA完整源码
- 小程序商城源码+后台源码
- 冒险岛同步版本登录器源码.rar
- spring in action(第四版 中英文版 带源
- 源码包ZStack-CC2530-2.5.1a最新
- 集成讯飞语音图灵机器人侧滑菜单别
- Maven《实战》许晓斌完整版包含源码
- 凹多边形凸分解源码和使用说明
- H5卡五星棋牌源码
- jdk1.6源码包
评论
共有 条评论