小编use*_*856的帖子

EMGU CV SURF图像匹配

我一直在使用EMGU CV库中的SURF特征检测示例.

到目前为止它的工作令人惊讶; 我可以检测到2个给定图像之间的匹配对象,但是我遇到了关于图像不匹配的问题.

我一直在寻找论坛的支持,但他们从我所处的地方开始.有谁知道哪些参数决定图像是否匹配.当我使用不匹配的2张图像进行测试时,代码仍会像匹配一样进行,并且即使没有匹配也会在图像的随机位置绘制模糊的粗红线.

如果没有匹配,我希望打破代码,不再继续.

附录:

      static void Run()
      {
          Image<Gray, Byte> modelImage = new Image<Gray, byte>("HatersGonnaHate.png");
         Image<Gray, Byte> observedImage = new Image<Gray, byte>("box_in_scene.png");
         Stopwatch watch;
         HomographyMatrix homography = null;

         SURFDetector surfCPU = new SURFDetector(500, false);

         VectorOfKeyPoint modelKeyPoints;
         VectorOfKeyPoint observedKeyPoints;
         Matrix<int> indices;
         Matrix<float> dist;
         Matrix<byte> mask;

         if (GpuInvoke.HasCuda)
         {
            GpuSURFDetector surfGPU = new GpuSURFDetector(surfCPU.SURFParams, 0.01f);
            using (GpuImage<Gray, Byte> gpuModelImage = new GpuImage<Gray, byte>(modelImage))
            //extract features from the object image
            using (GpuMat<float> gpuModelKeyPoints = surfGPU.DetectKeyPointsRaw(gpuModelImage, null))
            using (GpuMat<float> gpuModelDescriptors = …
Run Code Online (Sandbox Code Playgroud)

c# image-processing object-detection surf emgucv

9
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1

emgucv ×1

image-processing ×1

object-detection ×1

surf ×1