0

我有两张想拼接在一起的图像。图像有两种不同的尺寸(一个是主图像,另一个是小图例)。我目前正在做:

[STAThread]
static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    long matchTime;
    string modelPath = "C:/Emgu/emgucv-windows-universal-cuda 2.9.0.1922/Emgu.CV.Example/SURFFeature/model images";
    using (Image<Gray, Byte> observedImage = new Image<Gray, byte>("C:/Emgu/emgucv-windows-universal-cuda 2.9.0.1922/Emgu.CV.Example/SURFFeature/test images/fridge4.jpg"))
    {
        //returns two different sized images
        Image<Bgr, byte>[] results = DrawMatches.DrawAllMatches(modelPath, observedImage, out matchTime);
        ImageViewer.Show(results[0], String.Format("Matched using {0} in {1} milliseconds", GpuInvoke.HasCuda ? "GPU" : "CPU", matchTime));
        ImageViewer.Show(results[1], "Legend");

        using (Stitcher stitcher = new Stitcher(true))
        {
            Image<Bgr, Byte> stictchedResult = stitcher.Stitch(results);//exception here!
            ImageViewer.Show(stictchedResult, String.Format("Matched using {0} in {1} milliseconds", GpuInvoke.HasCuda ? "GPU" : "CPU", matchTime));
        }
    }
}

但是,我ArgumentException在注释行中得到一个。当我查看查看详细信息部分时,它显示{"Requires more images"}. results数组中已经有 2 个图像。我有什么明显的遗漏吗?还是我误用/误解了Stitch课程?我看到的 API中没有任何问题。

4

0 回答 0