There are a lot of ways and libraries to show panorama picture in iOS, Although there is a panorama feature in the built-in camera there is no way to use it within an app.
Is there any library I can use to capture a panorama image?
Thanks!
There are a lot of ways and libraries to show panorama picture in iOS, Although there is a panorama feature in the built-in camera there is no way to use it within an app.
Is there any library I can use to capture a panorama image?
Thanks!
These people might sell you a license for a c++ library. Their code goes into the brilliant Autostich app available in the App Store.
Autostitch is based on SIFT image feature detection. SIFT and many other techniques are available in the openCv c++ library. A pre built iOS framework is available from that site.
update
OpenCV has a
Stitcher
class with mounds of documentation...OpenCV Stitching pipline
OpenCV Stitcher class
update 2
If you haven't used openCV before, the first hurdle is to get the library compiled and installed into your project. Can be tricky, see my questions and answers here (getting openCV installed and working) and here (an example how to keep c++ code separate from objective-c, with sample github project).
When you have openCV working, this should be the quickest way to get started with your query:
Parameters:
images – Input images.
pano – Final pano.
Then to speed it up - if you have them - provide regions of interest rects (indicating where photos overlap)
You can dig into the stitching pipeline to optimise many details of the process, but this should be enough to get you started.
If you look in the samples/cpp folder of the openCV distro, you will see a couple of stitching examples,
stitching.cpp
andstitching_detailed.cpp
.To provide the input images you will want to hook up with the camera and design a decent user interface to assist the user in taking the right kind of pictures (eg with good overlaps).
If you want to look at an existing project using openCV, here is one for android that claims to do what you are after - different platform, but the principles will be the same (using a java interface into the same libraries). Take a look especially at PanoActivity.java.
update 3
I've uploaded a very basic sample to github. I'm impressed how good a job it does, without any optimising or tweaking. It stitches the sample photos in my github project almost as well as the Autostitch app.
update 4 some time later... I've made a new sample project updated for use with Swift and Cocoapods