4.3. Tutorial: Generating a 3D Point Cloud

Problem

Some objects can not be modelled accurately using silhouettes alone. Concave regions are often not recovered and surface details can be missed. This can result in a non-realistic appearance of the final model.

Solution

For objects with a highly patterned texture 3DSOM Pro version 3 can calculate a point cloud — a dense set of 3D points in space. These points can then be used to improve the model geometry and ultimately the final appearance of the 3D model. The Point Cloud Wizard is used for this task.

For untextured plain objects, a digital projector can be used to project a highly patterned slide onto the object. Two or more cameras are then required to capture the lit scene from several angles. The Point Cloud Wizard can then be used to obtain accurate 3D points. Note you can also capture the two views of the light projected scene by moving a single camera - if you have a computer controlled turntable take a first sequence, then move the camera up (keeping the projector fixed) and take a second sequence from identical turntable positions.

Starting Point

Although not essential, it is usually better to have an initial surface generated — the initial unoptimised mesh generated from masks defines the region of space where 3D points can lie.

At any stage you can recalculate a point cloud using the existing geometry to constrain where the points can be found.

Step 1

Open the Point Cloud Wizard by clicking the ID_CALC_POINTCLOUD.jpgGenerate Point Cloud button.

Step 2

Adjust the "density" slider to vary the number of points that will be calculated. A high density cloud will require more processing power but result in more 3D points which can result in better accuracy. A multi-core fast processor is recommended for calculating a high density cloud.

Figure 4.3.1. The effects of choosing different point density settings.

Move the slider to the left to generate a quick sparse set of 3D points ("draft" quality).

TIP:

Do not increase the point density too high if the object is fairly plain (and you haven't used projected patterns) — as the resulting points are likely to be fairly inaccurate.

The "Remove outliers when done" option should be selected to interactively eliminate erroneous outliers after generating the 3D points.

The "Restrict image pairs" parameters are used if you have used a projected pattern to illuminate a plain surface and captured the scene using two (or more) cameras. In this case there will be a sequence of pairs (or multiple) shots as the object is rotated and different parts of the object are illuminated with the projected pattern.

When using "Restrict image pairs" settings, the "...using timestamp" option should be set if the images taken from both cameras were taken simultaneously (or within a 0.5 seconds). Alternatively use the "...using trailing digits" option if the images have been named with the same numerical suffix. For example the first image pair are named "camera1-0001.JPG" and "camera2-0001.JPG" the next image pair are named "camera1-0002.JPG" and "camera2-0002.JPG" and so on.

Use the "Constrain points to be near surface" setting to constrain the 3D points to lie close to the existing surface - i.e. if you believe the current surface is reasonably accurate and wish to capture additional detail close to the current estimate. In this case set the associated threshold value to a small value (use the default of 0.025 if you are unsure).

Step 3

Click the Next > button to start the process. The points will be displayed in the 3D view as they are calculated. You can rotate the scene using the viewpoint controls as normal.

TIP:

Use the ID_SHOWPOINTS.jpgShow points only button to see the point cloud more clearly without the current mesh. Pairs of images are processed in turn and the resulting points displayed with a unique colour for that pair.

Click the Next > button button to stop processing and use the current point cloud or wait for the wizard to complete processing and then hit the Next > button.

Step 4

If the "Remove outliers when done" option was selected the "Filtering Point Cloud" page is displayed.

You will need to wait a short while as the points are pre-processed. You can then interactively eliminate outlier points and see the results immediately.

Try to eliminate points that appear to be incorrect (i.e. do not lie on the surface of the object) as these points could result in an inaccurate 3D model when you optimise the surface.

Move the slider to the left to eliminate more points.

Select the "remove points outside masks" option to remove points that lie outside any mask when projected into each view. If your masks are accurate this can help eliminate incorrect points.

Select the "add back nearby points" option to use a "hysterisis" approach where the points are first filtered to keep only those likely to be accurate and then nearby points are added back into the cloud. You can see this happen interactively.

When you are happy select the Finish button.

Figure 4.3.2. Point cloud filtered without (left) and with hysterisis option selected (right).
Figure 4.3.3. Point cloud heavily filtered without (left) and with hysterisis option selected (right).
Step 5

At any point you can remove outliers in the point cloud by selecting the ID_DFILTERCLOUD.jpgFilter point cloud outliers button.

To update the surface geometry using the generated point cloud you will now need to run the Surface Wizard. See Optimising the surface geometry.