库在iOS 6中捕获全景图 [英] libraries to CAPTURE panorama in iOS 6

查看:113
本文介绍了库在iOS 6中捕获全景图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS中有很多方法和库可以显示全景图片,虽然内置相机中有全景功能,但无法在应用程序中使用它。

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?

谢谢!

推荐答案

这些人可能会向您出售c ++库的许可证。他们的代码进入了App Store中提供的出色的Autostich应用程序。

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基于SIFT图像特征检测。 SIFT和许多其他技术可在 openCv c ++库中找到。该站点提供了预构建的iOS框架。

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.

更新

OpenCV有一个 Stitcher 带有大量文档的类......

OpenCV has a Stitcher class with mounds of documentation...

OpenCV Stitching pipline

OpenCV Stitcher类


高级别图像拼接器。可以在不了解整个拼接管道的情况下使用此类。但是,为了能够实现更高的拼接稳定性和最终图像的质量,建议至少熟悉该理论(参见拼接pipline )。

更新2

如果您之前没有使用过openCV,那么第一个障碍是将库编译并安装到您的项目中。可能很棘手,请查看我的问题和答案这里(安装openCV并运行)和这里(如何将c ++代码与objective-c分开,使用示例github项目)。

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).

当你使用openCV时,这应该是是开始查询的最快方式:

When you have openCV working, this should be the quickest way to get started with your query:

Stitcher::stitch(InputArray images, OutputArray pano)

参数:

images - 输入图像。

pano - Final pano 。

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)

Stitcher::stitch(InputArray images, const std::vector<std::vector<Rect>>& rois, OutputArray pano)  

您可以深入了解拼接管道以优化流程的许多细节,但这应该足以让您入门。

You can dig into the stitching pipeline to optimise many details of the process, but this should be enough to get you started.

如果你查看o​​penCV发行版的samples / cpp文件夹,你会看到几个拼接示例, stitching.cpp stitching_detailed.cpp

If you look in the samples/cpp folder of the openCV distro, you will see a couple of stitching examples, stitching.cpp and stitching_detailed.cpp.

要提供输入图像,您需要与相机连接并设计一个不错的用户界面以帮助用户aike正确的图片(例如,有很好的重叠)。

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).

如果你想使用openCV查看现有项目,这里有一个用于安卓的人,声称自己做的是你所追求的 - 不同的平台,但原则将是相同的(使用java接口进入相同的库)。请特别注意 PanoActivity.java

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.

更新3

我上传了 github的一个非常基本的样本。如果没有任何优化或调整,我会对它的工作表现给我留下深刻的印象。它在我的github项目中缝合样本照片几乎和Autostitch应用程序一样。

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.

更新4
一段时间后来... 我已经制作了一个新的示例项目更新用于Swift和Cocoapods

update 4 some time later... I've made a new sample project updated for use with Swift and Cocoapods

这篇关于库在iOS 6中捕获全景图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