Robust Image Segmentation Using Modified Edge-Following Scheme with Automatically-Determined Thresholds