Point 二维点坐标(x,y)

typedef Point3_<int> Point3i;
typedef Point3_<float> Point3f;
typedef Point3_<double> Point3d;

Point3 3维点坐标(x,y,z)

typedef Point_<int> Point2i;
typedef Point2i Point;
typedef Point_<float> Point2f;
typedef Point_<double> Point2d;

Size_  尺寸(width, height)

typedef Size_<int> Size2i;
typedef Size2i Size;
typedef Size_<float> Size2f;

Rect_  矩形区域(x,y,width,height) ,(x,y)左上角坐标, 范围[x, x + width), [y, y + height)

rect = rect ± point //矩形偏移(shifting a rectangle by a certain offset)
rect = rect ± size //改变大小(expanding or shrinking a rectangle by a certain amount)
rect += point, rect -= point, rect += size, rect -= size //(augmenting operations)
rect = rect1 & rect2 //矩形交集(rectangle intersection)
rect = rect1 | rect2 //包含r1r2的最小矩形(minimum area rectangle containing rect2 and rect3 )
rect &= rect1, rect |= rect1 //(and the corresponding augmenting operations)
rect == rect1, rect != rect1 //(rectangle comparison)

RotatedRect  旋转矩形

// p中心点(不是左上角坐标),size尺寸,angle旋转角度
RotatedRect::RotatedRect(const Point2f& p, const Size2f& size, float angle)
RotatedRect rRect = RotatedRect(Point2f(,), Size2f(,), );

Matx 小矩阵

template<typename_Tp, int m, int n> class Matx {...};
typedef Matx<float, , > Matx12f;
typedef Matx<double, , > Matx12d;
...
typedef Matx<float, , > Matx16f;
typedef Matx<double, , > Matx16d;
typedef Matx<float, , > Matx21f;
typedef Matx<double, , > Matx21d;
...
typedef Matx<float, , > Matx61f;
typedef Matx<double, , > Matx61d;
typedef Matx<float, , > Matx22f;
typedef Matx<double, , > Matx22d;
...
typedef Matx<float, , > Matx66f;
typedef Matx<double, , > Matx66d; Matx33f m(, , ,
, , ,
, , );
cout << sum(Mat(m*m.t())) << endl;//Matx转化为Mat

Vec  短向量,基于Matx

template<typename_Tp, int n> class Vec : public Matx<_Tp, n, > {...};
typedef Vec<uchar, > Vec2b;
typedef Vec<uchar, > Vec3b;
typedef Vec<uchar, > Vec4b;
typedef Vec<short, > Vec2s;
typedef Vec<short, > Vec3s;
typedef Vec<short, > Vec4s;
typedef Vec<int, > Vec2i;
typedef Vec<int, > Vec3i;
typedef Vec<int, > Vec4i;
typedef Vec<float, > Vec2f;
typedef Vec<float, > Vec3f;
typedef Vec<float, > Vec4f;
typedef Vec<float, > Vec6f;
typedef Vec<double, > Vec2d;
typedef Vec<double, > Vec3d;
typedef Vec<double, > Vec4d;
typedef Vec<double, > Vec6d;

Scalar_  四维向量

template<typename_Tp> class Scalar_: public Vec<_Tp, > { ... };
typedef Scalar_<double> Scalar;

Range 范围,(start, end)

Mat m(,,CV32F);
Mat part = m(Range::all(), Range(, )); // 相当于matlab的m(:, 20 : 199)

Mat 矩阵结构

Mat img;
img.data //数据区域的指针
img.dims //矩阵维度
img.sizes //维度
img.elemSize() //每个元素占的字节空间大小,与元素类型相关,如CV_8U
img.step[] //用来计算元素地址, M.step[i] 表示所有比i大的维度所占空间大小
img.step[i] >= M.step[i+1]*img.sizes[i+1];

