Passing C++ cv::Mat to Image in C# [closed]

asked 2019-09-30 04:00:53 -0600

Hello

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.

https://social.msdn.microsoft.com/For...

Thanks a lot and regards Roberto

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by LBerger
close date 2019-09-30 06:33:09.674137

Comments

thanks....

Debugger gravatar imageDebugger ( 2019-09-30 08:55:50 -0600 )edit

Last time I wanted to do some image processing stuff in C#, I realized that it was a very bad idea. With all the unsafe code, the memory access became a real nightmare. The Image class is good for displaying some JPGs, but that's all.

kbarni gravatar imagekbarni ( 2019-10-02 04:12:14 -0600 )edit