[C++] Eigen to OpenCV conversion ๋ณํ
Eigen::MatrixXf์ cv::Mat์ผ๋ก ๋ณํํด๋ณด์
Eigen to CV
#include <opencv2/core/eigen.hpp>
int num_rows = 100;
int num_cols = 100;
Eigen::MatrixXf mat(num_cols, num_rows);
cv::Mat image(num_cols, num_rows, CV_32FC1);
cv::eigen2cv(mat, image);
CV to Eigen
void cv2eigen(const Mat& src, Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols>& dst)
Leave a comment