Homepage Demos Overview Downloads Tutorials Reference
Credits

BlobData Class Reference

#include <BlobData.h>

Inheritance diagram for BlobData:

Inheritance graph
[legend]
List of all members.

Detailed Description

Blob shapes, described by bounding boxes and an optional list of runs.

Definition at line 25 of file BlobData.h.

Public Types

 groundplane
 2D shape lying flat on the ground
 pillar
 3D shape standing on the ground
 pinata
 3D shape hanging vertically in space
enum  BlobOrientation_t { groundplane, pillar, pinata }
 Assumed orientation of the blob in 3D space. More...

Public Member Functions

 BlobData (ShapeSpace &_space, const Point &_topLeft, const Point &_topRight, const Point &_bottomLeft, const Point &_bottomRight, const float _area, const std::vector< run > &_runvec, const BlobOrientation_t _orientation, const rgb rgbvalue)
 Constructor.
 DATASTUFF_H (BlobData)
virtual Point getCentroid () const
 return the centroid of the shape in point format
float getArea ()
 Area of the blob.
virtual void printParams () const
 Print information about this shape.
virtual void applyTransform (const NEWMAT::Matrix &Tmat)
 Transformations. (Virtual in BaseData.).
virtual void projectToGround (const NEWMAT::Matrix &camToBase, const NEWMAT::ColumnVector &groundplane)
 Project to ground.
virtual void update_derived_properties ()
 Update derived properties.
virtual bool isMatchFor (const ShapeRoot &other) const
 Match blobs based on their parameters. (Virtual in BaseData.).
virtual bool updateParams (const ShapeRoot &other, bool forceUpdate=false)
 Update shape parameters after matching to another shape.
virtual unsigned short getDimension () const
std::vector< PointfindCorners (unsigned int nExpected, std::vector< Point > &candidates, float &bestValue)
std::vector< PointfindCornersDerivative ()
std::vector< PointfindCornersDiagonal ()
std::vector< PointfindCornersShapeFit (unsigned int ncorners, std::vector< Point > &candidates, float &bestValue)

Static Public Member Functions

static ShapeType_t getStaticType ()
static std::vector< Shape<
BlobData > > 
extractBlobs (const Sketch< bool > &sketch, const set< int > &colors, int minarea=0, BlobData::BlobOrientation_t orient=BlobData::groundplane, int maxblobs=50)
 Import blobs from Sketch<bool> as a vector of Shape<BlobData>.
static std::vector< Shape<
BlobData > > 
extractBlobs (const Sketch< bool > &sketch, int minarea=0, BlobData::BlobOrientation_t orient=BlobData::groundplane, int maxblobs=50)
static std::vector< Shape<
BlobData > > 
extractBlobs (const Sketch< CMVision::uchar > &sketch, const set< int > &colors, int minarea=0, BlobData::BlobOrientation_t orient=BlobData::groundplane, int maxblobs=50)
 Import blobs from Sketch<uchar> as a vector of Shape<BlobData>.
static std::vector< Shape<
BlobData > > 
extractBlobs (const Sketch< CMVision::uchar > &sketch, int minarea=0, BlobData::BlobOrientation_t orient=BlobData::groundplane, int maxblobs=50)
static BlobDatanew_blob (ShapeSpace &space, const CMVision::region &reg, const CMVision::run< CMVision::uchar > *rle_buff, const BlobData::BlobOrientation_t orient, const rgb rgbvalue)

Public Attributes

Point topLeft
Point topRight
Point bottomLeft
Point bottomRight
float area
const std::vector< runrunvec
enum DualCoding::BlobData::BlobOrientation_t orientation
 Assumed orientation of the blob in 3D space.

Private Member Functions

virtual Sketch< bool > * render () const
 Render into a sketch space and return reference. (Private.).
BlobDataoperator= (const BlobData &)
 don't call

Friends

class Shape< BlobData >

Classes

class  areaLessThan
struct  run


Member Enumeration Documentation

Assumed orientation of the blob in 3D space.

Enumerator:
groundplane  2D shape lying flat on the ground
pillar  3D shape standing on the ground
pinata  3D shape hanging vertically in space

Definition at line 44 of file BlobData.h.


Constructor & Destructor Documentation

BlobData ( ShapeSpace _space,
const Point _topLeft,
const Point _topRight,
const Point _bottomLeft,
const Point _bottomRight,
const float  _area,
const std::vector< run > &  _runvec,
const BlobOrientation_t  _orientation,
const rgb  rgbvalue 
)

Constructor.

Definition at line 24 of file BlobData.cc.


Member Function Documentation

void applyTransform ( const NEWMAT::Matrix &  Tmat  )  [virtual]

