AURobotServers  4
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
UGridBBox Class Reference

Public Member Functions

void addCell (int ix, int iy, int iz, UImg3Dpoint *v)
 add this cell to the bounding box More...
 
void addCol (int pixel)
 
void addPosToFootprint (UPosition *pos)
 
void addPosToProfile (UPosition *pos, bool isProfile)
 
void addPosToSideView (UPosition *pos, bool isSideView)
 
bool allowMerge (UGridBBox *nb, int maxdy)
 merge is not allowed if resulting y-size is above maxdy cells More...
 
void clear ()
 clear More...
 
void filter (int minCellCnt, int maxDX, int maxDY, int maxHeight, int minHeight, int minX, int roofLimit, double minDens, int minDensCnt)
 is this box valid or not, based on size More...
 
int getCol ()
 
double getDensity (UPolygon *pgn)
 
bool hasOverlap (UGridBBox *nb, int allowedZdist)
 
void merge (UGridBBox *other)
 
void reduceToConvexFootprint ()
 
 UGridBBox ()
 
 ~UGridBBox ()
 destructor More...
 

Public Attributes

int col [MCL]
 
int colCnt
 
bool filtered
 is box filtered More...
 
UPolygon40footprint
 polygon for the foodprint of the box More...
 
bool footprintConvex
 is the footprint convex More...
 
int hitCnt
 count of cells More...
 
bool human
 is likeky to be a human More...
 
int maxx
 
int maxy
 
int maxz
 
int minx
 limits of box in voxel index values More...
 
int miny
 
int minz
 
UImg3Dpointpix
 sample pixels in box More...
 
UPolygon40profile
 
bool roof
 is a roof or ignorable high obstacle More...
 
int serial
 original cluster number More...
 
UPolygon40sideView
 
bool valid
 is box valid More...
 

Static Public Attributes

static const int MCL = 20
 number of pixels in average array More...
 

Detailed Description

Bounding box for a number of voxels

Constructor & Destructor Documentation

UGridBBox::UGridBBox ( )
inline
UGridBBox::~UGridBBox ( )
inline

destructor

Member Function Documentation

void UGridBBox::addCell ( int  ix,
int  iy,
int  iz,
UImg3Dpoint v 
)
inline

add this cell to the bounding box

References UImg3Dpoint::pixLeft, UImg3Dpoint::pos, and UImg3Dpoint::q.

Referenced by UGrid3D::voxelSegmentation().

void UGridBBox::addCol ( int  pixel)
inline

Add colour sample to the total samples of this blob, if array is full, then remove one from both ends. So that it is possible to find the a sort of median color at the end. based on Red-Green only. The color order is assumed to be 8-bit blue;green;red (i.e. red is lower 8 bits)

void UGridBBox::addPosToFootprint ( UPosition pos)
inline

add a position to the footprint of this box. if too full, then the points are reduced to a convex

References UPolygon::add(), dist, UPolygon::getPointsCnt(), and UPolygon::removeNearVertex().

void UGridBBox::addPosToProfile ( UPosition pos,
bool  isProfile 
)
inline

add a position to the footprint of this box. if too full, then the points are reduced to a convex

Parameters
posis the position to add to polygon
isProfiletrue if the coordinates are exchanged to profile view

References UPolygon::add(), dist, UPolygon::getPointsCnt(), UPolygon::removeNearVertex(), UPosition::x, UPosition::y, and UPosition::z.

void UGridBBox::addPosToSideView ( UPosition pos,
bool  isSideView 
)
inline

add a position to the footprint of this box. if too full, then the points are reduced to a convex

Parameters
posis the position to add to polygon
isProfiletrue if the coordinates are exchanged to side view

References UPolygon::add(), dist, UPolygon::getPointsCnt(), UPolygon::removeNearVertex(), UPosition::x, UPosition::y, and UPosition::z.

bool UGridBBox::allowMerge ( UGridBBox nb,
int  maxdy 
)
inline

merge is not allowed if resulting y-size is above maxdy cells

References maxi(), maxy, mini(), and miny.

void UGridBBox::clear ( void  )
inline

clear

Referenced by UGridBBoxes::getBBox().

void UGridBBox::filter ( int  minCellCnt,
int  maxDX,
int  maxDY,
int  maxHeight,
int  minHeight,
int  minX,
int  roofLimit,
double  minDens,
int  minDensCnt 
)
inline

is this box valid or not, based on size

Referenced by UGridBBoxes::filter().

int UGridBBox::getCol ( )
inline

Get representative colour for this bounding box

Referenced by UResObj3d::paintGndPlane().

double UGridBBox::getDensity ( UPolygon pgn)
inline

References a, and UPolygon::getXYarea().

Referenced by UGrid3D::paintVoxels().

bool UGridBBox::hasOverlap ( UGridBBox nb,
int  allowedZdist 
)
inline

test if this box overlaps another box returns true if so

References footprint, footprintConvex, UPolygon::isEmbedded(), UPolygon::isOverlappingXY(), maxz, minz, and reduceToConvexFootprint().

Referenced by UGridBBoxes::mergeOverlappingBBs().

void UGridBBox::merge ( UGridBBox other)
inline

Merge the other box into this

Parameters
otherassimilated box

References footprint, UPolygon::getPoints(), UPolygon::getPointsCnt(), hitCnt, maxi(), maxx, maxy, maxz, mini(), minx, miny, minz, profile, and sideView.

void UGridBBox::reduceToConvexFootprint ( )
inline

reduce the footprint list of cell-points to a convex footprint, using the x,y coordinates only

References UPolygon::extractConvexTo().

Referenced by hasOverlap(), and UGridBBoxes::reduceToConvexFootprint().

Member Data Documentation

int UGridBBox::col[MCL]

array of pixels sorted in intensity order, a few is kept only, but should give a fair colour representation of the polygin

int UGridBBox::colCnt

Number of colours in the col array

bool UGridBBox::filtered

is box filtered

Referenced by UGrid3D::paintVoxels().

UPolygon40* UGridBBox::footprint

polygon for the foodprint of the box

Referenced by UResObj3d::do3dVoxels(), hasOverlap(), merge(), UResObj3d::paintGndPlane(), and UGrid3D::paintVoxels().

bool UGridBBox::footprintConvex

is the footprint convex

Referenced by hasOverlap().

int UGridBBox::hitCnt

count of cells

Referenced by merge(), and UGrid3D::paintVoxels().

bool UGridBBox::human

is likeky to be a human

Referenced by UResObj3d::do3dVoxels(), UResObj3d::paintGndPlane(), and UGrid3D::paintVoxels().

int UGridBBox::maxx
int UGridBBox::maxy
int UGridBBox::maxz
const int UGridBBox::MCL = 20
static

number of pixels in average array

int UGridBBox::minx

limits of box in voxel index values

Referenced by UGrid3D::logBB(), merge(), and UGrid3D::paintVoxels().

int UGridBBox::miny
int UGridBBox::minz
UImg3Dpoint* UGridBBox::pix

sample pixels in box

UPolygon40 * UGridBBox::profile

Referenced by merge().

bool UGridBBox::roof

is a roof or ignorable high obstacle

Referenced by UResObj3d::paintGndPlane(), and UGrid3D::paintVoxels().

int UGridBBox::serial

original cluster number

Referenced by UGridBBoxes::getBBox().

UPolygon40 * UGridBBox::sideView

Referenced by merge(), and UResObj3d::paintGndPlane().

bool UGridBBox::valid

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