Optimal boundary detection on grey-tone image