Surface consistency constraints in vision