当前位置:网站首页>[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
边栏推荐
- 文件查看命令和用户管理命令
- 如何安装jsonpath包
- 猜數字遊戲
- Rust:单元测试(cargo test )的时候显示 println 的输出信息
- For() loop parameter call order
- Initialization of classes and objects (constructors and destructors)
- Friend function, friend class, class template
- 【UDS统一诊断服务】三、应用层协议(2)
- Wechat applet request encapsulation
- xlsxwriter.exceptions.FileCreateError: [Errno 13] Permission denied问题
猜你喜欢
Basemap库绘制地图
Solution to the trial of ycu Blue Bridge Cup programming competition in 2021
【UDS统一诊断服务】三、应用层协议(1)
【UDS统一诊断服务】五、诊断应用示例:Flash Bootloader
1007 go running (hdu6808) in the fourth game of 2020 Hangzhou Electric Multi school competition
【UDS统一诊断服务】四、诊断典型服务(4)— 在线编程功能单元(0x34-0x38)
Completely clean up MySQL win
Robocode教程5——Enemy类
基于Sentinel+Nacos 对Feign Client 动态添加默认熔断规则
gcc ,g++,gdb的安装
随机推荐
Call procedure of function
OpenCV使用 GenericIndex 进行 KNN 搜索
Robocode教程4——Robocode的游戏物理
破解滑动验证码
xlsxwriter.exceptions.FileCreateError: [Errno 13] Permission denied问题
【UDS统一诊断服务】四、诊断典型服务(1)— 诊断和通信管理功能单元
函数的调用过程
Export the articles written in CSDN to PDF format
Detailed arrangement of knowledge points of University probability theory and mathematical statistics
日志
对象的动态建立和释放,赋值和复制
批量导出Arcgis属性表
Feign请求日志统一打印
【UDS统一诊断服务】三、应用层协议(1)
共用数据的保护
拷贝构造函数
PHP junior programmers, take orders and earn extra money
[untitled]
jenkspy包安装
Solution to the trial of ycu Blue Bridge Cup programming competition in 2021