Update flag_detect.m

Added bounding box stuff