【发布时间】:2017-08-19 07:05:51
【问题描述】:
我尝试使用 Emgu.CV 在 C# 中使用视差图计算
我从 article 读取图像作为 bitmapLeft 和 bitmapRight。作为参考,我使用了来自here的示例代码
这是我的源代码:
bitmapLeft = (Bitmap) mainForm.pictureBoxLeft.Image;
bitmapRight = (Bitmap)mainForm.pictureBoxRight.Image;
Image<Gray, Byte> imageLeft = new Image<Gray, Byte>(bitmapLeft);
Image<Gray, Byte> imageRight = new Image<Gray, Byte>(bitmapRight);
Image<Gray, Byte> imageDisparity = new Image<Gray, Byte>(bitmapLeft.Width, bitmapLeft.Height);
StereoBM stereoBM = new StereoBM(16, 15);
StereoMatcherExtensions.Compute(stereoBM, imageLeft, imageRight, imageDisparity);
Image bitmapDisparity = imageDisparity.ToBitmap();
但是,生成的位图是全黑的。
【问题讨论】: