CylinderPrimitiveShape Class Reference

#include <VisionX/components/pointcloud_processor/EfficientRANSACPrimitiveExtractor/EfficientRANSAC/CylinderPrimitiveShape.h>

+ Inheritance diagram for CylinderPrimitiveShape:

Public Member Functions

void BitmapExtent (float epsilon, GfxTL::AABox< GfxTL::Vector2Df > *bbox, MiscLib::Vector< std::pair< float, float > > *params, size_t *uextent, size_t *vextent)
 
PrimitiveShapeClone () const
 
unsigned int ConfidenceTests (unsigned int numTests, float epsilon, float normalThresh, float rms, const PointCloud &pc, const MiscLib::Vector< size_t > &indices) const
 
 CylinderPrimitiveShape ()
 
 CylinderPrimitiveShape (const Cylinder &cylinder)
 
void Description (std::string *s) const
 
float Distance (const Vec3f &p) const
 
void DistanceAndNormalDeviation (const Vec3f &p, const Vec3f &n, std::pair< float, float > *dn) const
 
bool Fit (const PointCloud &pc, float epsilon, float normalThresh, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)
 
float Height () const
 
size_t Identifier () const
 
void InBitmap (const std::pair< float, float > &param, float epsilon, const GfxTL::AABox< GfxTL::Vector2Df > &bbox, size_t uextent, size_t vextent, std::pair< int, int > *inBmp) const
 
bool Init (bool binary, std::istream *i)
 
bool Init (const Vec3f &pointA, const Vec3f &pointB, const Vec3f &normalA, const Vec3f &normalB)
 
bool InSpace (float u, float v, Vec3f *p, Vec3f *n) const
 
bool InSpace (size_t u, size_t v, float epsilon, const GfxTL::AABox< GfxTL::Vector2Df > &bbox, size_t uextent, size_t vextent, Vec3f *p, Vec3f *n) const
 
const CylinderInternal () const
 
