How to use opencv in Unity3d?

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.

-------------Problems Reply------------

Check this link: OpenCV + Unity3D integration

Also there is Paid Plugin at unity Store: (it supports mobile platforms)

http://forum.unity3d.com/threads/released-opencv-for-unity.277080/

Link at the store

https://www.assetstore.unity3d.com/en/#!/content/21088

Category:opencv Views:0 Time:2018-02-12

Related post

  • How to use OpenCV/or any ported library classes in Objective-C 2011-09-30

    First, I apology for this newbie question. I'm new in Objective C and OpenCV the normal method declaration in Objective-C is like that Function functionName = [[Function alloc] init]; but when I use OpenCV class it says (for example CvMat) receiver t

  • How to use OpenCV with DirectShow 2011-12-28

    DirectShow has great capturing and rendering abilities but no image processing capability. I found an article on how to use opencv with directshow. It is probably old. I could not find Proxytrans filter in my OpenCV 2.3.1. Is there an alternative to

  • how to use opencv to get binaryzation image's histogram 2010-01-27

    for example I have a binaryzation image like this I want get histogram like this! how to do it use opencv. --------------Solutions------------- While OpenCV does have Histogram functions, I am not sure I would bother using it in this case. It seems l

  • how to use OpenCV with VB.NET 2008 2011-11-24

    I have heard about EmguCv, OpenCV wrapper for VS.NET I dindn't understand how to use it on VB.NET 2008. is it different with OpenCV usage? anyone can help me, may you have ebook, tutorial etc. thank you so much.. --------------Solutions-------------

  • how to use opencv setOpenGlDrawCallback function? 2012-01-18

    I'm using OpenCV 2.3.2 library downloaded from OpenCV trunk. I want to use setOpenGlDrawCallback function for displaying OpenGL scene. When I compile the below simple code, I get following errors: OpenCV Error: Assertion failed (depth >= 0 &

  • how to use OpenCV 2.3.1 to connect to IP Camera? 2012-02-08

    I'm using openCV 2.3.1 to connect to IP Camera. Here is my code #include "../../../OpenCV/include/opencv/cv.h" #include "../../../OpenCV/include/opencv/highgui.h" CvCapture *camera = cvCreateFileCapture("http://usr:[email protected]:port/nphMotionJpeg?resoluti

  • How to use OpenCV to remove non text areas from a business card? 2012-04-21

    my target is to remove any non text area from a scanned business card image but i don't know the steps to perform that using OpenCV , i have followed this steps but don't know this is the right one or not also i don't notice any change in the image (

  • How to use opencv flann::Index? 2012-04-26

    I have some problems with opencv flann::Index - I'm creating index Mat samples = Mat::zeros(vfv_net_quie.size(),24,CV_32F); for (int i =0; i < vfv_net_quie.size();i++) { for (int j = 0;j<24;j++) { samples.at<float>(i,j)=(float)vfv_net_qui

  • How to use OpenCV cvProjectPoints2 function 2009-06-10

    I'm having some troubles with cvProjectPoints2 function. Following is the function overview from O'Reilly's "Learning OpenCV" book: void cvProjectPoints2( const CvMat* object_points, const CvMat* rotation_vector, const CvMat* translation_vector, cons

  • How to use opencv reduce using cv2 python API 2011-11-30

    I checked the documentation but its incomplete: there is no mention of what rtype parameter actually is. I think it's a reduce type but I can't find any of variables like cv2.CV_REDUCE_SUM etc... I found this problem with many function that use diffe

  • How to use OpenCV to extract frames from MPEG files? 2011-09-01

    I try to extract frames from video files(.mpg .mpeg), one frame per minute. I have made it when extract frames from video files(.avi), int icframe = (int) cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_COUNT); //incorrect returnning to MPEG cvNamedW

  • How to Detect and extract QR code from a preview frame using OpenCV in Android? 2012-02-12

    I am using Android Zxing library to decode a QR code, that has to be extracted in real time from a camera preview frame. The problem is that I have to use OpenCV to do the QR code detection, without asking the user to capture the image. Can anybody p

  • How to use C++ classes in android-ndk project 2012-02-13

    people! I am looking for an example or any advice, of how to use C++ classes in android-ndk project. There are a lot of examples, but they all written in pure C. And there are a lot of topics where people asking the same question. But there are stupi

  • Digit Recogntion using OpenCV on android 2012-04-11

    I'm a first time Android and OpenCV developer and I would very much appreciate your help and some advise. I would like to extract and identify digits inputted by a mobile phone camera. How do i approach this? What would be the best way to approach it

  • How to get path of stroke using opencv? 2010-04-26

    I want to get path stroke from image using opencv. I know how to get contours but I need path of stroke (path that runs through the center of the stroke). Is it possible to get this in opencv ? --------------Solutions------------- OpenCV does not hav

  • How do I track a blob using OpenCV and Python 2010-07-30

    I've gotten OpenCV working with Python and I can even detect a face through my webcam. What I really want to do though, is see movement and find the point in the middle of the blob of movement. The camshift sample is close to what I want, but I don't

  • Can we use Opencv to get live video stream over the internet? How to do that? 2010-09-22

    I tried giving cvCreateCameraCapture an URL of the camera viewing on internet. However, I can't get any video playing. I am writing in C language. --------------Solutions------------- My camera works to a degree with CvCapture *camera = cvCreateFileC

  • How to use flann based matcher, or generally flann in opencv? 2011-04-17

    http://opencv.willowgarage.com/documentation/cpp/features2d_common_interfaces_of_descriptor_matchers.html#flannbasedmatcher Please can somebody show me sample code or tell me how to use this class and methods. I just want to match SURF's from a query

  • How to use cv::createButton prototype in OpenCV 2011-05-21

    I'd like to understand how to use cv::createButton which is defined in OpenCV documentation: http://opencv.jp/opencv-2svn_org/cpp/highgui_qt_new_functions.html#cv-createbutton It says that the prototype is: createButton(const string& button_name

  • How to calculate convex hull area using openCV functions? 2011-06-24

    I'm unable to find a working example of how to calculate the area of a convex hull using OpenCV. I saw one example that uses cvApproxPoly and cvContourArea, but I couldn't make it work. I have the following code. IplImage* img = cvCreateImage( cvSize

  • How to play a video file from my disk using OpenCV.? 2011-08-08

    Please help me in achieving above task.I'm newbie to openCV. I have OpenCV 2.2 installed in my system and using VC++ 2010 Express as IDE. I don't have inbuilt webcam in my laptop... just i learnt how to load image. I'm very eager to load a video file

  • How to find corners on a Image using OpenCv 2011-08-31

    I´m trying to find the corners on a image, I don´t need the contours, only the 4 corners. I will change the perspective using 4 corners. I´m using Opencv, but I need to know the steps to find the corners and what function I will use. My images will b

  • How to get MJPG stream video from android IPWebcam using opencv 2011-09-01

    I am using the IP Webcam program on android and receiving it on my PC by WiFi. What I want is to use opencv in Visual Studio, C++, to get that video stream, there is an option to get MJPG stream by the following URL: http://MyIP:port/videofeed How to

  • How to specify a threshold angle in Corner detection using OpenCV? 2011-10-04

    I'm trying to get corners that are formed by two approximately perpendicular line segments, and not all the possible corners that are detected by either Shi-Tomasi or the Harris corner detectors provided in OpenCV. Eg: 000000000000000110 000000000000

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.217 (s). 11 q(s)