Hello,
Welcome to our Microsoft Q&A platform!
Since the opencv code has to be compiled to native code for each platform, so we have to have a separate library for each platform.
In IOS,you can create a static framework using Xcode and write opencv functions using C++. Then you need to bind (map) the static framework to Xamarin using a binding project.
Here is an example of how to do: https://github.com/trinnguyen/xamarin.ios-opencv .
Here is an article describing the steps: https://chamoda.com/how-to-use-opencv-with-xamarin-ios/
[BaseType(typeof(NSObject))]
interface OpenCV
{
[Export("version:")]
NSString Version();
}
private OpenCV OpenCV = new OpenCV();
Console.WriteLine(OpenCV.Version());
Here is a similar thread, you can check :https://stackoverflow.com/questions/13493149/calling-opencv-c-code-in-c-sharp-application
You can also check microsoft tutorial here: Bring Some C++ to Xamarin Apps | The Xamarin Show
Best Regards,
Jessie Zhang
---
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.