%% Read Specified Region of TIFF Image
% Read a specific region of pixels of the sample image, corn.tif.
% Specify the 'PixelRegion' parameter with a cell array of vectors indicating the boundaries of the region to read. The first vector specifies the range of rows to read, and the second vector specifies the range of columns to read.

A = imread('corn.tif','PixelRegion',{[1,2],[2,5]});

% imread reads the image data in rows 1-2 and columns 2-5 from corn.tif and returns the 2-by-4 array, A.
% Copyright 2015 The MathWorks, Inc.