optical flow sensor for mobile robot navigation

Hi friends..I badly need your help.My project is to design a flow sensor for mobile robot navigation.That is the mobile should not hit the walls on right and left,just go straight.distance is to be measured continuously as velocity of the image and the this data is used to navigate the robot along the straight path.I will be very thankful if anyone guides me on this..Waiting for reply..

What resolution of sensor are you going to use? I don’t think high resolution image analysis at a proper speed can be done on Arduino or any similar 8 bit microprocessor. For low resolution, I found following link. http://diydrones.com/profiles/blogs/user-programmable-subgram?id=705844%3ABlogPost%3A177115&page=1#comments

just use an optical mouse.

a great place to start is this link : http://www.bidouille.org/hack/mousecam

I use "AVM Navigator" for robot navigation and it works pretty well ;)