问题
The camera app on Android 4.3/4.4 under the 'Sphere mode' can stitch photos from varied directions into one spherical panorama, with very good quality.
Results illustration:
- http://i-cdn.phonearena.com/images/articles/73441-image/google-nexus-4-photo-sphere.jpg
- http://www.studio8apps.com/wp-content/uploads/2013/05/glass_team_pano_resized.jpg
What I'm going to do is to implement an application for iPad with exactly the same functionality.
I tried two approaches:
OpenCV 2.4.8
OpenCV 2.4.8 provides with an image stitching pipeline which seems very promising at first glance. However, it has two problems:
The pipeline deals with unordered input photos, as far as I know it only uses image feature matching to locate the geometric relations between photos, and the pipeline performs poorly when image feature extraction fails on blank photos (eg. white wall, blue sky). However, iPad can provide the arbitrary spatial direction data of each taken photo (with noise though), but I don't know how to utilize these data in the OpenCV stitching pipeline.
I couldn't find a way to generate a 180x360 degree panorama like PhotoSphere does using this pipeline. Feeding the pipeline with photos in all directions only produces a large panorama with curved image boundary.
PanoTools
I also tried the PanoTools/Hugin lib, although this lib supports predefined photo directions, the result is quite poor and unstable. Additionally I tried using the Focal(beta) app on Google Play, whose sphere mode is also based on PanoTools/Hugin, their results (in sphere mode) seems no better than ours.
My questions:
- Are there any libraries which can do what Google's PhotoSphere does? Since I don't develop for commercial use, any open-source libs are acceptable.
- Are there any good algorithms (or technical reports, scholar papers) available? If there are any, which one is the best?
- How Google implements their own PhotoSphere ? Any suggestion is appreciated.
回答1:
You can take a look at Google's source code for Camera application here :
https://android.googlesource.com/platform/packages/apps/Camera/+refs
来源:https://stackoverflow.com/questions/21682541/the-algorithm-behind-googles-photosphere-on-android-4-3-4-4