kuwisdelu / matter

Out-of-core statistical computing and signal processing
http://www.cardinalmsi.org
Artistic License 2.0
55 stars 4 forks source link

Add local maxima detection for multidimensional signals #23

Closed kuwisdelu closed 3 months ago

kuwisdelu commented 5 months ago

Can we implement locmax2() and locmaxn() for multidimensional local maxima?

For locmax2(), assuming a gridded 2D image, we can use the same idea: use a sliding window and a local maxima must be greater than all other samples in the window.

For locmaxn(), for the general case of nonuniformly sampled N-D signals, we can rely on knnsearch().

kuwisdelu commented 3 months ago

Added in https://github.com/kuwisdelu/matter/commit/13843ea5072bdf3055837c9ccc93e51870202f1e

Revised in https://github.com/kuwisdelu/matter/commit/bce1e80ee174c15eb99a5706ac235e7d7de0fb2d