I'm actually about to embark on exactly such a project. My plan is to use OpenCV's "stitching_detailed.cpp" example, and improve it from there. OpenCV's stitching is quite good out of the box, but I think I can improve it by adding knowledge from the phone's IMU. What do you need this for?