Unwrapped image algorithm