C# 如何匹配两幅图像的EMGU CV SIFT关键点?

C# 如何匹配两幅图像的EMGU CV SIFT关键点?,c#,opencv,emgucv,C#,Opencv,Emgucv,我想代码匹配的基础上,筛选关键点两张图片 我有下面的SIFT代码 public static Image<Bgr, Byte> siftFunction(Bitmap sourceBitmap) { Image<Gray, Byte> modelImage = new Image<Gray, byte>(sourceBitmap); SIFTDetector siftCPU = new SIFTDetector();

我想代码匹配的基础上,筛选关键点两张图片

我有下面的SIFT代码

public static Image<Bgr, Byte> siftFunction(Bitmap sourceBitmap)
    {
        Image<Gray, Byte> modelImage = new Image<Gray, byte>(sourceBitmap);
        SIFTDetector siftCPU = new SIFTDetector();
        VectorOfKeyPoint modelKeyPoints = new VectorOfKeyPoint();
        MKeyPoint[] mKeyPoints = siftCPU.DetectKeyPoints(modelImage, null);
        modelKeyPoints.Push(mKeyPoints);
        ImageFeature<float>[] reulst = siftCPU.ComputeDescriptors(modelImage, null, mKeyPoints);
        Image<Bgr, Byte> result = Features2DToolbox.DrawKeypoints(modelImage, modelKeyPoints, new Bgr(Color.Red), Features2DToolbox.KeypointDrawType.DEFAULT);
        return result;
    }
公共静态图像筛选功能(位图源位图)
{
图像模型图像=新图像(源位图);
SIFTDetector siftCPU=新的SIFTDetector();
VectorOfKeyPoint modelKeyPoints=新VectorOfKeyPoint();
MKeyPoint[]mKeyPoints=siftCPU.DetectKeyPoints(modelImage,null);
模型关键点。推送(关键点);
ImageFeature[]reulst=siftCPU.ComputedDescriptors(modelImage,null,mKeyPoints);
图像结果=Features2DToolbox.DrawKeypoints(modelImage、modelKeyPoints、新Bgr(颜色.红色)、Features2DToolbox.KeypointDrawType.DEFAULT);
返回结果;
}


一种解决方案是使用提供的目标检测示例,然后比较检测区域。如果整个观察图像与模型图像相对应,则图像匹配

其他解决方案-根本不使用描述符,只选择关键点。然后比较两幅图片的关键点数组,并在相等的情况下考虑匹配的图像。 第一种解决方案在某种程度上更可靠,而第二种解决方案更快更容易