HP restores creased photos with flatbed scanners
New software from HP Labs can determine a photographic defect, and artificially correct it.
Scientists at HP have developed a technique to detect creases in photographs using standard, unmodified flatbed scanners. Once correctly scanned into a computer, software can determine where the photograph's defect is, and artificially correct it to remove any trace of a crease or fold.
How does it work?
On the surface, the technique appears relatively simple. Most flatbed scanners use two separate lightbulbs to accurately capture all the color in a photo. By controlling these independently of each other, two slightly different images (each taken from different directions as the bulbs move under the photo) can be captured of the same photograph. From these, rudimentary 3D information can be generated.
With the defect--a crease in our example--identified, software can artificially mask it entirely. Known as "infilling," each pixel inside the scanned crease is replaced by a new one generated from pixels just outside of the crease. The software makes sure the two pixels are similar, to avoid sticking a giant red pixel in the middle of a bunch of green ones.
The result is a spotless JPEG scan from a creased photo, with absolutely no modified hardware and no technical know-how required on the part of the user.
Problems and future applications
The technique has been proven to work in the lab using off-the-shelf (HP) scanners, but the researchers have been quick to point out the technique's flaws. Any defects that lie flat against the glass cannot be detected, both lightbulbs in the scanner must be identical, and really big creases or tears still prove problematic for the software.
No commercial uses for the technique have yet been announced, but the detailed technical documentation (PDF) provides an extremely interesting read until they are.