look at image recogniton? (fyi, I know very little about implementing it)
alternativly look at the wavefront algrithm, there is a tutorial somewhere in the robot tutorials, and adapt that to identify a target shape?
best ideas I have, the wavefront algorithm has some potential to be used on diffrent forms of sensors. depending on what you want to do.