iterative closest points
CEV ICP algorithm library
Loading...
Searching...
No Matches
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
9namespace 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}
Definition geo.cpp:9
Eigen::Vector2d Vector
Definition geo.h:15
Vector get_centroid(const std::vector< Vector > &points)
Definition geo.cpp:10