There are other possible methods, such as the "photo popup" created at CMU some years ago, but these rely heavily upon "dodgy heuristics" and often fail to give a good result.
Also note that the method used by this app is very short ranged, and uses the LCD's backlight while it's imaging, so there's zero feedback, making any kind of interactive application impossible.
1: There are third party accessories to make this easy and repeatable, built with varying levels of quality. Here's a fairly cheap one, circa 2003: http://www.dansdata.com/photo3d.htm
1. Illuminate 2. Take photo 3. Show photo
Repeat.
If step 2 is really short, you could have the illumination phase be much shorter than the show photo phase and the user of the phone would see it as 4 short flashes over their own photo.