Interpolates an image.
IMINTERP(image, factor, method)
image |
- |
An array. The input image. |
||||
factor |
- |
Optional. An integer, the interpolation factor. Defaults to 2. |
||||
method |
- |
Optional. An integer, the interpolation method:
|
An array.
W1: readimage(gethome + "data\mandrill.bmp")
W2: iminterp(W1, 4, 0);setaspect(-1)
W3: iminterp(W1, 4, 1);setaspect(-1)
W4: iminterp(W1, 6, 1);setaspect(-1)

W1 contains a 250x240 color image of a mandrill.
W2 produces a 997x957 linearly interpolated image where the interpolation factor is 4..
W3 produces a 997x957 cubic spline interpolated image where the interpolation factor is 4.
W4 produces a 1495x1435 cubic spline interpolated image where the interpolation factor is 6.
Although the image sizes of W2, W3 and W4 are larger than W1, the plot extent is the same because the resulting DELTAX and DELTAY values are adjusted
If the image is an RGBIMAGE (i.e. a 24 bit image), IMINTERP automatically interpolates each R, G, B (red, green, blue) component.
The DELTAX and DELTAY values are adjusted as per the interpolation factor.