最終更新:2021-11-17 (水) 16:21:35 (17d)  

OpenCvSharp.Mat
Top / OpenCvSharp.Mat

  • Mat mat1 = new Mat(100, 200, MatType.CV_64FC1?);
  • Mat mat1 = new Mat(100, 200, MatType.CV_8UC3, new Scalar(255, 255, 255)););
  • Mat mat2 = new Mat("hoge/fuga/piyo.png");

プロパティ

crop

  • var barcode = new Mat(image, biggestContourRect); //Crop the image

OpenCvSharp/描画

OpenCvSharp.ImreadModes?

  • ImreadModes.Color?
  • ImreadModes.GrayScale?

OpenCvSharp.MatType

一部をコピー

  • var partialClone = src.Clone(new Rect(100, 100, 200, 150));

バイト配列にコピー

  • var Mat = new Mat();
    var bytes= new byte[mat.Total()];
    Marshal.Copy(mat.Data, bytes, 0, bytes.Length);

関数

派生クラス

OpenCvSharp.MatOfByteMatType.CV_8UC1?
OpenCvSharp.MatOfByte3?MatType.CV_8UC3OpenCvSharp.Vec3b?
OpenCvSharp.MatOfDouble?
OpenCvSharp.MatOfDouble3?
OpenCvSharp.MatOfInt?
OpenCvSharp.MatOfFloat?
OpenCvSharp.MatOfPoint?
OpenCvSharp.MatOfUShort?

関連

参考