OpenCV with Xamarin.Forms

I would like to use OpenCV in a Xamarin.Forms app. OpenCV already provides binaries for Android (as .so files) and iOS (as a framework). I don't need all of OpenCV, so I think that the best way to go about it is to use these provided binaries to create my own library (perhaps in C++) that exposes only the functionality I need. I could then create a C# wrapper for this library that could be used by my Xamarin.Forms app. However, I don't know if this is the best approach, and even if it is, I don't know how to go about it.

A similar question was asked here. However, the answer talks about the difficulty in binding all of OpenCV. I don't need (or want) that. I want to use the binaries provided by OpenCV to create my own library, and then use that. I think that would be easier than trying to bind all of OpenCV.

Tagged:

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    You could build your own projects with OpenVC and expose any apis as you want without any problems. Then use binding library to convert this native project to the libraries can be consumed by Xamarin.
    But if you involve the whole OpenVC in your own project, it will not decrease the library's size even though you expose the fewer functionalities. I think it's better to use the bound libraries for Xamarin instead of your own. Anyway, it's all up to you.

Sign In or Register to comment.