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);
Im