OpenCV常用数据类型的更多相关文章

  1. Opencv基本数据类型

    1.OpenCV中数据类型和常用数据类型对应 Mat<uchar>                            CV_8U Mat<char>            ...

  2. NoSQL初探之人人都爱Redis:(2)Redis API与常用数据类型简介

    一.Redis API For .Net 首先,不得不说Redis官方提供了众多的API开发包,但是目前Redis官方版本不支持.Net直接进行连接,需要使用一些第三方的开源类库.目前最流行的就是Se ...

  3. MySQL数据库3 - MySQL常用数据类型

    一. MySql常用数据类型 数据类型:整数(tinyint smailint int bigint) 定点数 decimal(p,s) ------ 小数点位置固定的       ---> 数 ...

  4. 【转】NoSQL初探之人人都爱Redis:(2)Redis API与常用数据类型简介

    一.Redis API For .Net 首先,不得不说Redis官方提供了众多的API开发包,但是目前Redis官方版本不支持.Net直接进行连接,需要使用一些第三方的开源类库.目前最流行的就是Se ...

  5. Mssql中一些常用数据类型的说明和区别

    Mssql中一些常用数据类型的说明和区别 1.bigint 占用8个字节的存储空间,取值范围在-2^63 (-9,223,372,036,854,775,808) 到 2^63-1 (9,223,37 ...

  6. Redis常用数据类型介绍、使用场景及其操作命令

    Redis常用数据类型介绍.使用场景及其操作命令 本文章同时也在cpper.info发布. Redis目前支持5种数据类型,分别是: 1.String(字符串) 2.List(列表) 3.Hash(字 ...

  7. Redis简介、与memcached比较、存储方式、应用场景、生产经验教训、安全设置、key的建议、安装和常用数据类型介绍、ServiceStack.Redis使用(1)

    1.NOSQL简介 nosql的产生并不是要彻底的代替关系型数据库,而是作为传统关系型数据库的一个补充. Facebook和360使用Cassandra来存储海量社交数据 Twitter在其url抓取 ...

  8. Mysql常用数据类型

    Mysql常用数据类型 数字: 字符串: 时间:

  9. python常用数据类型内置方法介绍

    熟练掌握python常用数据类型内置方法是每个初学者必须具备的内功. 下面介绍了python常用的集中数据类型及其方法,点开源代码,其中对主要方法都进行了中文注释. 一.整型 a = 100 a.xx ...

随机推荐

  1. iOS - is missing from working copy

    解决方案:1.打开终端2.cd 到警告所提示的文件夹下3.执行命令svn rm --force 丢失文件的名称 丢失的文件太多批量处理:1.打开终端2.sudo find /Users/mac/Des ...

  2. Windows文件夹、文件源代码对比工具--WinMerge

    /********************************************************************** * Windows文件夹.文件源代码对比工具--WinM ...

  3. ubuntu 初始安装完成后的一些设置

    处于安全考虑最好,使用普通用户登录. 首先以超级用户登入系统,然后执行以下步骤 第一步:设置普通用户 以下<user_name>代表普通用户的用户名 useradd -g users -d ...

  4. LeetCode - Online Election

    In an election, the i-th vote was cast for persons[i] at time times[i]. Now, we would like to implem ...

  5. 在centos7中安装python3并设置为默认版本

    1,查看Python默认版本 python -V (大写V) 2,看看执行Python在哪个位置 which python 3,安装gcc,用于编译Python源码 yum install gcc 4 ...

  6. ab压力测试nginx

    centos7系统: yum install httpd-tools -y #安装ab压力测试工具

  7. debian系统下apache2开启ssi功能

    SSI (Server Side Include)的 html 文件扩展名 (.shtml), 通常称为"服务器端嵌入"或者叫"服务器端包含"说白了就是类似其他 ...

  8. 18.1 volatile的作用

    volatile的作用是作为指令关键字,确保本条指令不会因编译器的优化而省略,且要求每次直接读值. 1.编译器的优化 在本次线程内,当读取一个变量时,为提高存取速度,编译器优化时有时会先把变量读取到一 ...

  9. keepalived 高可用配置

    下载地址:http://www.keepalived.org/software/keepalived-1.2.12.tar.gzht 安装方法:1. ./configure 可能出现的错误 !!! O ...

  10. Windows 下最佳的 C++ 开发的 IDE 是什么?

    作者:渡世白玉链接:https://www.zhihu.com/question/19589089/answer/30312199来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注 ...