当前位置:网站首页>[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
边栏推荐
猜你喜欢

解决ArcGIS分区统计显示太多唯一值执行失败

【UDS统一诊断服务】三、应用层协议(2)

拷贝构造函数

Solution to the trial of ycu Blue Bridge Cup programming competition in 2021

ArcGIS license错误-15解决方法
[ThreadX] h743zi + lan8720 + ThreadX + netx duo transplantation

【UDS统一诊断服务】二、网络层协议(2)— 数据传输规则(单帧与多帧)

ArcGIS表转EXCEL超出上限转换失败

Robocode教程5——Enemy类

大学概率论与数理统计知识点详细整理
随机推荐
非参数化相机畸变模型简介
用二进制进行权限管理
MySQL groups are sorted by a field, and the first value is taken
Robocode教程8——AdvancedRobot
使用TransmittableThreadLocal实现参数跨线程传递
带默认模板实参的类模板与模板模板形参的匹配
The onnx model of yolov5 removes the transfer layer
爬虫效率提升方法
Object array and object pointer
[ThreadX] h743zi + lan8720 + ThreadX + netx duo transplantation
Dynamic creation and release, assignment and replication of objects
For() loop parameter call order
word排版遇到的格式问题
静态成员
Completely clean up MySQL win
1007 go running (hdu6808) in the fourth game of 2020 Hangzhou Electric Multi school competition
Linux 用rpm的方式安装mysql(超简单)
NVIDIA Jetson: GStreamer 和 openMAX(gst-omx) 插件
Gesture recognition research
Record the installation and configuration of gestermer on TX2, and then use GST RTSP server