Resize a hyperspectral image cube

Contents

Syntax:

   Q = resize_I(I, scale);
   Q = resize_I(I, rows, cols);

Description:

    Resizes an image cube comprised of n wavelength indexed bands to be of
    dimensions rows x cols x n.

Input:

    I: Image cube.
    scale: Scaling factor for the image cube. This should be a value
        greater than 0, where values between 0 and 1 imply the output image
        cube is smaller in size and values greater than one yield a
        larger image cube.
    rows, cols: New image cube dimensions

Output:

    Q: Resized image cube.

Example

    Resize an image cube so as to be 256 by 320 pixels.
    I = FLAread('.\shared\samples\apples_small.fla');
    Q = resize_I(I.I, 256, 320);