Image Processing Toolbox | ![]() ![]() |
Interpolation
Interpolation is the process by which we estimate an image value at a location in between image pixels. For example, if you resize an image so it contains more pixels than it did originally, the software obtains values for the additional pixels through interpolation. The imresize
and imrotate
geometric functions use two-dimensional interpolation as part of the operations they perform. (The improfile
image analysis function also uses interpolation. See Intensity Profile for information about this function.)
The Image Processing Toolbox provides three interpolation methods:
The interpolation methods all work in a fundamentally similar way. In each case, to determine the value for an interpolated pixel, you find the point in the input image that the output pixel corresponds to. You then assign a value to the output pixel by computing a weighted average of some set of pixels in the vicinity of the point. The weightings are based on the distance each pixel is from the point.
The methods differ in the set of pixels that are considered:
The number of pixels considered affects the complexity of the computation. Therefore the bilinear method takes longer than nearest neighbor interpolation, and the bicubic method takes longer than bilinear. However, the greater the number of pixels considered, the more accurate the effect is, so there is a trade-off between processing time and quality.
![]() | Terminology | Image Types | ![]() |