Loading...
Searching...
No Matches
pcl::GrabCut< PointT > Class Template Reference
Module segmentation

Implementation of the GrabCut segmentation in "GrabCut — Interactive Foreground Extraction using Iterated Graph Cuts" by Carsten Rother, Vladimir Kolmogorov and Andrew Blake. More...

`#include <pcl/segmentation/grabcut_segmentation.h>`

Inheritance diagram for pcl::GrabCut< PointT >:

## Classes

struct | NLinks

## Public Types

using | KdTree = pcl::search::Search<PointT>
using | KdTreePtr = typename KdTree::Ptr
using | PointCloudConstPtr = typename PCLBase<PointT>::PointCloudConstPtr
using | PointCloudPtr = typename PCLBase<PointT>::PointCloudPtr
Public Types inherited from pcl::PCLBase< PointT >
using | PointCloud = pcl::PointCloud<PointT>
using | PointCloudPtr = typename PointCloud::Ptr
using | PointCloudConstPtr = typename PointCloud::ConstPtr
using | PointIndicesPtr = PointIndices::Ptr
using | PointIndicesConstPtr = PointIndices::ConstPtr

## Public Member Functions

| GrabCut (std::uint32_t K=5, float lambda=50.f)
| Constructor.
| ~GrabCut () override=default
| Destructor.
void | setInputCloud (const PointCloudConstPtr &cloud) override
| Provide a pointer to the input dataset.
void | setBackgroundPoints (const PointCloudConstPtr &background_points)
| Set background points, foreground points = points \ background points.
void | setBackgroundPointsIndices (int x1, int y1, int x2, int y2)
| Set background indices, foreground indices = indices \ background indices.
void | setBackgroundPointsIndices (const PointIndicesConstPtr &indices)
| Set background indices, foreground indices = indices \ background indices.
virtual void | refine ()
| Run Grabcut refinement on the hard segmentation.
virtual int | refineOnce ()
float | getLambda ()
void | setLambda (float lambda)
| Set lambda parameter to user given value.
std::uint32_t | getK ()
void | setK (std::uint32_t K)
| Set K parameter to user given value.
void | setSearchMethod (const KdTreePtr &tree)
| Provide a pointer to the search object.
KdTreePtr | getSearchMethod ()
| Get a pointer to the search method used.
void | setNumberOfNeighbours (int nb_neighbours)
| Allows to set the number of neighbours to find.
int | getNumberOfNeighbours () const
| Returns the number of neighbours to find.
void | extract (std::vector< pcl::PointIndices > &clusters)
| This method launches the segmentation algorithm and returns the clusters that were obtained during the segmentation.
Public Member Functions inherited from pcl::PCLBase< PointT >
| PCLBase ()
| Empty constructor.
| PCLBase (const PCLBase &base)
| Copy constructor.
virtual | ~PCLBase ()=default
| Destructor.
PointCloudConstPtr const | getInputCloud () const
| Get a pointer to the input point cloud dataset.
virtual void | setIndices (const IndicesPtr &indices)
| Provide a pointer to the vector of indices that represents the input data.
virtual void | setIndices (const IndicesConstPtr &indices)
| Provide a pointer to the vector of indices that represents the input data.
virtual void | setIndices (const PointIndicesConstPtr &indices)
| Provide a pointer to the vector of indices that represents the input data.
virtual void | setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
| Set the indices for the points laying within an interest region of the point cloud.
IndicesPtr | getIndices ()
| Get a pointer to the vector of indices used.
IndicesConstPtr const | getIndices () const
| Get a pointer to the vector of indices used.
const PointT & | operator[] (std::size_t pos) const
| Override PointCloud operator[] to shorten code.

## Protected Types

using | vertex_descriptor = pcl::segmentation::grabcut::BoykovKolmogorov::vertex_descriptor

## Protected Member Functions

