我有两个想要拼接的图像。图像有两种不同的尺寸(一种是主图像,另一种是小图例)。我现在正在做:
[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
班级?我认为the API中没有任何内容可能是个问题。