一 OpenCV中的数据类型

1. cv::Mat

2. cv::Point

主要用来表示二维点,也有表示三维点的模板类型;

cv::Point p(int,  int)  最常用

① cv::Point_<T>

② cv::Point2i          cv::Point_<int>

③ cv::Point2f          cv::Point_<float>

④ cv::Point2d         cv::Point_<double>

⑤ cv::Point2l          cv::Point_<int64>

cv::Point3(int,  int,  int)

① cv::Point3_<T>          表示三维点

② cv::Point3i

③ cv::Point3f

④ cv::Point3l

⑤ cv::Point3d

3. cv::Rect 矩形

① cv::Rect               最常用

② cv::Rect_<int>     int类型的矩形

② cv::Rect_<float>  float表示的矩形

③ cv::Rect_<long>  long表示的矩形

④ cv::Rect2i            int表示的矩形

⑤ cv::Rect2f            float表示的矩形

4. cv::Vec

向量,可以用来表示点

typedef Vec<uchar, 2> Vec2b;                     二维点
typedef Vec<uchar, 3> Vec3b;                     三维点
typedef Vec<uchar, 4> Vec4b;                     四维点

typedef Vec<short, 2> Vec2s;                   
typedef Vec<short, 3> Vec3s;
typedef Vec<short, 4> Vec4s;

typedef Vec<ushort, 2> Vec2w;
typedef Vec<ushort, 3> Vec3w;
typedef Vec<ushort, 4> Vec4w;

typedef Vec<int, 2> Vec2i;
typedef Vec<int, 3> Vec3i;
typedef Vec<int, 4> Vec4i;
typedef Vec<int, 6> Vec6i;
typedef Vec<int, 8> Vec8i;

typedef Vec<float, 2> Vec2f;
typedef Vec<float, 3> Vec3f;
typedef Vec<float, 4> Vec4f;
typedef Vec<float, 6> Vec6f;

typedef Vec<double, 2> Vec2d;
typedef Vec<double, 3> Vec3d;
typedef Vec<double, 4> Vec4d;
typedef Vec<double, 6> Vec6d;

5. cv::KeyPoint

6. cv::DMatch

  • 8
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值