【发布时间】:2017-12-13 19:57:07
【问题描述】:
我正在尝试将多个图像拼接到单个(全景)图像。
以下代码在 EMGU-2.4 中运行良好,但在 EMGU-3.1 中,我在缝合方法中传递参数时遇到问题。
// Collect all images
List<Image<Bgr, Byte>> sourceImages = new List<Image<Bgr, Byte>>();
for (int i = 1; i <7 ; i++)
{
string fileN = fl1 + "n (" + i.ToString() + ").jpg";
sourceImages.Add(new Image<Bgr, Byte>(fileN));
}
try
{
using (Stitcher stitcher = new Stitcher(false))
{
// Stitch images
Image<Bgr, Byte> result = stitcher.Stitch(sourceImages.ToArray());
Bitmap bm = result.ToBitmap();
bm.Save(fl1 + "resul.jpeg", ImageFormat.Jpeg);
}
}
finally
{
}
EMGU-3.1 文档:stitch 方法包含如下新参数
//
// Summary:
// Compute the panoramic images given the images
//
// Parameters:
// images:
// The input images. This can be, for example, a VectorOfMat
//
// pano:
// The panoramic image
//
// Returns:
// true if successful
public bool Stitch(IInputArray images, IOutputArray pano);
如何在我现有的代码中传递这两个参数,这个参数是干什么用的?
拜托我是 EMGU 的新手
【问题讨论】: