Block classification based edge detector and object localizer