AURobotServers
4
|
#include <uimg3dpoint.h>
Public Member Functions | |
UImg3Dpoint * | add (UImg3Dpoint *p) |
UImg3Dpoint * | add (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 |
UImg3Dpoint * | p3d |
int | p3dCnt |
int | p3dCntMax |
UPosRot | pose |
unsigned int | serial |
int | sourceImgColor |
UTime | time |
Class with 3D point found by stereo calculation
|
inline |
Constructor
|
inline |
Constructor
|
inline |
Add a 3D point
p | is the 3d point to add. |
Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UFuncKinect::makeObj3Dcloud(), and UFuncStereo::processImages().
|
inline |
Add point based on values
x,y,z | is the 3d position to add. |
row | source image row. |
col | source image column |
pix | is the pixel value |
q | quality value |
References UImg3Dpoint::column, UImg3Dpoint::pixLeft, UImg3Dpoint::pos, UImg3Dpoint::q, UImg3Dpoint::row, and UPosition::set().
|
inline |
Clear all points from array
Referenced by UFuncKinect::makeObj3Dcloud(), and UFuncStereo::processImages().
|
inline |
Clear the 3D data point set
imgSerial | new serial number valid for the 3D data |
|
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
samples | is number of samples the RANSAC should try (from probability of false points) |
sigma | is the standard deviation for the point distribution around the plane. |
refPlane | reference plane for tilt test |
tiltLim | is 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. |
xLimit | is the maximum acceptable x-value (works as range limit) - only if rngComp=true |
cnt | is on return then number of points associated to the 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
name | optional filename. If no provided name, then a name is constructed from data (cloudNNN_time.pcd). |
andRGB | will add RGB values in points to the file |
andRowCol | will add row and column from source image to the file |
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().
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 |
maximum number of available elements in p3d buffer 3D points
Referenced by UResObj3d::addGroundObjects(), UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UResObj3d::do3dVoxels(), UResObj3d::doGndPlaneMask(), getRansacPlane(), makePCLFile(), UResObj3d::paintGndPlane(), and toRobotCoordinates().
int UImg3Dpoints::p3dCnt |
number of actual points in p3d
Referenced by UResObj3d::addGroundObjects(), UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UResObj3d::do3dVoxels(), UResObj3d::doGndPlaneMask(), getRansacPlane(), UFuncStereo::handleStereo(), makePCLFile(), UResObj3d::paintGndPlane(), and toRobotCoordinates().
int UImg3Dpoints::p3dCntMax |
number of actual points in p3d
UPosRot UImg3Dpoints::pose |
Sensor pose (should be set by data source)
Referenced by UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UFuncKinect::makeObj3Dcloud(), UFuncStereo::processImages(), and toRobotCoordinates().
unsigned int UImg3Dpoints::serial |
Image serial number for these data
Referenced by UResObj3d::addGroundObjects(), UResObj3d::do3dVoxels(), UResObj3d::doGndPlaneMask(), UFuncKinect::makeObj3Dcloud(), makePCLFile(), UResObj3d::paintGndPlane(), and UFuncStereo::processImages().
int UImg3Dpoints::sourceImgColor |
source image number for color image
Referenced by UFuncKinect::makeObj3Dcloud().
UTime UImg3Dpoints::time |
Valid time for the 3D data (data capture time)
Referenced by UResObj3d::addGroundObjects(), UFuncKinect::callGotNewDataWithObject(), UResObj3d::do3dCloudFromSvs(), UFuncGndAna::do3dGroundPlane(), UResObj3d::do3dGroundPlane(), UResObj3d::do3dVoxels(), UResObj3d::doGndPlaneMask(), UFuncKinect::makeObj3Dcloud(), makePCLFile(), UResObj3d::paintGndPlane(), and UFuncStereo::processImages().