Public Member Functions | Protected Attributes
pcl::recognition::HoughSpace3D Class Reference

HoughSpace3D is a 3D voting space. Cast votes can be interpolated in order to better deal with approximations introduced by bin quantization. A weight can also be associated with each vote. More...

#include <hough_3d.h>

List of all members.

Public Member Functions

double findMaxima (double min_threshold, std::vector< double > &maxima_values, std::vector< std::vector< int > > &maxima_voter_ids)
 Find the bins with most votes.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW HoughSpace3D (const Eigen::Vector3d &min_coord, const Eigen::Vector3d &bin_size, const Eigen::Vector3d &max_coord)
 Constructor.
void reset ()
 Reset all cast votes.
int vote (const Eigen::Vector3d &single_vote_coord, double weight, int voter_id)
 Casting a vote for a given position in the Hough space.
int voteInt (const Eigen::Vector3d &single_vote_coord, double weight, int voter_id)
 Vote for a given position in the 3D space. The weight is interpolated between the bin pointed by single_vote_coord and its neighbors.

Protected Attributes

Eigen::Vector3i bin_count_
 Number of bins for each dimension.
Eigen::Vector3d bin_size_
 Size of each bin in the Hough Space.
std::vector< double > hough_space_
 The Hough Space.
Eigen::Vector3d min_coord_
 Minimum coordinate in the Hough Space.
int partial_bin_products_ [4]
 Used to access hough_space_ as if it was a matrix.
int total_bins_count_
 Total number of bins in the Hough Space.
boost::unordered_map< int,
std::vector< int > > 
voter_ids_
 List of voters for each bin.

Detailed Description

HoughSpace3D is a 3D voting space. Cast votes can be interpolated in order to better deal with approximations introduced by bin quantization. A weight can also be associated with each vote.

Author:
Federico Tombari (original), Tommaso Cavallari (PCL port)

Definition at line 54 of file hough_3d.h.


Constructor & Destructor Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW pcl::recognition::HoughSpace3D::HoughSpace3D ( const Eigen::Vector3d &  min_coord,
const Eigen::Vector3d &  bin_size,
const Eigen::Vector3d &  max_coord 
)

Constructor.

Parameters:
[in]min_coordminimum (x,y,z) coordinates of the Hough space
[in]bin_sizesize of each bing of the Hough space.
[in]max_coordmaximum (x,y,z) coordinates of the Hough space.

Member Function Documentation

double pcl::recognition::HoughSpace3D::findMaxima ( double  min_threshold,
std::vector< double > &  maxima_values,
std::vector< std::vector< int > > &  maxima_voter_ids 
)

Find the bins with most votes.

Parameters:
[in]min_thresholdthe minimum number of votes to be included in a bin in order to have its value returned. If set to a value between -1 and 0 the Hough space maximum_vote is found and the returned values are all the votes greater than -min_threshold * maximum_vote.
[out]maxima_valuesthe list of Hough Space bin values greater than min_threshold.
[out]maxima_voter_idsfor each value returned, a list of the voter ids who cast a vote in that position.
Returns:
The min_threshold used, either set by the user or found by this method.

Definition at line 207 of file hough_3d.cpp.

Reset all cast votes.

Definition at line 72 of file hough_3d.cpp.

int pcl::recognition::HoughSpace3D::vote ( const Eigen::Vector3d &  single_vote_coord,
double  weight,
int  voter_id 
)

Casting a vote for a given position in the Hough space.

Parameters:
[in]single_vote_coordcoordinates of the vote being cast (in absolute coordinates)
[in]weightweight associated with the vote.
[in]voter_idthe numeric id of the voter. Useful to trace back the voting correspondence, if the vote is returned by findMaxima as part of a maximum of the Hough Space.
Returns:
the index of the bin in which the vote has been cast.

Definition at line 82 of file hough_3d.cpp.

int pcl::recognition::HoughSpace3D::voteInt ( const Eigen::Vector3d &  single_vote_coord,
double  weight,
int  voter_id 
)

Vote for a given position in the 3D space. The weight is interpolated between the bin pointed by single_vote_coord and its neighbors.

Parameters:
[in]single_vote_coordcoordinates of the vote being cast.
[in]weightweight associated with the vote.
[in]voter_idthe numeric id of the voter. Useful to trace back the voting correspondence, if the vote is returned by findMaxima as a part of a maximum of the Hough Space.
Returns:
the index of the bin in which the vote has been cast.

Definition at line 107 of file hough_3d.cpp.


Member Data Documentation

Eigen::Vector3i pcl::recognition::HoughSpace3D::bin_count_ [protected]

Number of bins for each dimension.

Definition at line 113 of file hough_3d.h.

Eigen::Vector3d pcl::recognition::HoughSpace3D::bin_size_ [protected]

Size of each bin in the Hough Space.

Definition at line 110 of file hough_3d.h.

std::vector<double> pcl::recognition::HoughSpace3D::hough_space_ [protected]

The Hough Space.

Definition at line 122 of file hough_3d.h.

Eigen::Vector3d pcl::recognition::HoughSpace3D::min_coord_ [protected]

Minimum coordinate in the Hough Space.

Definition at line 107 of file hough_3d.h.

Used to access hough_space_ as if it was a matrix.

Definition at line 116 of file hough_3d.h.

Total number of bins in the Hough Space.

Definition at line 119 of file hough_3d.h.

boost::unordered_map<int, std::vector<int> > pcl::recognition::HoughSpace3D::voter_ids_ [protected]

List of voters for each bin.

Definition at line 126 of file hough_3d.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:44:33