1. A method for controlling a function in a vehicle, the method comprising the steps of: detecting a series of 2D images of the vehicle surroundings; detecting a series of 3D images of the vehicle surroundings, the 3D images including depth information; processing one of the series of images to find objects to be tracked; tracking the objects in the one series of images; processing both series of images to retrieve object information; adjusting the objects to be tracked in the one series of images according to the object information retrieved from processing the other series of images; and controlling a function of the vehicle based on the retrieved object information, where the 3D images are processed to detect objects for which distance change relative to the vehicle is larger than the predetermined value, and where position and size information of the detected object retrieved from the 3D images is transmitted to a 2D imaging unit, the objects tracked in the 2D images being adapted to the information received from the 3D images.