Ask Your Question

Revision history [back]

wrapper dll

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