OpenCV中findFundamentalMat函数错误
Error in function findFundamentalMat in OpenCV
我想用这个代码(源代码)在opencv中找到基本矩阵。
#include <iostream>
using namespace std;
#include <opencv2/opencv.hpp>
using namespace cv;
int point_count = 100;
vector<Point2f> points1(point_count);
vector<Point2f> points2(point_count);
// initialize the points here ... */
for( int i = 0; i < point_count; i++ )
{
points1[i] = Point2f(10.0f, 20.0f);
points2[i] = Point2f(0.3f, 40.0f);
}
Mat fundamental_matrix =
findFundamentalMat(points1, points2, FM_RANSAC, 3, 0.99);
,但我得到错误在findFundamentalMat像这样
undefined reference to `cv::findFundamentalMat(cv::_InputArray const&, cv::_InputArray const&, int, double, double, cv::_OutputArray const&)'
请指出我做错了什么,并描述性的,因为我是新的OpenCv,谢谢。
对于Windows用户,您需要包含calib3d.hpp
才能使用findFundamentalMat函数。
#include "opencv2/calib3d/calib3d.hpp"
链接器错误。您需要在您的链接器库中包含calib3d
,可能还包括其他。
相关文章:
- 链接器错误:函数的多个定义
- 编译器错误:函数调用在常量表达式中必须有一个常量值
- 错误:函数声明符之后的预期函数体
- C 错误 - 函数不能超载
- 如何修复传递参数时调用错误函数的主函数?(C++)
- 错误:函数调用中有两个参数
- 错误:函数不是“类”的静态数据成员 - C++
- C ,G 编译错误函数
- CMake 解析错误函数缺少结尾")"。而是找到带有文本的未终止字符串")
- C++ 错误 函数 2 的多重定义
- 错误:函数调用中从int到int(*)[4]的转换无效
- C++14 自动扣除错误:函数返回一个数组
- 视觉C++错误:函数必须返回一个值
- 错误:函数声明中的两种或多种数据类型
- 错误:函数未在作用域中声明
- rtw_android.c错误:函数“strnicmp”的隐式声明[-Weror=隐式函数声明]
- 错误:函数中的return语句没有值,返回“void*”[-fpermission]
- 简单程序中的链接器错误:函数的多重定义
- 错误:函数参数太多
- 错误:函数__tmaincrtstartup中引用的未解析的外部符号_main