Method for the three-dimensional detection of objects, in which - a scene is detected by means of an image acquisition device, a camera image being generated, - the scene is illuminated with a pattern which is at least locally self-dissimilar, wherein an image is generated as a reference image corresponding to the pattern, - a correlation window is defined as a section of the camera image, - a plurality of search windows are defined as sections of the taught-in reference image, different search windows representing different regions of the reference image, - the search window corresponding to the correlation window is determined by means of a correlation method, characterised in that - in the correlation method, a binarization scheme is applied to the correlation window and the search windows, in which the points of at least one randomly selected pair of points within the correlation window and within the search windows are respectively compared with one another, a result vector being formed for each of the correlation window and the search windows, - the result vector of the correlation window and the result vectors of the search windows are correlated in order to determine the search window corresponding to the correlation window, and - the at least one pair of points is selected by means of a plurality of iterations, wherein for each iteration the at least one pair of points is newly selected at random and that at least one pair of points is used for the correlation method which achieves the best assignment between the correlation window and the search window corresponding to the correlation window, wherein the correlation of the result vector of the correlation window and the result vectors of the search windows takes place on the basis of the Hamming distance of the result vectors, wherein an aggregate is formed over a plurality of Hamming distances for adjacent correlation windows and the correlation takes place on the basis of the aggregate, wherein the camera image is rectified. - a scene is detected by means of an image acquisition device, a camera image being generated, - the scene is illuminated with a pattern which is at least locally self-dissimilar, wherein an image is generated as a reference image corresponding to the pattern, - a correlation window is defined as a section of the camera image, - a plurality of search windows are defined as sections of the taught-in reference image, different search windows representing different regions of the reference image, - the search window corresponding to the correlation window is determined by means of a correlation method, - in the correlation method, a binarization scheme is applied to the correlation window and the search windows, in which the points of at least one randomly selected pair of points within the correlation window and within the search windows are respectively compared with one another, a result vector being formed for each of the correlation window and the search windows, - the result vector of the correlation window and the result vectors of the search windows are correlated in order to determine the search window corresponding to the correlation window, and - the at least one pair of points is selected by means of a plurality of iterations, wherein for each iteration the at least one pair of points is newly selected at random and that at least one pair of points is used for the correlation method which achieves the best assignment between the correlation window and the search window corresponding to the correlation window, wherein the correlation of the result vector of the correlation window and the result vectors of the search windows takes place on the basis of the Hamming distance of the result vectors,