1. A method of detecting two-dimensional codes, in particular matrix codes, which include a plurality of light and dark data bits arranged two dimensionally, in particular in matrix form, wherein the code is detected as a gray scale value image; wherein the detected gray scale value image is split into image areas corresponding to the individual data bits; wherein a binarizing threshold representing a specific gray scale value is determined for the image areas; wherein a respective binarizing of the gray scale value of the individual image areas is carried out by means of the binarizing threshold to produce a bit sequence which represents the data bits and consists of the values 0 and 1; and wherein the bit sequence is supplied to an error correction algorithm to recognize and/or correct bit errors within the bit sequence, characterized in that those so-called uncertain image areas are determined whose gray scale values each lie close to the binarizing threshold; and in that these uncertain image areas are taken into special account in the error correction.