Go to the documentation of this file.
53 const Vec3f& p,
const Vec3f& n, std::pair< float, float >* dn)
const
71 float epsilon,
float normalThresh,
float rms,
const PointCloud&
pc,
74 return BasePrimitiveShape::ConfidenceTests< Plane >(numTests, epsilon,
101 std::pair< size_t, float >* score)
const
149 m_hcs[0] = rot * m_hcs[0];
150 m_hcs[1] = rot * m_hcs[1];
155 visitor->
Visit(*
this);
169 std::pair< float, float >* param)
const
172 param->first = pp.
dot(m_hcs[0].Data());
173 param->second = pp.
dot(m_hcs[1].Data());
183 ParametersImpl(begin, end, bmpParams);
193 ParametersImpl(begin, end, bmpParams);
199 size_t* uextent,
size_t* vextent)
201 *uextent = size_t(std::ceil((bbox->
Max()[0] - bbox->
Min()[0]) / epsilon)) + 1;
202 *vextent = size_t(std::ceil((bbox->
Max()[1] - bbox->
Min()[1]) / epsilon)) + 1;
207 size_t, std::pair< int, int >* inBmp)
const
209 inBmp->first = std::floor((param.first - bbox.
Min()[0]) / epsilon);
210 inBmp->second = std::floor((param.second - bbox.
Min()[1]) / epsilon);
222 size_t,
size_t,
float,
int)
236 *p =
Vec3f(((bbox.
Min()[0] + epsilon * (
float(u) + .5f)) * m_hcs[0] +
237 (bbox.
Min()[1] + epsilon * (
float(
v) + .5f)) * m_hcs[1]).Data()) +
virtual void Visit(const PlanePrimitiveShape &plane)=0
PrimitiveShape * Clone() const
void Description(std::string *s) const
MiscLib::performance_t totalTime_planeConnected
float Distance(const Vec3f &p) const
float NormalDeviation(const Vec3f &p, const Vec3f &n) const
void WrapBitmap(const GfxTL::AABox< GfxTL::Vector2Df > &bbox, float epsilon, bool *uwrap, bool *vwrap) const
void DistanceAndNormalDeviation(const Vec3f &p, const Vec3f &n, std::pair< float, float > *dn) const
void Normal(const Vec3f &p, Vec3f *n) const
bool Fit(const PointCloud &pc, float epsilon, float normalThresh, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)
bool LeastSquaresFit(const PointCloud &pc, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)
void Project(const Vec3f &p, Vec3f *pp) const
unsigned int ConfidenceTests(unsigned int numTests, float epsilon, float normalThresh, float rms, const PointCloud &pc, const MiscLib::Vector< size_t > &indices) const
void Transform(float scale, const Vec3f &translate)
PrimtiveShape is a shape primitive in conjunction with a parametrization.
void Serialize(std::ostream *o, bool binary=true) const
This is the one and only serialization function It stores all the parameters of the shape as well as ...
void SetExtent(const GfxTL::AABox< GfxTL::Vector2Df > &bbox, const MiscLib::Vector< int > &componentsImg, size_t uextent, size_t vextent, float epsilon, int label)
void InBitmap(const std::pair< float, float > ¶m, float epsilon, const GfxTL::AABox< GfxTL::Vector2Df > &bbox, size_t uextent, size_t vextent, std::pair< int, int > *inBmp) const
static size_t SerializedSize()
const typedef Point * const_iterator
VectorXD< 3, float > Vector3Df
LevMarFunc< float > * SignedDistanceFunc() const
size_t SerializedSize() const
const Vec3f & getPosition() const
double a(double t, double a0, double j)
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...
void Transform(float scale, const Vec3f &translate)
PlanePrimitiveShape(const Vec3f &a, const Vec3f &b, const Vec3f &c)
PrimitiveShape * LSFit(const PointCloud &pc, float epsilon, float normalThresh, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end, std::pair< size_t, float > *score) const
size_t Identifier() const
void BitmapExtent(float epsilon, GfxTL::AABox< GfxTL::Vector2Df > *bbox, MiscLib::Vector< std::pair< float, float > > *params, size_t *uextent, size_t *vextent)
double v(double t, double v0, double a0, double j)
float dot(const Vec3f &v) const
float SignedDistance(const Vec3f &pos) const
const Vec3f & getNormal() const
void Serialize(bool binary, std::ostream *o) const
bool Similar(float tolerance, const PlanePrimitiveShape &) const
VectorXD< 3, float > Vec3f
float SignedDistance(const Vec3f &p) 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
bool InSpace(float u, float v, Vec3f *p, Vec3f *n) const
void Parameters(const Vec3f &p, std::pair< float, float > *param) const
void Visit(PrimitiveShapeVisitor *visitor) const
float getDistance(const Vec3f &pos) const
double s(double t, double s0, double v0, double a0, double j)