arrayCrop

PURPOSE ^

Used to crop a rectangular region from an n dimensional array.

SYNOPSIS ^

function I = arrayCrop( I, strLocs, endLocs, padEl )

DESCRIPTION ^

 Used to crop a rectangular region from an n dimensional array.

 Guarantees that the resulting array will have dims as specified by rect
 by filling in locations with padEl if the locations are outside of array.

 USAGE
  I = arrayCrop( I, strLocs, endLocs, [padEl] )

 INPUTS
  I          - n dimensional array to crop window from
  strLocs    - locs at which to start cropping along each dim
  endLocs    - locs at which to end cropping along each dim
  padEl      - [0] element with which to pad

 OUTPUTS
  I          - cropped array

 EXAMPLE
  I=randn(10);  IC=arrayCrop( I, [-1 1], [10 10], 0 );

 See also PADARRAY, ARRAYTODIMS

 Piotr's Computer Vision Matlab Toolbox      Version 2.02
 Copyright 2014 Piotr Dollar.  [pdollar-at-gmail.com]
 Licensed under the Simplified BSD License [see external/bsd.txt]

Generated by m2html © 2003