随笔分类 - EmguCV
摘要:MCvDTreeParams cvFolds //If this parameter is >1, the tree is pruned using cv_folds-fold cross validation. maxCategories //默认为10 maxDepth //This parameter specifies the maximum possible depth of the tree. That is the training algorithms attempts to split a node while its depth is l...
阅读全文
摘要:一、相关类MCvMoments inv_sqrt_m00 m00!=0?1/sqrt(m00):0 m00 spatial moments m01, m02, m03, m10, m11 m12, m21, m30, mu02, mu03 mu11, mu12, mu20, mu21, mu30MCvHuMoments hu1 Hu ivnariants hu2, hu3, hu4, hu5, hu6, hu7public static void cvMoments( IntPtr arr, //Image (1-...
阅读全文
摘要:一、圆 public static void cvCircle( IntPtr img, System.Drawing.Point center, //Center of the circle int radius, //Radius of the circle MCvScalar color, //Color of the circle int thickness, if negative indicates that a filled circle has to be drawn Emgu.CV.CvEn...
阅读全文
摘要:一、cvApproxPoly 使用多边形逼近一个轮廓,使得顶点数目变少。算法先从轮廓选择2个最远的点,然后将2个连成一个线段,然后再查找轮廓上到线段距离最远的点,添加到逼近后的新轮廓。算法反复迭代,不断将最远的点添加到结果中。直到所有的点到多边形的最短距离小于parameter参数指定的精度。二、cvArcLength、cvContourPerimeter 作用于一个轮廓并返回其长度。三、cvContourArea 计算轮廓的面积。四、cvBoundingRect 描述矩形边界框,返回一个包围轮廓的CvRect,CvRect只能表示一个方正的长方形。五、cvMinAreaRect2 ...
阅读全文
摘要:一、public static double cvThreshold( IntPtr src, IntPtr dst, double threshold, double maxValue, //Maximum value to use with CV_THRESH_BINARY and CV_THRESH_BINARY_INV thresholding types Emgu.CV.CvEnum.THRESH thresholdType ) thresholdType有如下几种: CV_THRESH_BINARY,表示dsti=(sr...
阅读全文
摘要:一、先是在程序中图像的导入,我是根据图像路径实现,其中path是string类型,是图像路径。IntPtr img=CvInvoke.cvLoadImage(path, Emgu.CV.CvEnum.LOAD_IMAGE_TYPE.CV_LOAD_IMAGE_ANYCOLOR);二、图像灰度化处理,先创建一幅尺寸大小为为原图的8位图像GrayImg1:Rectangle cr = CvInvoke.cvGetImageROI(img1); int width = cr.Width; int height = cr.Height;IntPtr GrayImg1 = CvInvoke.cvCrea
阅读全文
摘要:一、相关函数 public static void cvDrawContours( IntPtr img, IntPtr contour, MCvScalar externalColor, MCvScalar holeColor, int maxLevel, int thickness, Emgu.CV.CvEnum.LINE_TYPE lineType, //EIGHT_CONNECTED、FOUR_CONNECTED、CV_AA System.Drawing.Point offset ) cvDrawC...
阅读全文
摘要:需要添加引用:System.Runtime.InteropServices举例如下: float[] priors={1,10}; IntPtr intPtrSet = new IntPtr(); intPtrSet=Marshal.AllocCoTaskMem(Marshal.SizeOf(priors[0]*priors.Length)); Marshal.Copy(priors, 0, intPtrSet, priors.Length);
阅读全文
摘要:一、MCvTermCriteria epsilon Epsilon max_iter Maximum iteration type CV_TERMCRIT value二、MCvScalar vo The scalar value v1 The scalar value v2 The scalar value v3 The scalar value三、MCvSlice end_index End index start_index Start index四、MCvBox2 angle The an...
阅读全文
摘要:一、下载与安装OpenCV 安装包版本:OpenCV2.4.2 X86 下载地址:http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.2/OpenCV-2.4.2.exe/download 解压并且设置系统变量,在“用户变量”处,新建了PATH项,内容为*\OpenCV2.4.2\build\x86\vc10\bin;二、下载与安装EmguCV 安装包版本:EmguCV2.4.2 X86 下载地址:http://sourceforge.net/projects/emgucv/files/emgucv/2.4...
阅读全文

浙公网安备 33010602011771号