bool | initCompute ()
void | computeBetaOrganized ()
| Compute beta from image.
void | computeBetaNonOrganized ()
| Compute beta from cloud.
void | computeL ()
| Compute L parameter from given lambda.
void | computeNLinksOrganized ()
| Compute NLinks from image.
void | computeNLinksNonOrganized ()
| Compute NLinks from cloud.
void | setTrimap (const PointIndicesConstPtr &indices, segmentation::grabcut::TrimapValue t)
| Edit Trimap.
int | updateHardSegmentation ()
virtual void | fitGMMs ()
| Fit Gaussian Multi Models.
void | initGraph ()
| Build the graph for GraphCut.
void | addEdge (vertex_descriptor v1, vertex_descriptor v2, float capacity, float rev_capacity)
| Add an edge to the graph, graph must be oriented so we add the edge and its reverse.
void | setTerminalWeights (vertex_descriptor v, float source_capacity, float sink_capacity)
| Set the weights of SOURCE --> v and v --> SINK.
bool | isSource (vertex_descriptor v)
Protected Member Functions inherited from pcl::PCLBase< PointT >
bool | initCompute ()
| This method should get called before starting the actual computation.
bool | deinitCompute ()
| This method should get called after finishing the actual computation.

## Protected Attributes

std::uint32_t | width_ {0}
| image width
std::uint32_t | height_ {0}
| image height
std::uint32_t | K_
| Number of GMM components.
float | lambda_
| lambda = 50. This value was suggested the GrabCut paper.
float | beta_ {0.0f}
| beta = 1/2 * average of the squared color distances between all pairs of 8-neighboring pixels.
float | L_ {0.0f}
| L = a large value to force a pixel to be foreground or background.
KdTreePtr | tree_ {nullptr}
| Pointer to the spatial search object.
int | nb_neighbours_ {9}
| Number of neighbours.
bool | initialized_ {false}
| is segmentation initialized
std::vector< NLinks > | n_links_ {}
| Precomputed N-link weights.
segmentation::grabcut::Image::Ptr | image_
| Converted input.
std::vector< segmentation::grabcut::TrimapValue > | trimap_ {}
std::vector< std::size_t > | GMM_component_ {}
std::vector< segmentation::grabcut::SegmentationValue > | hard_segmentation_ {}
std::vector< float > | soft_segmentation_ {}
segmentation::grabcut::GMM | background_GMM_
segmentation::grabcut::GMM | foreground_GMM_
pcl::segmentation::grabcut::BoykovKolmogorov | graph_
| Graph for Graphcut.
std::vector< vertex_descriptor > | graph_nodes_ {}
| Graph nodes.
Protected Attributes inherited from pcl::PCLBase< PointT >
PointCloudConstPtr | input_
| The input point cloud dataset.
IndicesPtr | indices_
| A pointer to the vector of point indices to use.
bool | use_indices_
| Set to true if point indices are used.
bool | fake_indices_
| If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud.

## Detailed Description

template<typename PointT>
class pcl::GrabCut< PointT >

Implementation of the GrabCut segmentation in "GrabCut — Interactive Foreground Extraction using Iterated Graph Cuts" by Carsten Rother, Vladimir Kolmogorov and Andrew Blake.

Author
  Justin Talbot, jtalb.nosp@m.ot@s.nosp@m.tanfo.nosp@m.rd.e.nosp@m.du placed in Public Domain, 2010
  Nizar Sallem port to PCL and adaptation of original code.

Definition at line 317 of file grabcut_segmentation.h.

## Member Typedef Documentation

## KdTree

template<typename PointT>

using pcl::GrabCut< PointT >::KdTree = pcl::search::Search<PointT>

Definition at line 320 of file grabcut_segmentation.h.

## KdTreePtr

template<typename PointT>

using pcl::GrabCut< PointT >::KdTreePtr = typename KdTree::Ptr

Definition at line 321 of file grabcut_segmentation.h.

## PointCloudConstPtr

template<typename PointT>

