opencvsharp
opencvsharp copied to clipboard
Access to OpenCVSharpExtern in 3.0?
OpenCVSharpExtern.dll is a Native plugin in 3.0.
I compiled everything from the Git repo, in VS 2013 with no issues. I'm moving my existing C++ code from openCV to C#.
My library of interest is photo HDR. I have no problem importing OpenCvSharp and its subs in .net but don't know how to use the extern dll. How can I access its features?
Thanks, Tharyn
.
You can use OpenCvSharpExtern functions through the NativeMethods class. It is public so you can access it everywhere.
IntPtr matPtr = NativeMethods.imgcodecs_imread("foo.jpg", 1);
NativeMethods.imgcodecs_imwrite("bar.png", matPtr, IntPtr.Zero, 0);
NativeMethods.core_Mat_delete(matPtr);
Thank you for the quick reply that is just what I was looking for.