Transformations. (Virtual in BaseData.).

Implements BaseData.

Definition at line 88 of file BlobData.cc.

DATASTUFF_H ( BlobData   ) 

static std::vector<Shape<BlobData> > extractBlobs ( const Sketch< CMVision::uchar > &  sketch,
int  minarea = 0,
BlobData::BlobOrientation_t  orient = BlobData::groundplane,
int  maxblobs = 50 
) [static]

static std::vector<Shape<BlobData> > extractBlobs ( const Sketch< CMVision::uchar > &  sketch,
const set< int > &  colors,
int  minarea = 0,
BlobData::BlobOrientation_t  orient = BlobData::groundplane,
int  maxblobs = 50 
) [static]

Import blobs from Sketch<uchar> as a vector of Shape<BlobData>.

std::vector< Shape< BlobData > > extractBlobs ( const Sketch< bool > &  sketch,
int  minarea = 0,
BlobData::BlobOrientation_t  orient = BlobData::groundplane,
int  maxblobs = 50 
) [static]

Definition at line 220 of file BlobData.cc.

std::vector< Shape< BlobData > > extractBlobs ( const Sketch< bool > &  sketch,
const set< int > &  colors,
int  minarea = 0,
BlobData::BlobOrientation_t  orient = BlobData::groundplane,
int  maxblobs = 50 
) [static]

Import blobs from Sketch<bool> as a vector of Shape<BlobData>.

Definition at line 202 of file BlobData.cc.

Referenced by BlobData::extractBlobs(), MapBuilder::getCamBlobs(), and MapBuilder::getCameraShapes().

std::vector< Point > findCorners ( unsigned int  nExpected,
std::vector< Point > &  candidates,
float &  bestValue 
)

Definition at line 341 of file BlobData.cc.

std::vector< Point > findCornersDerivative (  ) 

Definition at line 507 of file BlobData.cc.

std::vector< Point > findCornersDiagonal (  ) 

Definition at line 587 of file BlobData.cc.

std::vector< Point > findCornersShapeFit ( unsigned int  ncorners,
std::vector< Point > &  candidates,
float &  bestValue 
)

Definition at line 704 of file BlobData.cc.

Referenced by BlobData::findCorners().

float getArea (  )  [inline]

Area of the blob.

Definition at line 70 of file BlobData.h.

Point getCentroid (  )  const [virtual]

return the centroid of the shape in point format

Implements BaseData.

Definition at line 40 of file BlobData.cc.

Referenced by BlobData::findCornersDerivative(), BlobData::findCornersDiagonal(), and BlobData::isMatchFor().

virtual unsigned short getDimension (  )  const [inline, virtual]

Implements BaseData.

Definition at line 91 of file BlobData.h.

static ShapeType_t getStaticType (  )  [inline, static]

Definition at line 60 of file BlobData.h.

bool isMatchFor ( const ShapeRoot other  )  const [virtual]

Match blobs based on their parameters. (Virtual in BaseData.).

Implements BaseData.

Definition at line 172 of file BlobData.cc.

static BlobData* new_blob ( ShapeSpace space,
const CMVision::region &  reg,
const CMVision::run< CMVision::uchar > *  rle_buff,
const BlobData::BlobOrientation_t  orient,
const rgb  rgbvalue 
) [static]

BlobData& operator= ( const BlobData  )  [private]

don't call

void printParams (  )  const [virtual]

Print information about this shape.

Implements BaseData.

Definition at line 45 of file BlobData.cc.

void projectToGround ( const NEWMAT::Matrix &  camToBase,
const NEWMAT::ColumnVector &  groundplane 
) [virtual]

Project to ground.

Implements BaseData.

Definition at line 111 of file BlobData.cc.

Sketch< bool > * render (  )  const [private, virtual]

Render into a sketch space and return reference. (Private.).

Implements BaseData.

Definition at line 55 of file BlobData.cc.

void update_derived_properties (  )  [virtual]

Update derived properties.

Definition at line 156 of file BlobData.cc.

Referenced by BlobData::projectToGround(), and BlobData::updateParams().

bool updateParams ( const ShapeRoot other,
bool  forceUpdate = false 
) [virtual]

Update shape parameters after matching to another shape.

Implements BaseData.

Definition at line 182 of file BlobData.cc.


Friends And Related Function Documentation

friend class Shape< BlobData > [friend]

Definition at line 64 of file BlobData.h.

Referenced by BlobData::extractBlobs(), BlobData::isMatchFor(), and BlobData::updateParams().


Member Data Documentation

const std::vector<run> runvec


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

DualCoding 3.0beta
Generated Wed Oct 4 00:02:25 2006 by Doxygen 1.4.7