PreviousNext
Help > Importing and Using Photographs > Viewing Photographs > Create Masks Dialog
Create Masks Dialog

Graphical user interface, application

Description automatically generated

The Create Masks Dialog provides tools to create mask images for project photos from within PhotoModeler. Once created, the mask images can be set on Photo Properties (see Texture and DSM Mask image file names) for use with photo textures - masking out unwanted regions, or DSM - masking out regions not to be DSM processed. 

Note: that you can also create a mask by drawing using Draw Mask Mode.

Your project must first be saved in order to create mask image files because the mask files are stored in a project's "Masks" sub-folder.

You can select a photo set in the top drop down selector to limit the mask image generation to certain photos.

There are two ways to create a mask:

        Image alpha channel:  If your photos contain an alpha channel (e.g., image formats such as GIF, PNG and TIFF), the alpha channel is scanned and used to create a mask image. Regions containing alpha value 0 will be masked and not included.

        Chroma Key: You can select an RGB value, or use the average RGB value of a 50x50 pixel sample patch near the top left of the image to generate the mask image. For example, using an RGB value of [0,255,0] will mask out the green portions of the image.  Note that chroma key relies on distinct color differentiation and that differences in intensity are ignored.  Muted colors and desaturated colors (e.g., whites, blacks, grey, light browns, etc.) make poor chroma key color choices. Ideal high contrast color pairs are red/green or yellow/blue. Chroma keying generally works well in controlled environments (studios, film sets, etc.).  The color tolerance slider controls the range of color values used in the mask, where 0 masks a narrower color range (therefore fewer pixels masked out), while 100 masks a wider color range (therefore more pixels masked out).

You then check the 'Use mask for' settings to apply masks to Texturing and/or DSM's (see the Texture and DSM Mask image file names properties on Photo Properties).  This will apply the mask files after they have been created.

Once the masks are created a summary dialog appears showing the results of the process:

Graphical user interface, text, application, email

Description automatically generated

Feedback is given as to the quality and status of masks.  If you select a mask image line, as shown above, the "Open with associated program" button enables which allows you to view the created mask image in an external image viewer program.  If you examine your mask images, you should note that the black areas of the image will mask or not be included in DSM or Textures etc.  If your project photos don't have ideal masking color contrast, you may want to confirm that appropriate parts of the images are masked out.

For example, the following image shows a good mask region, where the region around the model object is black and therefore masked/not used for DSM or texture creation:

A white square with a black background

Description automatically generated with low confidence

On the other hand, this mask image below shows a poor mask region, where the model object region and the region around the model object are predominantly white:

A picture containing silhouette

Description automatically generated

When setting up your projects to work with masks the background colour should be a high intensity color (e.g. green) with a large amount of contrast.

You can also edit a mask in an image editor such as PhotoShop to, for example, fill in areas to make the mask more contiguous, where black regions are masked out in PhotoModeler.