Beispiel #1
0
 ///<summary> Draw a Circle of the specific color and thickness </summary>
 ///<param name="circle"> The circle to be drawn</param>
 ///<param name="color"> The color of the circle </param>
 ///<param name="thickness"> If thickness is less than 1, the circle is filled up </param>
 /// <param name="lineType">Line type</param>
 /// <param name="shift">Number of fractional bits in the center coordinates and radius value</param>
 public override void Draw(CircleF circle, TColor color, int thickness = 1, CvEnum.LineType lineType = CvEnum.LineType.EightConnected, int shift = 0)
 {
     base.Draw(
         new CircleF(MapPointToImagePoint(circle.Center), circle.Radius / Resolution.X),
         color,
         thickness, lineType, shift);
 }
Beispiel #2
0
 internal static extern void cveDrawWireframe(
     IntPtr img,
     IntPtr pts2d,
     IntPtr tris,
     ref MCvScalar color,
     CvEnum.LineType type,
     [MarshalAs(CvInvoke.BoolMarshalType)] bool cullBackface);
Beispiel #3
0
 /// <summary>
 /// Draw a wireframe of a triangle mesh
 /// </summary>
 /// <param name="img">The output image</param>
 /// <param name="pts2d">The 2d points obtained by projectPoints</param>
 /// <param name="tris">Triangle face connectivity</param>
 /// <param name="color">Line color</param>
 /// <param name="type">Line type</param>
 /// <param name="cullBackface">Enable back-face culling based on CCW order</param>
 public static void DrawWireframe(
     IInputOutputArray img,
     IInputArray pts2d,
     IInputArray tris,
     MCvScalar color,
     CvEnum.LineType type = LineType.EightConnected,
     bool cullBackface    = false)
 {
     using (InputOutputArray ioaImg = img.GetInputOutputArray())
         using (InputArray iaPts2d = pts2d.GetInputArray())
             using (InputArray iaTris = tris.GetInputArray())
             {
                 cveDrawWireframe(ioaImg, iaPts2d, iaTris, ref color, type, cullBackface);
             }
 }
Beispiel #4
0
 /// <summary>
 /// Draw the text using the specific font on the image
 /// </summary>
 /// <param name="message">The text message to be draw</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="bottomLeft">The location of the bottom left corner of the font</param>
 /// <param name="color">The color of the text</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 override void Draw(String message, Point bottomLeft, CvEnum.FontFace fontFace, double fontScale, TColor color, int thickness = 1, CvEnum.LineType lineType = CvEnum.LineType.EightConnected, bool bottomLeftOrigin = false)
 {
     base.Draw(message, MapPointToImagePoint(bottomLeft), fontFace, fontScale, color, thickness, lineType, bottomLeftOrigin);
 }
Beispiel #5
0
 /// <summary>
 /// Draw a line segment in the map
 /// </summary>
 /// <param name="line">The line to be draw</param>
 /// <param name="color">The color for the line</param>
 /// <param name="thickness">The thickness of the line</param>
 /// <param name="lineType">Line type</param>
 /// <param name="shift">Number of fractional bits in the center coordinates and radius value</param>
 public override void Draw(LineSegment2DF line, TColor color, int thickness, CvEnum.LineType lineType = CvEnum.LineType.EightConnected, int shift = 0)
 {
     base.Draw(new LineSegment2DF(MapPointToImagePoint(line.P1), MapPointToImagePoint(line.P2)), color, thickness, lineType, shift);
 }