0

After saving a image in PNG format using

bitmap.save(filename, ImageFormat.PNG),

I now try to read the same image

Image<Rgb, Byte> inpImage = new Image<Rgb, Byte>(dir + fn_only + "_ms.png") using emgu Image. On runtime I get a

System.TypeInitializationException occurred in Emgu.CV.dll

Exception:

System.TypeInitializationException: The type initializer for 'Emgu.CV.CvInvoke' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'opencv _core242': The specified module could not be found. (Exception from HRESULT: 0x8 007007E) at Emgu.CV.CvInvoke.cvRedirectError(CvErrorCallback errorHandler, IntPtr user data, IntPtr prevUserdata) at Emgu.CV.CvInvoke..cctor() --- End of inner exception stack trace --- at Emgu.CV.Image`2..ctor(String fileName)

when opencv_242 is present. On dependency check it says NVCUDA is missing. I do not have a GPU, obv there wont be NVCUDA in that case.

I tried color type RGB and BGR.

2

1 Answer 1

2
//a way is first open the PNG in a bitmap

Bitmap bitmap = new Bitmap(dir + fn_only + "_ms.png");

//and read the bitman how image

Image<Rgb, Byte> inpImage = new Image<Rgb, Byte>(bitmap);

ref: http://www.emgu.com/wiki/index.php/Working_with_Images Creating image from Bitmap

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.