I am trying to use opencv library for my unity project. So to do that I have created a c++ dll which contains all of my opencv functions and behaviours. Then I have created a C# library (wrapper) for c++ dll and using this library in my unity project.
Up till everything is fine no warning and error msgs. But as soon as i make call to any function of c++ dll the unity just crahes with following error:
I am sure that c++ dll is working fine cause I have added a test method as well in that for adding two integral values which is working fine ans you can see 9 in the debug window. This happens only when i call any function containing opencv method in c++ dll.
Here is the code for calling the function:
UnityEngine.Debug.Log (ShBLibrary.ShBLibrary.DllAdd(4,5));
UnityEngine.Debug.Log("creating viz");
ShBLibrary.ShBrLibrary.BrViz (imgSrcLoc, nImgLoc, b, g, r, coordX, coordY);
For caution i have also used exception handling for it. Need urgent help for this. Thanks in advance.