added Ostu thresholding