Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
肥鼠路易
基于g2o的面特征优化
提交
e2e719e4
基
基于g2o的面特征优化
项目概览
肥鼠路易
/
基于g2o的面特征优化
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
29
列表
看板
标记
里程碑
合并请求
29
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
基
基于g2o的面特征优化
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
29
Issue
29
列表
看板
标记
里程碑
合并请求
29
合并请求
29
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e2e719e4
编写于
6月 22, 2021
作者:
肥鼠路易
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上传新文件
上级
6e6d6feb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
50 addition
and
0 deletion
+50
-0
include/mylib/planar.h
include/mylib/planar.h
+50
-0
未找到文件。
include/mylib/planar.h
0 → 100644
浏览文件 @
e2e719e4
#ifndef PLANE_PLANAR_H
#define PLANE_PLANAR_H
# include <mylib/commen_include.h>
class
Plane
{
public:
//public 修饰的成员变量和函数可以在类的内部和外部访问
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
/* typedef std::shared_ptr<Plane> Ptr;
Plane(){}
Plane(Eigen::Vector3d normal, double dis): normal_(normal), dis_(dis){
HesseToHomogenous(normal_, dis_, homo_para_);
}
Plane(Eigen::Vector4d home_para):homo_para_(home_para){
HomogeneousToHesse(homo_para_, normal_, dis_);
};*/
// 创建立平面上的点
void
createPlanePoints
();
// popular Hesse notation formed by a unit normal vector n and the orthogonal distance to the origin d.
void
HomogeneousToHesse
(
const
Eigen
::
Vector4d
&
homo_para
,
Eigen
::
Vector3d
&
norm
,
double
&
dis
);
// 只要我们是标准化的,正规化的,我们就可以使用n_norm = 1.从Hesse形式转变为面的齐次形式
void
HesseToHomogenous
(
const
Eigen
::
Vector3d
&
norm
,
const
double
&
dis
,
Eigen
::
Vector4d
&
homo_para
);
// 这里是平面的四元数表达法,只需要把Hesse形式进行一个小小的变形就可以得到单位四元数化的平面参数化形式,几何意义不明确
Eigen
::
Quaterniond
HesseToQuaternion
(
Eigen
::
Vector3d
norm
,
double
d
);
// 我们把Hesse单位法向量看成是一个单位圆球上的一点,可以把平面用球坐标参数化
Eigen
::
Vector3d
SpherToHesse
(
const
double
&
phi_
,
const
double
&
theta
,
const
double
&
dis_s
);
private:
// 修饰的成员变量和函数只可以在类的内部访问
//unsigned long id_;
/* Eigen::Vector3d normal_;
normal_ << 1, 1, 1;
double dis_ = 1.0; // hessian form, n^T * pt = d
int num_points_ = 100;
VecVector3d plane_points_;*/
Eigen
::
Vector4d
homo_para_
;
// homogeneous parameters
Eigen
::
Vector3d
normal_
;
double
dis_
;
// hessian form, n^T * pt = d
int
num_points_
=
100
;
VecVector3d
plane_points_
;
//std::vector<int> frame_ids_; // the index of the frame that observes this plane.
};
#endif //PLANE_PLANAR_H
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录