当前位置: 首页>>代码示例>>C#>>正文


C# Mat.ToIplImage方法代码示例

本文整理汇总了C#中OpenCvSharp.CPlusPlus.Mat.ToIplImage方法的典型用法代码示例。如果您正苦于以下问题:C# Mat.ToIplImage方法的具体用法?C# Mat.ToIplImage怎么用?C# Mat.ToIplImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenCvSharp.CPlusPlus.Mat的用法示例。


在下文中一共展示了Mat.ToIplImage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Ellipse

        /// <summary>
        /// 枠だけの楕円,楕円弧,もしくは塗りつぶされた扇形の楕円を描画する
        /// </summary>
        /// <param name="img">楕円が描画される画像</param>
        /// <param name="center">楕円の中心</param>
        /// <param name="axes">楕円の軸の長さ</param>
        /// <param name="angle">回転角度</param>
        /// <param name="startAngle">楕円弧の開始角度</param>
        /// <param name="endAngle">楕円弧の終了角度</param>
        /// <param name="color">楕円の色</param>
        /// <param name="thickness">楕円弧の線の幅 [既定値は1]</param>
        /// <param name="lineType">楕円弧の線の種類 [既定値はLineType.Link8]</param>
        /// <param name="shift">中心座標と軸の長さの小数点以下の桁を表すビット数 [既定値は0]</param>
#else
        /// <summary>
        /// Draws simple or thick elliptic arc or fills ellipse sector
        /// </summary>
        /// <param name="img">Image. </param>
        /// <param name="center">Center of the ellipse. </param>
        /// <param name="axes">Length of the ellipse axes. </param>
        /// <param name="angle">Rotation angle. </param>
        /// <param name="startAngle">Starting angle of the elliptic arc. </param>
        /// <param name="endAngle">Ending angle of the elliptic arc. </param>
        /// <param name="color">Ellipse color. </param>
        /// <param name="thickness">Thickness of the ellipse arc. [By default this is 1]</param>
        /// <param name="lineType">Type of the ellipse boundary. [By default this is LineType.Link8]</param>
        /// <param name="shift">Number of fractional bits in the center coordinates and axes' values. [By default this is 0]</param>
#endif
        public static void Ellipse(Mat img, CvPoint center, CvSize axes, double angle, double startAngle, double endAngle, CvScalar color,
            int thickness, LineType lineType, int shift)
        {
            if (img == null)
                throw new ArgumentNullException("img");
            
            CvInvoke.cvEllipse(img.ToIplImage().CvPtr, center, axes, angle, startAngle, endAngle, color, thickness, lineType, shift);
        }
开发者ID:neoxeo,项目名称:opencvsharp,代码行数:36,代码来源:CvCpp.cs

示例2: Circle

        /// <summary>
        /// 円を描画する
        /// </summary>
        /// <param name="img">画像</param>
        /// <param name="center">円の中心</param>
        /// <param name="radius">円の半径</param>
        /// <param name="color">円の色</param>
        /// <param name="thickness">線の幅.負の値を指定した場合は塗りつぶされる.[既定値は1]</param>
        /// <param name="line_type">線の種類. [既定値はLineType.Link8]</param>
        /// <param name="shift">中心座標と半径の小数点以下の桁を表すビット数. [既定値は0]</param>
#else
        /// <summary>
        /// Draws a circle
        /// </summary>
        /// <param name="img">Image where the circle is drawn. </param>
        /// <param name="center">Center of the circle. </param>
        /// <param name="radius">Radius of the circle. </param>
        /// <param name="color">Circle color. </param>
        /// <param name="thickness">Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn. [By default this is 1]</param>
        /// <param name="line_type">Type of the circle boundary. [By default this is LineType.Link8]</param>
        /// <param name="shift">Number of fractional bits in the center coordinates and radius value. [By default this is 0]</param>
#endif
        public static void Circle(Mat img, CvPoint center, int radius, CvScalar color, int thickness, LineType line_type, int shift)
        {
            if (img == null)
                throw new ArgumentNullException("img");
            CvInvoke.cvCircle(img.ToIplImage().CvPtr, center, radius, color, thickness, line_type, shift);
        }
开发者ID:neoxeo,项目名称:opencvsharp,代码行数:28,代码来源:CvCpp.cs

示例3: Rectangle

        /// <summary>
        /// 枠のみ,もしくは塗りつぶされた矩形を描画する
        /// </summary>
        /// <param name="img">画像</param>
        /// <param name="pt1">矩形の一つの頂点</param>
        /// <param name="pt2">矩形の反対側の頂点</param>
        /// <param name="color">線の色(RGB),もしくは輝度(グレースケール画像).</param>
        /// <param name="thickness">矩形を描く線の太さ.負の値を指定した場合は塗りつぶされる. [既定値は1]</param>
        /// <param name="lineType">線の種類. [既定値はLineType.Link8]</param>
        /// <param name="shift">座標の小数点以下の桁を表すビット数. [既定値は0]</param>
#else
        /// <summary>
        /// Draws simple, thick or filled rectangle
        /// </summary>
        /// <param name="img">Image. </param>
        /// <param name="pt1">One of the rectangle vertices. </param>
        /// <param name="pt2">Opposite rectangle vertex. </param>
        /// <param name="color">Line color (RGB) or brightness (grayscale image). </param>
        /// <param name="thickness">Thickness of lines that make up the rectangle. Negative values make the function to draw a filled rectangle. [By default this is 1]</param>
        /// <param name="lineType">Type of the line, see cvLine description. [By default this is LineType.Link8]</param>
        /// <param name="shift">Number of fractional bits in the point coordinates. [By default this is 0]</param>
#endif
        public static void Rectangle(Mat img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness, LineType lineType, int shift)
        {
            if (img == null)
                throw new ArgumentNullException("img");
            
            CvInvoke.cvRectangle(img.ToIplImage().CvPtr, pt1, pt2, color, thickness, lineType, shift);
        }
开发者ID:neoxeo,项目名称:opencvsharp,代码行数:29,代码来源:CvCpp.cs

示例4: Line

        /// <summary>
        /// 2点を結ぶ線分を画像上に描画する.
        /// </summary>
        /// <param name="img">画像</param>
        /// <param name="pt1">線分の1番目の端点</param>
        /// <param name="pt2">線分の2番目の端点</param>
        /// <param name="color">線分の色</param>
#else
        /// <summary>
        /// Draws a line segment connecting two points
        /// </summary>
        /// <param name="img">The image. </param>
        /// <param name="pt1">First point of the line segment. </param>
        /// <param name="pt2">Second point of the line segment. </param>
        /// <param name="color">Line color. </param>
#endif
        public static void Line(Mat img, CvPoint pt1, CvPoint pt2, CvScalar color)
        {
            if (img == null)
                throw new ArgumentNullException("img");

            CvInvoke.cvLine(img.ToIplImage().CvPtr, pt1, pt2, color, 1, LineType.Link8, 0);
        }
开发者ID:neoxeo,项目名称:opencvsharp,代码行数:23,代码来源:CvCpp.cs


注:本文中的OpenCvSharp.CPlusPlus.Mat.ToIplImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。