opencvsharp4 BitmapConverter Bitmap cannot be changed. [closed]
OpenCvSharp.Extensions.BitmapConverter bug?
Bitmap liveBitmap = ImageProcessingUtility.ConvertTo32(new Bitmap("Live.bmp"));
Bitmap captureBitmap = ImageProcessingUtility.ConvertTo32(new Bitmap("Capture.bmp"));
Mat liveImage = BitmapConverter.ToMat(liveBitmap);
Mat captureImage = BitmapConverter.ToMat(captureBitmap);
Mat liveRverseImage = new Mat(liveImage.Size(), liveImage.Type());
Mat captureRverseImage = new Mat(captureImage.Size(), captureImage.Type());
Cv2.BitwiseNot(liveImage, liveRverseImage);
Cv2.BitwiseNot(captureImage, captureRverseImage);
liveRverseImage.SaveImage("livebmp.bmp"); // Image saving success
captureRverseImage.SaveImage("cpaturebmp.bmp"); // Image saving success
Bitmap liveReverseBitmap = BitmapConverter.ToBitmap(liveRverseImage);
Bitmap captureReverseBitmap = BitmapConverter.ToBitmap(captureRverseImage);
liveReverseBitmap.Save("liveReverseBitmap.bmp"); // Failed to save image.
captureReverseBitmap.Save("captureReverseBitmap.bmp"); // Failed to save image.
result
we cannot help with 3rdparty c# wrappers, and opencv does not have a "BitmapConverter"