Sometimes it's really an eye-opener when a developer opens the curtains just a little and lets those of us on the outside see what is going on behind the scenes. The Verge noted this morning that the Instagram engineering team had done exactly that, revealing how they went about designing and implementing the automatic image straightening that's available in Instagram for iPhone.
The option is simple in operation; one simply taps the proper icon in a menu, and the app uses data from the iPhone's accelerometer