Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

BlobData Class Reference

#include <BlobData.h>

Inheritance diagram for BlobData:

List of all members.


Detailed Description

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

Definition at line 27 of file BlobData.h.


Public Types

enum  BlobOrientation_t { groundplane, pillar, poster }
 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=0, const std::vector< run > &_runvec=std::vector< run >(), const BlobOrientation_t _orientation=groundplane, const coordinate_t assumedHeight=0, const rgb rgbvalue=rgb())
 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, const ReferenceFrameType_t newref=unspecified)
 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
Corner extraction for rectangular blobs
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, int minarea=25, BlobOrientation_t orient=BlobData::groundplane, coordinate_t height=0, int maxblobs=50)
 Import blobs from Sketch<bool> as a vector of Shape<BlobData>.
static std::vector< Shape
< BlobData > > 
extractBlobs (const Sketch< uchar > &sketch, int minarea=25, BlobOrientation_t orient=BlobData::groundplane, const coordinate_t height=0, int maxblobs=50)
 Import blobs of all colors from Sketch<uchar> as a vector of Shape<BlobData>.
static std::vector< Shape
< BlobData > > 
extractBlobs (const Sketch< uchar > &sketch, const std::set< color_index > &colors, const std::map< color_index, int > &minareas, const std::map< color_index, BlobOrientation_t > &orients, const std::map< color_index, coordinate_t > &heights, int maxblobs)
 Import blobs of specified colors from Sketch<uchar> as a vector of Shape<BlobData>.
static BlobDatanew_blob (ShapeSpace &space, const CMVision::region &reg, const CMVision::run< CMVision::uchar > *rle_buff, const BlobOrientation_t orient, const coordinate_t height, const rgb rgbvalue)
 Utility function for making a new blob instance from CMVision's region data structures.

Public Attributes

BlobOrientation_t orientation
 Orientation of the blob.
coordinate_t assumedHeight
Point topLeft
 Bounding quadrilateral: may not be square when projected to ground space.
Point topRight
Point bottomLeft
Point bottomRight
float area
 Area of the blob; may not be integer when projected to ground space.
const std::vector< runrunvec
 Runs (for rendering in camera 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
poster  3D shape hanging vertically in space

Definition at line 31 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 = 0,
const std::vector< run > &  _runvec = std::vector<run>(),
const BlobOrientation_t  _orientation = groundplane,
const coordinate_t  assumedHeight = 0,
const rgb  rgbvalue = rgb() 
)

Constructor.

Definition at line 26 of file BlobData.cc.

Referenced by BlobData::new_blob().


Member Function Documentation

static ShapeType_t getStaticType (  )  [inline, static]

Definition at line 64 of file BlobData.h.

DATASTUFF_H ( BlobData   ) 

Point getCentroid (  )  const [virtual]

return the centroid of the shape in point format

Implements BaseData.

Definition at line 44 of file BlobData.cc.

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

float getArea (  )  [inline]

Area of the blob.

Definition at line 74 of file BlobData.h.

void printParams (  )  const [virtual]

Print information about this shape.

Implements BaseData.

Definition at line 49 of file BlobData.cc.

void applyTransform ( const NEWMAT::Matrix &  Tmat,
const ReferenceFrameType_t  newref = unspecified 
) [virtual]

Transformations. (Virtual in BaseData.).

Implements BaseData.

Definition at line 93 of file BlobData.cc.

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

Project to ground.

Implements BaseData.

Definition at line 100 of file BlobData.cc.

void update_derived_properties (  )  [virtual]

Update derived properties.

Definition at line 137 of file BlobData.cc.

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

bool isMatchFor ( const ShapeRoot other  )  const [virtual]

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

Implements BaseData.

Definition at line 151 of file BlobData.cc.

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

Update shape parameters after matching to another shape.

Implements BaseData.

Definition at line 161 of file BlobData.cc.

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

Implements BaseData.

Definition at line 95 of file BlobData.h.

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

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

Definition at line 186 of file BlobData.cc.

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

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

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

Definition at line 213 of file BlobData.cc.

std::vector< Shape< BlobData > > extractBlobs ( const Sketch< uchar > &  sketch,
const std::set< color_index > &  colors,
const std::map< color_index, int > &  minareas,
const std::map< color_index, BlobOrientation_t > &  orients,
const std::map< color_index, coordinate_t > &  heights,
int  maxblobs 
) [static]

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

Definition at line 233 of file BlobData.cc.

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

Utility function for making a new blob instance from CMVision's region data structures.

Definition at line 287 of file BlobData.cc.

Referenced by BlobData::extractBlobs(), and VRmixin::getBlobsFromRegionGenerator().

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

Definition at line 339 of file BlobData.cc.

std::vector< Point > findCornersDerivative (  ) 

Definition at line 505 of file BlobData.cc.

std::vector< Point > findCornersDiagonal (  ) 

Definition at line 585 of file BlobData.cc.

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

Definition at line 702 of file BlobData.cc.

Referenced by BlobData::findCorners().

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

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

Implements BaseData.

Definition at line 60 of file BlobData.cc.

BlobData& operator= ( const BlobData  )  [private]

don't call


Friends And Related Function Documentation

friend class Shape< BlobData > [friend]

Definition at line 68 of file BlobData.h.

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


Member Data Documentation

coordinate_t assumedHeight

Assumed height above ground of blob centroid (for poster) or top (for pillar)

Definition at line 47 of file BlobData.h.

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

float area

Area of the blob; may not be integer when projected to ground space.

Definition at line 50 of file BlobData.h.

Referenced by BlobData::getArea(), BlobData::isMatchFor(), BlobData::printParams(), BlobData::projectToGround(), BlobData::update_derived_properties(), and BlobData::updateParams().

const std::vector<run> runvec

Runs (for rendering in camera space).

Definition at line 51 of file BlobData.h.

Referenced by DualCoding::getBoundingQuadrilateralInteriorPointRatio(), BlobData::new_blob(), and BlobData::render().


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

DualCoding 4.0
Generated Thu Nov 22 00:53:56 2007 by Doxygen 1.5.4