Package pyvision :: Package util :: Module fast_util :: Class LocalMaximumDetector
[hide private]
[frames] | no frames]

Class LocalMaximumDetector

source code

Instance Methods [hide private]
 
__init__(self, max_length=1000000) source code
 
__call__(self, mat, threshold=None, sort_results=True)
All any local maximum that are greater than threshhold up to a total of max_length.
source code
Method Details [hide private]

__call__(self, mat, threshold=None, sort_results=True)
(Call operator)

source code 

All any local maximum that are greater than threshhold up to a total of max_length.

To save time arrays that hold the maxes and vals that are created once and reused for each call. This means that local maximum detection is not thread safe. If using this class with threads create an instance for each thread.

Parameters:
  • mat - 2d Real Matrix input.
  • threshold - Mininum value of local maxima.
  • sort_results - set to False to save time and return an unorderd list.
Returns:
maxes,vals