Resizing a Categorical Image

A label image uses pixel values as category codes. Its resampling should preserve permitted labels under the chosen interpretation.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace two regions
  2. Choose based on the target

Trace two regions

If adjacent samples carry label 1 and label 3, linear averaging could produce 2, which may describe another unrelated category. Bilinear interpolation works with numeric values whose mixtures have meaning.

Choose based on the target

Nearest-neighbor sampling chooses an existing category, while a downsample can use a majority or coverage rule if appropriate. See nearest-neighbor location.[1][2]

References

  1. scikit-image Contributors, NumPy Images and Coordinate Conventions ↩
  2. scikit-image Contributors, Image Data Types and Representable Values ↩