using pcl::GrabCut< PointT >::PointCloudConstPtr = typename PCLBase<PointT>::PointCloudConstPtr

Definition at line 322 of file grabcut_segmentation.h.

## PointCloudPtr

template<typename PointT>

using pcl::GrabCut< PointT >::PointCloudPtr = typename PCLBase<PointT>::PointCloudPtr

Definition at line 323 of file grabcut_segmentation.h.

## vertex_descriptor

template<typename PointT>

using pcl::GrabCut< PointT >::vertex_descriptor = pcl::segmentation::grabcut::BoykovKolmogorov::vertex_descriptor

protected

Definition at line 404 of file grabcut_segmentation.h.

## Constructor & Destructor Documentation

## GrabCut()

template<typename PointT>

pcl::GrabCut< PointT >::GrabCut | ( | std::uint32_t | K = 5,
|  | float | lambda = 50.f )

inline

Constructor.

Definition at line 329 of file grabcut_segmentation.h.

References pcl::K, K_, and lambda_.

## ~GrabCut()

template<typename PointT>

pcl::GrabCut< PointT >::~GrabCut | ( |  | ) |

override default

Destructor.

## Member Function Documentation

## addEdge()

template<typename PointT>

void pcl::GrabCut< PointT >::addEdge | ( | vertex_descriptor | v1,
|  | vertex_descriptor | v2,
|  | float | capacity,
|  | float | rev_capacity )

protected

Add an edge to the graph, graph must be oriented so we add the edge and its reverse.

Definition at line 150 of file grabcut_segmentation.hpp.

References graph_.

Referenced by initGraph().

## computeBetaNonOrganized()

template<typename PointT>

void pcl::GrabCut< PointT >::computeBetaNonOrganized | ( |  | ) |

protected

Compute beta from cloud.

Definition at line 387 of file grabcut_segmentation.hpp.

References beta_, pcl::GrabCut< PointT >::NLinks::dists, image_, pcl::GrabCut< PointT >::NLinks::indices, pcl::PCLBase< PointT >::indices_, pcl::PCLBase< PointT >::input_, pcl::isFinite(), n_links_, pcl::GrabCut< PointT >::NLinks::nb_links, nb_neighbours_, pcl::squaredEuclideanDistance(), tree_, and pcl::GrabCut< PointT >::NLinks::weights.

Referenced by initCompute().

## computeBetaOrganized()

template<typename PointT>

void pcl::GrabCut< PointT >::computeBetaOrganized | ( |  | ) |

protected

Compute beta from image.

Definition at line 426 of file grabcut_segmentation.hpp.

References beta_, pcl::GrabCut< PointT >::NLinks::dists, image_, pcl::GrabCut< PointT >::NLinks::indices, pcl::PCLBase< PointT >::input_, n_links_, pcl::GrabCut< PointT >::NLinks::nb_links, pcl::squaredEuclideanDistance(), and pcl::GrabCut< PointT >::NLinks::weights.

Referenced by initCompute().

## computeL()

template<typename PointT>

void pcl::GrabCut< PointT >::computeL | ( |  | ) |

protected

Compute L parameter from given lambda.

Definition at line 496 of file grabcut_segmentation.hpp.

References L_, and lambda_.

Referenced by initCompute().

## computeNLinksNonOrganized()

template<typename PointT>

void pcl::GrabCut< PointT >::computeNLinksNonOrganized | ( |  | ) |

protected

Compute NLinks from cloud.

Definition at line 334 of file grabcut_segmentation.hpp.

References beta_, pcl::GrabCut< PointT >::NLinks::dists, pcl::GrabCut< PointT >::NLinks::indices, pcl::PCLBase< PointT >::indices_, lambda_, n_links_, pcl::GrabCut< PointT >::NLinks::nb_links, and pcl::GrabCut< PointT >::NLinks::weights.

Referenced by initCompute().

## computeNLinksOrganized()

template<typename PointT>

