How to Rescue a Faded or Blurry QR Photo
A QR code that looks tired in a photo can often be rescued, because the scanner does not need a beautiful image. It needs a clean separation between dark and light squares. Enhancement works by pushing the photo toward that clean separation: contrast stretches the gap between the darkest and lightest pixels, brightness shifts the whole image so the background sits well above the threshold, thresholding forces every pixel to pure black or pure white, and sharpening tightens the edges between squares. Applied in that order, these four steps can turn a washed-out snapshot into a code that scans on the first try.
Start with the gentlest settings that work, not the strongest. Contrast around 1.4 with thresholding enabled rescues most faded prints and unevenly lit photos without destroying detail. If the background is grey rather than white, raise brightness slightly before thresholding, so the background lands above the threshold and the modules stay below it. If the code is on a dark or colored surface, brightness alone will not help, because the background itself is dark; in that case the photo may be unrecoverable, and the right answer is a fresh print, not more processing.
Threshold is the most powerful control and the easiest to get wrong. Set it too low and pale modules turn white and disappear; set it too high and grey background noise turns black and merges the squares together. The default of 128 splits the tonal range in half and suits most photos. If the code looks patchy after enhancement, move the threshold in small steps and re-check the result each time, watching the finder patterns in the corners: they should be solid black squares with clean white borders. If the finder patterns are broken or bleeding into the background, the settings are wrong for this photo.
Sharpening helps with blur, but it cannot create information that is not there. A slightly soft photo sharpens well, because the module edges are still present, just spread over a few pixels. A photo that is badly out of focus, heavily compressed, or shot at a steep angle will not sharpen into a working code, because the modules have merged into each other. Perspective is the other hard limit: enhancement does not straighten a skewed photo. If the code was photographed at an angle, straighten and crop it first, then enhance, because thresholding a skewed code bakes the distortion in.
Always verify the enhanced result by scanning it, and compare the decoded content against the expected destination. Enhancement can occasionally flip a module near the threshold, which changes the payload or breaks the code's error correction in a way that still looks fine. If the enhanced code scans but leads somewhere unexpected, discard it and use the original source file instead. Enhancement is a rescue tool for a photo of a code you no longer have the source for, not a substitute for keeping the original export.
