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

#include <uimg3dpoint.h>

Inheritance diagram for UImg3Dpoints:
Inheritance graph

Public Member Functions

UImg3Dpointadd (UImg3Dpoint *p)
 
UImg3Dpointadd (double x, double y, double z, int row, int col, int pix, int q)
 
void clear ()
 
void clear3d (unsigned int imgSerial, UTime imgTime)
 
virtual const char * getDataType ()
 
UPlane getRansacPlane (int samples, double sigma, UPlane refPlane, double tiltLim, double xLimit, int *cnt)
 
bool makePCLFile (const char *name, bool andRGB, bool andRowCol)
 
void toRobotCoordinates ()
 
 UImg3Dpoints ()
 
 ~UImg3Dpoints ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 
- Public Member Functions inherited from UDataBase
bool isA (const char *typeString)
 
virtual bool isAlsoA (const char *typeString)
 
virtual void snprint (const char *preString, char *buff, const int buffCnt)
 
 UDataBase ()
 
virtual ~UDataBase ()
 

Public Attributes

bool inSensorCoordinates
 
UImg3Dpointp3d
 
int p3dCnt
 
int p3dCntMax
 
UPosRot pose
 
unsigned int serial
 
int sourceImgColor
 
UTime time
 

Detailed Description

Class with 3D point found by stereo calculation

Constructor & Destructor Documentation

UImg3Dpoints::UImg3Dpoints ( )
inline

Constructor

UImg3Dpoints::~UImg3Dpoints ( )
inline

Constructor

Member Function Documentation

UImg3Dpoint* UImg3Dpoints::add ( UImg3Dpoint p)
inline

Add a 3D point

Parameters
pis the 3d point to add.
Returns
number of points in the point array.

Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UFuncKinect::makeObj3Dcloud(), and UFuncStereo::processImages().

UImg3Dpoint* UImg3Dpoints::add ( double  x,
double  y,
double  z,
int  row,
int  col,
int  pix,
int  q 
)
inline

Add point based on values

Parameters
x,y,zis the 3d position to add.
rowsource image row.
colsource image column
pixis the pixel value
qquality value
Returns
number of points in array

References UImg3Dpoint::column, UImg3Dpoint::pixLeft, UImg3Dpoint::pos, UImg3Dpoint::q, UImg3Dpoint::row, and UPosition::set().

void UImg3Dpoints::clear ( void  )
inline

Clear all points from array

Referenced by UFuncKinect::makeObj3Dcloud(), and UFuncStereo::processImages().

void UImg3Dpoints::clear3d ( unsigned int  imgSerial,
UTime  imgTime 
)
inline

Clear the 3D data point set

Parameters
imgSerialnew serial number valid for the 3D data
virtual const char* UImg3Dpoints::getDataType ( )
inlinevirtual

Get (end) type of this structure

Reimplemented from UDataBase.

UPlane UImg3Dpoints::getRansacPlane ( int  samples,
double  sigma,
UPlane  refPlane,
double  tiltLim,
double  xLimit,
int *  cnt 
)

Estimate largest plane in 3D cloud, using RANSAC

Parameters
samplesis number of samples the RANSAC should try (from probability of false points)
sigmais the standard deviation for the point distribution around the plane.
refPlanereference plane for tilt test
tiltLimis the minimum tilt limit relative to refPlane, for an accepted plane. The value is the dot-product limit in range [0..1], tiltLim=0 accept all planes, tiltLim=1 accept a perfect aligned plane (=refPlane) only.
xLimitis the maximum acceptable x-value (works as range limit) - only if rngComp=true
cntis on return then number of points associated to the plane.
Returns
the estimated plane.

References UPlane::dist(), UPosition::dot(), UPlane::getNormal(), p3d, p3dCnt, UImg3Dpoint::pos, UPlane::set(), and UPosition::x.

Referenced by UFuncGndAna::do3dGroundPlane(), and UResObj3d::do3dGroundPlane().

bool UImg3Dpoints::makePCLFile ( const char *  name,
bool  andRGB,
bool  andRowCol 
)

Make PCL file (for PCD viewer - and the like. creates filename from data

Parameters
nameoptional filename. If no provided name, then a name is constructed from data (cloudNNN_time.pcd).
andRGBwill add RGB values in points to the file
andRowColwill add row and column from source image to the file
Returns
true if file is created

References UImg3Dpoint::column, dataPath, UTime::getForFilename(), p3d, p3dCnt, UImg3Dpoint::pixLeft, UImg3Dpoint::pos, UImg3Dpoint::row, serial, time, UPosition::x, UPosition::y, and UPosition::z.

Referenced by dummyCall(), UFuncStereo::handleStereo(), and UFuncKinect::makePCD().

void UImg3Dpoints::toRobotCoordinates ( )

Convert 3D cloud data in sensor coordinates to robot coordinates does nothing, if inPoseCoordinates is false

References UPosRot::getRtoMMatrix(), inSensorCoordinates, p3d, p3dCnt, UImg3Dpoint::pos, and pose.

Referenced by UResObj3d::do3dCloudFromSvs(), UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UResObj3d::do3dVoxels(), and UResObj3d::paintGndPlane().

Member Data Documentation

bool UImg3Dpoints::inSensorCoordinates

In sensor pose coordinates (i.e. not converted to 'robot' coordinates

Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UFuncKinect::makeObj3Dcloud(), UFuncStereo::processImages(), and toRobotCoordinates().

UImg3Dpoint* UImg3Dpoints::p3d
int UImg3Dpoints::p3dCnt
int UImg3Dpoints::p3dCntMax

number of actual points in p3d

UPosRot UImg3Dpoints::pose
unsigned int UImg3Dpoints::serial
int UImg3Dpoints::sourceImgColor

source image number for color image

Referenced by UFuncKinect::makeObj3Dcloud().

UTime UImg3Dpoints::time

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