Garbage Collector too slow when working with large images
问题 I am using Emgu OpenCV to grab images from a webcam and want to visualize them with WPF Image Control. So I need to convert the image from Mat to something compatible with Image control. So I took this class from the Emgu examples: public static class BitmapSourceConvert { /// <summary> /// Delete a GDI object /// </summary> /// <param name="o">The poniter to the GDI object to be deleted</param> /// <returns></returns> [DllImport("gdi32")] private static extern int DeleteObject(IntPtr o); ///