1. A method for representing a virtual object in a real environment, having the following steps: obtaining at least one two-dimensional image of a real environment by means of a recording device; ascertaining a position of the recording device relative to at least one component of the real environment; generating 3D information for identifying at least one segment of the real environment, using a sensor or feature detection over a plurality of image data sets; segmenting at least one area of the real environment in the at least one two-dimensional image, comprising: subdividing, into at least one 2D segment corresponding to the at least one segment of the real environment, image areas in the at least one two-dimensional image in which different components of reality are imaged by using the generated 3D information to choose a starting point or area for the subdividing and creating 2D segmentation data; and merging the virtual object with the at least one two-dimensional image of the real environment or, by means of an optical, semitransparent element, directly with reality with consideration of the 2D segmentation data.