A circular Dammann grating in the front focal plane of a lens is used to generate an annular beam in the back focal plane to code an object by two-dimensional scanning. The coded image of the object is decoded digitally by convolving it with the same annular beam used to code the object. Simple inverse filtering is subsequently used to improve the contrast of the decoded image.