2.3. Masking the images

After adding images to the project, the next step in 3DSOM Pro is to mask the images (normal shots) if they are not pre-masked PNGs. Masking the images refers to the process of marking the background around the object, so that 3DSOM Pro knows where the object is within the images. This section of the User Guide explains how to automatically mask images within 3DSOM Pro and how to work with masked images.

The Edit Masks Window section explains how to use 3DSOM Pro to manually edit a single mask. The Creating or editing masks in an external application tutorial shows how you can use your usual image editing software to edit the masks externally.

TIP:

If your images are proving difficult to mask, you may wish to mask just a few key views (such as front, left, right, back views) and rely on the point data generated using the Point Cloud Wizard .

Step 1

If you want to automatically mask all the images (or all the unmasked images), press the ID_MAKE_MASKS.jpgMask all images... button to launch the Mask Wizard to guide you through the automasking process.

If you just want to apply automasking to a selection of the images, you can use the Masking > Mask Images... menu item. This opens the same Mask Wizard as before but only affects the masks of the selected images.

To try this out, follow the instructions in the Creating a 3DSOM Pro Project section to create a new project from the images in the Examples/Statue directory included with your installation.

Step 2

When you launch the wizard you are asked about your backdrop setup. Select one of the two options:

2.3.1. Proceeding without a plain backdrop

Step 1

If you selected the second option you will be presented with the following dialog to help you quickly mask the photos using our "Magic highlighter" tool.

The ID_MAGIC_MARKER.jpgMagic highlighter mode button is initially selected.

Step 2

Paint around the edge of your object using the selected tool. You can change the brush size using the buttons in the dialog or using the < and > keys.

Make sure the true precise edge between the background and foreground object lies inside the painted region.

Sketch around the complete boundary...

Step 3

Now press the "Preview" button to see the how 3DSOM Pro interprets your sketched mask to create a precise mask.

Step 4

Select the ID_MAGIC_MARKER.jpgMagic highlighter mode button again and paint any interior "hole" regions in the mask. You should make sure that there is an unpainted area in the hole center so 3DSOM Pro knows to grow a mask hole inside - either use a smaller brush where needed or unpaint using the ID_MAGIC_UNPAINT.jpgUnpaint highlight button.

Step 5

Use the ID_MAGIC_UNPAINT.jpgUnpaint highlight button mode to improve masking e.g. where you have accidentally included a dot on the mat as part of the object. Simply "unpaint" part of the dot so it becomes part of the background when previewed.

Step 6

Hit the Next > button when you have a reasonable mask. Then keep masking the photos until you have around 10 completed masks and then hit Close. For simple objects you can get away with fewer masks. More complex objects with holes, overhangs etc will benefit from more masks.

2.3.2. Using a plain backrop

Step 1

If you selected the first option you will now get the chance to modify the parameters used in the automatic masking process.

If you want to discard all the existing masks on your images then select the "Replace any existing masks" option. Unselect this option if some images have had their masks manually edited to prevent 3DSOM Pro from over-writing the edits.

You should select the "Use colour normalisation" option if you used a coloured backdrop and have shadows or other slight variations of lighting on the backdrop in the images. This will attempt to compensate for the shadows and avoid treating them as part of the object.

The "Background detection threshold" field lets you change the threshold that is used to separate the foreground from the background. You should only change this from the default value if you have problems generating the masks (see below).

The Preview button can be used to interactively preview the result on the currently selected image. Once you clicked the button, use the slider to interactively vary the threshold. You can also switch preview image by double-clicking a thumbnail.

Step 2

Hit the Next > button to start the masking process.

TIP:

If you have an image loaded into the Edit Masks Window while you are performing automasking you will see each image displayed as it is masked.

Step 3

Check through the masks by looking at the thumbnails in the Thumbnail Window or loading them into the Edit Masks Window by double-clicking on the thumbnail.

It is important that none of the object is covered by the masked area in any of the images, otherwise some of the object will be carved away when you create the wireframe geometry. It is less important that all of the background is masked, since 3DSOM Pro will often be able to use information from other images to define the shape of the object.

TIP:

The automatic masking requires a good contrast between the background and object; a good choice of background colour will result in much better automatic masking. Lighting can also affect the results of automatic masking.

If you are not happy with your masks, click < Back button to return to the Mask Generation Window and try changing the parameter values. If areas of the background are consistently not being masked then increase the "Background detection threshold". If regions of the object are being incorrectly masked then reduce this number.

TIP:

You can use interactive masking on an representative mask to help you pick a threshold value then apply it to all the other images as described in the Fine tuning the auto-masking tutorial.

Step 4

When you are finished, click the Finish button to close the Mask Wizard.

In some cases the automatic masking of an image may not be perfect; but this is not a problem as the masked images can be improved individually as explained in the Fine tuning the auto-masking tutorial.