简体   繁体   中英

how to integrate openCV python code in Swift

I wrote a code using openCV in Python and I want to integrate it into my IOS application. Existing tutorials are outdated and I got error saying "'opencv2/core.hpp' file not found". I really appreciate if you can help me answering these:

  1. Can I integrate openCV in Python directly into IOS or do I have to convert it to C++?
  2. If I can integrate it how to do it without getting core.hpp error?

after a couple of days more intensive study I understood that to use OpenCV framework does not mean to integrate a python code into the Swift code. It requires to code in the.mm file with C++ syntax. There is a python to C converter called cython and you can create c extension for your code but it does not solve the problem.

The best openCV framework integration into the code described in the link below. Plus there is a sample code you can download to check. Hope it helps:

OpenCVFramework integration in Xcode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM