iterative closest points
CEV ICP algorithm library
Loading...
Searching...
No Matches
src
icp
geo.cpp
Go to the documentation of this file.
1
/*
2
* @author Ethan Uppal
3
* @copyright Copyright (C) 2024 Ethan Uppal. All rights reserved.
4
*/
5
6
#include <numeric>
7
#include "
geo.h
"
8
9
namespace
icp
{
10
Vector
get_centroid
(
const
std::vector<Vector>& points) {
11
Vector
sum = Vector::Zero();
12
for
(
const
Vector
& point: points) {
13
sum += point;
14
}
15
return
sum / points.size();
16
}
17
}
geo.h
icp
Definition
geo.cpp:9
icp::Vector
Eigen::Vector2d Vector
Definition
geo.h:15
icp::get_centroid
Vector get_centroid(const std::vector< Vector > &points)
Definition
geo.cpp:10
Generated by
1.10.0