EmguCV提取轮廓的一个例子
来源:互联网 发布:淘宝自动回复经典语句 编辑:程序博客网 时间:2024/06/05 17:21
EmguCV, 也就是OpenCV的C#版本,用法也和OpenCV一致:
using System.Drawing;using Emgu.CV;using Emgu.CV.Structure;using Emgu.CV.CvEnum;using Emgu.CV.Util;public class EmguDemo{ private List<Rectangle> _rcList = new List<Rectangle>(); public void GetRects(ref Bitmap bmp, int thresholdBinary) { _grayImage = new Image<Gray, byte>(bmp); Image<Gray, byte> binaryImage = _grayImage.ThresholdBinary(new Gray(thresholdBinary), new Gray(255)); VectorOfVectorOfPoint contour = new VectorOfVectorOfPoint(); CvInvoke.FindContours(binaryImage, contour, null, RetrType.External, ChainApproxMethod.ChainApproxSimple); CvInvoke.ApproxPolyDP(contour, contour, 1.0, true); _rcList.Clear(); for (int i = 0; i < contour.Size; i++) { _rcList.Add(CvInvoke.BoundingRectangle(contour[i])); } // do something you want... }}
0 0
- EmguCV提取轮廓的一个例子
- OpenCV与EmguCV中的图像轮廓提取
- opencv cookbook中关于轮廓提取以及表示的例子
- 几种方法用来提取图像轮廓的例子
- 图像轮廓的提取
- 一个提取字符串的例子
- OpenCV中findContours轮廓提取一个边缘只对应的一个轮廓
- 计算提取轮廓的面积
- 轮廓提取
- 轮廓提取
- 轮廓提取
- 轮廓提取
- 将轮廓检测的各个轮廓提取出来并显示
- 将轮廓检测的各个轮廓提取出来并显示
- 将轮廓检测的各个轮廓提取出来并显示
- OpenCV提取轮廓(去掉面积小的轮廓)
- 使用OpenCV的函数findContours提取轮廓并绘制轮廓
- 图像轮廓的提取和绘制
- ajax请求接口里的数据,然后显示在页面里
- 小顶堆的C++实现
- 消息中间件中术语
- 从0开始学习 GitHub 系列之「GitHub 常见的几种操作」
- 中缀表达式求值(模板)
- EmguCV提取轮廓的一个例子
- 【转】VS2010 RDLC报表 矩阵 详解 分组、总计、表头、显示方向、序号
- nginx做反向负载均衡,后端服务器获取真实客户端ip
- perl学习笔记-----------------------(2)
- 自定义异常类
- adb远程调试
- 平时积累
- Remove Duplicates from Sorted List II
- Duilib学习笔记(一)