我如何在带有OpenCV的iOS上执行此EmguCV C#代码(使用SURF)

How do I do this EmguCV C# code (that uses SURF) on iOS with OpenCV?

本文关键字:EmguCV 代码 SURF 使用 执行 iOS OpenCV      更新时间:2023-10-16

这是我使用 EmguCV 包装器的 C# 代码。我不知道如何在iOS上将其转换为可用的代码以与OpenCV一起使用。有人有OpenCV专家吗?

public Matrix<float> ComputeSingleDescriptors(string imagePath)
{
     private SURFDetector detector = new SURFDetector(surfHessianThresh, surfExtendedFlag);
     Matrix<float> descs;
     using (Image<Gray, Byte> img = new Image<Gray, byte>(imagePath))
     {
         VectorOfKeyPoint keyPoints = detector.DetectKeyPointsRaw(img, null);
         descs = detector.ComputeDescriptorsRaw(img, null, keyPoints);
     }
     return descs;
}

我不会称自己为专家,但我认为解决问题的最佳方法是查看最新的OpenCV和OpenCV-Contrib存储库。然后,您将能够手动构建opencv_ios.framework并包含contrib模块(SURF检测器就是其中之一)。然后,您将能够使用 opencv_ios.framework 创建一个 iOS 应用程序