error: No matching function for call to 'cv2eigen'的解决方法

报错

#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/core/eigen.hpp>
#include <Eigen/Core>
#include <Eigen/Dense>

报错

/home/ubuntu/桌面/measure/measure/main.cpp:3: error: In included file: "Wrong usage of OpenCV's Eigen utility header. Include Eigen's headers first. See https://github.com/opencv/opencv/issues/17366"
    cv::cv2eigen();
    cv::cv2eigen();
    cv::cv2eigen();
	
	/home/ubuntu/桌面/measure/measure/main.cpp:50: error: No matching function for call to 'cv2eigen'

解决办法

https://github.com/opencv/opencv/issues/17366

#include ... Eigen headers ...
#include <opencv2/core/eigen.hpp>
posted @ 2022-10-08 10:13  榴红八色鸫  阅读(430)  评论(0)    收藏  举报