BitmapPrimitiveShape Class Referenceabstract

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

+ Inheritance diagram for BitmapPrimitiveShape:

Public Member Functions

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)
 
virtual void BitmapExtent (float epsilon, GfxTL::AABox< GfxTL::Vector2Df > *bbox, MiscLib::Vector< std::pair< float, float > > *params, size_t *uextent, size_t *vextent)=0
 
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
 
virtual 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 =0
 
bool Init (bool binary, std::istream *i)
 
virtual bool InSpace (float u, float v, Vec3f *p, Vec3f *n) const =0
 
virtual 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 =0
 
virtual void Parameters (const Vec3f &p, std::pair< float, float > *param) const =0
 
virtual void Parameters (GfxTL::IndexedIterator< IndexIterator, PointCloud::const_iterator > begin, GfxTL::IndexedIterator< IndexIterator, PointCloud::const_iterator > end, MiscLib::Vector< std::pair< float, float > > *bmpParams) const =0
 
virtual 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 =0
 
virtual void PreWrapBitmap (const GfxTL::AABox< GfxTL::Vector2Df > &bbox, float epsilon, size_t uextent, size_t vextent, MiscLib::Vector< char > *bmp) const
 
void TrimmingPolygons (const PointCloud &pc, float epsilon, size_t begin, size_t end, std::deque< ComponentPolygons > *polys) const
 
virtual void WrapBitmap (const GfxTL::AABox< GfxTL::Vector2Df > &bbox, float epsilon, bool *uwrap, bool *vwrap) const =0
 
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 PrimitiveShapeClone () const =0
 
virtual void Description (std::string *s) const =0
 
virtual float Distance (const Vec3f &p) const =0
 
virtual void DistanceAndNormalDeviation (const Vec3f &p, const Vec3f &n, std::pair< float, float > *dn) const =0
 
virtual bool Fit (const PointCloud &pc, float epsilon, float normalThresh, MiscLib::Vector< size_t >::const_iterator begin, MiscLib::Vector< size_t >::const_iterator end)=0
 
virtual size_t Identifier () const =0
 
virtual 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 =0
 
virtual void Normal (const Vec3f &p, Vec3f *n) const =0
 
virtual float NormalDeviation (const Vec3f &p, const Vec3f &n) const =0
 
virtual void OptimizeParametrization (const PointCloud &pc, size_t begin, size_t end, float epsilon)
 
virtual void Project (const Vec3f &p, Vec3f *pp) const =0
 
virtual unsigned int RequiredSamples () const =0
 
virtual void Serialize (float *array) const =0
 
virtual void Serialize (std::ostream *o, bool binary=true) const =0
 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 =0
 
virtual size_t SerializedSize () const =0
 
virtual float SignedDistance (const Vec3f &p) const =0
 
virtual LevMarFunc< float > * SignedDistanceFunc () const =0
 
virtual 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 void Transform (float scale, const Vec3f &translate)=0
 
virtual void Visit (PrimitiveShapeVisitor *visitor) const =0
 
- Public Member Functions inherited from RefCount
unsigned int AddRef () const
 
RefCountoperator= (const RefCount &)
 
 RefCount ()
 
 RefCount (const RefCount &)
 
unsigned int Release () const
 

Protected Attributes

GfxTL::AABox< GfxTL::Vector2Dfm_extBbox
 

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 BasePrimitiveShape
template<class ShapeT >
unsigned int ConfidenceTests (unsigned int numTests, float epsilon, float normalThresh, float rms, const PointCloud &pc, const MiscLib::Vector< size_t > &indices) const
 
- Protected Member Functions inherited from RefCount
virtual ~RefCount ()
 

Detailed Description

Definition at line 30 of file BitmapPrimitiveShape.h.

Member Function Documentation

◆ AllConnectedComponents()

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 
)

Definition at line 101 of file BitmapPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ BitmapExtent()

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

Implemented in SpherePrimitiveShape, CylinderPrimitiveShape, TorusPrimitiveShape, PlanePrimitiveShape, and ConePrimitiveShape.

+ Here is the caller graph for this function:

◆ BuildBitmap() [1/2]

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

Definition at line 102 of file BitmapPrimitiveShape.h.

+ Here is the call graph for this function:

◆ BuildBitmap() [2/2]

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

Definition at line 163 of file BitmapPrimitiveShape.h.

+ Here is the call graph for this function:

◆ BuildPolygons()

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

Definition at line 349 of file BitmapPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ ConnectedComponent()

size_t ConnectedComponent ( const PointCloud pc,
float  epsilon,
MiscLib::Vector< size_t > *  indices,
bool  doFiltering = true,
float borderRatio = 0 
)
virtual

Implements PrimitiveShape.

Definition at line 161 of file BitmapPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ GenerateBitmapPoints()

void GenerateBitmapPoints ( const PointCloud pc,
float  epsilon,
size_t  begin,
size_t  end,
PointCloud bmpPc 
) const
virtual

Implements PrimitiveShape.

Definition at line 304 of file BitmapPrimitiveShape.cpp.

+ Here is the call graph for this function:

◆ InBitmap()

virtual 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
pure virtual

Implemented in SpherePrimitiveShape, CylinderPrimitiveShape, TorusPrimitiveShape, PlanePrimitiveShape, and ConePrimitiveShape.

+ Here is the caller graph for this function:

◆ Init()

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

Definition at line 28 of file BitmapPrimitiveShape.cpp.

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

◆ InSpace() [1/2]

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

◆ InSpace() [2/2]

virtual 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
pure virtual

◆ Parameters() [1/3]

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

Implements PrimitiveShape.

Implemented in SpherePrimitiveShape, CylinderPrimitiveShape, TorusPrimitiveShape, PlanePrimitiveShape, and ConePrimitiveShape.

+ Here is the caller graph for this function:

◆ Parameters() [2/3]

◆ Parameters() [3/3]

virtual 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
pure virtual

◆ PreWrapBitmap()

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

Reimplemented in CylinderPrimitiveShape, and ConePrimitiveShape.

Definition at line 12 of file BitmapPrimitiveShape.cpp.

◆ TrimmingPolygons()

void TrimmingPolygons ( const PointCloud pc,
float  epsilon,
size_t  begin,
size_t  end,
std::deque< ComponentPolygons > *  polys 
) const
virtual

Implements PrimitiveShape.

Definition at line 295 of file BitmapPrimitiveShape.cpp.

◆ WrapBitmap()

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

◆ WrapComponents()

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
virtual

Reimplemented in SpherePrimitiveShape, TorusPrimitiveShape, and ConePrimitiveShape.

Definition at line 19 of file BitmapPrimitiveShape.cpp.

Member Data Documentation

◆ m_extBbox

GfxTL::AABox< GfxTL::Vector2Df > m_extBbox
mutableprotected

Definition at line 98 of file BitmapPrimitiveShape.h.


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