simple conversion of scans to distance image