Nearest-Neighbor Image Resampling

Nearest-neighbor resampling chooses one source sample for each output location using a coordinate mapping and rounding rule.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a simple location
  2. Check which locations the map uses

Trace a simple location

If an output position maps to source coordinate 2.1 on a row, the nearest integer position is two. A coordinate of 2.5 requires a tie rule. See rounding conventions.

Check which locations the map uses

A mapping between pixel centers can differ from one treating endpoints as fixed. Keep edge and center behavior explicit in grid coordinate tests.[1][2]

References

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