ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
TreeIsoHelper.h File Reference
#include "API.h"
#include "knncpp.h"
#include <Eigen/Dense>
#include <vector>
Include dependency graph for TreeIsoHelper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool perform_cut_pursuit (const uint32_t K, const float regStrength, const std::vector< std::vector< float >> &pc_vec, std::vector< float > &edgeWeight, std::vector< uint32_t > &Eu, std::vector< uint32_t > &Ev, std::vector< uint32_t > &in_component, std::vector< std::vector< uint32_t >> &components)
 
void perform_cut_pursuit2d (const uint32_t K, const float regStrength, const std::vector< std::vector< float >> &pc_vec, std::vector< float > &edgeWeight, std::vector< uint32_t > &Eu, std::vector< uint32_t > &Ev, std::vector< uint32_t > &)
 
template<typename T >
void toTranslatedVector (const ccPointCloud *pc, std::vector< std::vector< T >> &y)
 
template<typename T >
size_t arg_min_col (std::vector< T > &arr)
 
template<typename T >
size_t arg_max_col (std::vector< T > &arr)
 
template<typename T >
void min_col (std::vector< std::vector< T >> &arr, std::vector< T > &)
 
template<typename T >
min_col (std::vector< T > &arr)
 
template<typename T >
void max_col (std::vector< std::vector< T >> &arr, std::vector< T > &)
 
template<typename T >
void mean_col (std::vector< std::vector< T >> &arr, std::vector< T > &)
 
template<typename T >
mean_col (std::vector< T > &arr)
 
template<typename T >
median_col (std::vector< T > &arr)
 
template<typename T >
mode_col (std::vector< T > &arr)
 
template<typename T >
void decimate_vec (std::vector< std::vector< T >> &arr, T res, std::vector< std::vector< T >> &vec_dec)
 
template<typename T >
void unique_group (std::vector< T > &arr, std::vector< std::vector< T >> &u_group, std::vector< T > &arr_unq, std::vector< T > &ui)
 
template<typename T >
void unique_group (std::vector< T > &idx, std::vector< std::vector< T >> &)
 
template<typename T >
void unique_group (std::vector< T > &arr, std::vector< std::vector< T >> &u_group, std::vector< T > &arr_unq)
 
template<typename T >
void unique_index_by_rows (std::vector< std::vector< T >> &arr, std::vector< size_t > &ia, std::vector< size_t > &ic)
 
template<typename T >
void sort_indexes_by_row (std::vector< std::vector< T >> &v, std::vector< size_t > &idx, std::vector< std::vector< T >> &)
 
template<typename ValueType , typename IndexType >
void sort_indexes (std::vector< ValueType > &v, std::vector< IndexType > &idx, std::vector< ValueType > &)
 
template<typename T1 , typename T2 >
void get_subset (const std::vector< std::vector< T1 >> &arr, const std::vector< T2 > &indices, std::vector< std::vector< T1 >> &)
 
template<typename T1 , typename T2 >
void get_subset (const std::vector< std::vector< T1 >> &arr, const std::vector< T2 > &indices, Eigen::MatrixXf &)
 
template<typename T1 , typename T2 >
bool get_subset (ccPointCloud *pcd, std::vector< T2 > &indices, std::vector< std::vector< T1 >> &arr_sub)
 
template<typename T1 , typename T2 >
void get_subset (std::vector< T1 > &arr, std::vector< T2 > &indices, std::vector< T1 > &arr_sub)
 
void knn_cpp_nearest_neighbors (const std::vector< std::vector< float >> &dataset, size_t k, std::vector< std::vector< uint32_t >> &res_idx, std::vector< std::vector< float >> &res_dists, unsigned n_thread)
 
void knn_cpp_build (knncpp::KDTreeMinkowskiX< float, knncpp::EuclideanDistance< float >> &kdtree, unsigned n_thread=0)
 
void knn_cpp_query (knncpp::KDTreeMinkowskiX< float, knncpp::EuclideanDistance< float >> &kdtree, Eigen::MatrixXf &query_points, size_t k, std::vector< std::vector< size_t >> &res_idx, std::vector< std::vector< float >> &res_dists)
 
