Esempio n. 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);
             }
         }
     }
 }
Esempio n. 3
0
 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);
         }
     }
 }
Esempio n. 4
0
 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);
         }
     }
 }