Skip to content

# The Brush Tool

Back to MIB | User interface | Panels | Segmentation

## Overview

Use the brush to make selections, with size regulated by the Radius, px edit box

- Demo
- MIB in brief: Manual segmentation tools

Controls

- Ctrl + Mouse wheel: change brush size.
- None or Shift + : paint with brush.
- Ctrl + : start eraser (radius amplified by Eraser, x).
- Auto fill in the Selection panel: autofill areas after brushing.

Tip

Connect objects across slices using Interpolation (i shortcut or Menu -> Selection -> Interpolate).

## Widgets of the brush panel

- Radius: define brush radius in pixels.
- Eraser, x: define eraser size multiplier.
- Interpolation settings: modify settings via dialog (also adjustable in
  Menu -> File -> Preferences -> Segmentation tools
  or in toolbar).

- Watershed: cluster pixels with the watershed algorithm for selection as clusters.
- SLIC: cluster pixels with the SLIC algorithm for selection as clusters.

Superpixels with the Brush tool

Enable Superpixels mode with
Watershed or
SLIC checkboxes. The brush selects groups of pixels (superpixels) instead of individual pixels.
Undo the last superpixel with `Ctrl` + `Z`.

Algorithms:

- SLIC: Simple Linear Iterative Clustering by Radhakrishna Achanta et al., 2015 (good for distinct intensities).
- Watershed: Good for distinct boundaries.

Adjust superpixel size and shape with

- N (default, 220 for SLIC, 15 for Watershed)
- Compact/Invert (higher compactness = more rectangular shapes; Invert: 1 for dark boundaries, 0 for bright).

Tip

Use
`Ctrl` + `Alt` + mouse wheel or
`Ctrl` + `Alt` + `Shift` + mouse wheel to adjust N.

Example of SLIC and Watershed superpixels

SLIC boundaries use drawregionboundaries.m by Peter Kovesi.

Note

- Note 1: Sensitive to Adapt. in the Selection panel, selecting superpixels based on mean ± standard deviation × Adapt. factor.
- Note 2: Adjust Adapt. with the mouse wheel while drawing.
- Note 3: Requires compiling slicmex.c for your OS.

References

- Achanta et al., SLIC Superpixels Compared to State-of-the-art Superpixel Methods, IEEE TPAMI, 2012.
- Achanta et al., SLIC Superpixels, EPFL Technical Report, 2010.

## Presets

Use the following key shortcuts to define and restore presets

- `Shift`+`1`, `Shift`+`2`, `Shift`+`3` - store preset 1, 2, or 3 correspondingly
- `1`, `2`, `3` - restore preset 1, 2, or 3 correspondingly

Back to MIB | User interface | Panels | Segmentation