Let r_scale be the neighborhood radius scale, a brute search method would require N*r_scale to detect the valleys with neighborhood size of r_scale in 1d signal or N*r_scale*r_scale complexity in 2d image. Which is too slow in large data size. In this file, the complexity is reduced in N*log(r_scale) in both 1d and 2d data.
To run the code, firstly you have to generate the dll using:
Su Dongcai (2020). Efficient local minima detector (https://www.mathworks.com/matlabcentral/fileexchange/29513-efficient-local-minima-detector), MATLAB Central File Exchange. Retrieved .
supply the compling m-file make it runnable independent of the operating enviroments