overview

project page

about


PCI Register PC
(PCIRegisterPC)



Short Description

This tool is used for registration of two pointclouds dock and dockee. dock and dockee are the target cloud and the cloud to be registered, respectively.



screenshot

Methods

selectClouds...“. Selects the dock and dockee-clouds based on the names entered in dockName and dockeeName.

newton...“ starts a newton optimization process. The derivatives of the cost function are calculated analytically. This method also uses a simple form of automatic step-adaption, so be aware, that sometimes iterations, especially towards the end may be evaluated at halfed/quartered/a.s.f. steplength, which may consume some noticeable additional time.

descent...“ performs a gradient descent on the cost function, evaluating the derivatives numerically. This method doesn't perform any automatic adaption of steplength. When using „descent...“ it is possible to choose another cost function, which is not based on the Normal Distribution Transform, but rather on ICP. Note, that this WILL be extremely time consuming on non-hierarchical pointclouds, since nearest neighbors have to be found. Actually, it is sufficient if only the dock-cloud is hierarchical. (Currently, since ICP is more of an afterthought rather than the actual focus of the tool, using ICP will still generate the grid of gaussians for the cloud, though it doesn't use more than the size of the cells as a hint for the general stepsize when calculating the forward differences. So you might want to choose a gridsize of 1, when using ICP and no grid has been generated yet).

Parameters

numIterations – self explanatory

nthPoint – choose a subset of points for evaluation of the cost function. Minimization will use every nth point. Thus nthPoint=1 equals using every point, nthPoint=100 every 100th point. Note that the points are not guaranteed to be distributed regulary over the surface since e.g. nthPoints=2 means that while iterating over the points with a basic iterator every other point is skipped.

gridRes – NDT generates an AABB for the scene and creates a grid with gridRes*gridRes*gridRes cells, each with it's own covariance matrix for cost evaluation. This will only be recalculated if gridRes or dock change.

step – the calculated change in parameters deltaP (x,y,z,alpha,beta,gamma) will be multiplied with this value in each iteration. (recommended 1 for newton minimization. Smaller values may help if gradient descent oscillates)

angle – No effect when using newton! Sets the angle to use for the calculation of the forward difference to estimate the gradient-vector. I.e. Gradient.alpha=(cost(rotx(alpha+angle)*dockee)-cost(dockee) )/angle.

q_dist - No effect when using newton! Similar to angle, but for translations. If X is the size in x-direction of one cell of the grid, this first calculates dx=X/q_dist. Then the x-component of the gradient will be calculated as the forward difference Gradient.x=(cost(translation(dx,0,0)*dockee)-cost(dockee))/dx. In prose: for q_dist=100, to calculate the derivative for x, the cloud is translated in x-direction by 1/100th of the x-Size of a gridcell, and the forward difference of the translated cloud and the original cloud gives the estimated gradient. (Same is done for y and z, respectively).

ICP - No effect when using newton! Uses ICP as cost-function. Basically this just builds correspondences by choosing the nearest point in dock to a sample point from dockee and takes the average distance between corresponding points as cost.

eigenAspect – restricts gaussians from becoming too flat. This is extremely helpful when dealing with lot's of planar surfaces.

dock – target cloud to match to

dockee – cloud that is to be registered against dock

dockName – name of dock-cloud. Used for „selectClouds...“

dockeeName – name of dockee-cloud. Used for „selectClouds...“



A simple „How to“

There IS trying! Do it or undo it! So first, remember that „Undo“ is your best friend. If your not sure of the correct parameters, try them with few iterations. If it works, choose more iterations. If it doesn't work: undo and choose new parameters. Note that the CommandObject of PCIRegisterPC merges with subsequent CommandObjects of the same type. I.e. when you do 10 iterations,change parameters, and do 10 more, „undo“ will take you back 20 iterations. You can remedy that by simply rotating the camera a little, so that the Camera-CO prevents the merging. So, in short: before performing a minimization with changed parameters, rotate the camera a little and you're on the safe side. This may seem a bit bothering, but after performing minimization, you'll propably want to rotate the scene anyway to evaluate the result, so it more a less happens naturally.

General „Framework“

Newton Optimization:

Gradient Descent using NDT (default):

If newton just doesn't seem to work, or if you're caught in a local minimum, try doing a gradient descent. Maybe just for a few iterations to help the dockee find the way.

Your most important parameters will be q_dist and angle and to some extend step. Generally speaking, the smaller the steps, the less likely your descent is to do weird stuff, at the cost of slower convergence. Note that high values of q_dist (and thus small values for dx: remember dx=gridcell.xsize/q_dist) should go with small values of angle most of the time.

Gradient Descent using ICP (check ICP):

If newton using the NDT did a good job but doesn't hold any more room for improvements (gridRes is more or less limited to 40-50), try improving it by checking the ICP-Flag. Be sure not to do this for too many sample points, as the cost for finding the nearest neighbors can be quite high, depending on the size of the cloud and the hierarchy. Only use more sample points if you're sure that computing time is within a bearable limit.



overview

project page

about