1. A method for guiding a vehicle in a surrounding environment of an object, the method comprising: reading in a multiplicity of view ray endpoints in a three-dimensional image of the surrounding environment, containing the object and/or the vehicle, the three-dimensional image representing an image produced by a stereo camera of the vehicle, and at least one of the view ray endpoints representing an outer surface of the object; connecting the multiplicity of view ray endpoints to form a polygon that represents a free surface to be traveled by the vehicle, wherein one or more sides of the polygon define an edge of the free space, the one or more sides defining a boundary between the polygon and the object; and generating a driving corridor, provided for the vehicle, for driving around the object, based on the free surface, wherein the generating of the driving corridor includes: determining a safety distance between the vehicle and the one or more sides of the polygon, wherein a size of the safety distance varies as a function of a classification of the object, and defining at least one lateral edge of the driving corridor, a distance between the at least one lateral edge of the driving corridor and the one or more sides of the polygon corresponding to the safety distance.