The invention relates to a method and a device for optically detecting a surface structure of a test object, in particular a finger (9), said device (1) comprising at least one lighting device (7). The device (1) comprises at least one light guiding element, and light can be coupled into the light guiding element by means of the lighting device (7). The light guiding element has a first surface (3), and light can be coupled out of the light guiding element in the region of the first surface (3). The light guiding element is completely reflective for at least a part of the light generated by the lighting device (7) in the region of the first surface (3) for an air/light guiding element transition and incompletely reflective in a medium/light guiding element transition, said medium being a medium which is different from air. The invention also relates to a method for producing said device.