void pcl::GrabCut< PointT >::computeNLinksOrganized | ( |  | ) |

protected

Compute NLinks from image.

Definition at line 360 of file grabcut_segmentation.hpp.

References beta_, pcl::GrabCut< PointT >::NLinks::dists, image_, pcl::PCLBase< PointT >::input_, lambda_, n_links_, and pcl::GrabCut< PointT >::NLinks::weights.

Referenced by initCompute().

## extract()

template<typename PointT>

void pcl::GrabCut< PointT >::extract | ( | std::vector< pcl::PointIndices > & | clusters | ) |

This method launches the segmentation algorithm and returns the clusters that were obtained during the segmentation.

The indices of points belonging to the object will be stored in the cluster with index 1, other indices will be stored in the cluster with index 0.

Parameters

  [out] | clusters | clusters that were obtained. Each cluster is an array of point indices.

Definition at line 502 of file grabcut_segmentation.hpp.

References hard_segmentation_, pcl::PCLBase< PointT >::indices_, refine(), and pcl::segmentation::grabcut::SegmentationForeground.

## fitGMMs()

template<typename PointT>

void pcl::GrabCut< PointT >::fitGMMs | ( |  | ) |

protected virtual

Fit Gaussian Multi Models.

Definition at line 185 of file grabcut_segmentation.hpp.

References background_GMM_, pcl::segmentation::grabcut::buildGMMs(), foreground_GMM_, GMM_component_, hard_segmentation_, image_, pcl::PCLBase< PointT >::indices_, and initGraph().

Referenced by setBackgroundPointsIndices().

## getK()

template<typename PointT>

std::uint32_t pcl::GrabCut< PointT >::getK | ( |  | ) |

inline

Returns
  the number of components in the GMM

Definition at line 361 of file grabcut_segmentation.h.

References K_.

## getLambda()

template<typename PointT>

float pcl::GrabCut< PointT >::getLambda | ( |  | ) |

inline

Returns
  lambda

Definition at line 353 of file grabcut_segmentation.h.

References lambda_.

## getNumberOfNeighbours()

template<typename PointT>

int pcl::GrabCut< PointT >::getNumberOfNeighbours | ( |  | ) | const

inline

Returns the number of neighbours to find.

Definition at line 382 of file grabcut_segmentation.h.

References nb_neighbours_.

## getSearchMethod()

template<typename PointT>

KdTreePtr pcl::GrabCut< PointT >::getSearchMethod | ( |  | ) |

inline

Get a pointer to the search method used.

Definition at line 374 of file grabcut_segmentation.h.

References tree_.

## initCompute()

template<typename PointT>

bool pcl::GrabCut< PointT >::initCompute | ( |  | ) |

protected

Definition at line 87 of file grabcut_segmentation.hpp.

References background_GMM_, computeBetaNonOrganized(), computeBetaOrganized(), computeL(), computeNLinksNonOrganized(), computeNLinksOrganized(), foreground_GMM_, pcl::getFieldIndex(), GMM_component_, hard_segmentation_, height_, image_, pcl::PCLBase< PointT >::indices_, pcl::PCLBase< PointT >::initCompute(), initialized_, pcl::PCLBase< PointT >::input_, K_, n_links_, pcl::segmentation::grabcut::SegmentationBackground, tree_, trimap_, pcl::segmentation::grabcut::TrimapUnknown, and width_.

Referenced by setBackgroundPointsIndices().

## initGraph()

template<typename PointT>

void pcl::GrabCut< PointT >::initGraph | ( |  | ) |

protected

Build the graph for GraphCut.

Definition at line 269 of file grabcut_segmentation.hpp.

References addEdge(), background_GMM_, foreground_GMM_, graph_, graph_nodes_, image_, pcl::GrabCut< PointT >::NLinks::indices, pcl::PCLBase< PointT >::indices_, L_, n_links_, pcl::GrabCut< PointT >::NLinks::nb_links, setTerminalWeights(), trimap_, pcl::segmentation::grabcut::TrimapBackground, pcl::segmentation::grabcut::TrimapUnknown, pcl::UNAVAILABLE, and pcl::GrabCut< PointT >::NLinks::weights.

