HoughSpace3D is a 3D voting space.
More...
#include <pcl/recognition/cg/hough_3d.h>
|
| HoughSpace3D (const Eigen::Vector3d &min_coord, const Eigen::Vector3d &bin_size, const Eigen::Vector3d &max_coord) |
| Constructor. More...
|
|
void | reset () |
| Reset all cast votes. More...
|
|
int | vote (const Eigen::Vector3d &single_vote_coord, double weight, int voter_id) |
| Casting a vote for a given position in the Hough space. More...
|
|
int | voteInt (const Eigen::Vector3d &single_vote_coord, double weight, int voter_id) |
| Vote for a given position in the 3D space. More...
|
|
double | findMaxima (double min_threshold, std::vector< double > &maxima_values, std::vector< std::vector< int > > &maxima_voter_ids) |
| Find the bins with most votes. More...
|
|
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 57 of file hough_3d.h.
◆ ConstPtr
◆ Ptr
◆ HoughSpace3D()
pcl::recognition::HoughSpace3D::HoughSpace3D |
( |
const Eigen::Vector3d & |
min_coord, |
|
|
const Eigen::Vector3d & |
bin_size, |
|
|
const Eigen::Vector3d & |
max_coord |
|
) |
| |
Constructor.
- Parameters
-
[in] | min_coord | minimum (x,y,z) coordinates of the Hough space |
[in] | bin_size | size of each bing of the Hough space. |
[in] | max_coord | maximum (x,y,z) coordinates of the Hough space. |
◆ findMaxima()
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_threshold | the 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_values | the list of Hough Space bin values greater than min_threshold. |
[out] | maxima_voter_ids | for 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.
◆ reset()
void pcl::recognition::HoughSpace3D::reset |
( |
| ) |
|
◆ vote()
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_coord | coordinates of the vote being cast (in absolute coordinates) |
[in] | weight | weight associated with the vote. |
[in] | voter_id | the 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.
◆ voteInt()
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_coord | coordinates of the vote being cast. |
[in] | weight | weight associated with the vote. |
[in] | voter_id | the 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.
◆ bin_count_
Eigen::Vector3i pcl::recognition::HoughSpace3D::bin_count_ |
|
protected |
Number of bins for each dimension.
Definition at line 118 of file hough_3d.h.
◆ bin_size_
Eigen::Vector3d pcl::recognition::HoughSpace3D::bin_size_ |
|
protected |
Size of each bin in the Hough Space.
Definition at line 115 of file hough_3d.h.
◆ hough_space_
std::vector<double> pcl::recognition::HoughSpace3D::hough_space_ |
|
protected |
◆ min_coord_
Eigen::Vector3d pcl::recognition::HoughSpace3D::min_coord_ |
|
protected |
Minimum coordinate in the Hough Space.
Definition at line 112 of file hough_3d.h.
◆ partial_bin_products_
int pcl::recognition::HoughSpace3D::partial_bin_products_[4] {} |
|
protected |
Used to access hough_space_ as if it was a matrix.
Definition at line 121 of file hough_3d.h.
◆ total_bins_count_
int pcl::recognition::HoughSpace3D::total_bins_count_ {0} |
|
protected |
Total number of bins in the Hough Space.
Definition at line 124 of file hough_3d.h.
◆ voter_ids_
std::unordered_map<int, std::vector<int> > pcl::recognition::HoughSpace3D::voter_ids_ |
|
protected |
List of voters for each bin.
Definition at line 130 of file hough_3d.h.
The documentation for this class was generated from the following file: