How would I convert a picture of a slanted surface into a straight one? Suppose I took a picture of a whiteboard at an angle. If I could detect where the corners of the whiteboard are, what algorithms and linear projections could I use to convert this slanted view into a "head on" view?
As @user1118321 mentioned, as well as @NathanReed in this answer to another question, you can do a perspective transform to transform any convex quadrilateral to any other.

OpenCV has a good library for doing perspective transformations if you don't want to roll your own.