偶遇需要轮廓检测

private System.Collections.Generic.IEnumerable<Contour<System.Drawing.Point>> FindContour(Image<Gray, byte> frame, double accuracy) { double num = (double)(frame.Width * frame.Height); for (Contour<System.Drawing.Point> contour = frame.FindContours(CHAIN_APPROX_METHOD.CV_CHAIN_APPROX_SIMPLE, RETR_TYPE.CV_RETR_TREE); contour != null; contour = contour.HNext) { yield return contour.ApproxPoly(accuracy, 2, new MemStorage()); } yield break; }