A method for clearing unwanted data from optically detected virtual representations of objects includes: a. Defining an extension line of the representation; b. Generating a projection plane at one point of the extension line, which is perpendicular to the generated projection plane; c. Projecting all known points in space of the representation from one region on the projection plane onto the projection plane, the corresponding point in space being stored for each projected point; d. Generating a two-dimensional curve on the projection plane; e. Determining maxima, minima and a center of the curve; f. Identifying projected points of the curve that—;viewed from the center of the curve—;lie outside of the minima or maxima; g. Removing the points in space that correspond to the projected points that were identified in step f.; and h. Optionally, repeating starting from step b. for one further point of the extension line.