The two things worth of mentioning are the focus and the reconstruction into a box. For the focus-guessing, I found that a good "close" distance is about the sum of the width and height of the background square. The program automatically checks if it's too small, using a very loose heuristic of comparing the depth to half the average of the dimensions. If the focus is too small, then increasing it to 5 times its original value usually solves the problem. As for the 3-D texture-mapping to a box... I couldn't figure out how the x,y,z given to the warp function worked, did it by trial and error, and still have less than a clear idea about how it worked. I also tried to set the transparency of each plane. However, it would only set alpha globally, so that didn't go through.
In any case, below are some normal results, just to demonstrate the program's correctness, followed by some fun stuff induced by hunger and sleep-deprivation.
Original:
Is that a lion?!?! I hope this artist was messing up the proportions on purpose...
Results:
Original:
Results:
Poor room got butchered ='(
All base files can be found here. And all results and points annotated images can be found here.