资源简介
For the VINS mobile of the slam , I just push up to csdn to backup
代码片段和文件信息
/**
* 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-12-26 04:19 VINS-Mobile-master\
文件 454 2017-12-26 04:19 VINS-Mobile-master\.gitignore
文件 35140 2017-12-26 04:19 VINS-Mobile-master\LICENSE
文件 4024 2017-12-26 04:19 VINS-Mobile-master\README.md
目录 0 2017-12-26 04:19 VINS-Mobile-master\Resources\
文件 81074608 2017-12-26 04:19 VINS-Mobile-master\Resources\boost.a
文件 60030120 2017-12-26 04:19 VINS-Mobile-master\Resources\brief_k10L6.bin
文件 6977 2017-12-26 04:19 VINS-Mobile-master\Resources\brief_pattern.yml
文件 2123528 2017-12-26 04:19 VINS-Mobile-master\Resources\libjpeg.a
目录 0 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\
目录 0 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\
文件 2752 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\BowVector.cpp
文件 1885 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\BowVector.h
文件 2230 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\DBoW2.h
文件 2382 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\FBrief.cpp
文件 1597 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\FBrief.h
文件 1642 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\FClass.h
文件 1831 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\FeatureVector.cpp
文件 1080 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\FeatureVector.h
文件 1384 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\QueryResults.cpp
文件 4142 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\QueryResults.h
文件 7890 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\Scoringob
文件 2449 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\Scoringob
文件 37670 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\TemplatedDataba
文件 41407 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DBoW\TemplatedVocabulary.h
目录 0 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DUtils\
文件 1079 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DUtils\DException.h
文件 1056 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DUtils\DUtils.h
文件 2886 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DUtils\Random.cpp
文件 3690 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DUtils\Random.h
文件 5117 2017-12-26 04:19 VINS-Mobile-master\ThirdParty\DUtils\Timestamp.cpp
............此处省略1215个文件信息
- 上一篇:计算机网络自顶向下中文第6版.pdf
- 下一篇:802.11权威指南
相关资源
- 汉王考勤机开发指南HANVON SDK 20141119
- 达梦数据库JDBC驱动包
- spring4.3.20版本
- solr4.3的IK分词器
- apache-maven-3.3.9-bin.tar.gz 安装包
- Inno Setup5.5.9 中文汉化绿色版
- hibernate-3.0.zip
- Access_JDBC30.jar 完全破解版
- exe4j工具及使用教程
- introductory statistics with R中文第二版
- apache-camel-1.2.0-src.tar.gz
- hivelib地址
- com.genuitec.eclipse.export.wizard_9.0.0.me201
- Zxing3.1版
- miglayout15-swing
- com.google.common.collect
- spire.pdf破解版
- XposedBridge54-89所有api
- 基于netty和RXTXCom.jar实现的串口通信
- excel模板所需jar:commons-jexl-2.1.1.jar 和
- spring3.2.18源码所需要的jar:spring-asm-r
- commons-collections-3.2.1.jar
- 查看jar源码插件jd-eclipse-2.0.0
- SoapUI Pro 5.1.2破解jar包与注册文件
- jxl.jar完整包
- aopalliance最新完整jar包
- JNA需要的jar包资源
- mpandrodchartlibrary.jar
- ibatis-2.3.0.677 jar 包 ibatis
- tomcat-redis-session-manager的jar包-包附To
评论
共有 条评论