added local min-max filters and vice versa, divideMatrix