LocalMin is identical in most respects to LocalMax, except that it detects local minima. Hence all signs must be inverted. For example, a point is considered a local minimum for a window size if: .