注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

G G I C C I

 
 
 

日志

 
 

OpenCV中的结构体、类与Emgu.CV的对应表  

2012-07-09 19:04:39|  分类: OpenCV |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
OpenCv中的 C 结构 OpenCV中的 C++ 封装 Emgu.CV中的 C# 封装
OpenCV 和 Emgu.CV 中的结构罗列
Author : Ggicci
转载请注明出处
谢谢阅读,有误希望指正
Basic Structures: main data structures used in opencv.


CvPoint
CvPoint2D32f
CvPoint2D64f
CvPoint3D32f
CvPoint3D64f

Point_<typename _Tp>
Point3_<typename _Tp>
Point_<int>(Point2i, Point)
Point_<float>(Point2f)
Point_<double>(Point2d)
Point3_<float>(Point3f)
Point3_<double>(Point3d)
Point3_<int>(Point3i)


System.Drawing.Point
System.Drawing.PointF
MCvPoint2D64f
MCvPoint3D32f
MCvPoint3D64f


CvSize
CvSize2D32f
Size_<typename _Tp>
Size_<int>(Size, Size2i)
Size_<float>(Size2f)

System.Drawing.Size
System.Drawing.SizeF

CvRect
Rect_<typename _Tp>
Rect_<int>(Rect)

System.Drawing.Rectangle
CvScalar
(A container for 1-,2-,3-or4-tuples of doubles)
Scalar_<typename _Tp>
Scalar_<double>(Scalar)
(:public Vec<_Tp, 4>)
(Scalar is widely used to pass pixel values)

MCvScalar


CvBox2D RotatedRect MCvBox2D
CvMat
(A multi-channel dense matrix) – obsolete
Mat MCvMat
MCvHistogram
Matrix<TDepath>(wrapper)
CvMatND
(Multi-dimensional dense multi-channel array) – obsolete
MCvMatND
MatND<TDepth>(wrapper)
IplImage MIplImage
Image<TColor, TDepth>(wrapper)
CvSparseMat SparseMat SparseMatrix<TDepath>(wrapper)
CvArr
(“metatype”only used as function parameter)
InputArray
OutputArray
CvArray<TDepth>(wrapper)
CvTermCriteria
(Termination criteria for iterative algorithms)
TermCriteria MCvTermCriteria
Dynamic Structures: for creating growable sequences and other dynamic data structures allocated in CvMemStorage. If you use the new C++, Python, Java etc interface, you will unlikely need this functionality. Use std::vector or other high-level data structures instead.
CvMemStorage MemStorage MemStorage(wrapper)
CvMemBlock
CvMemStoragePos
CvSeq Seq<typename _Tp> MCvSeq
Seq<T>(wrapper)
CvSlice Range MCvSlice
CvSet
(derived from CvSeq)
MCvSet
CvGraph
(derived from CvSet)
CvGraphScanner
(used for depth-first graph traversal)
CvTreeNodeIterator
(used to traverse trees of sequences)
Extra C++ Basic Structures: some basic structures in C++ version.
Matx<typename _Tp, int m, int n>
typedef Matx<float, 1, 2> Matx12f;
typedef Matx<double, 6, 6> Matx66d;
...
Vec<typename _Tp, int n> (:public Matx<_Tp, n, 1>)
typedef Vec<uchar, 2> Vec2b;
typedef Vec<short, 4> Vec4s;
typedef Vec<int, 3> Vec3i;
...float,double...
Ptr<typename _Tp>
for smart reference-counting pointers
MatExpr

Matrix Expressions: (Mat A, B; Scalar s; double alpha)
  • Addition, substraction, negation: A + B, A - B, A + s, A - s, s - A, -A
  • Scaling: A * alpha
  • Per-element multiplication and division: A.mul(B), A/B, alpha/A
  • Matrix multiplication: A*B
  • Transposition: A.t() (means AT)
  • Matrix inversion and pseudo-inversion, solving linear systems and least-squares problems: A.inv([method]) (~ A-1) , A.inv([method])*B (~ X: AX=B)
  • Comparison: A cmpop B, A cmpop alpha, alpha cmpop A, where cmpop is one of : >, >=, ==, !=, <=, <. The result of comparison is an 8-bit single channel mask whose elements are set to 255 (if the particular element or pair of elements satisfy the condition) or 0.
  • Bitwise logical operations: A logicop B, A logicop s, s logicop A, ~A, where logicop is one of : &, |, ^.
  • Element-wise minimum and maximum: min(A, B), min(A, alpha), max(A, B), max(A, alpha)
  • Element-wise absolute value: abs(A)
  • Cross-product, dot-product: A.cross(B) A.dot(B)
  • Any function of matrix or matrices and scalars that returns a matrix or a scalar, such as norm, mean, sum, countNonZero, trace, determinant, repeat, and others.
  • Matrix initializers ( Mat::eye(), Mat::zeros(), Mat::ones() ), matrix comma-separated initializers, matrix constructors and operators that extract sub-matrices (see Mat description).
  • Mat_<destination_type>() constructors to cast the result to the proper type.
  评论这张
 
阅读(1758)| 评论(0)
推荐

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017