ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CSF.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "Cloth.h"
11 #include "wlPointCloud.h"
12 
13 // system
14 #include <string>
15 #include <vector>
16 
18 class QWidget;
19 class ccMesh;
20 
21 class CSF {
22 public:
23  CSF(wl::PointCloud& cloud);
24  virtual ~CSF();
25 
26  // input PC from files
27  bool readPointsFromFile(std::string filename);
28 
29  // save the ground points to file
30  void saveGroundPoints(const std::vector<int>& grp, std::string path = "");
31  void saveOffGroundPoints(const std::vector<int>& grp,
32  std::string path = "");
33 
34  // The main program: Do filtering
35  bool do_filtering(std::vector<int>& groundIndexes,
36  std::vector<int>& offGroundIndexes,
37  bool exportClothMesh,
38  ccMesh*& clothMesh,
39  ecvMainAppInterface* app = 0,
40  QWidget* parent = 0);
41 
42 private:
43  wl::PointCloud& point_cloud;
44 
45 public:
46  struct Parameters {
47  // parameters
49 
51 
52  double time_step;
53 
55 
57 
58  int rigidness;
59 
61  };
62 
64 };
CSF::readPointsFromFile
bool readPointsFromFile(std::string filename)
Definition: CSF.cpp:42
filename
std::string filename
Definition: PointCloudIO.cpp:47
CSF::saveOffGroundPoints
void saveOffGroundPoints(const std::vector< int > &grp, std::string path="")
Definition: CSF.cpp:228
CSF::Parameters::cloth_resolution
double cloth_resolution
Definition: CSF.h:56
CSF::Parameters::rigidness
int rigidness
Definition: CSF.h:58
CSF::Parameters::class_threshold
double class_threshold
Definition: CSF.h:54
CSF::~CSF
virtual ~CSF()
Definition: CSF.cpp:40
CSF::Parameters::k_nearest_points
int k_nearest_points
Definition: CSF.h:48
ecvMainAppInterface
Main application interface (for plugins)
Definition: ecvMainAppInterface.h:24
CSF::Parameters
Definition: CSF.h:46
cloudViewer::t::geometry::path
static const std::string path
Definition: PointCloud.cpp:59
CSF
Definition: CSF.h:21
CSF::do_filtering
bool do_filtering(std::vector< int > &groundIndexes, std::vector< int > &offGroundIndexes, bool exportClothMesh, ccMesh *&clothMesh, ecvMainAppInterface *app=0, QWidget *parent=0)
Definition: CSF.cpp:73
CSF::Parameters::time_step
double time_step
Definition: CSF.h:52
wl::PointCloud
Definition: wlPointCloud.h:28
wlPointCloud.h
ccMesh
Triangular mesh.
Definition: ecvMesh.h:35
CSF::params
Parameters params
Definition: CSF.h:63
CSF::saveGroundPoints
void saveGroundPoints(const std::vector< int > &grp, std::string path="")
Definition: CSF.cpp:211
Cloth.h
CSF::Parameters::iterations
int iterations
Definition: CSF.h:60
CSF::Parameters::bSloopSmooth
bool bSloopSmooth
Definition: CSF.h:50
CSF::CSF
CSF(wl::PointCloud &cloud)
Definition: CSF.cpp:30