I can develop the code, but the thing is , i need to know what sensor is being used. If you are looking forward to get it done by just using a camera, then it will need more complicated code which will be more costly that i bid. If you are using other distance based sensors, like kinect sensor it might not be that complicated.
Updated : Since using camera, i am updating the bid.