Ask Your Question
0

calling opencv [c++ ] function from C#

asked 2013-08-26 02:59:05 -0600

opencv student gravatar image

updated 2013-08-26 03:20:10 -0600

I got an opencv [c++] function to perform certain image processing algorithms. Now i want to call that function from c#, i am not allowed to use any wrappers or emgu cv. is there any other way to achieve this ?

thanks

edit retag flag offensive close merge delete

Comments

Small remark. We suggest not to use hashtags in the tags of your topic. They generate a lot of double tags, rendering the search and filter options useless. Keep this in mind at your next post, adjusted it for you now.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-26 03:20:30 -0600 )edit

And this could be the solution to your problem, an approach called PInvoke.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-26 03:22:14 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-08-27 04:24:44 -0600

AlexanderShishkov gravatar image

You can create managed wrapper with managed C++ and call it from C#.

edit flag offensive delete link more

Comments

That's how I do it, too. The trickiest thing is to convert images to cv::Mat's and the other way round. Here's how you can do the latter one: http://answers.opencv.org/question/14183/having-trouble-with-using-mat-image-in-picturebox/

Ben gravatar imageBen ( 2013-08-27 04:31:53 -0600 )edit

Question Tools

Stats

Asked: 2013-08-26 02:59:05 -0600

Seen: 2,415 times

Last updated: Aug 27 '13