博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Core模块其他常用知识点[OpenCV 笔记14]
阅读量:7294 次
发布时间:2019-06-30

本文共 3726 字,大约阅读时间需要 12 分钟。

Matx

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

Vec

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

template
class Vec : public Matx<_Tp, n, 1> {...};typedef Vec
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=1, 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 = 0, int thickness = 1, int line_type = 8 )       // 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=1, int lineType=LINE_8, int shift=0);// 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=1, int lineType=LINE_8, int shift=0)// 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=1, 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=1, int lineType=LINE_8, int shift=0)// 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=1, int lineType=LINE_8, int shift=0) void    cv::polylines (InputOutputArray img, InputArrayOfArrays pts, bool isClosed, const Scalar &color, int thickness=1, int lineType=LINE_8, int shift=0)// 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=0)void cv::fillConvexPoly (InputOutputArray img, InputArray points, const Scalar &color, int lineType=LINE_8, int shift=0)// 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=0, Point offset=Point())void    cv::fillPoly (InputOutputArray img, InputArrayOfArrays pts, const Scalar &color, int lineType=LINE_8, int shift=0, Point offset=Point())// Fills the area bounded by one or more polygons.

随机数生成器

class RNG;

 

转载于:https://www.cnblogs.com/Xiaoyan-Li/p/5677381.html

你可能感兴趣的文章
DFS (Backtracing) 基本框架
查看>>
汕头市队赛 C SRM 05 - YYL 杯 R1 T3!
查看>>
基于Redis的分布式锁安全性分析-转
查看>>
android——仿网易今日头条等自定义频道listview 或者grideview等item上移到另一个view中...
查看>>
leetcode 2. 两数相加
查看>>
第二周进度报告
查看>>
Hadoop集群(一) Zookeeper搭建
查看>>
JDBC事务,银行转账,货物进出库等等。
查看>>
oc-Foundation框架-NSString-常用方法
查看>>
算法:管窥算法-查找旋转数组(即进行了左移或右移的数组)的最小值
查看>>
linux 查看进程和端口
查看>>
服务器端汉字乱码
查看>>
学习笔记之Data analysis
查看>>
Linux系统中“动态库”和“静态库”那点事儿【转】
查看>>
Linux磁盘空间不足
查看>>
Java项目怎么使用Swagger生成API文档?
查看>>
LeetCode OJ:Bulls and Cows (公牛与母牛)
查看>>
吴宁川-阿里云创造者写了《在线》,这是一本怎样的书?
查看>>
CRB and Candies LCM 性质
查看>>
zgg与占卜师
查看>>