The influence of contrast and spatial factors in the perceived shape of boundaries