简体   繁体   中英

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

Here's my code on C# code with the EmguCV wrapper. I don't know how to convert it to useable code on iOS for use with OpenCV. Anyone OpenCV experts out there?

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;
}

I wouldn't call myself an expert but I think the best approach to solving your problem is to checkout the latest OpenCV and OpenCV-Contrib repos. You will then be able to build the opencv_ios.framework manually and include the contrib modules (of which the SURF detector is one). You will then be able to create an iOS application using the opencv_ios.framework

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