Example #1
0
 /// <summary>
 /// Renders the text in the image with the specified font and color. The printed text is clipped by ROI rectangle. Symbols that do not belong to the specified font are replaced with the rectangle symbol.
 /// </summary>
 /// <param name="img">Input image</param>
 /// <param name="text">String to print</param>
 /// <param name="org">Coordinates of the bottom-left corner of the first letter</param>
 /// <param name="fontFace">Font type.</param>
 /// <param name="fontScale">Font scale factor that is multiplied by the font-specific base size.</param>
 /// <param name="color">Text color</param>
 /// <param name="thickness">Thickness of the lines used to draw a text.</param>
 /// <param name="lineType">Line type</param>
 /// <param name="bottomLeftOrigin">When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner.</param>
 public static void PutText(IInputOutputArray img, String text, Point org, Emgu.CV.CvEnum.FontFace fontFace, double fontScale, Color color, int thickness = 1, Emgu.CV.CvEnum.LineType lineType = Emgu.CV.CvEnum.LineType.EightConnected, bool bottomLeftOrigin = false)
 {
     // No change needed, just wrapping to complete the api
     CvInvoke.PutText(img, text, org, fontFace, fontScale, color.ToMCvSCalar(), thickness, lineType, bottomLeftOrigin);
 }
Example #2
0
 /// <summary>
 /// Draws a simple or filled circle with given center and radius. The circle is clipped by ROI rectangle.
 /// </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">Color of the circle</param>
 /// <param name="thickness">Thickness of the circle outline if positive, otherwise indicates that a filled circle has to be drawn</param>
 /// <param name="lineType">Line type</param>
 /// <param name="shift">Number of fractional bits in the center coordinates and radius value</param>
 /// <remarks>
 /// http://docs.opencv.org/2.4/modules/core/doc/drawing_functions.html?highlight=cv2.circle#cv2.circle
 /// </remarks>
 public static void Circle(IInputOutputArray img, Point center, int radius, Color color, int thickness = 1, Emgu.CV.CvEnum.LineType lineType = Emgu.CV.CvEnum.LineType.EightConnected, int shift = 0)
 {
     // No change needed, just wrapping to complete the api
     CvInvoke.Circle(img, center, radius, color.ToMCvSCalar(), thickness, lineType, shift);
 }
Example #3
0
 /// <summary>
 /// Draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image or ROI rectangle. For non-antialiased lines with integer coordinates the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering.
 /// </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>
 /// <param name="thickness">Line thickness. </param>
 /// <param name="lineType">Type of the line:
 /// 8 (or 0) - 8-connected line.
 /// 4 - 4-connected line.
 /// CV_AA - antialiased line.
 /// </param>
 /// <param name="shift">Number of fractional bits in the point coordinates</param>
 public static void Line(IInputOutputArray img, Point pt1, Point pt2, MCvScalar color, int thickness = 1, Emgu.CV.CvEnum.LineType lineType = Emgu.CV.CvEnum.LineType.EightConnected, int shift = 0)
 {
     // No change needed, just wrapping to complete the api
     CvInvoke.Line(img, pt1, pt2, color, thickness, lineType, shift);
 }