Emgu CV图像加载不起作用 [英] Emgu CV image load notworking

查看:96
本文介绍了Emgu CV图像加载不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用emgu cv版本3。我尝试加载要处理的图像。但这会为我提供错误。根据错误,它将说无法读取图像。但是我在该位置下有一张图片。

I am using emgu cv version 3. I try to load image to process. but it will provide error for me. According to the error it will say image cannot be read. But i have a image under that location.

这是我的代码行。

Image<Bgr, Byte> image = new Image<Bgr, Byte>("image.jpg");


推荐答案

您提供的代码行是正确的。请使用绝对路径进行检查。之所以可以使用它,是因为如果您的映像不在源目录中,则相对路径(您仅给出了映像名称,这意味着您的映像位于源目录中)将不起作用。最好检查一下您的绝对路径。如下所示

Code line that you have provided is correct. Please check this with absolute path. It will be worked because if your image is not within your source directory your relative path (you have given only name of image that means your image is within your source directory) will not work. Its good to check with your absolute path. Like as follows

Image<Bgr, Byte> image = new Image<Bgr, Byte>(@"E:\Downloads\image.jpg");

图片 image.jpg位于E:\下载位置。

Image "image.jpg" is within E:\Downloads location.

这篇关于Emgu CV图像加载不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