Referenced by fitGMMs(), and refineOnce().

## isSource()

template<typename PointT>

bool pcl::GrabCut< PointT >::isSource | ( | vertex_descriptor | v | ) |

inline protected

Returns
  true if v is in source tree

Definition at line 439 of file grabcut_segmentation.h.

References graph_.

Referenced by updateHardSegmentation().

## refine()

template<typename PointT>

void pcl::GrabCut< PointT >::refine | ( |  | ) |

virtual

Run Grabcut refinement on the hard segmentation.

Definition at line 212 of file grabcut_segmentation.hpp.

References pcl::PCLBase< PointT >::indices_, and refineOnce().

Referenced by extract().

## refineOnce()

template<typename PointT>

int pcl::GrabCut< PointT >::refineOnce | ( |  | ) |

virtual

Returns
  the number of pixels that have changed from foreground to background or vice versa

Definition at line 195 of file grabcut_segmentation.hpp.

References background_GMM_, foreground_GMM_, GMM_component_, graph_, hard_segmentation_, image_, pcl::PCLBase< PointT >::indices_, initGraph(), pcl::segmentation::grabcut::learnGMMs(), and updateHardSegmentation().

Referenced by refine().

## setBackgroundPoints()

template<typename PointT>

void pcl::GrabCut< PointT >::setBackgroundPoints | ( | const PointCloudConstPtr & | background_points | ) |

Set background points, foreground points = points \ background points.

## setBackgroundPointsIndices() [1/2]

template<typename PointT>

void pcl::GrabCut< PointT >::setBackgroundPointsIndices | ( | const PointIndicesConstPtr & | indices | ) |

Set background indices, foreground indices = indices \ background indices.

Definition at line 163 of file grabcut_segmentation.hpp.

References fitGMMs(), hard_segmentation_, initCompute(), initialized_, pcl::segmentation::grabcut::SegmentationBackground, pcl::segmentation::grabcut::SegmentationForeground, trimap_, pcl::segmentation::grabcut::TrimapBackground, and pcl::segmentation::grabcut::TrimapUnknown.

## setBackgroundPointsIndices() [2/2]

template<typename PointT>

void pcl::GrabCut< PointT >::setBackgroundPointsIndices | ( | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2 )

Set background indices, foreground indices = indices \ background indices.

## setInputCloud()

template<typename PointT>

void pcl::GrabCut< PointT >::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) |

override virtual

Provide a pointer to the input dataset.

Parameters

  [in] | cloud | the const boost shared pointer to a PointCloud message

Reimplemented from pcl::PCLBase< PointT >.

Definition at line 81 of file grabcut_segmentation.hpp.

References pcl::PCLBase< PointT >::input_.

## setK()

template<typename PointT>

void pcl::GrabCut< PointT >::setK | ( | std::uint32_t | K | ) |

inline

Set K parameter to user given value.

Suggested value by the authors is 5

Parameters

  [in] | K | the number of components used in GMM

Definition at line 366 of file grabcut_segmentation.h.

References pcl::K, and K_.

## setLambda()

template<typename PointT>

void pcl::GrabCut< PointT >::setLambda | ( | float | lambda | ) |

inline

Set lambda parameter to user given value.

Suggested value by the authors is 50

Parameters

  [in] | lambda |

Definition at line 358 of file grabcut_segmentation.h.

References lambda_.

## setNumberOfNeighbours()

template<typename PointT>

void pcl::GrabCut< PointT >::setNumberOfNeighbours | ( | int | nb_neighbours | ) |

inline

Allows to set the number of neighbours to find.

Parameters

  [in] | nb_neighbours | new number of neighbours

Definition at line 379 of file grabcut_segmentation.h.