float knn_cpp_query_min_d (knncpp::KDTreeMinkowskiX< float, knncpp::EuclideanDistance< float >> &kdtree, Eigen::MatrixXf &query_points, size_t k)
 

Function Documentation

◆ arg_max_col()

template<typename T >
size_t arg_max_col ( std::vector< T > &  arr)

Definition at line 1393 of file TreeIso.cpp.

Referenced by TreeIso::Final_seg_pcd().

◆ arg_min_col()

template<typename T >
size_t arg_min_col ( std::vector< T > &  arr)

Definition at line 1386 of file TreeIso.cpp.

Referenced by TreeIso::Final_seg_pcd().

◆ decimate_vec()

template<typename T >
void decimate_vec ( std::vector< std::vector< T >> &  arr,
res,
std::vector< std::vector< T >> &  vec_dec 
)

Definition at line 1501 of file TreeIso.cpp.

References cloudViewer::utility::floor(), and min_col().

Referenced by TreeIso::Init_seg_pcd(), and TreeIso::Intermediate_seg_pcd().

◆ get_subset() [1/4]

template<typename T1 , typename T2 >
bool get_subset ( ccPointCloud pcd,
std::vector< T2 > &  indices,
std::vector< std::vector< T1 >> &  arr_sub 
)

◆ get_subset() [2/4]

template<typename T1 , typename T2 >
void get_subset ( const std::vector< std::vector< T1 >> &  arr,
const std::vector< T2 > &  indices,
Eigen::MatrixXf &  arr_sub 
)

Definition at line 1165 of file TreeIso.cpp.

References size.

◆ get_subset() [3/4]

template<typename T1 , typename T2 >
void get_subset ( const std::vector< std::vector< T1 >> &  arr,
const std::vector< T2 > &  indices,
std::vector< std::vector< T1 >> &  arr_sub 
)

Definition at line 1185 of file TreeIso.cpp.

◆ get_subset() [4/4]

template<typename T1 , typename T2 >
void get_subset ( std::vector< T1 > &  arr,
std::vector< T2 > &  indices,
std::vector< T1 > &  arr_sub 
)

◆ knn_cpp_build()

void knn_cpp_build ( knncpp::KDTreeMinkowskiX< float, knncpp::EuclideanDistance< float >> &  kdtree,
unsigned  n_thread = 0 
)

Definition at line 947 of file TreeIso.cpp.

Referenced by TreeIso::Final_seg_pcd(), and TreeIso::Intermediate_seg_pcd().

◆ knn_cpp_nearest_neighbors()

void knn_cpp_nearest_neighbors ( const std::vector< std::vector< float >> &  dataset,
size_t  k,
std::vector< std::vector< uint32_t >> &  res_idx,
std::vector< std::vector< float >> &  res_dists,
unsigned  n_thread 
)

◆ knn_cpp_query()

void knn_cpp_query ( knncpp::KDTreeMinkowskiX< float, knncpp::EuclideanDistance< float >> &  kdtree,
Eigen::MatrixXf &  query_points,
size_t  k,
std::vector< std::vector< size_t >> &  res_idx,
std::vector< std::vector< float >> &  res_dists 
)

◆ knn_cpp_query_min_d()

float knn_cpp_query_min_d ( knncpp::KDTreeMinkowskiX< float, knncpp::EuclideanDistance< float >> &  kdtree,
Eigen::MatrixXf &  query_points,
size_t  k 
)

Definition at line 983 of file TreeIso.cpp.

Referenced by TreeIso::Intermediate_seg_pcd().

◆ max_col()

template<typename T >
void max_col ( std::vector< std::vector< T >> &  arr,
std::vector< T > &  max_vals 
)

Definition at line 1464 of file TreeIso.cpp.

References max().

Referenced by TreeIso::Final_seg_pcd().

◆ mean_col() [1/2]

template<typename T >
void mean_col ( std::vector< std::vector< T >> &  arr,
std::vector< T > &  mean_vals 
)

