Ask Your Question
0

wrapper dll

asked 2014-05-29 12:49:30 -0600

Hi,

I'm trying to create a dll wrapper for using openCV in labview. I'm also pretty new with both of them (openCV & Labview). I would like to use the cvTriangulatePoints from labview. For now I've created a hpp file

#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__

#include "cvconfig.h"

#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
#include "opencv2/features2d/features2d.hpp"
#include <vector>

#ifdef HAVE_TEGRA_OPTIMIZATION
#include "opencv2/calib3d/calib3d_tegra.hpp"
#else
#define GET_OPTIMIZED(func) (func)
#endif

#endif

(this is the precomp.hpp, it's include in the file triangulate.cpp opencv\sources\modules\calib3d\src)

then my own hpp file

#ifdef WRAPPEROPENCV_EXPORTS
#define WRAPPEROPENCV_API __declspec(dllexport) 
#else
#define WRAPPEROPENCV __declspec(dllimport) 
#endif

#include "precomp.hpp"

namespace WrapperOpenCv
{
    class WrapperOpenCv
    {
        public: 
            WRAPPEROPENCV_API void cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2, CvMat* projPoints1, CvMat* projPoints2, CvMat* points4D);
            WRAPPEROPENCV_API void cvCorrectMatches(CvMat *F_, CvMat *points1_, CvMat *points2_, CvMat *new_points1, CvMat *new_points2);
            static WRAPPEROPENCV_API void triangulatePoints( InputArray _projMatr1, InputArray _projMatr2, InputArray _projPoints1, InputArray _projPoints2,  OutputArray _points4D )
    };
}

With this I should be able to export these methods in labview.(I know I still have to implement the functions in a cpp file). PROBLEM : I have an error on InputArray and OutputArray:

Error: identifier "InputArray" is undefined

Anybody knows what I should do to fix this ? Thanks for the help

edit retag flag offensive close merge delete

Comments

are you sure, you can use c++ in labview at all ? afaik, it's plain C

anyway, for now it's probably just cv::InputArray

berak gravatar imageberak ( 2014-05-29 13:20:15 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-09-01 09:56:35 -0600

nanoeng gravatar image

If you haven't already solved it, the link shown below describes how a DLL can be called from LabView http://digital.ni.com/public.nsf/allkb/DCB90714981A1F148625731E00797C33

edit flag offensive delete link more

Comments

A good tutorial describing the process can be found at http://www.ni.com/tutorial/3009/en/

nanoeng gravatar imagenanoeng ( 2015-09-01 09:59:25 -0600 )edit

Question Tools

Stats

Asked: 2014-05-29 12:49:30 -0600

Seen: 1,005 times

Last updated: May 29 '14