Edge Detection with Lockbits C#
问题 I made a program that implements an edge detection algorithm, but it takes a long time to process. I've read about using lockbits, and unsafe state instead of getpixel and setpixel, but I still don't understand how to use it. This is my example code: private Bitmap SobelEdgeDetect(Bitmap original) { Bitmap b = original; Bitmap bb = original; int width = b.Width; int height = b.Height; int[,] gx = new int[,] { { -1, 0, 1 }, { -2, 0, 2 }, { -1, 0, 1 } }; int[,] gy = new int[,] { { 1, 2, 1 }, {