我正在尝试在 Windows x64 和 Netbeans 上安装 openCV 2.4.2。我遵循了以下指南:http ://projectsfromhellandmore.blogspot.co.nz/2012/06/opencv-241-netbeans-windows-7-plus.html
当我尝试编译指南中包含的示例代码时,我在文件“include/opencv2/core/operations.hpp”中收到以下代码块的以下错误,并且我没有找到任何修复或想出如何修复我自己:
template<typename _Tp, typename _Base> inline void AlgorithmInfo::addParam(Algorithm& algo, const char* parameter,
Ptr<_Tp>& value, bool readOnly, Ptr<_Tp> (Algorithm::*getter)(), void (Algorithm::*setter)(const Ptr<_Tp>&),
const string& help)
{
//TODO: static assert: _Tp inherits from _Base
addParam_(algo, parameter, ParamType<_Base>::type, &value, readOnly,
(Algorithm::Getter)getter, (Algorithm::Setter)setter, help);
}
错误:得到 2 个模板参数但需要 1 个
第二个有错误的代码块是:
template<typename _Tp> inline void AlgorithmInfo::addParam(Algorithm& algo, const char* parameter,
Ptr<_Tp>& value, bool readOnly, Ptr<_Tp> (Algorithm::*getter)(), void (Algorithm::*setter)(const Ptr<_Tp>&),
const string& help)
{
//TODO: static assert: _Tp inherits from Algorithm
addParam_(algo, parameter, ParamType<Algorithm>::type, &value, readOnly,
(Algorithm::Getter)getter, (Algorithm::Setter)setter, help);
}
错误:重新定义 ...(第一个代码块中的函数)
任何帮助将不胜感激谢谢