Matx

轻量级的Mat,必须在使用前规定好大小,比如一个2x3的float型的Matx,可以声明为Matx23f

Vec

Vec是Matx的一个派生类,是一个一维的Matx,跟vector很相似。在OpenCV源码中定义如下:

template<typename _TP, int n> class Vec : public Matx<_Tp, n, > {...};
typedef Vec<uchar, > Vec2b;

Range

使OpenCV的使用更像MATLAB, Range::all()等同于MATLAB的:,Range(a,b)等同于MATLAB的a:b,其中a, b为整型

内存溢出

防止内存溢出的函数有alignPtr, alignSize, allocate, deallocate, fastMalloc, fastFree

math.h函数

float cv::fastAtan2 (   float y, float x ); // 计算向量角度

float cv::cubeRoot (float val);  // 计算立方根

int     cvCeil (double value);
int cvCeil (float value);
int cvCeil (int value); // 向上取整 int cvFloor (double value);
int cvFloor (float value);
int cvFloor (int value); // 向下取整 int cvRound (double value)
int cvRound (float value)
int cvRound (int value) // 四舍五入 int cvIsInf (double value);
int cvIsInf (float value); // 自变量是否无穷大 int cvIsNaN (double value);
int cvIsNaN (float value); // 自变量是否为NaN

文字显示函数

Size cv::getTextSize(   const String & text, int fontFace, double fontScale, int thickness, int * baseLine );
// Calculates the width and height of a text string.
// baseLine: y-coordinate of the baseline relative to the bottom-most text point. void cv::putText (InputOutputArray img, const String &text, Point org, int fontFace, double fontScale, Scalar color, int thickness=, int lineType=LINE_8, bool bottomLeftOrigin=false)
// Renders the specified text string in the image. void cvInitFont( CvFont * font, int font_face, double hscale, double vscale, double shear = , int thickness = , int line_type = )
// Initializes the font structure that can be passed to text rendering functions.

作图函数

可参考链接

void    cv::circle (InputOutputArray img, Point center, int radius, const Scalar &color, int thickness=, int lineType=LINE_8, int shift=);
// Draw a circle. bool cv::clipLine (Size imgSize, Point &pt1, Point &pt2)
// Clips the line against the image rectangle. void cv::ellipse (InputOutputArray img, Point center, Size axes, double angle, double startAngle, double endAngle, const Scalar &color, int thickness=, int lineType=LINE_8, int shift=)
// Draws a simple or thick elliptic arc or fills an ellipse sector. void cv::ellipse (InputOutputArray img, const RotatedRect &box, const Scalar &color, int thickness=, int lineType=LINE_8) void cv::ellipse2Poly (Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, std::vector< Point > &pts)
// Approximates an elliptic arc with a polyline. void cv::line (InputOutputArray img, Point pt1, Point pt2, const Scalar &color, int thickness=, int lineType=LINE_8, int shift=)
// Draws a line segment connecting two points. void cv::polylines (Mat &img, const Point *const *pts, const int *npts, int ncontours, bool isClosed, const Scalar &color, int thickness=, int lineType=LINE_8, int shift=) void cv::polylines (InputOutputArray img, InputArrayOfArrays pts, bool isClosed, const Scalar &color, int thickness=, int lineType=LINE_8, int shift=)
// Draws several polygonal curves. class cv::LineIterator;

填充函数

void cv::fillConvexPoly (Mat &img, const Point *pts, int npts, const Scalar &color, int lineType=LINE_8, int shift=)

void cv::fillConvexPoly (InputOutputArray img, InputArray points, const Scalar &color, int lineType=LINE_8, int shift=)
// Fills a convex polygon. void cv::fillPoly (Mat &img, const Point **pts, const int *npts, int ncontours, const Scalar &color, int lineType=LINE_8, int shift=, Point offset=Point()) void cv::fillPoly (InputOutputArray img, InputArrayOfArrays pts, const Scalar &color, int lineType=LINE_8, int shift=, Point offset=Point())
// Fills the area bounded by one or more polygons.

随机数生成器

class RNG;

