Implemented Sauvola alorithm