# Getting started

This guide will go through the process of stitching together two point clouds using Register3D. When you first start the program, a screen as shown in Figure 1 is presented.

Figure 1: Main screen
The workspace is comprised of three sub-windows. The main display area is where the point cloud manipulations are done. It is divided into two window panes, the left for the first scan and the right for the second. The second scan is used as the reference scan. This means upon stitching, the first scan will be transformed into the world co-ordinates of the second scan.

The status area is used to to provide useful information to the user.

The reference point (XYZ axis) indicates the position (0,0,0) and is used during point cloud manipulation.

## 1. Loading the two point clouds

The two point clouds can be loaded by going to File and selecting Open first scan/Open second scan. Immediately save the second scan when it has been loaded. This will save the second scan using the program's native binary format and any further operations will make reference to this new file's name.

## 2. Setting the ground plane for the reference scan

Sometimes the reference scan (used to register all the other scans) is on a slight tilt relative to the ground. You can test this by changing the view to side and back by pressing 1,2,3 and observing the whether the ground is straight or on an inlcined. To perform this operation you will need to become familiar with some basic mouse and keyboard operations, as listed below:

Mouse operations
rotation - hold down the LEFT mouse button and drag
zooming - hold down the MIDDLE mouse button and drag, or use the scroll wheel
translation - hold down the RIGHT mouse button and drag

Keyboard shortcuts
G - centre on the reference point (useful if you lose the view)
1,2,3 - change the view (top, side, back)
C - toggle the point cloud's colour between real or false colour
ESC - delete the last added registration point
SHIFT + LEFT CLICK - add a registration point
CTRL + LEFT CLICK - move the reference point (XYZ axis)

This tilt can be corrected by selecting 3 registration points (CTRL + LEFT CLICK) on the ground plane in the second scan and clicking Set ground plane (2nd scan). Save the second scan, preferably give it a new name eg. scan001_corrected_ground.raw.gz, and use this new scan for further operations.

An example of a scan that needs the ground plane corrected is shown below in Figure 2. The incline in this scan is about 2 degrees and false colouring has been turned on to highlight the ground.

Figure 2: An example scan that needs ground plane correction

The selected 3 ground plane points for the above example is shown below in Figure 3.

Figure 3: 3 selected ground plane points

The corrected scan is shown below in Figure 4. The false colour is different to before because the colouring starts at z=-1.0 metres (red). When the ground plane is corrected, the lowest point is around z=0 (orange).

Figure 4: Ground plane corrected

TIP: You only need to perform the ground plane correction once for the reference plane.

## 3. Selecting the registration points

The next step is to select 4 registration points for stitching. Some additional keyboard shortcuts for registering point clouds are given:

Keyboard shortcuts
D - toggle between assistive highlighting for localising the registration point in the second scan
S - toggle between assistive highlighting using transparent spheres for localising the registration point in the second scan

Add a registration point (SHIFT + LEFT CLICK) on the desired location in the first scan and find the same location in the second scan. Repeat this process for the remaining 3 points. Register3D can visually assist the user in localising the registration point by highlighting potential registration points within a 2 metre radius, by pressing D. Alternatively, a transparent sphere can be displayed instead by pressing S. An example of selected points for registration is shown in Figure 5.

Figure 5: Selected points for registration

TIP: When selecting the registration points, try to select them as far away from each other as possible and make sure the registration points are not co-linear. If the registration points are too close to each other, any slight misalignment will be amplified at the outer parts of the scan.

Sometime it is helpful to move the reference point when zooming in on a particular area. This is more convenient than zooming and translating from a reference point far away from the area of interest.

NOTE: All the keyboard shortcuts affect the main display area (either first or second scan) where the mouse is currently over.

## 4. Stitching the two scans

The Stitch scans button near the top left will be enabled after 4 registration points have been selected. Clicking this button will bring up a dialog box showing various parameters that can be set for ICP. The default values should be fine for most cases. Try it first and adjust if it does not work out.

Figure 6: ICP Dialog

The Maximum points per scan limits the number of points per scan to use for ICP. It is a trade off between speed and memory usage.
The Initial outlier distance removes points that are not close to any points in the other scan. This is used to remove points that have no overlap.
The Least Trimmed Square percentage controls how many of the points are used for optimisation. A value of 0.9 indicates the top 90% closest matches are used for optimisation, while the remaining 10% can be considered noise.
The Maximum number of iterations is one of the conditions used to terminate the ICP algorithm.
The Minimum change between iterations is the other condition used to terminate the ICP algorithm. If the change in mean square error falls below this value, the algorithm will terminate.
The Nearest neighbour search error is used to determine how accurately to search for nearest points. A less accurate search may speed up searching, but for most cases this value should be 0.

The ICP registration process will terminate when either the Maximum number of iterations condition has been met or the Minimum change between iterations, whichever comes first.

## 4. Viewing the stitched scans

After the scans are registered, the program will automatically switch to a merged view of the two scans. From here you can check the quality of the registration. It is helpful sometimes to switch to single colour mode (by pressing C) and check for any misalignments. An example of a stitched scan is shown in Figure 7. Switching to single colour mode is useful for checking the quality of alignment, particularly for line features in the environment, such as walls.

Figure 7: Stitched scans. Top: Full colour. Bottom: Single colour per scan. Line features are a good way to check for alignment.

## 5. Saving the first scan

The last step is to save the transformed first scan via File, Save first scan (including transformation matrix). You do not need to enter the extension when saving, it will automatically append it. This will save the transformed scan and create an additional transformation matrix file (with .matrix extension), that can be used to join up all the scans later into a larger one using the Join3D program.

TIP: It might be useful to include some information in the filename to indicate which scan it was registered to eg. scan_002_registered_to_scan_001.raw.gz

Return home