Morphological Spatial Pattern Analysis (MSPA)
With the foresk/non-forest mask created, we perform the MSPA within the GTB. MSPA is a series of mathematical morphological operators designed to analyze the shape and connectivity of image elements. It performs a segmentation of the foreground objects in a binary input image. MSPA categorizes each foreground pixel into a distinct feature class: Core, Islet, Perforation, Edge, Loop, Bridge, and Branch. The background pixels can be further classified into other feature classes: Core opening, Perforation, Border Opening, etc. It is used to assess and monitor landscape patterns, for example, measuring the area of forest patches in fragmented agricultural landscapes.
1. Load the mask into the GTB.
- File > Read > Image > GeoTIFF
1a. Convert the mask values to an unsigned 8-bit integer.
- If the mask was not cast as a byte, we convert the mask values to unsigned 8-bit integers using General Tools > Convert > Byte. Otherwise, this step can be skipped.
1b. Reclassify mask values.
- If the mask values are incorrect, we reclassify the values using General Tools > Preprocessing > Recode Classes. Otherwise, this step can be skipped.
- Background = 1, Foreground = 2, and Missing = 0
2. Set the MSPA settings.
2a. Foreground Connectivity (FGConn) is checked (on: 8 pixels).
- For a set of 3×3 pixels the center pixel (surrounded in red below) is connected to its adjacent neighboring pixels by having either a pixel border and a pixel corner in common (8-connectivity) or, a common pixel border only (4-connectivity).
2b. EdgeWidth as 3 pixels.
- The EdgeWidth parameter defines the width or thickness of the non-core classes in pixels. The actual distance corresponds to the number of edge pixels multiplied by the pixel resolution of the data. The EdgeWidth distance used in MSPA corresponds to the radius of a Euclidean disk.
2c. Transitions is unchecked (off: 0).
- Transition pixels are loop or bridge pixels that traverse an edge or a perforation to connect to the core area. If Transition is set to 0 (↔do not show transition pixels) then the perforation and the edges will show closed core boundaries.
2d. Intext is checked (on: 1).
- The parameter Intext allows separating internal from external features, where internal features are defined as being enclosed by a Perforation. Pixels values of internal features are offset by 100 byte. All classes, except for Perforation, which by default is always internal (105b), can then appear as internal or external. The default is to enable this distinction, which will add a second layer of classes to the seven basic classes. The image below shows the difference in pixel values when Intext = 1 (default – left panel) versus Intext = 0 (right panel). Note: When using the default Intext = 1, the internal Background is segmented into the two categories: Border-Opening and Core-Opening (bottom panel).
3. Run the MSPA.
- Image Analysis > Pattern > Morphological > MSPA
4. Save the MSPA image.
- File > Save Image > GeoTiff
- Make sure to include the details of the settings in the output name. Example: For settings such as FGConn 8 pixels, EdgeWidth 3 pixels, Transitions off, and Intext on, the file name could be: mspa_{deal}_8_3_0_1 or similar name.
5. Visualize the MSPA image.
- The MSPA result is visualized using the following colors:
- 7 colors: corresponding to the pattern classes of Foreground,
- 3 gray tones: corresponding to external Background, Border-Opening, Core-Opening,
- 1 color white: corresponding to Missing, if this class was in the input map.