Beispiel #1
0
 private static void Imencode(string extension, IInputArray image, VectorOfByte buffer, params int[] parameters)
 {
     using (CvString cvString = new CvString(extension))
     {
         using (VectorOfInt intVector = new VectorOfInt())
         {
             if (parameters != null && parameters.Length > 0)
             {
                 intVector.Push(parameters);
             }
             using (InputArray array = image.GetInputArray())
             {
                 cveImencode(cvString, array, buffer, intVector);
             }
         }
     }
 }
 private static void Imencode(string extension, IInputArray image, VectorOfByte buffer, params int[] parameters)
 {
     using (CvString cvString = new CvString(extension))
     {
         using (VectorOfInt intVector = new VectorOfInt())
         {
             if (parameters != null && parameters.Length > 0)
             {
                 intVector.Push(parameters);
             }
             using (InputArray array = image.GetInputArray())
             {
                 cveImencode(cvString, array, buffer, intVector);
             }
         }
     }
 }
 public static void DrawText(IInputOutputArray image,
                             string text,
                             Point position,
                             FontFace fontFace,
                             double fontScale,
                             MCvScalar color,
                             int thickness         = 1,
                             LineType lineType     = LineType.EightConnected,
                             bool bottomLeftOrigin = false)
 {
     using (CvString cvString = new CvString(text))
     {
         using (InputOutputArray array = image.GetInputOutputArray())
         {
             cvePutText(array, cvString, ref position, fontFace, fontScale, ref color, thickness, lineType, bottomLeftOrigin);
         }
     }
 }
 public static void DrawText(IInputOutputArray image,
     string text,
     Point position,
     FontFace fontFace,
     double fontScale,
     MCvScalar color,
     int thickness = 1,
     LineType lineType = LineType.EightConnected,
     bool bottomLeftOrigin = false)
 {
     using (CvString cvString = new CvString(text))
     {
         using (InputOutputArray array = image.GetInputOutputArray())
         {
             cvePutText(array, cvString, ref position, fontFace, fontScale, ref color, thickness, lineType, bottomLeftOrigin);
         }
     }
 }