ICP  1.1.0
 Hosted by GitHub
Functions | Variables
step_by_step.cpp File Reference

An example showcasing the progress of the ICP pipeline. More...

#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <GL/glew.h>
#include <CLUtils.hpp>
#include <ocl_icp_sbs.hpp>
#include <GL/glut.h>
Include dependency graph for step_by_step.cpp:

Functions

std::vector< cl_float8 > pc8d1 (n)
 
std::vector< cl_float8 > pc8d2 (n)
 
void drawGLScene ()
 Display callback for the window. More...
 
void idleGLScene ()
 Idle callback for the window. More...
 
void resizeGLScene (int width, int height)
 Reshape callback for the window. More...
 
void keyPressed (unsigned char key, int x, int y)
 Keyboard callback for the window. More...
 
void mouseMoved (int x, int y)
 Mouse callback for the window. More...
 
void mouseButtonPressed (int button, int state, int x, int y)
 Mouse button callback for the window. More...
 
void initGL (int argc, char **argv)
 Initializes GLUT. More...
 
void printInfo ()
 Displays the available controls. More...
 
void fread (const char *path, char *data, size_t n)
 Reads in a binary file. More...
 
void configure (int argc, char **argv)
 Configures parameters. More...
 
int main (int argc, char **argv)
 

Variables

const int gl_win_width = 640
 
const int gl_win_height = 480
 
int glWinId
 
int mouseX = -1
 
int mouseY = -1
 
float angleX = 0.f
 
float angleY = 0.f
 
float zoom = 1.f
 
GLuint glPC4DBuffer
 
GLuint glRGBABuffer
 
const cl_algo::ICP::ICPStepConfigT RC = cl_algo::ICP::ICPStepConfigT::POWER_METHOD
 
const cl_algo::ICP::ICPStepConfigW WC = cl_algo::ICP::ICPStepConfigW::WEIGHTED
 
ICPSBS< RC, WC > * icp
 

Detailed Description

An example showcasing the progress of the ICP pipeline.

Estimates, step by step, the transformation between two point clouds and displays the result of each ICP step in the registration process.

Note
To change the configuration of the ICPStep class, alter the RC and WC variables.
Command line arguments:
<name_1>: name of the binary file for the first point cloud.
<name_2>: name of the binary file for the second point cloud.
Usage:
./bin/icp_step_by_step pcA pcB
loads the point clouds in ../data/pcA.bin and ../data/pcB.bin
./bin/icp_step_by_step pc
loads the point clouds in ../data/pc_1.bin and ../data/pc_2.bin
./bin/icp_step_by_step
loads the point clouds in ../data/kg_pc8d_1.bin and ../data/kg_pc8d_2.bin
Author
Nick Lamprianidis
Version
1.1.0
Date
2015
Copyright (c) 2015 Nick Lamprianidis
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Function Documentation

void configure ( int  argc,
char **  argv 
)

Configures parameters.

Parameters
[in]argccommand line argument count
[in]argvcommand line arguments
void drawGLScene ( )

Display callback for the window.

void fread ( const char *  path,
char *  data,
size_t  n 
)

Reads in a binary file.

Parameters
[in]pathpath to the file.
[out]dataarray that receives the data.
[in]nnumber of bytes to read.
void idleGLScene ( )

Idle callback for the window.

void initGL ( int  argc,
char **  argv 
)

Initializes GLUT.

void keyPressed ( unsigned char  key,
int  x,
int  y 
)

Keyboard callback for the window.

int main ( int  argc,
char **  argv 
)
void mouseButtonPressed ( int  button,
int  state,
int  x,
int  y 
)

Mouse button callback for the window.

void mouseMoved ( int  x,
int  y 
)

Mouse callback for the window.

std::vector<cl_float8> pc8d1 ( )
std::vector<cl_float8> pc8d2 ( )
void printInfo ( )

Displays the available controls.

void resizeGLScene ( int  width,
int  height 
)

Reshape callback for the window.

Variable Documentation

float angleX = 0.f
float angleY = 0.f
const int gl_win_height = 480
const int gl_win_width = 640
GLuint glPC4DBuffer
GLuint glRGBABuffer
int glWinId
ICPSBS<RC, WC>* icp
int mouseX = -1
int mouseY = -1
float zoom = 1.f