Resize a hyperspectral image cube
Contents
Syntax:
Q = crop_I(I, rect);
Description:
Crops an hyperspectal image cube.
Input:
I: Image cube. This is a 3D array of size rows x cols x bands.
rect: Four-element position vector [xmin ymin width height]
that specifies the size and position of the crop rectangle.
Output:
Q: Cropped image cube.
Example
Crop an image cube based on a rect of width and height of 150 and 200 pixels, respectively.
I = FLAread('.\shared\samples\apples_small.fla');
Q = crop_I(I.I, [80 70 150 200]);