Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
pcl
registration
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
* * 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 the copyright holder(s) 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
*/
37
38
#pragma once
39
40
#include <
pcl/common/common.h
>
41
#include <pcl/registration/registration.h>
42
#include <
pcl/memory.h
>
43
#include <
pcl/pcl_macros.h
>
44
45
#include <limits>
46
47
namespace
pcl
{
48
namespace
registration
{
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
*/
56
struct
MatchingCandidate
{
57
/** \brief Constructor. */
58
MatchingCandidate
()
59
:
fitness_score
(std::numeric_limits<float>::max())
60
,
transformation
(
Eigen
::Matrix4f::Identity()){};
61
62
/** \brief Value constructor. */
63
MatchingCandidate
(
float
s,
const
pcl::Correspondences
& c,
const
Eigen::Matrix4f& m)
64
:
fitness_score
(s),
correspondences
(c),
transformation
(m){};
65
66
/** \brief Destructor. */
67
~MatchingCandidate
() =
default
;
68
69
/** \brief Fitness score of current candidate resulting from matching algorithm. */
70
float
fitness_score
;
71
72
/** \brief Correspondences between source <-> target. */
73
pcl::Correspondences
correspondences
;
74
75
/** \brief Corresponding transformation matrix retrieved using \a corrs. */
76
Eigen::Matrix4f
transformation
;
77
78
PCL_MAKE_ALIGNED_OPERATOR_NEW
79
};
80
81
using
MatchingCandidates
=
82
std::vector<MatchingCandidate, Eigen::aligned_allocator<MatchingCandidate>>;
83
84
/** \brief Sorting of candidates based on fitness score value. */
85
struct
by_score
{
86
/** \brief Operator used to sort candidates based on fitness score. */
87
bool
88
operator()
(
MatchingCandidate
const
& left,
MatchingCandidate
const
& right)
89
{
90
return
(left.
fitness_score
< right.
fitness_score
);
91
}
92
};
93
94
};
// namespace registration
95
};
// namespace pcl
common.h
Define standard C methods and C++ classes that are common to all methods.
PCL_MAKE_ALIGNED_OPERATOR_NEW
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Definition
memory.h:86
memory.h
Defines functions, macros and traits for allocating and using memory.
Eigen
Definition
bfgs.h:10
pcl::registration
Definition
convergence_criteria.h:46
pcl::registration::MatchingCandidates
std::vector< MatchingCandidate, Eigen::aligned_allocator< MatchingCandidate > > MatchingCandidates
Definition
matching_candidate.h:81
pcl
Definition
convolution.h:46
pcl::Correspondences
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
Definition
correspondence.h:89
pcl_macros.h
Defines all the PCL and non-PCL macros used.
pcl::registration::MatchingCandidate
Container for matching candidate consisting of.
Definition
matching_candidate.h:56
pcl::registration::MatchingCandidate::MatchingCandidate
MatchingCandidate(float s, const pcl::Correspondences &c, const Eigen::Matrix4f &m)
Value constructor.
Definition
matching_candidate.h:63
pcl::registration::MatchingCandidate::correspondences
pcl::Correspondences correspondences
Correspondences between source <-> target.
Definition
matching_candidate.h:73
pcl::registration::MatchingCandidate::~MatchingCandidate
~MatchingCandidate()=default
Destructor.
pcl::registration::MatchingCandidate::MatchingCandidate
MatchingCandidate()
Constructor.
Definition
matching_candidate.h:58
pcl::registration::MatchingCandidate::transformation
Eigen::Matrix4f transformation
Corresponding transformation matrix retrieved using corrs.
Definition
matching_candidate.h:76
pcl::registration::MatchingCandidate::fitness_score
float fitness_score
Fitness score of current candidate resulting from matching algorithm.
Definition
matching_candidate.h:70
pcl::registration::by_score
Sorting of candidates based on fitness score value.
Definition
matching_candidate.h:85
pcl::registration::by_score::operator()
bool operator()(MatchingCandidate const &left, MatchingCandidate const &right)
Operator used to sort candidates based on fitness score.
Definition
matching_candidate.h:88