2014-04-03 220 views
1

我正在运行图像拼接的EmguCV示例。下面是该示例中的重要代码:图像拼接Emgu CV与GPU

try 
    { 
     using (Stitcher stitcher = new Stitcher(false)) 
     { 
      Image<Bgr, Byte> result = stitcher.Stitch(sourceImages); 
      IMGBXDisplayStitched.Image = result; 
     } 
    } 
    finally 
    { 
     foreach (Image<Bgr, Byte> img in sourceImages) 
     { 
      img.Dispose(); 
     } 
    } 

它运作良好,但是当我改变Stitcher()为真(我想用GPU)的值,它显示了这个错误:

An unhandled exception of type 'Emgu.CV.Util.CvException' occurred in Emgu.CV.dll Additional information: OpenCV: You should explicitly call download method for gpu::GpuMat object

如何我能解决这个问题吗?

+0

在被异常发生什么线? –

回答

0

如果你看一看this example page,它说

There is currently a bug in Open CV such that GPU processing cannot produce the correct result. Must specify false as parameter. Hope this will be fixed soon to enable GPU processing