Go to the documentation of this file.
59 std::pair<float, float>* dn)
const
85 return BasePrimitiveShape::ConfidenceTests<Plane>(
86 numTests, epsilon, normalThresh, rms,
pc,
indices);
119 std::pair<size_t, float>* score)
const
170 m_hcs[0] = rot * m_hcs[0];
171 m_hcs[1] = rot * m_hcs[1];
177 visitor->
Visit(*
this);
196 param->first = pp.
dot(m_hcs[0].Data());
197 param->second = pp.
dot(m_hcs[1].Data());
206 ParametersImpl(begin, end, bmpParams);
215 ParametersImpl(begin, end, bmpParams);
225 *uextent = size_t(std::ceil((bbox->
Max()[0] - bbox->
Min()[0]) / epsilon)) + 1;
226 *vextent = size_t(std::ceil((bbox->
Max()[1] - bbox->
Min()[1]) / epsilon)) + 1;
235 std::pair<int, int>* inBmp)
const
237 inBmp->first = std::floor((param.first - bbox.
Min()[0]) / epsilon);
238 inBmp->second = std::floor((param.second - bbox.
Min()[1]) / epsilon);
279 *p =
Vec3f(((bbox.
Min()[0] + epsilon * (
float(u) + .5f)) * m_hcs[0] +
280 (bbox.
Min()[1] + epsilon * (
float(
v) + .5f)) * m_hcs[1])
virtual void Visit(const PlanePrimitiveShape &plane)=0
PrimitiveShape * Clone() const
void Description(std::string *s) const
MiscLib::performance_t totalTime_planeConnected
VectorXD< 3, float > Vec3f
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)
VectorXD< 3, float > Vector3Df
PrimtiveShape is a shape primitive in conjunction with a parametrization.
void BitmapExtent(float epsilon, GfxTL::AABox< GfxTL::Vector2Df > *bbox, MiscLib::Vector< std::pair< float, float >> *params, size_t *uextent, size_t *vextent)
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 ...
constexpr auto n() noexcept
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
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
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
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)