Masking

Masking

is an option for various image and signal processing functions that specifies on which regions they should operate.

Details

  • Masking is also known as region of interest (ROI) or volume of interest (VOI).
  • The typical settings include:
  • Allentire object
    Automaticautomatic selection
    {pos1,pos2,}specific positions
    imagegrayscale or binary version of image
    regionany ConstantRegionQ
    graphicsuse positive raster values
    arrayuse positive values in array
  • When the region of interest is specified as an array or image, it is taken to be centered on the image to be processed.

Examples

open allclose all

Basic Examples  (2)

Apply a function to image pixels in a specified region of interest:

Compute image measurements only on a specified region of interest:

Scope  (1)

Perform color negation to the whole image:

This is equivalent to Masking->All:

Use a region as the mask:

Use a binary image as the mask:

Use a grayscale image as the mask:

Applications  (1)

Separate the foreground from the background:

Apply a function to the background:

Introduced in 2010
 (8.0)
 |
Updated in 2012
 (9.0)
2018
 (11.3)