1

Trying to convert this OpenCV java code over to C#. OpenCV Android Background Subtraction

Mostly working but am stumbling on this line

bmp = Bitmap.createBitmap(mFGMask.cols(), mFGMask.rows(), Bitmap.Config.ARGB_8888);
Utils.matToBitmap(mFGMask, bmp);

So there apparently is no createBitmap method. Can any C# experts suggest how I might properly convert the above?

Community
  • 1
  • 1
Bachalo
  • 6,965
  • 27
  • 95
  • 189
  • Have a look at http://stackoverflow.com/questions/6782489/create-bitmap-from-a-byte-array-of-pixel-data – Eric J. Sep 01 '15 at 18:13

1 Answers1

1

You can use System.Drawing.Bitmap class for creating bitmaps.

If you want to remove background (if I understood correctly), consider these useful links:

Community
  • 1
  • 1
Reza Aghaei
  • 120,393
  • 18
  • 203
  • 398