References nb_neighbours_.

## setSearchMethod()

template<typename PointT>

void pcl::GrabCut< PointT >::setSearchMethod | ( | const KdTreePtr & | tree | ) |

inline

Provide a pointer to the search object.

Parameters

  tree | a pointer to the spatial search object.

Definition at line 371 of file grabcut_segmentation.h.

References tree_.

## setTerminalWeights()

template<typename PointT>

void pcl::GrabCut< PointT >::setTerminalWeights | ( | vertex_descriptor | v,
|  | float | source_capacity,
|  | float | sink_capacity )

protected

Set the weights of SOURCE --> v and v --> SINK.

Definition at line 156 of file grabcut_segmentation.hpp.

References graph_.

Referenced by initGraph().

## setTrimap()

template<typename PointT>

void pcl::GrabCut< PointT >::setTrimap | ( | const PointIndicesConstPtr & | indices,
|  | segmentation::grabcut::TrimapValue | t )

protected

Edit Trimap.

Definition at line 252 of file grabcut_segmentation.hpp.

References hard_segmentation_, pcl::segmentation::grabcut::SegmentationBackground, pcl::segmentation::grabcut::SegmentationForeground, trimap_, pcl::segmentation::grabcut::TrimapBackground, and pcl::segmentation::grabcut::TrimapForeground.

## updateHardSegmentation()

template<typename PointT>

int pcl::GrabCut< PointT >::updateHardSegmentation | ( |  | ) |

protected

Definition at line 221 of file grabcut_segmentation.hpp.

References graph_nodes_, hard_segmentation_, pcl::PCLBase< PointT >::indices_, isSource(), pcl::segmentation::grabcut::SegmentationBackground, pcl::segmentation::grabcut::SegmentationForeground, trimap_, pcl::segmentation::grabcut::TrimapBackground, and pcl::segmentation::grabcut::TrimapForeground.

Referenced by refineOnce().

## Member Data Documentation

## background_GMM_

template<typename PointT>

segmentation::grabcut::GMM pcl::GrabCut< PointT >::background_GMM_

protected

Definition at line 468 of file grabcut_segmentation.h.

Referenced by fitGMMs(), initCompute(), initGraph(), and refineOnce().

## beta_

template<typename PointT>

float pcl::GrabCut< PointT >::beta_ {0.0f}

protected

beta = 1/2 * average of the squared color distances between all pairs of 8-neighboring pixels.

Definition at line 450 of file grabcut_segmentation.h.

Referenced by computeBetaNonOrganized(), computeBetaOrganized(), computeNLinksNonOrganized(), and computeNLinksOrganized().

## foreground_GMM_

template<typename PointT>

segmentation::grabcut::GMM pcl::GrabCut< PointT >::foreground_GMM_

protected

Definition at line 468 of file grabcut_segmentation.h.

Referenced by fitGMMs(), initCompute(), initGraph(), and refineOnce().

## GMM_component_

template<typename PointT>

std::vector<std::size_t> pcl::GrabCut< PointT >::GMM_component_ {}

protected

Definition at line 464 of file grabcut_segmentation.h.

Referenced by fitGMMs(), initCompute(), and refineOnce().

## graph_

template<typename PointT>

pcl::segmentation::grabcut::BoykovKolmogorov pcl::GrabCut< PointT >::graph_

protected

Graph for Graphcut.

Definition at line 471 of file grabcut_segmentation.h.

Referenced by addEdge(), initGraph(), isSource(), refineOnce(), and setTerminalWeights().

## graph_nodes_

template<typename PointT>

std::vector<vertex_descriptor> pcl::GrabCut< PointT >::graph_nodes_ {}

protected

Graph nodes.

Definition at line 473 of file grabcut_segmentation.h.

Referenced by initGraph(), and updateHardSegmentation().

## hard_segmentation_

template<typename PointT>

std::vector<segmentation::grabcut::SegmentationValue> pcl::GrabCut< PointT >::hard_segmentation_ {}