Core模块其他常用知识点[OpenCV 笔记14]的更多相关文章

  1. 常用数据结构[OpenCV 笔记12]

    Point 二维坐标系下的整数点, 定义如下 typedef Point_<int> Point2i; typedef Point2i Point; typedef Point_<f ...

  2. 图像显示 imshow()[OpenCV 笔记5]

    void imshow(const string& winname InputArray mat); winname 窗口表识名称 mat 需要显示的图像.InputArray类型,声明如下 ...

  3. OpenCV基本架构[OpenCV 笔记0]

    最近正在系统学习OpenCV,将不定期发布笔记,主要按照毛星云的<OpenCV3编程入门>的顺序学习,会参考官方教程和文档.学习工具是Xcode+CMake,会对书中一部分内容更正,并加入 ...

  4. OpenCV Tricks[OpenCV 笔记3]

    官方例程 事例程序位于opencv-3.1.0/samples/cpp/ 目录下,可以通过编译整个工程,编译所有的Sample Code 显示当前使用的OpenCV版本 CV_VERSION为标识当前 ...

  5. 查找并绘制轮廓[OpenCV 笔记XX]

    好久没有更新了,原谅自己放了个假最近又在赶进度,所以...更新的内容是很靠后的第八章,因为最近工作要用就先跳了,后面会更新笔记编号...加油加油! 在二值图像中寻找轮廓 void cv::findCo ...

  6. 访问图像中的像素[OpenCV 笔记16]

    再更一发好久没更过的OpenCV,不过其实写到这个部分对计算机视觉算法有所了解的应该可以做到用什么查什么了,所以后面可能会更的慢一点吧,既然开了新坑,还是机器学习更有研究价值吧... 图像在内存中的存 ...

  7. 实例:图形绘制[OpenCV 笔记15]

    DrawShapes.cxx # include "DrawShapes_utils.h" #define WINDOW_NAME1 "Painting 1" ...

  8. 颜色空间转换 cvtColor()[OpenCV 笔记13]

    void cvtColor(InputArray src, OutputArray dst, ) src: 输入图像 dst: 输出图像 code: 颜色空间转换标识符 OpenCV2的CV_前缀宏命 ...

  9. 图像储存容器Mat[OpenCV 笔记11]

    IplImage 与 Mat IplImage是OpenCV1中的图像存储结构体,基于C接口创建.在退出之前必须release,否则就会造成内存泄露.在一些只能使用C语言的嵌入式系统中,不得不使用. ...

随机推荐

  1. HW4.35

    public class Solution { public static void main(String[] args) { double sum = 0; for(int i = 1; i &l ...

  2. CentOS上安装FastDFS分布式文件系统

    鱼大自己写的项目简介:http://bbs.chinaunix.net/thread-1920470-1-1.html 架构简介:http://www.programmer.com.cn/4380/ ...

  3. DATASNAP复杂中间件的一些处理方法

    1.中间件需要连接SQL SERVER\ORACLE\MYSQL多种数据库,怎么办? [解决]:可以搞多种数据模块池对应多种数据库,一种数据模块池对应一种数据库 2.中间件业务对象多,在一个单元里面定 ...

  4. 前端javascript规范文档 (http://www.xuanfengge.com/category/web)

    说明:本文档为前端JS规范 一.规范目的 为提高团队协作效率,便于前端后期优化维护,输出高质量的文档. 二.基本准则 符合web标准,结构表现行为分离,兼容性优良.页面性能方面,代码要求简洁明了有序, ...

  5. Yii2 富头像上传

    前台html: <div class="xz_img2 text-center"> <div class="images_flow" id=& ...

  6. iOS Xcode的快捷键

    将一些搜集和经常使用的快捷键记录下来,方便你我. Command +1~ 8: 跳转到导航区的不同位置 Command +0 :显示/隐藏导航区 Command Alt 1~ 6:在不同检测器之间跳转 ...

  7. Rational Rose 2007 &amp;Rational Rose 2003 下载及破解方法和汉化文件下载

    这么好的东西,不拿来出分享,我对不起原作者呀.可是我这里不知道作者是谁,感谢在先了. ed2k://|file|%5BIBM%E8%BD%AF%E4%BB%B6%E7%B3%BB%E5%88%97%5 ...

  8. 杂谈:你选择coco 还是unity3d?

    当一个人喜欢的时候,那么这样的兴趣是非常难改变的.你是否会改变自己想法?眼下而言,如今adobe 对flash开发处于维护的状态.为什么?是由于前期错误政策流失非常多人才,这一点也非常难避免.当今年湖 ...

  9. node.js在windows下的学习笔记(3)---npm

    1.什么是npm npm是Node.js的包管理器,它允许开发人员在Node.js的应用程序中创建,共享,重用模块.之前我们通过node的官网的安装程序安装了Node.js,那么npm就已经装好了的. ...

  10. 新型信用卡MasterPass

    Xsolla与masterpass合作.提供新型支付方式 "电子支付的未来在这里. "在万事达卡宣布发行一种全新的被称为MasterPass的支付解决方式的两年后.从2014年底開 ...