Skip to content

Instantly share code, notes, and snippets.


Tharindu Mathew tharindu-mathew

View GitHub Profile
ialhashim / fitting3D.cpp
Created Nov 14, 2014
Fitting 3D points to a plane or a line
View fitting3D.cpp
template<class Vector3>
std::pair<Vector3, Vector3> best_plane_from_points(const std::vector<Vector3> & c)
// copy coordinates to matrix in Eigen format
size_t num_atoms = c.size();
Eigen::Matrix< Vector3::Scalar, Eigen::Dynamic, Eigen::Dynamic > coord(3, num_atoms);
for (size_t i = 0; i < num_atoms; ++i) coord.col(i) = c[i];
// calculate centroid
Vector3 centroid(coord.row(0).mean(), coord.row(1).mean(), coord.row(2).mean());
UnaNancyOwen / PCL1.7.2.props
Last active Sep 1, 2020
Property Sheet for Point Cloud Library
View PCL1.7.2.props
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="">
<ImportGroup Label="PropertySheets"/>
<!-- User Macros -->
<PropertyGroup Label="UserMacros">
<PCL_ROOT Condition="'$(Platform)'=='Win32'">$(ProgramFiles)\PCL 1.7.2</PCL_ROOT>
<PCL_ROOT Condition="'$(Platform)'=='x64'">$(ProgramW6432)\PCL 1.7.2</PCL_ROOT>
You can’t perform that action at this time.