How to import opencv2 framework in iOS Swift

后端 未结 2 1671
南旧
南旧 2021-02-09 02:20

I downloaded the latest pre-built opencv2.framework from the OpenCV SourceForge page. then in Xcode6-Beta3, I added opencv2.framework as a required linked framework under the \

相关标签:
2条回答
  • 2021-02-09 02:55

    It's easiest if you start with a simple project all ready to compile and run out of the box.

    This xcode project works with Swift, XCode 6.1, OpenCV 2, and is MIT licensed: http://whitneyland.com/2014/10/opencv-swift.html

    Here's one I haven't tried yet but there are so few still it's worth looking at: https://github.com/foundry/OpenCVSwiftStitch

    0 讨论(0)
  • 2021-02-09 03:03

    You will need to create a bridge from C++ to Objective C or plain C. After that, you will need to include/import the bridge's header into an "Objective-C Bridging Header", which Xcode should have generated when you added a Swift source file in an existing project.

    0 讨论(0)
提交回复
热议问题