Hi, I'm trying to do some ocr by myself in C#. I originally come from Java and this is my first "project" with C#
So I know, how you can make different ColorMatrizes to draw a processed bitmap in your application. I also do have those, but I want to use the processed picture to better analyze a picture.
Those are my methods to get a ImageAttribute
public static ImageAttributes ToGrayscale(Bitmap b)
public static ImageAttributes ToNegative(Bitmap b)
public static ImageAttributes ToSepia(Bitmap b)
public static ImageAttributes SetBrightness(Bitmap b, float Brightness)
public static ImageAttributes SetContrast(Bitmap b, float Contrast)
This is my method to draw it
Graphics g = this.CreateGraphics();
g.DrawImage(bmp,new Rectangle(0, 0, bmp.Width, bmp.Height),
0, 0, bmp.Width, bmp.Height,
GraphicsUnit.Pixel, ImageAnalysis.ToGrayscale(bmp));
g.Dispose();
This is what I want:
FindLines( setConrast(toGrayscale(bmp),200) )
But I found no method to save the changes permanently to bitmap object. Maybe someone did this before and can help me