Color colorValue=image.GetPixel(x,y); var averageValue = ((int)colorValue.R + (int)colorValue.B + (int)colorValue.G)/3; // get the average for black and white int threshold=averageValue * 0.9;
double averageValue = ((double)colorValue.R + (double)colorValue.B + (double)colorValue.G)/3d; // get the average for black and white int threshold=(int)(averageValue * 0.9d);
thresholdvec[x][y]=threshold;
double [] thresholdvec;
double [][] thresholdvec;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)