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 🙂
- Step 2 – running 3DF masquerade
|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.
|The 3DF Masquerade interface is divided into these sections:
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
|– 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.
|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
|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.