protected

Definition at line 465 of file grabcut_segmentation.h.

Referenced by extract(), fitGMMs(), initCompute(), refineOnce(), setBackgroundPointsIndices(), setTrimap(), and updateHardSegmentation().

## height_

template<typename PointT>

std::uint32_t pcl::GrabCut< PointT >::height_ {0}

protected

image height

Definition at line 443 of file grabcut_segmentation.h.

Referenced by initCompute().

## image_

template<typename PointT>

segmentation::grabcut::Image::Ptr pcl::GrabCut< PointT >::image_

protected

Converted input.

Definition at line 462 of file grabcut_segmentation.h.

Referenced by computeBetaNonOrganized(), computeBetaOrganized(), computeNLinksOrganized(), fitGMMs(), initCompute(), initGraph(), and refineOnce().

## initialized_

template<typename PointT>

bool pcl::GrabCut< PointT >::initialized_ {false}

protected

is segmentation initialized

Definition at line 458 of file grabcut_segmentation.h.

Referenced by initCompute(), and setBackgroundPointsIndices().

## K_

template<typename PointT>

std::uint32_t pcl::GrabCut< PointT >::K_

protected

Number of GMM components.

Definition at line 446 of file grabcut_segmentation.h.

Referenced by getK(), GrabCut(), initCompute(), and setK().

## L_

template<typename PointT>

float pcl::GrabCut< PointT >::L_ {0.0f}

protected

L = a large value to force a pixel to be foreground or background.

Definition at line 452 of file grabcut_segmentation.h.

Referenced by computeL(), and initGraph().

## lambda_

template<typename PointT>

float pcl::GrabCut< PointT >::lambda_

protected

lambda = 50. This value was suggested the GrabCut paper.

Definition at line 448 of file grabcut_segmentation.h.

Referenced by computeL(), computeNLinksNonOrganized(), computeNLinksOrganized(), getLambda(), GrabCut(), and setLambda().

## n_links_

template<typename PointT>

std::vector<NLinks> pcl::GrabCut< PointT >::n_links_ {}

protected

Precomputed N-link weights.

Definition at line 460 of file grabcut_segmentation.h.

Referenced by computeBetaNonOrganized(), computeBetaOrganized(), computeNLinksNonOrganized(), computeNLinksOrganized(), initCompute(), and initGraph().

## nb_neighbours_

template<typename PointT>

int pcl::GrabCut< PointT >::nb_neighbours_ {9}

protected

Number of neighbours.

Definition at line 456 of file grabcut_segmentation.h.

Referenced by computeBetaNonOrganized(), getNumberOfNeighbours(), and setNumberOfNeighbours().

## soft_segmentation_

template<typename PointT>

std::vector<float> pcl::GrabCut< PointT >::soft_segmentation_ {}

protected

Definition at line 467 of file grabcut_segmentation.h.

## tree_

template<typename PointT>

KdTreePtr pcl::GrabCut< PointT >::tree_ {nullptr}

protected

Pointer to the spatial search object.

Definition at line 454 of file grabcut_segmentation.h.

Referenced by computeBetaNonOrganized(), getSearchMethod(), initCompute(), and setSearchMethod().

## trimap_

template<typename PointT>

std::vector<segmentation::grabcut::TrimapValue> pcl::GrabCut< PointT >::trimap_ {}

protected

Definition at line 463 of file grabcut_segmentation.h.

Referenced by initCompute(), initGraph(), setBackgroundPointsIndices(), setTrimap(), and updateHardSegmentation().

## width_

template<typename PointT>

std::uint32_t pcl::GrabCut< PointT >::width_ {0}

protected

image width

Definition at line 441 of file grabcut_segmentation.h.

Referenced by initCompute().

The documentation for this class was generated from the following files:

- pcl/segmentation/grabcut_segmentation.h
- pcl/segmentation/impl/grabcut_segmentation.hpp