Point Cloud Library (PCL)  1.9.1-dev
gp3.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010-2011, Willow Garage, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of Willow Garage, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  * $Id$
37  *
38  */
39 
40 #pragma once
41 
42 // PCL includes
43 #include <pcl/surface/reconstruction.h>
44 #include <pcl/surface/boost.h>
45 
46 #include <pcl/conversions.h>
47 #include <pcl/kdtree/kdtree.h>
48 #include <pcl/PolygonMesh.h>
49 
50 #include <fstream>
51 #include <iostream>
52 
53 
54 
55 namespace pcl
56 {
57  /** \brief Returns if a point X is visible from point R (or the origin)
58  * when taking into account the segment between the points S1 and S2
59  * \param X 2D coordinate of the point
60  * \param S1 2D coordinate of the segment's first point
61  * \param S2 2D coordinate of the segment's second point
62  * \param R 2D coordinate of the reference point (defaults to 0,0)
63  * \ingroup surface
64  */
65  inline bool
66  isVisible (const Eigen::Vector2f &X, const Eigen::Vector2f &S1, const Eigen::Vector2f &S2,
67  const Eigen::Vector2f &R = Eigen::Vector2f::Zero ())
68  {
69  double a0 = S1[1] - S2[1];
70  double b0 = S2[0] - S1[0];
71  double c0 = S1[0]*S2[1] - S2[0]*S1[1];
72  double a1 = -X[1];
73  double b1 = X[0];
74  double c1 = 0;
75  if (R != Eigen::Vector2f::Zero())
76  {
77  a1 += R[1];
78  b1 -= R[0];
79  c1 = R[0]*X[1] - X[0]*R[1];
80  }
81  double div = a0*b1 - b0*a1;
82  double x = (b0*c1 - b1*c0) / div;
83  double y = (a1*c0 - a0*c1) / div;
84 
85  bool intersection_outside_XR;
86  if (R == Eigen::Vector2f::Zero())
87  {
88  if (X[0] > 0)
89  intersection_outside_XR = (x <= 0) || (x >= X[0]);
90  else if (X[0] < 0)
91  intersection_outside_XR = (x >= 0) || (x <= X[0]);
92  else if (X[1] > 0)
93  intersection_outside_XR = (y <= 0) || (y >= X[1]);
94  else if (X[1] < 0)
95  intersection_outside_XR = (y >= 0) || (y <= X[1]);
96  else
97  intersection_outside_XR = true;
98  }
99  else
100  {
101  if (X[0] > R[0])
102  intersection_outside_XR = (x <= R[0]) || (x >= X[0]);
103  else if (X[0] < R[0])
104  intersection_outside_XR = (x >= R[0]) || (x <= X[0]);
105  else if (X[1] > R[1])
106  intersection_outside_XR = (y <= R[1]) || (y >= X[1]);
107  else if (X[1] < R[1])
108  intersection_outside_XR = (y >= R[1]) || (y <= X[1]);
109  else
110  intersection_outside_XR = true;
111  }
112  if (intersection_outside_XR)
113  return true;
114  else
115  {
116  if (S1[0] > S2[0])
117  return (x <= S2[0]) || (x >= S1[0]);
118  else if (S1[0] < S2[0])
119  return (x >= S2[0]) || (x <= S1[0]);
120  else if (S1[1] > S2[1])
121  return (y <= S2[1]) || (y >= S1[1]);
122  else if (S1[1] < S2[1])
123  return (y >= S2[1]) || (y <= S1[1]);
124  else
125  return false;
126  }
127  }
128 
129  /** \brief GreedyProjectionTriangulation is an implementation of a greedy triangulation algorithm for 3D points
130  * based on local 2D projections. It assumes locally smooth surfaces and relatively smooth transitions between
131  * areas with different point densities.
132  * \author Zoltan Csaba Marton
133  * \ingroup surface
134  */
135  template <typename PointInT>
137  {
138  public:
139  typedef boost::shared_ptr<GreedyProjectionTriangulation<PointInT> > Ptr;
140  typedef boost::shared_ptr<const GreedyProjectionTriangulation<PointInT> > ConstPtr;
141 
145 
147  typedef typename KdTree::Ptr KdTreePtr;
148 
152 
153  enum GP3Type
154  {
155  NONE = -1, // not-defined
156  FREE = 0,
157  FRINGE = 1,
158  BOUNDARY = 2,
160  };
161 
162  /** \brief Empty constructor. */
164  mu_ (0),
165  search_radius_ (0), // must be set by user
166  nnn_ (100),
167  minimum_angle_ (M_PI/18), // 10 degrees
168  maximum_angle_ (2*M_PI/3), // 120 degrees
169  eps_angle_(M_PI/4), //45 degrees,
170  consistent_(false),
171  consistent_ordering_ (false),
172  triangle_ (),
173  coords_ (),
174  angles_ (),
175  R_ (),
176  state_ (),
177  source_ (),
178  ffn_ (),
179  sfn_ (),
180  part_ (),
181  fringe_queue_ (),
182  is_current_free_ (false),
183  current_index_ (),
184  prev_is_ffn_ (false),
185  prev_is_sfn_ (false),
186  next_is_ffn_ (false),
187  next_is_sfn_ (false),
188  changed_1st_fn_ (false),
189  changed_2nd_fn_ (false),
190  new2boundary_ (),
191  already_connected_ (false),
192  proj_qp_ (),
193  u_ (),
194  v_ (),
195  uvn_ffn_ (),
196  uvn_sfn_ (),
197  uvn_next_ffn_ (),
198  uvn_next_sfn_ (),
199  tmp_ ()
200  {};
201 
202  /** \brief Set the multiplier of the nearest neighbor distance to obtain the final search radius for each point
203  * (this will make the algorithm adapt to different point densities in the cloud).
204  * \param[in] mu the multiplier
205  */
206  inline void
207  setMu (double mu) { mu_ = mu; }
208 
209  /** \brief Get the nearest neighbor distance multiplier. */
210  inline double
211  getMu () const { return (mu_); }
212 
213  /** \brief Set the maximum number of nearest neighbors to be searched for.
214  * \param[in] nnn the maximum number of nearest neighbors
215  */
216  inline void
217  setMaximumNearestNeighbors (int nnn) { nnn_ = nnn; }
218 
219  /** \brief Get the maximum number of nearest neighbors to be searched for. */
220  inline int
221  getMaximumNearestNeighbors () const { return (nnn_); }
222 
223  /** \brief Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulating.
224  * \param[in] radius the sphere radius that is to contain all k-nearest neighbors
225  * \note This distance limits the maximum edge length!
226  */
227  inline void
228  setSearchRadius (double radius) { search_radius_ = radius; }
229 
230  /** \brief Get the sphere radius used for determining the k-nearest neighbors. */
231  inline double
232  getSearchRadius () const { return (search_radius_); }
233 
234  /** \brief Set the minimum angle each triangle should have.
235  * \param[in] minimum_angle the minimum angle each triangle should have
236  * \note As this is a greedy approach, this will have to be violated from time to time
237  */
238  inline void
239  setMinimumAngle (double minimum_angle) { minimum_angle_ = minimum_angle; }
240 
241  /** \brief Get the parameter for distance based weighting of neighbors. */
242  inline double
243  getMinimumAngle () const { return (minimum_angle_); }
244 
245  /** \brief Set the maximum angle each triangle can have.
246  * \param[in] maximum_angle the maximum angle each triangle can have
247  * \note For best results, its value should be around 120 degrees
248  */
249  inline void
250  setMaximumAngle (double maximum_angle) { maximum_angle_ = maximum_angle; }
251 
252  /** \brief Get the parameter for distance based weighting of neighbors. */
253  inline double
254  getMaximumAngle () const { return (maximum_angle_); }
255 
256  /** \brief Don't consider points for triangulation if their normal deviates more than this value from the query point's normal.
257  * \param[in] eps_angle maximum surface angle
258  * \note As normal estimation methods usually give smooth transitions at sharp edges, this ensures correct triangulation
259  * by avoiding connecting points from one side to points from the other through forcing the use of the edge points.
260  */
261  inline void
262  setMaximumSurfaceAngle (double eps_angle) { eps_angle_ = eps_angle; }
263 
264  /** \brief Get the maximum surface angle. */
265  inline double
266  getMaximumSurfaceAngle () const { return (eps_angle_); }
267 
268  /** \brief Set the flag if the input normals are oriented consistently.
269  * \param[in] consistent set it to true if the normals are consistently oriented
270  */
271  inline void
272  setNormalConsistency (bool consistent) { consistent_ = consistent; }
273 
274  /** \brief Get the flag for consistently oriented normals. */
275  inline bool
276  getNormalConsistency () const { return (consistent_); }
277 
278  /** \brief Set the flag to order the resulting triangle vertices consistently (positive direction around normal).
279  * @note Assumes consistently oriented normals (towards the viewpoint) -- see setNormalConsistency ()
280  * \param[in] consistent_ordering set it to true if triangle vertices should be ordered consistently
281  */
282  inline void
283  setConsistentVertexOrdering (bool consistent_ordering) { consistent_ordering_ = consistent_ordering; }
284 
285  /** \brief Get the flag signaling consistently ordered triangle vertices. */
286  inline bool
288 
289  /** \brief Get the state of each point after reconstruction.
290  * \note Options are defined as constants: FREE, FRINGE, COMPLETED, BOUNDARY and NONE
291  */
292  inline std::vector<int>
293  getPointStates () const { return (state_); }
294 
295  /** \brief Get the ID of each point after reconstruction.
296  * \note parts are numbered from 0, a -1 denotes unconnected points
297  */
298  inline std::vector<int>
299  getPartIDs () const { return (part_); }
300 
301 
302  /** \brief Get the sfn list. */
303  inline std::vector<int>
304  getSFN () const { return (sfn_); }
305 
306  /** \brief Get the ffn list. */
307  inline std::vector<int>
308  getFFN () const { return (ffn_); }
309 
310  protected:
311  /** \brief The nearest neighbor distance multiplier to obtain the final search radius. */
312  double mu_;
313 
314  /** \brief The nearest neighbors search radius for each point and the maximum edge length. */
316 
317  /** \brief The maximum number of nearest neighbors accepted by searching. */
318  int nnn_;
319 
320  /** \brief The preferred minimum angle for the triangles. */
322 
323  /** \brief The maximum angle for the triangles. */
325 
326  /** \brief Maximum surface angle. */
327  double eps_angle_;
328 
329  /** \brief Set this to true if the normals of the input are consistently oriented. */
331 
332  /** \brief Set this to true if the output triangle vertices should be consistently oriented. */
334 
335  private:
336  /** \brief Struct for storing the angles to nearest neighbors **/
337  struct nnAngle
338  {
339  double angle;
340  int index;
341  int nnIndex;
342  bool visible;
343  };
344 
345  /** \brief Struct for storing the edges starting from a fringe point **/
346  struct doubleEdge
347  {
348  doubleEdge () : index (0), first (), second () {}
349  int index;
350  Eigen::Vector2f first;
351  Eigen::Vector2f second;
352  };
353 
354  // Variables made global to decrease the number of parameters to helper functions
355 
356  /** \brief Temporary variable to store a triangle (as a set of point indices) **/
357  pcl::Vertices triangle_;
358  /** \brief Temporary variable to store point coordinates **/
359  std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > coords_;
360 
361  /** \brief A list of angles to neighbors **/
362  std::vector<nnAngle> angles_;
363  /** \brief Index of the current query point **/
364  int R_;
365  /** \brief List of point states **/
366  std::vector<int> state_;
367  /** \brief List of sources **/
368  std::vector<int> source_;
369  /** \brief List of fringe neighbors in one direction **/
370  std::vector<int> ffn_;
371  /** \brief List of fringe neighbors in other direction **/
372  std::vector<int> sfn_;
373  /** \brief Connected component labels for each point **/
374  std::vector<int> part_;
375  /** \brief Points on the outer edge from which the mesh has to be grown **/
376  std::vector<int> fringe_queue_;
377 
378  /** \brief Flag to set if the current point is free **/
379  bool is_current_free_;
380  /** \brief Current point's index **/
381  int current_index_;
382  /** \brief Flag to set if the previous point is the first fringe neighbor **/
383  bool prev_is_ffn_;
384  /** \brief Flag to set if the next point is the second fringe neighbor **/
385  bool prev_is_sfn_;
386  /** \brief Flag to set if the next point is the first fringe neighbor **/
387  bool next_is_ffn_;
388  /** \brief Flag to set if the next point is the second fringe neighbor **/
389  bool next_is_sfn_;
390  /** \brief Flag to set if the first fringe neighbor was changed **/
391  bool changed_1st_fn_;
392  /** \brief Flag to set if the second fringe neighbor was changed **/
393  bool changed_2nd_fn_;
394  /** \brief New boundary point **/
395  int new2boundary_;
396 
397  /** \brief Flag to set if the next neighbor was already connected in the previous step.
398  * To avoid inconsistency it should not be connected again.
399  */
400  bool already_connected_;
401 
402  /** \brief Point coordinates projected onto the plane defined by the point normal **/
403  Eigen::Vector3f proj_qp_;
404  /** \brief First coordinate vector of the 2D coordinate frame **/
405  Eigen::Vector3f u_;
406  /** \brief Second coordinate vector of the 2D coordinate frame **/
407  Eigen::Vector3f v_;
408  /** \brief 2D coordinates of the first fringe neighbor **/
409  Eigen::Vector2f uvn_ffn_;
410  /** \brief 2D coordinates of the second fringe neighbor **/
411  Eigen::Vector2f uvn_sfn_;
412  /** \brief 2D coordinates of the first fringe neighbor of the next point **/
413  Eigen::Vector2f uvn_next_ffn_;
414  /** \brief 2D coordinates of the second fringe neighbor of the next point **/
415  Eigen::Vector2f uvn_next_sfn_;
416 
417  /** \brief Temporary variable to store 3 coordinates **/
418  Eigen::Vector3f tmp_;
419 
420  /** \brief The actual surface reconstruction method.
421  * \param[out] output the resultant polygonal mesh
422  */
423  void
424  performReconstruction (pcl::PolygonMesh &output) override;
425 
426  /** \brief The actual surface reconstruction method.
427  * \param[out] polygons the resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.
428  */
429  void
430  performReconstruction (std::vector<pcl::Vertices> &polygons) override;
431 
432  /** \brief The actual surface reconstruction method.
433  * \param[out] polygons the resultant polygons, as a set of vertices. The Vertices structure contains an array of point indices.
434  */
435  bool
436  reconstructPolygons (std::vector<pcl::Vertices> &polygons);
437 
438  /** \brief Class get name method. */
439  std::string
440  getClassName () const override { return ("GreedyProjectionTriangulation"); }
441 
442  /** \brief Forms a new triangle by connecting the current neighbor to the query point
443  * and the previous neighbor
444  * \param[out] polygons the polygon mesh to be updated
445  * \param[in] prev_index index of the previous point
446  * \param[in] next_index index of the next point
447  * \param[in] next_next_index index of the point after the next one
448  * \param[in] uvn_current 2D coordinate of the current point
449  * \param[in] uvn_prev 2D coordinates of the previous point
450  * \param[in] uvn_next 2D coordinates of the next point
451  */
452  void
453  connectPoint (std::vector<pcl::Vertices> &polygons,
454  const int prev_index,
455  const int next_index,
456  const int next_next_index,
457  const Eigen::Vector2f &uvn_current,
458  const Eigen::Vector2f &uvn_prev,
459  const Eigen::Vector2f &uvn_next);
460 
461  /** \brief Whenever a query point is part of a boundary loop containing 3 points, that triangle is created
462  * (called if angle constraints make it possible)
463  * \param[out] polygons the polygon mesh to be updated
464  */
465  void
466  closeTriangle (std::vector<pcl::Vertices> &polygons);
467 
468  /** \brief Get the list of containing triangles for each vertex in a PolygonMesh
469  * \param[in] polygonMesh the input polygon mesh
470  */
471  std::vector<std::vector<size_t> >
472  getTriangleList (const pcl::PolygonMesh &input);
473 
474  /** \brief Add a new triangle to the current polygon mesh
475  * \param[in] a index of the first vertex
476  * \param[in] b index of the second vertex
477  * \param[in] c index of the third vertex
478  * \param[out] polygons the polygon mesh to be updated
479  */
480  inline void
481  addTriangle (int a, int b, int c, std::vector<pcl::Vertices> &polygons)
482  {
483  triangle_.vertices.resize (3);
484  if (consistent_ordering_)
485  {
486  const PointInT p = input_->at (indices_->at (a));
487  const Eigen::Vector3f pv = p.getVector3fMap ();
488  if (p.getNormalVector3fMap ().dot (
489  (pv - input_->at (indices_->at (b)).getVector3fMap ()).cross (
490  pv - input_->at (indices_->at (c)).getVector3fMap ()) ) > 0)
491  {
492  triangle_.vertices[0] = a;
493  triangle_.vertices[1] = b;
494  triangle_.vertices[2] = c;
495  }
496  else
497  {
498  triangle_.vertices[0] = a;
499  triangle_.vertices[1] = c;
500  triangle_.vertices[2] = b;
501  }
502  }
503  else
504  {
505  triangle_.vertices[0] = a;
506  triangle_.vertices[1] = b;
507  triangle_.vertices[2] = c;
508  }
509  polygons.push_back (triangle_);
510  }
511 
512  /** \brief Add a new vertex to the advancing edge front and set its source point
513  * \param[in] v index of the vertex that was connected
514  * \param[in] s index of the source point
515  */
516  inline void
517  addFringePoint (int v, int s)
518  {
519  source_[v] = s;
520  part_[v] = part_[s];
521  fringe_queue_.push_back(v);
522  }
523 
524  /** \brief Function for ascending sort of nnAngle, taking visibility into account
525  * (angles to visible neighbors will be first, to the invisible ones after).
526  * \param[in] a1 the first angle
527  * \param[in] a2 the second angle
528  */
529  static inline bool
530  nnAngleSortAsc (const nnAngle& a1, const nnAngle& a2)
531  {
532  if (a1.visible == a2.visible)
533  return (a1.angle < a2.angle);
534  else
535  return a1.visible;
536  }
537  };
538 
539 } // namespace pcl
540 
541 #ifdef PCL_NO_PRECOMPILE
542 #include <pcl/surface/impl/gp3.hpp>
543 #endif
double getMaximumAngle() const
Get the parameter for distance based weighting of neighbors.
Definition: gp3.h:254
void setConsistentVertexOrdering(bool consistent_ordering)
Set the flag to order the resulting triangle vertices consistently (positive direction around normal)...
Definition: gp3.h:283
bool getConsistentVertexOrdering() const
Get the flag signaling consistently ordered triangle vertices.
Definition: gp3.h:287
std::vector< uint32_t > vertices
Definition: Vertices.h:19
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:44
double getMinimumAngle() const
Get the parameter for distance based weighting of neighbors.
Definition: gp3.h:243
void setMu(double mu)
Set the multiplier of the nearest neighbor distance to obtain the final search radius for each point ...
Definition: gp3.h:207
bool isVisible(const Eigen::Vector2f &X, const Eigen::Vector2f &S1, const Eigen::Vector2f &S2, const Eigen::Vector2f &R=Eigen::Vector2f::Zero())
Returns if a point X is visible from point R (or the origin) when taking into account the segment bet...
Definition: gp3.h:66
IndicesPtr indices_
A pointer to the vector of point indices to use.
Definition: pcl_base.h:153
pcl::PointCloud< PointInT > PointCloudIn
Definition: gp3.h:149
boost::shared_ptr< KdTree< PointT > > Ptr
Definition: kdtree.h:70
boost::shared_ptr< const GreedyProjectionTriangulation< PointInT > > ConstPtr
Definition: gp3.h:140
double getMaximumSurfaceAngle() const
Get the maximum surface angle.
Definition: gp3.h:266
std::vector< int > getSFN() const
Get the sfn list.
Definition: gp3.h:304
bool getNormalConsistency() const
Get the flag for consistently oriented normals.
Definition: gp3.h:276
Describes a set of vertices in a polygon mesh, by basically storing an array of indices.
Definition: Vertices.h:14
std::vector< int > getPartIDs() const
Get the ID of each point after reconstruction.
Definition: gp3.h:299
boost::shared_ptr< PointCloud< PointInT > > Ptr
Definition: point_cloud.h:427
double getMu() const
Get the nearest neighbor distance multiplier.
Definition: gp3.h:211
double mu_
The nearest neighbor distance multiplier to obtain the final search radius.
Definition: gp3.h:312
double getSearchRadius() const
Get the sphere radius used for determining the k-nearest neighbors.
Definition: gp3.h:232
int nnn_
The maximum number of nearest neighbors accepted by searching.
Definition: gp3.h:318
void setMaximumNearestNeighbors(int nnn)
Set the maximum number of nearest neighbors to be searched for.
Definition: gp3.h:217
double minimum_angle_
The preferred minimum angle for the triangles.
Definition: gp3.h:321
pcl::KdTree< PointInT > KdTree
Definition: gp3.h:146
void setMinimumAngle(double minimum_angle)
Set the minimum angle each triangle should have.
Definition: gp3.h:239
boost::shared_ptr< const PointCloud< PointInT > > ConstPtr
Definition: point_cloud.h:428
GreedyProjectionTriangulation is an implementation of a greedy triangulation algorithm for 3D points ...
Definition: gp3.h:136
bool consistent_
Set this to true if the normals of the input are consistently oriented.
Definition: gp3.h:330
int getMaximumNearestNeighbors() const
Get the maximum number of nearest neighbors to be searched for.
Definition: gp3.h:221
GreedyProjectionTriangulation()
Empty constructor.
Definition: gp3.h:163
MeshConstruction represents a base surface reconstruction class.
void setMaximumSurfaceAngle(double eps_angle)
Don&#39;t consider points for triangulation if their normal deviates more than this value from the query ...
Definition: gp3.h:262
double eps_angle_
Maximum surface angle.
Definition: gp3.h:327
std::vector< int > getFFN() const
Get the ffn list.
Definition: gp3.h:308
void setSearchRadius(double radius)
Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulati...
Definition: gp3.h:228
void setMaximumAngle(double maximum_angle)
Set the maximum angle each triangle can have.
Definition: gp3.h:250
void setNormalConsistency(bool consistent)
Set the flag if the input normals are oriented consistently.
Definition: gp3.h:272
double maximum_angle_
The maximum angle for the triangles.
Definition: gp3.h:324
PointCloudConstPtr input_
The input point cloud dataset.
Definition: pcl_base.h:150
bool consistent_ordering_
Set this to true if the output triangle vertices should be consistently oriented. ...
Definition: gp3.h:333
double search_radius_
The nearest neighbors search radius for each point and the maximum edge length.
Definition: gp3.h:315
std::vector< int > getPointStates() const
Get the state of each point after reconstruction.
Definition: gp3.h:293
PointCloudIn::Ptr PointCloudInPtr
Definition: gp3.h:150
KdTree represents the base spatial locator class for kd-tree implementations.
Definition: kdtree.h:55
PointCloudIn::ConstPtr PointCloudInConstPtr
Definition: gp3.h:151
boost::shared_ptr< GreedyProjectionTriangulation< PointInT > > Ptr
Definition: gp3.h:139