Go to the documentation of this file. 1 #ifndef BASEPRIMITIVESHAPE_HEADER
2 #define BASEPRIMITIVESHAPE_HEADER
16 template<
class ShapeT >
21 unsigned int numFailures = 0;
23 const unsigned int numSamples = ShapeT::RequiredSamples;
24 if (numSamples >=
indices.size())
29 for (
unsigned int i = 0; i < numTests; ++i)
32 for (
unsigned int j = 0; j < numSamples; ++j)
39 while (std::find(sampleIndices.
begin(), sampleIndices.
end(), idx)
40 != sampleIndices.
end());
44 for (
unsigned int j = 0; j < numSamples; ++j)
46 samples[j] =
pc[sampleIndices[j]].
pos;
47 samples[j + numSamples] =
pc[sampleIndices[j]].
normal;
50 if (shape.Init(samples))
63 for (
size_t i = 0; i <
indices.size(); ++i)
65 for (
size_t j = 0; j <
shapes.size(); ++j)
75 if (
abs(dn) > normalThresh)
82 for (
size_t i = 0; i < scores.
size(); ++i)
84 if (scores[i] < .9f *
indices.size())
void push_back(const T &v)
PrimtiveShape is a shape primitive in conjunction with a parametrization.
std::vector< T > abs(const std::vector< T > &v)
pcl::PointIndices::Ptr indices(const PCG &g)
Retrieve the indices of the points of the point cloud stored in a point cloud graph that actually bel...
unsigned int ConfidenceTests(unsigned int numTests, float epsilon, float normalThresh, float rms, const PointCloud &pc, const MiscLib::Vector< size_t > &indices) const
float dot(const Vec3f &v) const
Introduction Thank you for taking interest in our work and downloading this software This library implements the algorithm described in the paper R R R Klein Efficient RANSAC for Point Cloud Shape in Computer Graphics Blackwell June If you use this software you should cite the aforementioned paper in any resulting publication Please send comments or bug reports to Ruwen Roland BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE Example usage This section shows how to use the library to detect the shapes in a point cloud PointCloud pc
MiscLib::Vector< std::pair< MiscLib::RefCountPtr< PrimitiveShape >, size_t > > shapes