I'm pretty sure one of the on-board cameras scans the ground during descent to find the optimal touch-down spot.
I'm not so sure that it does. I've read nothing to date that talks about lateral movement with the intent of avoiding objects. MARDI is used (afaik) to zero-out horizontal movement so that the rover is not dragged across the landscape.