Definition at line 1480 of file TreeIso.cpp.

References size.

◆ mean_col() [2/2]

template<typename T >
T mean_col ( std::vector< T > &  arr)

◆ median_col()

template<typename T >
T median_col ( std::vector< T > &  arr)

Definition at line 1437 of file TreeIso.cpp.

Referenced by TreeIso::Final_seg_pcd().

◆ min_col() [1/2]

template<typename T >
void min_col ( std::vector< std::vector< T >> &  arr,
std::vector< T > &  min_vals 
)

Definition at line 1400 of file TreeIso.cpp.

References min().

Referenced by decimate_vec(), and TreeIso::Final_seg_pcd().

◆ min_col() [2/2]

template<typename T >
T min_col ( std::vector< T > &  arr)

Definition at line 1416 of file TreeIso.cpp.

References result.

◆ mode_col()

template<typename T >
T mode_col ( std::vector< T > &  arr)

Definition at line 1453 of file TreeIso.cpp.

Referenced by TreeIso::Final_seg_pcd().

◆ perform_cut_pursuit()

bool perform_cut_pursuit ( const uint32_t  K,
const float  regStrength,
const std::vector< std::vector< float >> &  pc_vec,
std::vector< float > &  edgeWeight,
std::vector< uint32_t > &  Eu,
std::vector< uint32_t > &  Ev,
std::vector< uint32_t > &  in_component,
std::vector< std::vector< uint32_t >> &  components 
)

◆ perform_cut_pursuit2d()

void perform_cut_pursuit2d ( const uint32_t  K,
const float  regStrength,
const std::vector< std::vector< float >> &  pc_vec,
std::vector< float > &  edgeWeight,
std::vector< uint32_t > &  Eu,
std::vector< uint32_t > &  Ev,
std::vector< uint32_t > &   
)

◆ sort_indexes()

template<typename ValueType , typename IndexType >
void sort_indexes ( std::vector< ValueType > &  v,
std::vector< IndexType > &  idx,
std::vector< ValueType > &  v_sorted 
)

Definition at line 1576 of file TreeIso.cpp.

Referenced by TreeIso::Intermediate_seg_pcd(), and unique_group().

◆ sort_indexes_by_row()

template<typename T >
void sort_indexes_by_row ( std::vector< std::vector< T >> &  v,
std::vector< size_t > &  idx,
std::vector< std::vector< T >> &  v_sorted 
)

Definition at line 1531 of file TreeIso.cpp.

Referenced by unique_index_by_rows().

◆ toTranslatedVector()

template<typename T >
void toTranslatedVector ( const ccPointCloud pc,
std::vector< std::vector< T >> &  y 
)

◆ unique_group() [1/3]

template<typename T >
void unique_group ( std::vector< T > &  arr,
std::vector< std::vector< T >> &  u_group,
std::vector< T > &  arr_unq 
)

Definition at line 1079 of file TreeIso.cpp.

References sort_indexes().

◆ unique_group() [2/3]

template<typename T >
void unique_group ( std::vector< T > &  arr,
std::vector< std::vector< T >> &  u_group,
std::vector< T > &  arr_unq,
std::vector< T > &  ui 
)

Definition at line 1034 of file TreeIso.cpp.

References sort_indexes().

Referenced by TreeIso::Final_seg_pcd(), and TreeIso::Intermediate_seg_pcd().

◆ unique_group() [3/3]

template<typename T >
void unique_group ( std::vector< T > &  idx,
std::vector< std::vector< T >> &  u_group 
)

Definition at line 1120 of file TreeIso.cpp.

References sort_indexes().

◆ unique_index_by_rows()

template<typename T >
void unique_index_by_rows ( std::vector< std::vector< T >> &  arr,
std::vector< size_t > &  ia,
std::vector< size_t > &  ic 
)

Definition at line 1601 of file TreeIso.cpp.

References sort_indexes_by_row().

Referenced by TreeIso::Init_seg_pcd(), and TreeIso::Intermediate_seg_pcd().