Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Creating a wrapper for C# and converting Bitmap

I have some questions about using OpenCV C++ code in C#... I have created my C++ console application which is used for the image analysis, then created a C++/CLI class library which should work as a wrapper for the OpenCV code. The main issue I'm having is converting a Bitmap received from C# to Mat, I have no idea how to do it. Can anyone point me in the right direction when it comes to the conversion and wrapping? This is the tutorial I'm using for creating the wrapper http://drthitirat.wordpress.com/2013/06/06/use-opencv-c-codes-in-a-vc-project-solution-of-creating-a-managed-clr-wrapper/

click to hide/show revision 2
retagged

updated 2014-04-30 02:19:38 -0600

berak gravatar image

Creating a wrapper for C# and converting Bitmap

I have some questions about using OpenCV C++ code in C#... I have created my C++ console application which is used for the image analysis, then created a C++/CLI class library which should work as a wrapper for the OpenCV code. The main issue I'm having is converting a Bitmap received from C# to Mat, I have no idea how to do it. Can anyone point me in the right direction when it comes to the conversion and wrapping? This is the tutorial I'm using for creating the wrapper http://drthitirat.wordpress.com/2013/06/06/use-opencv-c-codes-in-a-vc-project-solution-of-creating-a-managed-clr-wrapper/