Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
za0612
pcl
提交
424c1c6a
P
pcl
项目概览
za0612
/
pcl
与 Fork 源项目一致
从无法访问的项目Fork
通知
13
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pcl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
424c1c6a
编写于
1月 19, 2021
作者:
K
koide3
提交者:
GitHub
1月 19, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4568 from mvieth/indices_surface
[surface] Use more pcl::Indices and pcl::index_t
上级
851e89f0
bac53760
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
71 addition
and
74 deletion
+71
-74
surface/include/pcl/surface/grid_projection.h
surface/include/pcl/surface/grid_projection.h
+13
-13
surface/include/pcl/surface/impl/concave_hull.hpp
surface/include/pcl/surface/impl/concave_hull.hpp
+1
-1
surface/include/pcl/surface/impl/gp3.hpp
surface/include/pcl/surface/impl/gp3.hpp
+1
-1
surface/include/pcl/surface/impl/grid_projection.hpp
surface/include/pcl/surface/impl/grid_projection.hpp
+16
-17
surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp
surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp
+1
-1
surface/include/pcl/surface/impl/mls.hpp
surface/include/pcl/surface/impl/mls.hpp
+10
-10
surface/include/pcl/surface/impl/surfel_smoothing.hpp
surface/include/pcl/surface/impl/surfel_smoothing.hpp
+3
-3
surface/include/pcl/surface/impl/texture_mapping.hpp
surface/include/pcl/surface/impl/texture_mapping.hpp
+12
-15
surface/include/pcl/surface/mls.h
surface/include/pcl/surface/mls.h
+8
-8
surface/include/pcl/surface/on_nurbs/sequential_fitter.h
surface/include/pcl/surface/on_nurbs/sequential_fitter.h
+1
-1
surface/include/pcl/surface/simplification_remove_unused_vertices.h
...clude/pcl/surface/simplification_remove_unused_vertices.h
+3
-2
surface/include/pcl/surface/texture_mapping.h
surface/include/pcl/surface/texture_mapping.h
+1
-1
surface/src/on_nurbs/sequential_fitter.cpp
surface/src/on_nurbs/sequential_fitter.cpp
+1
-1
未找到文件。
surface/include/pcl/surface/grid_projection.h
浏览文件 @
424c1c6a
...
...
@@ -91,7 +91,7 @@ namespace pcl
{
Leaf
()
{}
std
::
vector
<
int
>
data_indices
;
pcl
::
Indices
data_indices
;
Eigen
::
Vector4f
pt_on_surface
;
Eigen
::
Vector3f
vect_at_grid_pt
;
};
...
...
@@ -315,7 +315,7 @@ namespace pcl
* \param pt_union_indices the union of input data points within the cell and padding cells
*/
void
getDataPtsUnion
(
const
Eigen
::
Vector3i
&
index
,
std
::
vector
<
int
>
&
pt_union_indices
);
getDataPtsUnion
(
const
Eigen
::
Vector3i
&
index
,
pcl
::
Indices
&
pt_union_indices
);
/** \brief Given the index of a cell, exam it's up, left, front edges, and add
* the vectices to m_surface list.the up, left, front edges only share 4
...
...
@@ -324,7 +324,7 @@ namespace pcl
* \param pt_union_indices the union of input data points within the cell and padding cells
*/
void
createSurfaceForCell
(
const
Eigen
::
Vector3i
&
index
,
std
::
vector
<
int
>
&
pt_union_indices
);
createSurfaceForCell
(
const
Eigen
::
Vector3i
&
index
,
pcl
::
Indices
&
pt_union_indices
);
/** \brief Given the coordinates of one point, project it onto the surface,
...
...
@@ -335,7 +335,7 @@ namespace pcl
* \param projection the resultant point projected
*/
void
getProjection
(
const
Eigen
::
Vector4f
&
p
,
std
::
vector
<
int
>
&
pt_union_indices
,
Eigen
::
Vector4f
&
projection
);
getProjection
(
const
Eigen
::
Vector4f
&
p
,
pcl
::
Indices
&
pt_union_indices
,
Eigen
::
Vector4f
&
projection
);
/** \brief Given the coordinates of one point, project it onto the surface,
* return the projected point. Find the plane which fits all the points in
...
...
@@ -346,7 +346,7 @@ namespace pcl
*/
void
getProjectionWithPlaneFit
(
const
Eigen
::
Vector4f
&
p
,
std
::
vector
<
int
>
&
pt_union_indices
,
pcl
::
Indices
&
pt_union_indices
,
Eigen
::
Vector4f
&
projection
);
...
...
@@ -357,7 +357,7 @@ namespace pcl
*/
void
getVectorAtPoint
(
const
Eigen
::
Vector4f
&
p
,
std
::
vector
<
int
>
&
pt_union_indices
,
Eigen
::
Vector3f
&
vo
);
pcl
::
Indices
&
pt_union_indices
,
Eigen
::
Vector3f
&
vo
);
/** \brief Given the location of a point, get it's vector
* \param p the coordinates of the input point
...
...
@@ -368,7 +368,7 @@ namespace pcl
*/
void
getVectorAtPointKNN
(
const
Eigen
::
Vector4f
&
p
,
std
::
vector
<
int
>
&
k_indices
,
pcl
::
Indices
&
k_indices
,
std
::
vector
<
float
>
&
k_squared_distances
,
Eigen
::
Vector3f
&
vo
);
...
...
@@ -377,7 +377,7 @@ namespace pcl
* \param pt_union_indices the union of input data points within the cell and padding cells
*/
double
getMagAtPoint
(
const
Eigen
::
Vector4f
&
p
,
const
std
::
vector
<
int
>
&
pt_union_indices
);
getMagAtPoint
(
const
Eigen
::
Vector4f
&
p
,
const
pcl
::
Indices
&
pt_union_indices
);
/** \brief Get the 1st derivative
* \param p the coordinate of the input point
...
...
@@ -386,7 +386,7 @@ namespace pcl
*/
double
getD1AtPoint
(
const
Eigen
::
Vector4f
&
p
,
const
Eigen
::
Vector3f
&
vec
,
const
std
::
vector
<
int
>
&
pt_union_indices
);
const
pcl
::
Indices
&
pt_union_indices
);
/** \brief Get the 2nd derivative
* \param p the coordinate of the input point
...
...
@@ -395,7 +395,7 @@ namespace pcl
*/
double
getD2AtPoint
(
const
Eigen
::
Vector4f
&
p
,
const
Eigen
::
Vector3f
&
vec
,
const
std
::
vector
<
int
>
&
pt_union_indices
);
const
pcl
::
Indices
&
pt_union_indices
);
/** \brief Test whether the edge is intersected by the surface by
* doing the dot product of the vector at two end points. Also test
...
...
@@ -408,7 +408,7 @@ namespace pcl
bool
isIntersected
(
const
std
::
vector
<
Eigen
::
Vector4f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector4f
>
>
&
end_pts
,
std
::
vector
<
Eigen
::
Vector3f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector3f
>
>
&
vect_at_end_pts
,
std
::
vector
<
int
>
&
pt_union_indices
);
pcl
::
Indices
&
pt_union_indices
);
/** \brief Find point where the edge intersects the surface.
* \param level binary search level
...
...
@@ -423,7 +423,7 @@ namespace pcl
const
std
::
vector
<
Eigen
::
Vector4f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector4f
>
>
&
end_pts
,
const
std
::
vector
<
Eigen
::
Vector3f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector3f
>
>
&
vect_at_end_pts
,
const
Eigen
::
Vector4f
&
start_pt
,
std
::
vector
<
int
>
&
pt_union_indices
,
pcl
::
Indices
&
pt_union_indices
,
Eigen
::
Vector4f
&
intersection
);
/** \brief Go through all the entries in the hash table and update the
...
...
@@ -442,7 +442,7 @@ namespace pcl
*/
void
storeVectAndSurfacePoint
(
int
index_1d
,
const
Eigen
::
Vector3i
&
index_3d
,
std
::
vector
<
int
>
&
pt_union_indices
,
const
Leaf
&
cell_data
);
pcl
::
Indices
&
pt_union_indices
,
const
Leaf
&
cell_data
);
/** \brief Go through all the entries in the hash table and update the cellData.
* When creating the hash table, the pt_on_surface field store the center point
...
...
surface/include/pcl/surface/impl/concave_hull.hpp
浏览文件 @
424c1c6a
...
...
@@ -564,7 +564,7 @@ pcl::ConcaveHull<PointInT>::performReconstruction (PointCloud &alpha_shape, std:
pcl
::
KdTreeFLANN
<
PointInT
>
tree
(
true
);
tree
.
setInputCloud
(
input_
,
indices_
);
std
::
vector
<
int
>
neighbor
;
pcl
::
Indices
neighbor
;
std
::
vector
<
float
>
distances
;
neighbor
.
resize
(
1
);
distances
.
resize
(
1
);
...
...
surface/include/pcl/surface/impl/gp3.hpp
浏览文件 @
424c1c6a
...
...
@@ -83,7 +83,7 @@ pcl::GreedyProjectionTriangulation<PointInT>::reconstructPolygons (std::vector<p
nnn_
=
static_cast
<
int
>
(
indices_
->
size
());
// Variables to hold the results of nearest neighbor searches
std
::
vector
<
int
>
nnIdx
(
nnn_
);
pcl
::
Indices
nnIdx
(
nnn_
);
std
::
vector
<
float
>
sqrDists
(
nnn_
);
// current number of connected components
...
...
surface/include/pcl/surface/impl/grid_projection.hpp
浏览文件 @
424c1c6a
...
...
@@ -144,7 +144,7 @@ pcl::GridProjection<PointNT>::getVertexFromCellCenter (
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
void
pcl
::
GridProjection
<
PointNT
>::
getDataPtsUnion
(
const
Eigen
::
Vector3i
&
index
,
std
::
vector
<
int
>
&
pt_union_indices
)
pcl
::
Indices
&
pt_union_indices
)
{
for
(
int
i
=
index
[
0
]
-
padding_size_
;
i
<=
index
[
0
]
+
padding_size_
;
++
i
)
{
...
...
@@ -170,7 +170,7 @@ pcl::GridProjection<PointNT>::getDataPtsUnion (const Eigen::Vector3i &index,
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
void
pcl
::
GridProjection
<
PointNT
>::
createSurfaceForCell
(
const
Eigen
::
Vector3i
&
index
,
std
::
vector
<
int
>
&
pt_union_indices
)
pcl
::
Indices
&
pt_union_indices
)
{
// 8 vertices of the cell
std
::
vector
<
Eigen
::
Vector4f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector4f
>
>
vertices
(
8
);
...
...
@@ -269,7 +269,7 @@ pcl::GridProjection<PointNT>::createSurfaceForCell (const Eigen::Vector3i &index
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
void
pcl
::
GridProjection
<
PointNT
>::
getProjection
(
const
Eigen
::
Vector4f
&
p
,
std
::
vector
<
int
>
&
pt_union_indices
,
Eigen
::
Vector4f
&
projection
)
pcl
::
Indices
&
pt_union_indices
,
Eigen
::
Vector4f
&
projection
)
{
const
double
projection_distance
=
leaf_size_
*
3
;
std
::
vector
<
Eigen
::
Vector4f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector4f
>
>
end_pt
(
2
);
...
...
@@ -308,7 +308,7 @@ pcl::GridProjection<PointNT>::getProjection (const Eigen::Vector4f &p,
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
void
pcl
::
GridProjection
<
PointNT
>::
getProjectionWithPlaneFit
(
const
Eigen
::
Vector4f
&
p
,
std
::
vector
<
int
>
(
&
pt_union_indices
),
pcl
::
Indices
(
&
pt_union_indices
),
Eigen
::
Vector4f
&
projection
)
{
// Compute the plane coefficients
...
...
@@ -343,7 +343,7 @@ pcl::GridProjection<PointNT>::getProjectionWithPlaneFit (const Eigen::Vector4f &
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
void
pcl
::
GridProjection
<
PointNT
>::
getVectorAtPoint
(
const
Eigen
::
Vector4f
&
p
,
std
::
vector
<
int
>
&
pt_union_indices
,
pcl
::
Indices
&
pt_union_indices
,
Eigen
::
Vector3f
&
vo
)
{
std
::
vector
<
double
>
pt_union_dist
(
pt_union_indices
.
size
());
...
...
@@ -390,7 +390,7 @@ pcl::GridProjection<PointNT>::getVectorAtPoint (const Eigen::Vector4f &p,
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
void
pcl
::
GridProjection
<
PointNT
>::
getVectorAtPointKNN
(
const
Eigen
::
Vector4f
&
p
,
std
::
vector
<
int
>
&
k_indices
,
pcl
::
Indices
&
k_indices
,
std
::
vector
<
float
>
&
k_squared_distances
,
Eigen
::
Vector3f
&
vo
)
{
...
...
@@ -424,10 +424,9 @@ pcl::GridProjection<PointNT>::getVectorAtPointKNN (const Eigen::Vector4f &p,
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
double
pcl
::
GridProjection
<
PointNT
>::
getMagAtPoint
(
const
Eigen
::
Vector4f
&
p
,
const
std
::
vector
<
int
>
&
pt_union_indices
)
const
pcl
::
Indices
&
pt_union_indices
)
{
std
::
vector
<
double
>
pt_union_dist
(
pt_union_indices
.
size
());
std
::
vector
<
double
>
pt_union_weight
(
pt_union_indices
.
size
());
double
sum
=
0.0
;
for
(
std
::
size_t
i
=
0
;
i
<
pt_union_indices
.
size
();
++
i
)
{
...
...
@@ -441,7 +440,7 @@ pcl::GridProjection<PointNT>::getMagAtPoint (const Eigen::Vector4f &p,
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
double
pcl
::
GridProjection
<
PointNT
>::
getD1AtPoint
(
const
Eigen
::
Vector4f
&
p
,
const
Eigen
::
Vector3f
&
vec
,
const
std
::
vector
<
int
>
&
pt_union_indices
)
const
pcl
::
Indices
&
pt_union_indices
)
{
double
sz
=
0.01
*
leaf_size_
;
Eigen
::
Vector3f
v
=
vec
*
static_cast
<
float
>
(
sz
);
...
...
@@ -454,7 +453,7 @@ pcl::GridProjection<PointNT>::getD1AtPoint (const Eigen::Vector4f &p, const Eige
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointNT
>
double
pcl
::
GridProjection
<
PointNT
>::
getD2AtPoint
(
const
Eigen
::
Vector4f
&
p
,
const
Eigen
::
Vector3f
&
vec
,
const
std
::
vector
<
int
>
&
pt_union_indices
)
const
pcl
::
Indices
&
pt_union_indices
)
{
double
sz
=
0.01
*
leaf_size_
;
Eigen
::
Vector3f
v
=
vec
*
static_cast
<
float
>
(
sz
);
...
...
@@ -468,7 +467,7 @@ pcl::GridProjection<PointNT>::getD2AtPoint (const Eigen::Vector4f &p, const Eige
template
<
typename
PointNT
>
bool
pcl
::
GridProjection
<
PointNT
>::
isIntersected
(
const
std
::
vector
<
Eigen
::
Vector4f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector4f
>
>
&
end_pts
,
std
::
vector
<
Eigen
::
Vector3f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector3f
>
>
&
vect_at_end_pts
,
std
::
vector
<
int
>
&
pt_union_indices
)
pcl
::
Indices
&
pt_union_indices
)
{
assert
(
end_pts
.
size
()
==
2
);
assert
(
vect_at_end_pts
.
size
()
==
2
);
...
...
@@ -505,7 +504,7 @@ pcl::GridProjection<PointNT>::findIntersection (int level,
const
std
::
vector
<
Eigen
::
Vector4f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector4f
>
>
&
end_pts
,
const
std
::
vector
<
Eigen
::
Vector3f
,
Eigen
::
aligned_allocator
<
Eigen
::
Vector3f
>
>
&
vect_at_end_pts
,
const
Eigen
::
Vector4f
&
start_pt
,
std
::
vector
<
int
>
&
pt_union_indices
,
pcl
::
Indices
&
pt_union_indices
,
Eigen
::
Vector4f
&
intersection
)
{
assert
(
end_pts
.
size
()
==
2
);
...
...
@@ -574,7 +573,7 @@ pcl::GridProjection<PointNT>::fillPad (const Eigen::Vector3i &index)
template
<
typename
PointNT
>
void
pcl
::
GridProjection
<
PointNT
>::
storeVectAndSurfacePoint
(
int
index_1d
,
const
Eigen
::
Vector3i
&
,
std
::
vector
<
int
>
&
pt_union_indices
,
pcl
::
Indices
&
pt_union_indices
,
const
Leaf
&
cell_data
)
{
// Get point on grid
...
...
@@ -599,7 +598,7 @@ pcl::GridProjection<PointNT>::storeVectAndSurfacePointKNN (int index_1d, const E
cell_center
.
y
()
+
static_cast
<
float
>
(
leaf_size_
)
/
2.0
f
,
cell_center
.
z
()
+
static_cast
<
float
>
(
leaf_size_
)
/
2.0
f
,
0.0
f
);
std
::
vector
<
int
>
k_indices
;
pcl
::
Indices
k_indices
;
k_indices
.
resize
(
k_
);
std
::
vector
<
float
>
k_squared_distances
;
k_squared_distances
.
resize
(
k_
);
...
...
@@ -624,7 +623,7 @@ pcl::GridProjection<PointNT>::reconstructPolygons (std::vector<pcl::Vertices> &p
cell_hash_map_
.
rehash
(
data_
->
size
()
/
static_cast
<
long
unsigned
int
>
(
cell_hash_map_
.
max_load_factor
()));
// Go over all points and insert them into the right leaf
for
(
int
cp
=
0
;
cp
<
static_cast
<
in
t
>
(
data_
->
size
());
++
cp
)
for
(
pcl
::
index_t
cp
=
0
;
cp
<
static_cast
<
pcl
::
index_
t
>
(
data_
->
size
());
++
cp
)
{
// Check if the point is invalid
if
(
!
std
::
isfinite
((
*
data_
)[
cp
].
x
)
||
...
...
@@ -676,7 +675,7 @@ pcl::GridProjection<PointNT>::reconstructPolygons (std::vector<pcl::Vertices> &p
for
(
const
auto
&
entry
:
cell_hash_map_
)
{
getIndexIn3D
(
entry
.
first
,
index
);
std
::
vector
<
int
>
pt_union_indices
;
pcl
::
Indices
pt_union_indices
;
getDataPtsUnion
(
index
,
pt_union_indices
);
// Needs at least 10 points (?)
...
...
@@ -693,7 +692,7 @@ pcl::GridProjection<PointNT>::reconstructPolygons (std::vector<pcl::Vertices> &p
for
(
const
auto
&
entry
:
cell_hash_map_
)
{
getIndexIn3D
(
entry
.
first
,
index
);
std
::
vector
<
int
>
pt_union_indices
;
pcl
::
Indices
pt_union_indices
;
getDataPtsUnion
(
index
,
pt_union_indices
);
// Needs at least 10 points (?)
...
...
surface/include/pcl/surface/impl/marching_cubes_hoppe.hpp
浏览文件 @
424c1c6a
...
...
@@ -61,7 +61,7 @@ pcl::MarchingCubesHoppe<PointNT>::voxelizeData ()
for
(
int
z
=
0
;
z
<
res_z_
;
++
z
)
{
std
::
vector
<
int
>
nn_indices
(
1
,
0
);
pcl
::
Indices
nn_indices
(
1
,
0
);
std
::
vector
<
float
>
nn_sqr_dists
(
1
,
0.0
f
);
const
Eigen
::
Vector3f
point
=
(
lower_boundary_
+
size_voxel_
*
Eigen
::
Array3f
(
x
,
y
,
z
)).
matrix
();
PointNT
p
;
...
...
surface/include/pcl/surface/impl/mls.hpp
浏览文件 @
424c1c6a
...
...
@@ -171,8 +171,8 @@ pcl::MovingLeastSquares<PointInT, PointOutT>::process (PointCloudOut &output)
//////////////////////////////////////////////////////////////////////////////////////////////
template
<
typename
PointInT
,
typename
PointOutT
>
void
pcl
::
MovingLeastSquares
<
PointInT
,
PointOutT
>::
computeMLSPointNormal
(
in
t
index
,
const
std
::
vector
<
int
>
&
nn_indices
,
pcl
::
MovingLeastSquares
<
PointInT
,
PointOutT
>::
computeMLSPointNormal
(
pcl
::
index_
t
index
,
const
pcl
::
Indices
&
nn_indices
,
PointCloudOut
&
projected_points
,
NormalCloud
&
projected_points_normals
,
PointIndices
&
corresponding_input_indices
,
...
...
@@ -249,7 +249,7 @@ pcl::MovingLeastSquares<PointInT, PointOutT>::computeMLSPointNormal (int index,
}
template
<
typename
PointInT
,
typename
PointOutT
>
void
pcl
::
MovingLeastSquares
<
PointInT
,
PointOutT
>::
addProjectedPointNormal
(
in
t
index
,
pcl
::
MovingLeastSquares
<
PointInT
,
PointOutT
>::
addProjectedPointNormal
(
pcl
::
index_
t
index
,
const
Eigen
::
Vector3d
&
point
,
const
Eigen
::
Vector3d
&
normal
,
double
curvature
,
...
...
@@ -305,7 +305,7 @@ pcl::MovingLeastSquares<PointInT, PointOutT>::performProcessing (PointCloudOut &
{
// Allocate enough space to hold the results of nearest neighbor searches
// \note resize is irrelevant for a radiusSearch ().
std
::
vector
<
int
>
nn_indices
;
pcl
::
Indices
nn_indices
;
std
::
vector
<
float
>
nn_sqr_dists
;
// Get the initial estimates of point positions and their neighborhoods
...
...
@@ -381,10 +381,10 @@ pcl::MovingLeastSquares<PointInT, PointOutT>::performUpsampling (PointCloudOut &
// Get 3D position of point
//Eigen::Vector3f pos = (*distinct_cloud_)[dp_i].getVector3fMap ();
std
::
vector
<
int
>
nn_indices
;
pcl
::
Indices
nn_indices
;
std
::
vector
<
float
>
nn_dists
;
tree_
->
nearestKSearch
((
*
distinct_cloud_
)[
dp_i
],
1
,
nn_indices
,
nn_dists
);
int
input_index
=
nn_indices
.
front
();
const
auto
input_index
=
nn_indices
.
front
();
// If the closest point did not have a valid MLS fitting result
// OR if it is too far away from the sampled point
...
...
@@ -418,10 +418,10 @@ pcl::MovingLeastSquares<PointInT, PointOutT>::performUpsampling (PointCloudOut &
p
.
y
=
pos
[
1
];
p
.
z
=
pos
[
2
];
std
::
vector
<
int
>
nn_indices
;
pcl
::
Indices
nn_indices
;
std
::
vector
<
float
>
nn_dists
;
tree_
->
nearestKSearch
(
p
,
1
,
nn_indices
,
nn_dists
);
int
input_index
=
nn_indices
.
front
();
const
auto
input_index
=
nn_indices
.
front
();
// If the closest point did not have a valid MLS fitting result
// OR if it is too far away from the sampled point
...
...
@@ -720,8 +720,8 @@ pcl::MLSResult::projectQueryPoint (ProjectionMethod method, int required_neighbo
template
<
typename
PointT
>
void
pcl
::
MLSResult
::
computeMLSSurface
(
const
pcl
::
PointCloud
<
PointT
>
&
cloud
,
in
t
index
,
const
std
::
vector
<
int
>
&
nn_indices
,
pcl
::
index_
t
index
,
const
pcl
::
Indices
&
nn_indices
,
double
search_radius
,
int
polynomial_order
,
std
::
function
<
double
(
const
double
)
>
weight_func
)
...
...
surface/include/pcl/surface/impl/surfel_smoothing.hpp
浏览文件 @
424c1c6a
...
...
@@ -92,7 +92,7 @@ pcl::SurfelSmoothing<PointT, PointNT>::smoothCloudIteration (PointCloudInPtr &ou
output_normals
=
NormalCloudPtr
(
new
NormalCloud
);
output_normals
->
points
.
resize
(
interm_cloud_
->
size
());
std
::
vector
<
int
>
nn_indices
;
pcl
::
Indices
nn_indices
;
std
::
vector
<
float
>
nn_distances
;
std
::
vector
<
float
>
diffs
(
interm_cloud_
->
size
());
...
...
@@ -171,7 +171,7 @@ pcl::SurfelSmoothing<PointT, PointNT>::smoothPoint (std::size_t &point_index,
float
error_residual
=
error_residual_threshold_
+
1
;
float
last_error_residual
=
error_residual
+
100.0
f
;
std
::
vector
<
int
>
nn_indices
;
pcl
::
Indices
nn_indices
;
std
::
vector
<
float
>
nn_distances
;
int
big_iterations
=
0
;
...
...
@@ -289,7 +289,7 @@ pcl::SurfelSmoothing<PointT, PointNT>::extractSalientFeaturesBetweenScales (Poin
diffs
[
i
]
=
(
*
cloud2_normals
)[
i
].
getNormalVector4fMap
().
dot
((
*
cloud2
)[
i
].
getVector4fMap
()
-
(
*
interm_cloud_
)[
i
].
getVector4fMap
());
std
::
vector
<
int
>
nn_indices
;
pcl
::
Indices
nn_indices
;
std
::
vector
<
float
>
nn_distances
;
output_features
->
resize
(
cloud2
->
size
());
...
...
surface/include/pcl/surface/impl/texture_mapping.hpp
浏览文件 @
424c1c6a
...
...
@@ -371,7 +371,7 @@ pcl::TextureMapping<PointInT>::isPointOccluded (const PointInT &pt, OctreePtr oc
direction
(
1
)
=
pt
.
y
;
direction
(
2
)
=
pt
.
z
;
std
::
vector
<
int
>
indices
;
pcl
::
Indices
indices
;
PointCloudConstPtr
cloud
(
new
PointCloud
());
cloud
=
octree
->
getInputCloud
();
...
...
@@ -405,8 +405,8 @@ pcl::TextureMapping<PointInT>::isPointOccluded (const PointInT &pt, OctreePtr oc
template
<
typename
PointInT
>
void
pcl
::
TextureMapping
<
PointInT
>::
removeOccludedPoints
(
const
PointCloudPtr
&
input_cloud
,
PointCloudPtr
&
filtered_cloud
,
const
double
octree_voxel_size
,
std
::
vector
<
int
>
&
visible_indices
,
std
::
vector
<
int
>
&
occluded_indices
)
const
double
octree_voxel_size
,
pcl
::
Indices
&
visible_indices
,
pcl
::
Indices
&
occluded_indices
)
{
// variable used to filter occluded points by depth
double
maxDeltaZ
=
octree_voxel_size
;
...
...
@@ -424,7 +424,7 @@ pcl::TextureMapping<PointInT>::removeOccludedPoints (const PointCloudPtr &input_
// for each point of the cloud, raycast toward camera and check intersected voxels.
Eigen
::
Vector3f
direction
;
std
::
vector
<
int
>
indices
;
pcl
::
Indices
indices
;
for
(
std
::
size_t
i
=
0
;
i
<
input_cloud
->
size
();
++
i
)
{
direction
(
0
)
=
(
*
input_cloud
)[
i
].
x
;
...
...
@@ -455,11 +455,11 @@ pcl::TextureMapping<PointInT>::removeOccludedPoints (const PointCloudPtr &input_
{
// point is added in the filtered mesh
filtered_cloud
->
points
.
push_back
((
*
input_cloud
)[
i
]);
visible_indices
.
push_back
(
static_cast
<
in
t
>
(
i
));
visible_indices
.
push_back
(
static_cast
<
pcl
::
index_
t
>
(
i
));
}
else
{
occluded_indices
.
push_back
(
static_cast
<
in
t
>
(
i
));
occluded_indices
.
push_back
(
static_cast
<
pcl
::
index_
t
>
(
i
));
}
}
...
...
@@ -478,7 +478,7 @@ pcl::TextureMapping<PointInT>::removeOccludedPoints (const pcl::TextureMesh &tex
// load points into a PCL format
pcl
::
fromPCLPointCloud2
(
tex_mesh
.
cloud
,
*
cloud
);
std
::
vector
<
int
>
visible
,
occluded
;
pcl
::
Indices
visible
,
occluded
;
removeOccludedPoints
(
cloud
,
filtered_cloud
,
octree_voxel_size
,
visible
,
occluded
);
// Now that we know which points are visible, let's iterate over each face.
...
...
@@ -492,14 +492,11 @@ pcl::TextureMapping<PointInT>::removeOccludedPoints (const pcl::TextureMesh &tex
{
// check if all the face's points are visible
bool
faceIsVisible
=
true
;
std
::
vector
<
int
>::
iterator
it
;
// iterate over face's vertex
for
(
const
auto
&
vertex
:
tex_mesh
.
tex_polygons
[
polygons
][
faces
].
vertices
)
{
it
=
find
(
occluded
.
begin
(),
occluded
.
end
(),
vertex
);
if
(
it
==
occluded
.
end
())
if
(
find
(
occluded
.
begin
(),
occluded
.
end
(),
vertex
)
==
occluded
.
end
())
{
// point is not in the occluded vector
// PCL_INFO (" VISIBLE!\n");
...
...
@@ -531,7 +528,7 @@ pcl::TextureMapping<PointInT>::removeOccludedPoints (const pcl::TextureMesh &tex
// load points into a PCL format
pcl
::
fromPCLPointCloud2
(
tex_mesh
.
cloud
,
*
cloud
);
std
::
vector
<
int
>
visible
,
occluded
;
pcl
::
Indices
visible
,
occluded
;
removeOccludedPoints
(
cloud
,
filtered_cloud
,
octree_voxel_size
,
visible
,
occluded
);
}
...
...
@@ -576,7 +573,7 @@ pcl::TextureMapping<PointInT>::sortFacesByCamera (pcl::TextureMesh &tex_mesh, pc
pcl
::
transformPointCloud
(
*
original_cloud
,
*
transformed_cloud
,
cam_trans
.
inverse
());
// find occlusions on transformed cloud
std
::
vector
<
int
>
visible
,
occluded
;
pcl
::
Indices
visible
,
occluded
;
removeOccludedPoints
(
transformed_cloud
,
filtered_cloud
,
octree_voxel_size
,
visible
,
occluded
);
visible_pts
=
*
filtered_cloud
;
...
...
@@ -644,7 +641,7 @@ pcl::TextureMapping<PointInT>::showOcclusions (const PointCloudPtr &input_cloud,
// ray direction
Eigen
::
Vector3f
direction
;
std
::
vector
<
int
>
indices
;
pcl
::
Indices
indices
;
// point from where we ray-trace
pcl
::
PointXYZI
pt
;
...
...
@@ -806,7 +803,7 @@ pcl::TextureMapping<PointInT>::textureMeshwithMultipleCameras (pcl::TextureMesh
pcl
::
KdTreeFLANN
<
pcl
::
PointXY
>
kdtree
;
kdtree
.
setInputCloud
(
projections
);
std
::
vector
<
int
>
idxNeighbors
;
pcl
::
Indices
idxNeighbors
;
std
::
vector
<
float
>
neighborsSquaredDistance
;
// af first (idx_pcan < current_cam), check if some of the faces attached to previous cameras occlude the current faces
// then (idx_pcam == current_cam), check for self occlusions. At this stage, we skip faces that were already marked as occluded
...
...
surface/include/pcl/surface/mls.h
浏览文件 @
424c1c6a
...
...
@@ -205,8 +205,8 @@ namespace pcl
*/
template
<
typename
PointT
>
void
computeMLSSurface
(
const
pcl
::
PointCloud
<
PointT
>
&
cloud
,
in
t
index
,
const
std
::
vector
<
int
>
&
nn_indices
,
pcl
::
index_
t
index
,
const
pcl
::
Indices
&
nn_indices
,
double
search_radius
,
int
polynomial_order
=
2
,
std
::
function
<
double
(
const
double
)
>
weight_func
=
{});
...
...
@@ -273,7 +273,7 @@ namespace pcl
using
PointCloudInPtr
=
typename
PointCloudIn
::
Ptr
;
using
PointCloudInConstPtr
=
typename
PointCloudIn
::
ConstPtr
;
using
SearchMethod
=
std
::
function
<
int
(
int
,
double
,
std
::
vector
<
int
>
&
,
std
::
vector
<
float
>
&
)
>
;
using
SearchMethod
=
std
::
function
<
int
(
pcl
::
index_t
,
double
,
pcl
::
Indices
&
,
std
::
vector
<
float
>
&
)
>
;
enum
UpsamplingMethod
{
...
...
@@ -331,7 +331,7 @@ namespace pcl
{
tree_
=
tree
;
// Declare the search locator definition
search_method_
=
[
this
]
(
int
index
,
double
radius
,
std
::
vector
<
int
>
&
k_indices
,
std
::
vector
<
float
>&
k_sqr_distances
)
search_method_
=
[
this
]
(
pcl
::
index_t
index
,
double
radius
,
pcl
::
Indices
&
k_indices
,
std
::
vector
<
float
>&
k_sqr_distances
)
{
return
tree_
->
radiusSearch
(
index
,
radius
,
k_indices
,
k_sqr_distances
,
0
);
};
...
...
@@ -645,7 +645,7 @@ namespace pcl
* \param[out] sqr_distances the resultant squared distances from the query point to the neighbors within search_radius_
*/
inline
int
searchForNeighbors
(
int
index
,
std
::
vector
<
int
>
&
indices
,
std
::
vector
<
float
>
&
sqr_distances
)
const
searchForNeighbors
(
pcl
::
index_t
index
,
pcl
::
Indices
&
indices
,
std
::
vector
<
float
>
&
sqr_distances
)
const
{
return
(
search_method_
(
index
,
search_radius_
,
indices
,
sqr_distances
));
}
...
...
@@ -662,8 +662,8 @@ namespace pcl
* (used only in the case of VOXEL_GRID_DILATION or DISTINCT_CLOUD upsampling)
*/
void
computeMLSPointNormal
(
in
t
index
,
const
std
::
vector
<
int
>
&
nn_indices
,
computeMLSPointNormal
(
pcl
::
index_
t
index
,
const
pcl
::
Indices
&
nn_indices
,
PointCloudOut
&
projected_points
,
NormalCloud
&
projected_points_normals
,
PointIndices
&
corresponding_input_indices
,
...
...
@@ -680,7 +680,7 @@ namespace pcl
* \param[out] corresponding_input_indices the set of indices with each point in output having the corresponding point in input
*/
void
addProjectedPointNormal
(
in
t
index
,
addProjectedPointNormal
(
pcl
::
index_
t
index
,
const
Eigen
::
Vector3d
&
point
,
const
Eigen
::
Vector3d
&
normal
,
double
curvature
,
...
...
surface/include/pcl/surface/on_nurbs/sequential_fitter.h
浏览文件 @
424c1c6a
...
...
@@ -217,7 +217,7 @@ namespace pcl
/** \brief Convert point-cloud */
static
unsigned
PCL2ON
(
pcl
::
PointCloud
<
pcl
::
PointXYZRGB
>::
Ptr
&
pcl_cloud
,
const
std
::
vector
<
int
>
&
indices
,
vector_vec3d
&
cloud
);
PCL2ON
(
pcl
::
PointCloud
<
pcl
::
PointXYZRGB
>::
Ptr
&
pcl_cloud
,
const
pcl
::
Indices
&
indices
,
vector_vec3d
&
cloud
);
public:
PCL_MAKE_ALIGNED_OPERATOR_NEW
...
...
surface/include/pcl/surface/simplification_remove_unused_vertices.h
浏览文件 @
424c1c6a
...
...
@@ -40,6 +40,7 @@
#include <vector> // for vector
#include <pcl/memory.h>
#include <pcl/pcl_macros.h>
#include <pcl/types.h> // for pcl::Indices
namespace
pcl
{
...
...
@@ -65,7 +66,7 @@ namespace pcl
inline
void
simplify
(
const
pcl
::
PolygonMesh
&
input
,
pcl
::
PolygonMesh
&
output
)
{
std
::
vector
<
int
>
indices
;
pcl
::
Indices
indices
;
simplify
(
input
,
output
,
indices
);
}
...
...
@@ -75,7 +76,7 @@ namespace pcl
* \param[out] indices the resultant vector of indices
*/
void
simplify
(
const
pcl
::
PolygonMesh
&
input
,
pcl
::
PolygonMesh
&
output
,
std
::
vector
<
int
>
&
indices
);
simplify
(
const
pcl
::
PolygonMesh
&
input
,
pcl
::
PolygonMesh
&
output
,
pcl
::
Indices
&
indices
);
};
}
...
...
surface/include/pcl/surface/texture_mapping.h
浏览文件 @
424c1c6a
...
...
@@ -257,7 +257,7 @@ namespace pcl
void
removeOccludedPoints
(
const
PointCloudPtr
&
input_cloud
,
PointCloudPtr
&
filtered_cloud
,
const
double
octree_voxel_size
,
std
::
vector
<
int
>
&
visible_indices
,
std
::
vector
<
int
>
&
occluded_indices
);
pcl
::
Indices
&
visible_indices
,
pcl
::
Indices
&
occluded_indices
);
/** \brief Remove occluded points from a textureMesh
* \param[in] tex_mesh input mesh, on witch to perform occlusion detection
...
...
surface/src/on_nurbs/sequential_fitter.cpp
浏览文件 @
424c1c6a
...
...
@@ -605,7 +605,7 @@ SequentialFitter::grow (float max_dist, float max_angle, unsigned min_length, un
}
unsigned
SequentialFitter
::
PCL2ON
(
pcl
::
PointCloud
<
pcl
::
PointXYZRGB
>::
Ptr
&
pcl_cloud
,
const
std
::
vector
<
int
>
&
indices
,
SequentialFitter
::
PCL2ON
(
pcl
::
PointCloud
<
pcl
::
PointXYZRGB
>::
Ptr
&
pcl_cloud
,
const
pcl
::
Indices
&
indices
,
vector_vec3d
&
on_cloud
)
{
std
::
size_t
numPoints
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录