Three most widely used resampling technique have been discussed below to provide insights on which one to use under given scenarios.
- Nearest Neighbor
- Bilinear
- Bicubic
Nearest Neighbor Resampling
The resampling method in which a pixel from the original image is matched to its corresponding position in the resized image is known as nearest neighbor resampling (Figure 1). If corresponding pixel is not available, the nearest pixel value is used instead.
![Nearest_Neighbor_Resampling]()
Figure 1: Schematic representation of Nearest neighbor resampling method.
The grid represents the output raster. The center of the cells of input raster are marked with gray circles. The blue circle marks the center of the target cell. The yellow circle is nearest cells from the input raster that is used for calculating output raster cell value [green cell].
Major advantage of nearest neighbor resampling technique is that it preserves original values and no interpolated values are created and hence is closest representation of the image. In addition, because of the speed of implementation and simplicity it remains the widely used for image resampling. A notable disadvantage is that this method introduces position errors where the realignment of pixels is obvious especially along linear structures.
When to use Nearest Neighbor Resampling Method?
This resampling method is ideal for representing categorical data such as nominal, and ordinal data.
Nominal Data: Named/ Class data which can be separated into discrete categories
(Example - Soil Type: "Sand", "Silt", "Clay"; Land-Use Class:"Forest", "Open", "Urban")
Ordinal Data: Data placed into some kind of order or scale
(Example - Likelihood and incidence of risk - "Low" "Moderate" "High"; Classes numbered and named: "1 - Good," "2 - Moderate," "3 - Poor")