Go to the documentation of this file.
19 enum { RequiredSamples = 1 };
27 bool Init(
bool binary, std::istream* i);
29 void Init(
float* array);
32 return abs(m_dist - m_normal.dot(pos));
36 return abs(m_dist - m_normal.dot(pos));
40 return m_normal.dot(pos) - m_dist;
59 bool equals(
Plane plane);
68 return LeastSquaresFit(
pc, begin, end);
73 template<
class IteratorT >
74 bool LeastSquaresFit(IteratorT begin, IteratorT end);
77 void Serialize(
bool binary, std::ostream* o)
const;
78 static size_t SerializedSize();
79 void Serialize(FILE* o)
const;
80 void Serialize(
float* array)
const;
81 static size_t SerializedFloatSize();
83 void Transform(
float scale,
const Vec3f& translate);
84 float Intersect(
const Vec3f& p,
const Vec3f& r)
const;
92 template<
class IteratorT >
float SignedDistToOrigin() const
void Normal(const Vec3f &, Vec3f *n) const
bool LeastSquaresFit(const PointCloud &pc, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)
void Normal(PointType *normal) const
const Vec3f & getPosition() const
std::vector< T > abs(const std::vector< T > &v)
void Mean(PointsForwardIt begin, PointsForwardIt end, WeightsForwardIt weights, PointT *mean)
float DistanceAndNormal(const Vec3f &pos, Vec3f *n) const
std::optional< float > mean(const boost::circular_buffer< NameValueMap > &buffer, const std::string &key)
float Distance(const Vec3f &pos) const
bool Fit(const PointCloud &pc, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)
float SignedDistance(const Vec3f &pos) const
const Vec3f & getNormal() const
VectorXD< 3, float > Vec3f
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
float getDistance(const Vec3f &pos) const
bool Fit(const PointType &origin, PointsForwardIt begin, PointsForwardIt end, WeightsForwardIt weights)