Emgu CV image load notworking

和自甴很熟 提交于 2019-12-13 20:04:41

问题


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.

This is my code line..

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

回答1:


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 "image.jpg" is within E:\Downloads location.



来源:https://stackoverflow.com/questions/31206179/emgu-cv-image-load-notworking

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!