[英]openCV 2.4.9 windows: InputArray is undefined
I'm trying to create a dll wrapper for using openCV in labview. 我正在尝试创建一个用于在Labview中使用openCV的dll包装器。 I'm also pretty new with both of them (openCV & Labview). 我对他们两个都还很陌生(openCV和Labview)。 I would like to use the cvTriangulatePoints from labview. 我想使用来自labview的cvTriangulatePoints。 For now I've created a hpp file 目前,我已经创建了一个hpp文件
#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: (这是precomp.hpp,它包含在文件triangulate.cpp opencv \\ sources \\ modules \\ calib3d \\ src中)然后是我自己的hpp文件:
#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). 这样,我应该能够在labview中导出这些方法(我知道我仍然必须在cpp文件中实现功能)。 PROBLEM : I have an error on InputArray and OutputArray: 问题:InputArray和OutputArray出现错误:
Error: identifier "InputArray" is undefined
Anybody knows what I should do to fix this ? 有人知道我该怎么做才能解决此问题? Thanks for the help 谢谢您的帮助
The problem was the namespace: 问题是名称空间:
cv::InputArray
or 要么
...
using namespace cv;
namespace WrapperOpenCv
{
...
everything work fine nox 一切正常NOX
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.