Classes | Defines | Functions | Variables
register_views.cpp File Reference
#include "../common/CommonTerminalRoutines.h"
#include "../common/CommonVTKRoutines.h"
#include "../common/CommonIORoutines.h"
#include "../common/CommonANNRoutines.h"
#include "../common/ANN-VTK.h"
#include <Eigen/Array>
#include <Eigen/Geometry>
#include <Eigen/SVD>
#include <time.h>
Include dependency graph for register_views.cpp:

Go to the source code of this file.

Classes

struct  PCD

Defines

#define BUCKET_SIZE   30

Functions

Matrix4f computeTransformation (const ANNpoint target, const ANNpoint source, const bool rotation)
ANNpointArray evaluateTransformation (Matrix4f transform, vector< PCD >::iterator model, double sqr_threshold, int step, int limit_match, int limit_inliers, vector< int > &match_idx, vector< int > &tmp_inliers)
int main (int argc, char **argv)
bool potentialMatch (const ANNpoint p0, const ANNpoint p1, const bool check_angle)

Variables

ANNkd_tree * kd_tree
double maxZdiff = 0.03
double minAdiff = DEG2RAD(30)
int model_nxIdx
ANNidxArray nnIdx
int nxIdx
ANNdistArray sqrDists

Define Documentation

#define BUCKET_SIZE   30

Definition at line 35 of file register_views.cpp.


Function Documentation

Matrix4f computeTransformation ( const ANNpoint  target,
const ANNpoint  source,
const bool  rotation 
) [inline]

Definition at line 68 of file register_views.cpp.

ANNpointArray evaluateTransformation ( Matrix4f  transform,
vector< PCD >::iterator  model,
double  sqr_threshold,
int  step,
int  limit_match,
int  limit_inliers,
vector< int > &  match_idx,
vector< int > &  tmp_inliers 
)

Definition at line 86 of file register_views.cpp.

int main ( int  argc,
char **  argv 
)

Init

Check and info

Parsing arguments

: would actually creating a model kd-tree and searching target points in it be faster?

Take only the first two .pcd files into account

Load the points from file

Checking dimensions

Create a kD-tree

Load the models from the files

for (unsigned i = 2; i < pPCDFileIndices.size (); i++) { PCD_Header header2; print_info (stderr, "Loading model "); print_value (stderr, "%s... ", argv[pPCDFileIndices.at (i)]); ANNpointArray points2 = LoadPCDFile (argv[pPCDFileIndices.at (i)], header2); if (points == NULL) return (-1); fprintf (stderr, "[done : "); print_value (stderr, "%d %d", header2.nr_points, header2.dimID.size ()); fprintf (stderr, "D points]\n"); print_info (stderr, "Available dimensions: "); print_value (stderr, "%s\n", getAvailableDimensions (header2).c_str ()); if (header2.comments.size () != 0) { print_value (stderr, "Header comments:\n"); fprintf (stderr, "%s", header2.comments.c_str ()); }

/ Checking dimensions int xIdx = getIndex (header2, "x"); if (xIdx != 0) { print_error (stderr, "XYZ coordinates not first dimensions!\n"); return (-1); }

/ Saving reference in list models[i-2].points = points2; models[i-2].header = header2; cerr << models[i-2].points << endl; fprintf (stderr, "Saved %s header: ", models[i-2].header.data_type?"ASCII":"BINARY"); print_value (stderr, "%d %d", models[i-2].header.nr_points, models[i-2].header.dimID.size ()); fprintf (stderr, "D "); print_value (stderr, "%s\n", getAvailableDimensions (models[i-2].header).c_str ()); if (models[i-2].header.comments.size () != 0) fprintf (stderr, "%s", models[i-2].header.comments.c_str ()); }

Starting global timer

Registering each model to the scan and find the best

for (vector<PCD>::iterator model = models.begin (); model != models.end (); model++)

Checking dimensions

Saving reference in list

<1> or <min_iter> instead of this?

Starting local timer

Iterate

save these for outside the RANSAC loop as well?

Iterate

<1> or <min_iter> instead of this?

: make this nicer

if (step != 1) {

: why is this not working if after the skip? shouldn't they be transformed in the function call already?

if (cp % step == 0) continue;

}

Save the best model

Done

Definition at line 131 of file register_views.cpp.

bool potentialMatch ( const ANNpoint  p0,
const ANNpoint  p1,
const bool  check_angle 
) [inline]

Definition at line 54 of file register_views.cpp.


Variable Documentation

ANNkd_tree* kd_tree

Definition at line 40 of file register_views.cpp.

double maxZdiff = 0.03

Definition at line 50 of file register_views.cpp.

double minAdiff = DEG2RAD(30)

Definition at line 51 of file register_views.cpp.

Definition at line 52 of file register_views.cpp.

ANNidxArray nnIdx

Definition at line 41 of file register_views.cpp.

int nxIdx

Definition at line 52 of file register_views.cpp.

ANNdistArray sqrDists

Definition at line 42 of file register_views.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


pcl_cloud_tools
Author(s): Nico Blodow, Zoltan-Csaba Marton, Dejan Pangercic
autogenerated on Sun Oct 6 2013 11:58:08