Emgu CV image load notworking

2019-08-07 03:24发布

问题:

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.



标签: c# emgucv