Redirecting you to http://en.wikipedia.org/wiki/Thresholding_%28image_processing%29#Adaptive_thresholding