本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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);
}