/// <summary> /// Finds an object center, size, and orientation. /// </summary> /// <param name="probImage">Back projection of the object histogram. </param> /// <param name="window">Initial search window.</param> /// <param name="criteria">Stop criteria for the underlying MeanShift() .</param> /// <returns></returns> public static RotatedRect CamShift( InputArray probImage, ref Rect window, TermCriteria criteria) { if (probImage == null) { throw new ArgumentNullException("probImage"); } probImage.ThrowIfDisposed(); CvRect window0 = window; RotatedRect result = NativeMethods.video_CamShift( probImage.CvPtr, ref window0, criteria); window = window0; return(result); }
/// <summary> /// 枠だけの楕円,もしくは塗りつぶされた楕円を描画する /// </summary> /// <param name="box">描画したい楕円を囲む矩形領域.</param> /// <param name="color">楕円の色.</param> /// <param name="thickness">楕円境界線の幅.[既定値は1]</param> /// <param name="lineType">楕円境界線の種類.[既定値はLineType.Link8]</param> #else /// <summary> /// Draws simple or thick elliptic arc or fills ellipse sector /// </summary> /// <param name="box">The enclosing box of the ellipse drawn </param> /// <param name="color">Ellipse color. </param> /// <param name="thickness">Thickness of the ellipse boundary. [By default this is 1]</param> /// <param name="lineType">Type of the ellipse boundary. [By default this is LineType.Link8]</param> #endif public void Ellipse(RotatedRect box, Scalar color, int thickness = 1, LineType lineType = LineType.Link8) { Cv2.Ellipse(this, box, color, thickness, lineType); }
public static extern void core_ellipse(IntPtr img, RotatedRect box, CvScalar color, int thickness, int lineType);
public static extern void core_ellipse(IntPtr img, RotatedRect box, CvScalar color, int thickness, int lineType);
/// <summary> /// 枠だけの楕円,もしくは塗りつぶされた楕円を描画する /// </summary> /// <param name="img">楕円が描かれる画像.</param> /// <param name="box">描画したい楕円を囲む矩形領域.</param> /// <param name="color">楕円の色.</param> /// <param name="thickness">楕円境界線の幅.[既定値は1]</param> /// <param name="lineType">楕円境界線の種類.[既定値はLineType.Link8]</param> #else /// <summary> /// Draws simple or thick elliptic arc or fills ellipse sector /// </summary> /// <param name="img">Image. </param> /// <param name="box">The enclosing box of the ellipse drawn </param> /// <param name="color">Ellipse color. </param> /// <param name="thickness">Thickness of the ellipse boundary. [By default this is 1]</param> /// <param name="lineType">Type of the ellipse boundary. [By default this is LineType.Link8]</param> #endif public static void Ellipse(Mat img, RotatedRect box, Scalar color, int thickness = 1, LineType lineType = LineType.Link8) { if (img == null) throw new ArgumentNullException("img"); img.ThrowIfDisposed(); NativeMethods.core_ellipse(img.CvPtr, box, color, thickness, (int)lineType); }