当前位置:网站首页>[opencv] use filestorage to read and write eigenvectors
[opencv] use filestorage to read and write eigenvectors
2022-04-23 06:38:00 【mightbxg】
In their own cpp Add the following code to :
namespace cv {
template <typename _Scalar, int _Dim>
class DataType<Eigen::Matrix<_Scalar, _Dim, 1>> {
public:
typedef Eigen::Matrix<_Scalar, _Dim, 1> value_type;
typedef Eigen::Matrix<typename DataType<_Scalar>::work_type, _Dim, 1> work_type;
typedef _Scalar channel_type;
enum {
generic_type = 0,
channels = _Dim,
fmt = traits::SafeFmt<channel_type>::fmt + ((channels - 1) << 8)
};
typedef Vec<channel_type, channels> vec_type;
};
} //namespace cv
And then it can be like cv::Point_<T>、cv::Point3_<T> Use like that cv::FileStorage Read and write Eigne::Vector2f、Eigen::Vector3d Other types , Include related sequence types std::vector<...> and std::vector<std::vector<...>>
版权声明
本文为[mightbxg]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230546583703.html
边栏推荐
猜你喜欢
随机推荐
xlsxwriter.exceptions.FileCreateError: [Errno 13] Permission denied问题
【学习一下】HF-Net 训练
爬西瓜视频url
C语言的浪漫
Linux 用rpm的方式安装mysql(超简单)
【OpenCV】使用 FileStorage 读写 Eigen 向量
【UDS统一诊断服务】四、诊断典型服务(5)— 功能/元件测试功能单元(例行程序功能单元0x31)
【UDS统一诊断服务】四、诊断典型服务(6)— 输入输出控制单元(0x2F)
斯坦福机器学习课程汇总
Graduation project, viewing screenshots of epidemic psychological counseling system
【UDS统一诊断服务】一、诊断概述(1)— 诊断概述
Easy to use data set and open source network comparison website
For() loop parameter call order
爬取蝉妈妈数据平台商品数据
搭建openstack平台
【UDS统一诊断服务】四、诊断典型服务(4)— 在线编程功能单元(0x34-0x38)
带默认模板实参的类模板与模板模板形参的匹配
爬取手游网站游戏详情和评论(MQ+多线程)
对象数组与对象指针
词频统计