PrimitiveShapeLSFit (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
 
float MaxHeight () const
 
float MinHeight () const
 
void Normal (const Vec3f &p, Vec3f *n) const
 
float NormalDeviation (const Vec3f &p, const Vec3f &n) const
 
void Parameters (const Vec3f &p, std::pair< float, float > *param) const
 
void Parameters (GfxTL::IndexedIterator< IndexIterator, PointCloud::const_iterator > begin, GfxTL::IndexedIterator< IndexIterator, PointCloud::const_iterator > end, MiscLib::Vector< std::pair< float, float > > *bmpParams) const
 
void Parameters (GfxTL::IndexedIterator< MiscLib::Vector< size_t >::iterator, PointCloud::const_iterator > begin, GfxTL::IndexedIterator< MiscLib::Vector< size_t >::iterator, PointCloud::const_iterator > end, MiscLib::Vector< std::pair< float, float > > *bmpParams) const
 
void PreWrapBitmap (const GfxTL::AABox< GfxTL::Vector2Df > &bbox, float epsilon, size_t uextent, size_t vextent, MiscLib::Vector< char > *bmp) const
 
void Project (const Vec3f &p, Vec3f *pp) const
 
unsigned int RequiredSamples () const
 
virtual void Serialize (float *array) const
 
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 the parametrization. More...
 
virtual size_t SerializedFloatSize () const
 
size_t SerializedSize () const
 
void SetExtent (const GfxTL::AABox< GfxTL::Vector2Df > &bbox, const MiscLib::Vector< int > &componentsImg, size_t uextent, size_t vextent, float epsilon, int label)
 
float SignedDistance (const Vec3f &p) const
 
LevMarFunc< float > * SignedDistanceFunc () const
 
bool Similar (float tolerance, const CylinderPrimitiveShape &shape) const
 
void SuggestSimplifications (const PointCloud &pc, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end, float distThresh, MiscLib::Vector< MiscLib::RefCountPtr< PrimitiveShape > > *suggestions) const
 
void Transform (const GfxTL::MatrixXX< 3, 3, float > &rot, const GfxTL::Vector3Df &trans)
 
void Transform (float scale, const Vec3f &translate)
 
void Visit (PrimitiveShapeVisitor *visitor) const
 
void WrapBitmap (const GfxTL::AABox< GfxTL::Vector2Df > &bbox, float epsilon, bool *uwrap, bool *vwrap) const
 
- Public Member Functions inherited from BitmapPrimitiveShape
size_t AllConnectedComponents (const PointCloud &pc, float epsilon, BitmapInfo &bitmapInfo, MiscLib::Vector< size_t > *indices, MiscLib::Vector< int > &componentsImg, MiscLib::Vector< std::pair< int, size_t > > &labels, bool doFiltering=true)
 
template<class IteratorT >
void BuildBitmap (const PointCloud &pc, float *epsilon, IteratorT begin, IteratorT end, MiscLib::Vector< std::pair< float, float > > *params, GfxTL::AABox< GfxTL::Vector2Df > *bbox, MiscLib::Vector< char > *bitmap, size_t *uextent, size_t *vextent, MiscLib::Vector< size_t > *bmpIdx) const
 
template<class IteratorT >
void BuildBitmap (const PointCloud &pc, float *epsilon, IteratorT begin, IteratorT end, MiscLib::Vector< std::pair< float, float > > *params, GfxTL::AABox< GfxTL::Vector2Df > *bbox, MiscLib::Vector< char > *bitmap, size_t *uextent, size_t *vextent, MiscLib::Vector< size_t > *bmpIdx, size_t border) const
 
void BuildPolygons (const PointCloud &pc, float epsilon, size_t begin, size_t end, GfxTL::AABox< GfxTL::Vector2Df > *bbox, size_t *uextent, size_t *vextent, std::deque< ComponentPolygons > *polys) const
 
size_t ConnectedComponent (const PointCloud &pc, float epsilon, MiscLib::Vector< size_t > *indices, bool doFiltering=true, float *borderRatio=0)
 
void GenerateBitmapPoints (const PointCloud &pc, float epsilon, size_t begin, size_t end, PointCloud *bmpPc) const
 
bool Init (bool binary, std::istream *i)
 
void TrimmingPolygons (const PointCloud &pc, float epsilon, size_t begin, size_t end, std::deque< ComponentPolygons > *polys) const
 
virtual void WrapComponents (const GfxTL::AABox< GfxTL::Vector2Df > &bbox, float epsilon, size_t uextent, size_t vextent, MiscLib::Vector< int > *componentImg, MiscLib::Vector< std::pair< int, size_t > > *labels) const
 
- Public Member Functions inherited from PrimitiveShape
virtual void OptimizeParametrization (const PointCloud &pc, size_t begin, size_t end, float epsilon)
 
- Public Member Functions inherited from RefCount
unsigned int AddRef () const
 
RefCountoperator= (const RefCount &)
 
 RefCount ()
 
 RefCount (const RefCount &)
 
unsigned int Release () const
 

Additional Inherited Members

- Public Types inherited from PrimitiveShape
typedef MiscLib::Vector< GfxTL::VectorXD< 2, size_t > > BitmapPolygon
 
typedef MiscLib::Vector< BitmapPolygonComponentPolygons
 
- Protected Member Functions inherited from RefCount
virtual ~RefCount ()
 
- Protected Attributes inherited from BitmapPrimitiveShape
GfxTL::AABox< GfxTL::Vector2Dfm_extBbox
 

Detailed Description

Definition at line 11 of file CylinderPrimitiveShape.h.

Constructor & Destructor Documentation

◆ CylinderPrimitiveShape() [1/2]

Definition at line 19 of file CylinderPrimitiveShape.cpp.

+ Here is the caller graph for this function:

◆ CylinderPrimitiveShape() [2/2]

CylinderPrimitiveShape ( const Cylinder cylinder)

Definition at line 22 of file CylinderPrimitiveShape.cpp.

Member Function Documentation

◆ BitmapExtent()

void BitmapExtent ( float  epsilon,
GfxTL::AABox< GfxTL::Vector2Df > *  bbox,
MiscLib::Vector< std::pair< float, float > > *  params,
size_t *  uextent,
size_t *  vextent 
)
virtual

Implements BitmapPrimitiveShape.

Definition at line 306 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Clone()

PrimitiveShape * Clone ( ) const
virtual

Implements PrimitiveShape.

Definition at line 31 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ ConfidenceTests()

unsigned int ConfidenceTests ( unsigned int  numTests,
float  epsilon,
float  normalThresh,
float  rms,
const PointCloud pc,
const MiscLib::Vector< size_t > &  indices 
) const
virtual

Reimplemented from BasePrimitiveShape.

Definition at line 78 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Description()

void Description ( std::string *  s) const
virtual

Implements PrimitiveShape.

Definition at line 86 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Distance()

float Distance ( const Vec3f p) const
virtual

Implements PrimitiveShape.

Definition at line 42 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ DistanceAndNormalDeviation()

void DistanceAndNormalDeviation ( const Vec3f p,
const Vec3f n,
std::pair< float, float > *  dn 
) const
virtual

Implements PrimitiveShape.

Definition at line 60 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Fit()

bool Fit ( const PointCloud pc,
float  epsilon,
float  normalThresh,
MiscLib::Vector< size_t >::const_iterator  begin,
MiscLib::Vector< size_t >::const_iterator  end 
)
virtual

Implements PrimitiveShape.

Definition at line 91 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Height()

float Height ( ) const

Definition at line 263 of file CylinderPrimitiveShape.cpp.

◆ Identifier()

size_t Identifier ( ) const
virtual

Implements PrimitiveShape.

Definition at line 26 of file CylinderPrimitiveShape.cpp.

◆ InBitmap()

void InBitmap ( const std::pair< float, float > &  param,
float  epsilon,
const GfxTL::AABox< GfxTL::Vector2Df > &  bbox,
size_t  uextent,
size_t  vextent,
std::pair< int, int > *  inBmp 
) const
virtual

Implements BitmapPrimitiveShape.

Definition at line 368 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Init() [1/2]

bool Init ( bool  binary,
std::istream *  i 
)
inline

Definition at line 25 of file CylinderPrimitiveShape.h.

+ Here is the call graph for this function:

◆ Init() [2/2]

bool Init ( const Vec3f pointA,
const Vec3f pointB,
const Vec3f normalA,
const Vec3f normalB 
)

Definition at line 36 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ InSpace() [1/2]

bool InSpace ( float  u,
float  v,
Vec3f p,
Vec3f n 
) const
virtual

Implements BitmapPrimitiveShape.

Definition at line 471 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InSpace() [2/2]

bool InSpace ( size_t  u,
size_t  v,
float  epsilon,
const GfxTL::AABox< GfxTL::Vector2Df > &  bbox,
size_t  uextent,
size_t  vextent,
Vec3f p,
Vec3f n 
) const
virtual

Implements BitmapPrimitiveShape.

Definition at line 484 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Internal()

const Cylinder& Internal ( ) const
inline

Definition at line 69 of file CylinderPrimitiveShape.h.

◆ LSFit()

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
virtual

Implements PrimitiveShape.

Definition at line 105 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ MaxHeight()

float MaxHeight ( ) const

Definition at line 273 of file CylinderPrimitiveShape.cpp.

◆ MinHeight()

float MinHeight ( ) const

Definition at line 268 of file CylinderPrimitiveShape.cpp.

◆ Normal()

void Normal ( const Vec3f p,
Vec3f n 
) const
virtual

Implements PrimitiveShape.

Definition at line 73 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ NormalDeviation()

float NormalDeviation ( const Vec3f p,
const Vec3f n 
) const
virtual

Implements PrimitiveShape.

Definition at line 52 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Parameters() [1/3]

void Parameters ( const Vec3f p,
std::pair< float, float > *  param 
) const
virtual

Implements BitmapPrimitiveShape.

Definition at line 278 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Parameters() [2/3]

void Parameters ( GfxTL::IndexedIterator< IndexIterator, PointCloud::const_iterator begin,
GfxTL::IndexedIterator< IndexIterator, PointCloud::const_iterator end,
MiscLib::Vector< std::pair< float, float > > *  bmpParams 
) const
virtual

Implements BitmapPrimitiveShape.

Definition at line 296 of file CylinderPrimitiveShape.cpp.

◆ Parameters() [3/3]

void Parameters ( GfxTL::IndexedIterator< MiscLib::Vector< size_t >::iterator, PointCloud::const_iterator begin,
GfxTL::IndexedIterator< MiscLib::Vector< size_t >::iterator, PointCloud::const_iterator end,
MiscLib::Vector< std::pair< float, float > > *  bmpParams 
) const
virtual

Implements BitmapPrimitiveShape.

Definition at line 286 of file CylinderPrimitiveShape.cpp.

◆ PreWrapBitmap()

void PreWrapBitmap ( const GfxTL::AABox< GfxTL::Vector2Df > &  bbox,
float  epsilon,
size_t  uextent,
size_t  vextent,
MiscLib::Vector< char > *  bmp 
) const
virtual

Reimplemented from BitmapPrimitiveShape.

Definition at line 392 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Project()

void Project ( const Vec3f p,
Vec3f pp 
) const
virtual

Implements PrimitiveShape.

Definition at line 68 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ RequiredSamples()

unsigned int RequiredSamples ( ) const
inlinevirtual

Implements PrimitiveShape.

Definition at line 17 of file CylinderPrimitiveShape.h.

◆ Serialize() [1/2]

virtual void Serialize ( float array) const
inlinevirtual

Implements PrimitiveShape.

Definition at line 51 of file CylinderPrimitiveShape.h.

◆ Serialize() [2/2]

void Serialize ( std::ostream *  o,
bool  binary = true 
) const
virtual

This is the one and only serialization function It stores all the parameters of the shape as well as the parametrization.

The first byte written (in both, binary and ascii mode) is the shape identifier

Implements PrimitiveShape.

Definition at line 126 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ SerializedFloatSize()

virtual size_t SerializedFloatSize ( ) const
inlinevirtual

Implements PrimitiveShape.

Definition at line 55 of file CylinderPrimitiveShape.h.

◆ SerializedSize()

size_t SerializedSize ( ) const
virtual

Implements PrimitiveShape.

Definition at line 144 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ SetExtent()

void SetExtent ( const GfxTL::AABox< GfxTL::Vector2Df > &  bbox,
const MiscLib::Vector< int > &  componentsImg,
size_t  uextent,
size_t  vextent,
float  epsilon,
int  label 
)

Definition at line 405 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ SignedDistance()

float SignedDistance ( const Vec3f p) const
virtual

Implements PrimitiveShape.

Definition at line 47 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ SignedDistanceFunc()

LevMarFunc< float > * SignedDistanceFunc ( ) const
virtual

Implements PrimitiveShape.

Definition at line 121 of file CylinderPrimitiveShape.cpp.

◆ Similar()

bool Similar ( float  tolerance,
const CylinderPrimitiveShape shape 
) const

Definition at line 256 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ SuggestSimplifications()

void SuggestSimplifications ( const PointCloud pc,
MiscLib::Vector< size_t >::const_iterator  begin,
MiscLib::Vector< size_t >::const_iterator  end,
float  distThresh,
MiscLib::Vector< MiscLib::RefCountPtr< PrimitiveShape > > *  suggestions 
) const
virtual

Reimplemented from PrimitiveShape.

Definition at line 165 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Transform() [1/2]

void Transform ( const GfxTL::MatrixXX< 3, 3, float > &  rot,
const GfxTL::Vector3Df trans 
)

Definition at line 154 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Transform() [2/2]

void Transform ( float  scale,
const Vec3f translate 
)
virtual

Implements PrimitiveShape.

Definition at line 149 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ Visit()

void Visit ( PrimitiveShapeVisitor visitor) const
virtual

Implements PrimitiveShape.

Definition at line 160 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ WrapBitmap()

void WrapBitmap ( const GfxTL::AABox< GfxTL::Vector2Df > &  bbox,
float  epsilon,
bool *  uwrap,
bool *  vwrap 
) const
virtual

Implements BitmapPrimitiveShape.

Definition at line 376 of file CylinderPrimitiveShape.cpp.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: