Invisible Hyperlinks in Physical Photographs

University of California, Berkeley

* Denotes Equal Contribution

Overview Video


Imagine a world in which each photo, printed or digitally displayed, hides arbitrary digital data that can be accessed through an internet-connected imaging system. Another way to think about this is physical photographs that have unique QR codes invisibly embedded within them. We present StegaStamp, the first steganographic algorithm to enable robust encoding and decoding of arbitrary hyperlink bitstrings into photos in a manner that approaches perceptual invisibility. StegaStamp comprises a deep neural network that learns an encoding/decoding algorithm robust to image perturbations that approximate the space of distortions resulting from real printing and photography. Our system prototype demonstrates real-time decoding of hyperlinks for photos from in-the-wild video subject to real-world variation in print quality, lighting, shadows, perspective, occlusion and viewing distance.



Our system uses an encoder network to process the input image and hyperlink bitstring into a StegaStamp. The StegaStamp is then printed and captured by a camera. A detection network localizes and rectifies the StegaStamp before passing it to the decoder network. After the bits are recovered and error corrected, the user can follow the hyperlink.


To train the encoder and decoder networks, we simulate the corruptions caused by printing, reimaging, and detecting the StegaStamp with a set of differentiable image augmentations.

Example Encoded Images

Original Image

Here are examples of images that have been converted to StegaStamps. The residual depicts the difference between the original image and the StegaStamp.


Oblique Angles
Variable Lighting

Here are examples of detection and decoding. The percentage corresponds to the number of bits correctly decoded. Each of these examples encode 100 bits.

Error Correcting Codes

Error correcting codes can be used to filter out bad decodings (due to incorrect detection proposal, or large image corruptions) and correct incorrect bits. Our prototype used BCH codes to create a code with 56 message bits and 40 error correcting bits. The image above demonstrates successful decoding of the 56 bit message  – sufficient to embed a unique code within every photo on the internet.