Photo Repair and 3D Structure from Flatbed Scanners