An optical security device comprising: - a substrate layer; - a waveguiding layer arranged on said substrate layer, said waveguiding layer defining a first waveguide surface on the substrate layer and defining a second waveguide surface opposite to said first waveguide surface 201; - a coating layer arranged on said second waveguide surface 203; the waveguiding layer comprising at least two resonating waveguide grating elements, each having less than four guided light wave modes and each comprising a first grating and a second grating in the first waveguide surface 201, a third grating and a fourth grating in the second waveguide surface, said third grating facing said first grating and said fourth grating facing said second grating; said first grating defining a first surface portion having a first center and the second grating defining a second surface portion having a second center 24a, said first center and said second center 24a defining a longitudinal waveguide axis W, and a resonating waveguide grating element center being defined halfway between said first center and said second center 24a, said first grating and said third grating being arranged to be in optical communication with said second grating and said fourth grating such that, upon illumination with a light source: - said first grating and said third grating couple into said resonating waveguide grating element at least a first incoupled portion of a first incident light beam, and so that said second grating and said fourth grating couple out of said resonating waveguide grating element an outcoupled fraction of said at least a first incoupled portion; - said second grating and said fourth grating couple into said resonating waveguide grating element at least a second incoupled portion of a second incident light beam and so that said first grating and said third grating couple out of said resonating waveguide grating element an outcoupled fraction of said at least a second incoupled portion, - said outcoupled fractions (40c, 40d) of said at least a first and second incoupled portions each having a predetermined wavelength λ and a predetermined spectral width Δλ characterized in that: - the optical security device further comprises an illumination center and a detection center, said detection center and said illumination center defining an X-axis, - the waveguiding layer comprises a waveguiding layer center being located closest to a midpoint between said light source center and said detector center, said waveguiding layer center and said midpoint defining a Z-axis, the normal to said X and Z axes passing through said midpoint and defining an Y axis, a center of each of said at least two resonating waveguide grating elements is arranged on a first nonlinear curve, defined in the plane of said waveguiding layer and away from said waveguiding layer center 200, characterised in that for each resonating waveguide element at least said outcoupled fraction of said at least first incoupled portion or said at least outcoupled fraction of said at least a second incoupled portion propagate towards said detector center, - a substrate layer; - a waveguiding layer arranged on said substrate layer, said waveguiding layer defining a first waveguide surface on the substrate layer and defining a second waveguide surface opposite to said first waveguide surface 201; - a coating layer arranged on said second waveguide surface 203; - said first grating and said third grating couple into said resonating waveguide grating element at least a first incoupled portion of a first incident light beam, and so that said second grating and said fourth grating couple out of said resonating waveguide grating element an outcoupled fraction of said at least a first incoupled portion; - said second grating and said fourth grating couple into said resonating waveguide grating element at least a second incoupled portion of a second incident light beam and so that said first grating and said third grating couple out of said resonating waveguide grating element an outcoupled fraction of said at least a second incoupled portion, - said outcoupled fractions (40c, 40d) of said at least a first and second incoupled portions each having a predetermined wavelength λ and a predetermined spectral width Δλ - the optical security device further comprises an illumination center and a detection center, said detection center and said illumination center defining an X-axis, - the waveguiding layer comprises a waveguiding layer center being located closest to a midpoint between said light source center and said detector center, said waveguiding layer center and said midpoint defining a Z-axis, the normal to said X and Z axes passing through said midpoint and defining an Y axis,