Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Emgu.CV.Mat"/> class from NSImage
 /// </summary>
 /// <param name="mode">The color conversion mode. By default, it convert the UIImage to BGRA color type to preserve all the image channels.</param>
 /// <param name="nsImage">The NSImage.</param>
 public UMat(NSImage nsImage, ImreadModes mode = ImreadModes.AnyColor)
     : this()
 {
     using (CGImage cgImage = nsImage.CGImage)
     {
         CvInvoke.ConvertCGImageToArray(cgImage, this, mode);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Emgu.CV.Mat"/> class from CGImage
 /// </summary>
 /// <param name="mode">The color conversion mode. By default, it convert the UIImage to BGRA color type to preserve all the image channels.</param>
 /// <param name="cgImage">The CGImage.</param>
 public UMat(CGImage cgImage, ImreadModes mode = ImreadModes.AnyColor)
     : this()
 {
     CvInvoke.ConvertCGImageToArray(cgImage, this, mode);
 }