I installed unity3D. I created a basic AR sample on it. I want to use opencv on unity3d. To do,there are some ways. I want to use opencvsharp. I install opencvsharp2.4.10 because I have installed opencv2.4.10.
I don't know next step? How I can integrate opencv with unity3d? I don't find heplful tutorial. I use 64bit and windows8.
EDIT
I learned that we can use c++ code(includes opencv function) in unity3d. I created dll using by visual stuio 2013. Guide link is here. Now I try to call substract
function in unity.
[DllImport ("MatFuncsDll")]
private static extern double Subtract(double a, double b);
void Update () {
if (Input.GetMouseButtonDown (0)) {
/*Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
float dist;
plane.Raycast (ray, out dist);
v3OrgMouse = ray.GetPoint (dist);
v3OrgMouse.y = 0;*/
mTrackableBehaviour.gameObject.transform.position = new Vector3 (
mTrackableBehaviour.gameObject.transform.position.x + (float)Subtract (1, 0.5),
mTrackableBehaviour.gameObject.transform.position.y,
mTrackableBehaviour.gameObject.transform.position.z);
}
}
When I run this code I get EntryPointNotFoundException:Substract
. I put MathFuncDll
under C://Program Fİles(x86)/Unity/Editor
and same directory Assets-Library under unity project.