"景先生毕设|www.jxszl.com

C# CvRect类代码示例

2023-12-29 17:48编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中CvRect类的典型用法代码示例。如果您正苦于以下问题:C#CvRect类的具体用法?C#CvRect怎么用?C#CvRect使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:GetSub publicstaticOpenCvSharp.IplImageGetSub(thisOpenCvSharp.IplImageipl,OpenCvSharp.CvRectsubRect) { if(ipl==null) thrownewArgumentNullException("ipl","iplisnull."); varboundingRect=newCvRect(0,0,ipl.Width,ipl.Height); if(!boundingRect.Contains(subRect)) thrownewInvalidOperationException("subRectisoutsideofipl"); try { ipl.SetROI(subRect); OpenCvSharp.IplImagesub=newIplImage( ipl.GetSize(), ipl.Depth, ipl.NChannels); ipl.Copy(sub); returnsub; } finally { ipl.ResetROI(); } }
原文链接:http://www.jxszl.com/biancheng/C/556827.html