improved pinhole dewarping