Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes
jafar::model3d::Grid3D Class Reference

uniform grid 3D it is formed of Grid3DCell we use a Image3D to build the grid we use RansacPlane to fit the plane in each cell More...


Detailed Description

uniform grid 3D it is formed of Grid3DCell we use a Image3D to build the grid we use RansacPlane to fit the plane in each cell

Definition at line 27 of file grid3D.hpp.

#include <grid3D.hpp>

List of all members.

Public Member Functions

void build (Image3D &im3d, double dbStep)
 build the grid3D using an Image3D and a step = cube width
void initialize (int nX, int nY, int nZ, double minX_, double minY_, double minZ_, double stepX_, double stepY_, double stepZ_)
 initialize the data members it is called within build if build if not used, you must explicitly call this function
void fillGrid (::std::vector< Point3D > *ppoints)
 distribute points onto the cells
void colorizeImage3D (char *fileName, char *outputIndeces)
void loadBrutImage (char *fileName)
void extractFloor (double delta, bool removeInnerPoints)
void prepareHoughAccumulator (float fRhoMax, float rhoStep, float angleStep, bool withSave=false, char *fileName=NULL)
void extractBigerHoughPlane3D (int maxRho=25, float rhoStep=0.02, float angleStep=5)
void extractHoughPlanes3D (int maxRho=25, float rhoStep=0.02, float angleStep=5, float fThresholdOfMaxVote=0.5, float fMinDistanceOfTowPlane=0.10, float fMinCosDihedralAngle=0.975, int nMaxPlaneNumber=30)
void extractProgProbHoughPlanes3D (int maxRho=25, float rhoStep=0.02, float angleStep=5, float fThresholdOfMaxVote=0.5, float fMinDistanceOfTowPlane=0.10, float fMinCosDihedralAngle=0.025, int nMaxPlaneNumber=30, int minPointNumberThreshold=50, int minFinalVoteThreshold=100, char *planeFileName="plane.txt")
void savePlanesCornersToFile (char *fileName)
void savePlanesEquations (std::vector< Plane3D > &vPlane3D, int nMaxPlaneNumber, char *fileName)
Grid3DCelloperator() (int i, int j, int k)
void savePlanesToFile (char *fileName)
 wrtie the extracted planes 3D to a file
void reducePlanesNumber (double distThreshold, double cosDihedralThreshold, int nPower)
void extractPlaneInCellsMLSE ()
 Extract a Plane in each cell if there is a plane using Min Least Square Error.
void extractPlaneInCellsEKFI ()
 Extract a Plane in each cell if there is a plane using Extended Kalman Filter (Implicit)
void bestPlaneMinLeastSquares (std::vector< int > &pointIndex, Plane3D &plane3D)
 extract the best "Min Least Square Error" plane passing throuth the points indexed by the vector
void bestPlaneEKFI (std::vector< int > &pointIndex, Plane3D &plane3D)
 extract the best plane using EKF
void planeEKFI (std::vector< int > &pointIndex, double abcE[5], int nPlaneType)
 extract the plane using EKF
void planeMinLeastSquares (std::vector< int > &pointIndex, double abcE[5], int type)
 extract the best "MinLeast square Error" plane of given type
void info ()
 print info
RansacPlanegetRansac ()
 return a pointer to the RansacPlane data member

Public Attributes

std::vector< float > m_vColor
unsigned char * pImage_BRUT
int m_nWidth_BRUT
int m_nHeight_BRUT
Plane3D m_plane3dFloor
int *** m_pAccumulator
int m_nRho
int m_nPhi
int m_nTheta
int m_nMaxVote
Plane3D m_BiggerPlane3D
std::vector< Point3DvP1
std::vector< Point3DvP2
std::vector< Point3DvP3
std::vector< Point3DvP4
::std::vector< Grid3DCellm_vCells
 vector of cells
::std::vector< Point3D > * m_pPoints
 pointer the a vector containg the point3D
RansacPlane m_RansacPlane
 RansacPlane object.
int m_nNX
 number of cells in x, y and z directions
int m_nNY
int m_nNZ
double m_dbStepX
 step in X,Y and Z directions
double m_dbStepY
double m_dbStepZ
double m_dbMinX
 the mimimum value fo X,Y and Z used in filling the grid
double m_dbMinY
double m_dbMinZ

Member Function Documentation

void jafar::model3d::Grid3D::bestPlaneEKFI ( std::vector< int > &  pointIndex,
Plane3D plane3D 
)

extract the best plane using EKF

void jafar::model3d::Grid3D::bestPlaneMinLeastSquares ( std::vector< int > &  pointIndex,
Plane3D plane3D 
)

extract the best "Min Least Square Error" plane passing throuth the points indexed by the vector

we call planeMinLeastSquares for the three type and take the best one.

Extract a Plane in each cell if there is a plane using Extended Kalman Filter (Implicit)

Extract a Plane in each cell if there is a plane using Min Least Square Error.

print info

Grid3DCell* jafar::model3d::Grid3D::operator() ( int  i,
int  j,
int  k 
) [inline]
Note:
There is no test on the values of i, j and k, so it is your responsability to ensure that they are within the good ranges.

Definition at line 138 of file grid3D.hpp.

References m_vCells.

void jafar::model3d::Grid3D::planeEKFI ( std::vector< int > &  pointIndex,
double  abcE[5],
int  nPlaneType 
)

extract the plane using EKF

void jafar::model3d::Grid3D::planeMinLeastSquares ( std::vector< int > &  pointIndex,
double  abcE[5],
int  type 
)

extract the best "MinLeast square Error" plane of given type

type = 0 : normal Equation of the plane : general form

w = abcE[0]*u + abcE[1]*v + abcE[2]

| puu puv pu | | abcE[0] | | puw | | puv pvv pv | * | abcE[1] | = | pvw | | pu pv 1 | | abcE[2] | | pw |

<=> A * abcE = B => abcE = A-1 * B

type 0: x = abcE[0]*y + abcE[1]*z + abcE[2] type 1: y = abcE[0]*x + abcE[1]*z + abcE[2] type 2: z = abcE[0]*x + abcE[1]*y + abcE[2]

void jafar::model3d::Grid3D::savePlanesToFile ( char *  fileName)

wrtie the extracted planes 3D to a file


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:42 for Jafar by doxygen 1.7.6.1
LAAS-CNRS