Ask Your Question

Revision history [back]

Passing C++ cv::Mat to Image in C#


I need to pass an cv::Mat (RGB Image without alpha) to a Image Class in C#. For this, I have created a DLL where I can call the C++ code from C#. Using emguCv is no option.

One option would be to save the image in C++ and to reopen the image in C#. But I would like to pass the image by reference (Pointer). For C++ datatype would be char* and in C# IntPtr right?

There are similiar questions but all of these cann't help me.

Thanks a lot and regards Roberto