Phase-Based Binarization of Ancient Document Images Model and Applications