maskingTutIntro

Tutorial #3 – using the masking Tool

Welcome to the 3DF Zephyr tutorial series.

In this recipe, you will learn when and how to use 3DF masquerade to mask images.

This feature requires 3DF Zephyr v 1.100 or higher.

  • Step 1 – Introduction

From version 1.100 a new tool (3DF Masquerade) is available and included in the 3DF Zephyr installation package: with 3DF Masquerade you’ll be able to mask certain images.

Feel free to watch this video tutorial or to skip directly to the following dataset example:

When masking images, you’re telling Zephyr to completely ignore some areas of the pictures, this means that

  • Zephyr will not use the ignored areas to search for features and to create matches between images
  • Zephyr will not use the ignored areas to compute the dense point cloud / mesh from that particular image

This is particularly helpful when there is a lot of background noise or when the subject has been moved incoherently with the background: the most common scenario is a subject that is being acquired on a turntable: since the object is moving but the background wall is not, if the background has enough features sometimes Zephyr might try to set the camera for the background rather than for the actual subject. The solution is to mask the background with 3DF Masquerade before processing the images.

For this tutorial, we are going to use our dismal souvenir dataset 🙂

download dataset Download 3DF Zephyr Tutorial 7 Dataset – Dismal Souvenir

  • Step 2  – running 3DF masquerade
masking images
click to view full screen
3DF Masquerade has been developed as an external executable, so you can either launch it from the Tools menu or during the wizard phase (right click -> edit with masquerade).

If the mask (.bim file) is saved in the same directory where the picture is saved, Zephyr will automatically pick it up when adding pictures.

You can safely mix unmasked images with masked images.

This time, run Zephyr with the same settings described in step 1 but remember to pick “mask images” during the “new project” Wizard in the Photos selection Page.

Click to view fullscreen
Click to view fullscreen
The 3DF Masquerade interface is divided into these sections:

  • (A) tools toolbar – picks current tool and masks/unmask image
  • (B) upper toolbar – undo / redo / rotate image / view BW mask /
  • (C) command history – used to undo/redo actions taken in 3DF Masquerade
  • (D) picture list – allows to quickly move through your pictures

The Rectangle (1), Polygon (2) and Lasso (3) tools are very similar and probably you will be able to pick them up very easily: in order to mask a certain area (mask what you want to be processed) you can

Click to view fullscreen
Click to view fullscreen
– drag a rectangle and the press the mask button (4) to mask the selected area

– use left click to add nodes to a polygon path (doubleclick to automatically close it) and press the mask button (4) to mask the selected area

– drag the lasso and press the mask button (4) to mask the selected area

When selecting you will see a blue outline – when masked, the selection area will turn red.

You can subtract a selection with the unmask button (5)

when using these tools, you can add areas by keeping pressed the left control key or subtract areas by keeping pressed the left shift key when doing the selection.  You can undo action by pressing CTRL+Z or simply by clicking to the command you want to revert back to in the command history section (C).

To zoom in / out you can use the mousewheel up/down ; panning is done by moving the mouse while holding the mousewheel button down.

Click to view fullscreen
Click to view fullscreen
The silhouetter tool can be used to automatically compute a silhouette by stroking the foreground element (6) (red stroke, which will be masked) and the background element (7) (blue stroke, which won’t be masked). You can quickly switch between the two strokes by pressing left shift+left click. The brush size can be changed with the brush size slider (8).

This tool is especially useful when the background has a very high contrast compared to the object: this is mostly used to automatically mask human faces against walls, for example – you can clearly see how the black support is automatically computed while the white background is creating some noise against the carton. You can delete existing strokes using the right click.

  • Final notes
Click to view fullscreen
Click to view fullscreen
Masking can be a daunting task given a high number of pictures, so we strongly encourage taking good pictures when possible. However,  masking out large portion of images will considerably speed up the computation process since masked out section won’t be computed at all.

The next tutorial will show how to manage multiple objects in 3DF Zephyr’s workspace. Click here to proceed to the next tutorial.