Improving performance while dealing with Bitmaps using Unsafe code
Since I'm working on my graduation project ( Iris recognition system ) using C#, I got involved in building the basic methods of image processing such as: image enhancement, convert to gray, convolutions, edge detectors etc... , so I have to reach every single pixel of the Bitmap image, but when dealing with .NET Framework embedded methods; getPixel(), setPixel(), it takes about 4 seconds only to convert an image to gray (this is unacceptable because many steps of convolutions, filters should be applied before I can get the needed information) so after a while I found a new way: fast and efficient, it's the unsafe code which deals directly with the memory but at the same time it is under the control of the CLR ,for more information visit:
Unsafe code programing in C# (Code Project)
Painless yet unsafe grayscale conversion in C# (Code Project)
I'll post more implementations for image processing in C# soon.