>  Docs Center  >  Libraries  >  Buie  >  SUBARR
Libraries

SUBARR

SUBARR

Name


  subarr

Purpose (one Line Only)


  Extract a sub-array from an image with bound checking

Description


  Return a portion of an image as a sub-array. The requested location for
    the sub-array is checked against the real boundary of the original image
    and portions of the sub-array that fall off the image are padded out
    with either zeros or a noisy background filler.
  An error is generated only when there is no overlap between the requested
    sub-array and the image.

Category


  Image display

Calling Sequence


  subarr,image,i0,i1,j0,j1,sub,error

Inputs


  image - The input image
  i0 - Bottom of the sub-array location
  j0 - Left boundary of the sub-array location
  i1 - Top of the sub-array location
  j1 - Right boundary of the sub-array location

Optional Input Parameters


Keyword Input Parameters


  FILL - value to use to fill non-overlap regions between sub and image
            (default=0)
  NOISE - noise value for FILL (default=0), this will not always be useful
            for non-floating point data types.
  SEED - seed value for random number generator. This is used only when
            NOISE is non-zero. It is only needed if you are trying to
            create the same set of random values for testing. Under normal
            circumstances there is no need to ever specify this value.

Outputs


  sub - sub-array from image, if an error occurs this will be returned as
            a scalar zero.
  error - Flag, set if an error occurred. The only time this happens is if
            the requested area has no overlap with the image.

Keyword Output Parameters


Common Blocks


Side Effects


Restrictions


Procedure


Modification History


  Written by Marc W. Buie, Southwest Research Insitute, 2015/06/30
  2016/12/28, MWB, added byte input option for FILL



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us