# nonMaxSuprWin

## PURPOSE

Nonmaximal suppression of values outside of a given window.

## SYNOPSIS

function [subs,vals,keepLocs] = nonMaxSuprWin( subs, vals,strLocs, endLocs, thresh, maxn )

## DESCRIPTION

     Nonmaximal suppression of values outside of a given window.

     Suppresses all location in subs that do not fall in given range (defined
     by strLocs and endLocs).  For example, if subs are 3D coordinates of
     maxes over an array of size siz,  "nonMaxSuprWin( subs, vals,
     [1,1,1]+10, siz-10 )" suppreses all locations within 10 pixels of the
     border of I.

     USAGE
      [subs,vals,keepLocs] = nonMaxSuprWin( subs, vals, ...
                                          strLocs, endLocs, thresh, maxn )

     INPUTS
      subs        - subscripts of point locations (m x d)
      vals        - values at point locations (m x 1)
      strLocs     - locations at which to start cropping along each dim
      endLocs     - locations at which to end cropping along each dim
      thresh      - [] minimum value below which not to look fo
      maxn        - [] return at most maxn of the largest vals

     OUTPUTS
      subs        - subscripts of non-suppressed point locations (n x d)
      vals        - values at non-suppressed point locations (n x 1)
      keepLocs    - indicies of kept locations from subs (n x 1)

     EXAMPLE

     See also SUBSTOARRAY, NONMAXSUPR, NONMAXSUPRLIST

     Piotr's Image&Video Toolbox      Version 2.0
     Copyright 2008 Piotr Dollar.  [pdollar-at-caltech.edu]
     Please email me if you find bugs, or have suggestions or questions!
     Licensed under the Lesser GPL [see external/lgpl.txt]

## CROSS-REFERENCE INFORMATION

This function calls:

- checkNumArgs Helper utility for checking numeric vector arguments.

This function is called by: