Point Cloud Library (PCL)  1.8.0
matching_candidate.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2014-, Open Perception, Inc.
6  * Copyright (C) 2008 Ben Gurion University of the Negev, Beer Sheva, Israel.
7  *
8  * All rights reserved
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are met
12  *
13  * * The use for research only (no for any commercial application).
14  * * Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  * * Redistributions in binary form must reproduce the above
17  * copyright notice, this list of conditions and the following
18  * disclaimer in the documentation and/or other materials provided
19  * with the distribution.
20  * * Neither the name of the copyright holder(s) nor the names of its
21  * contributors may be used to endorse or promote products derived
22  * from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  *
37  */
38 
39 #ifndef PCL_REGISTRATION_MATCHING_CANDIDATE_H_
40 #define PCL_REGISTRATION_MATCHING_CANDIDATE_H_
41 
42 #include <pcl/registration/registration.h>
43 #include <pcl/common/common.h>
44 
45 namespace pcl
46 {
47  namespace registration
48  {
49  /** \brief Container for matching candidate consisting of
50  *
51  * * fitness score value as a result of the matching algorithm
52  * * correspondences between source and target data set
53  * * transformation matrix calculated based on the correspondences
54  *
55  */
57  {
58  /** \brief Constructor. */
60  fitness_score (FLT_MAX),
61  correspondences (),
62  transformation (Eigen::Matrix4f::Identity ())
63  {};
64 
65  /** \brief Value constructor. */
66  MatchingCandidate (float s, const pcl::Correspondences &c, const Eigen::Matrix4f &m) :
67  fitness_score (s),
68  correspondences (c),
69  transformation (m)
70  {};
71 
72  /** \brief Destructor. */
74  {};
75 
76 
77  /** \brief Fitness score of current candidate resulting from matching algorithm. */
78  float fitness_score;
79 
80  /** \brief Correspondences between source <-> target. */
82 
83  /** \brief Corresponding transformation matrix retrieved using \a corrs. */
84  Eigen::Matrix4f transformation;
85 
86  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
87  };
88 
89  /** \brief Sorting of candidates based on fitness score value. */
90  struct by_score
91  {
92  /** \brief Operator used to sort candidates based on fitness score. */
93  bool operator () (MatchingCandidate const &left, MatchingCandidate const &right)
94  {
95  return (left.fitness_score < right.fitness_score);
96  }
97  };
98 
99  }; // namespace registration
100 }; // namespace pcl
101 
102 
103 #endif // PCL_REGISTRATION_MATCHING_CANDIDATE_H_
float fitness_score
Fitness score of current candidate resulting from matching algorithm.
Eigen::Matrix4f transformation
Corresponding transformation matrix retrieved using corrs.
Sorting of candidates based on fitness score value.
Container for matching candidate consisting of.
Definition: bfgs.h:10
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
MatchingCandidate(float s, const pcl::Correspondences &c, const Eigen::Matrix4f &m)
Value constructor.
pcl::Correspondences correspondences
Correspondences between source <-> target.