public MatrixSplitter(FileStream stream) { var matrix = new ImageMatrix(new Bitmap(Image.FromStream(stream))); var clearer = new BlurClearer(matrix); clearer.ClearShadows(); textMatrix = matrix.GetSubMatrix(new MatrixTools(matrix).FindTextSubmatrix()); }
private SubMatrix GetClearedTextMatrix(ImageMatrix matrix) { var clearer = new BlurClearer(matrix); clearer.ClearShadows(); //overkill //clearer.ClearSingleLineBlurHorizontal(); //clearer.ClearSingleLineBlurVertical(); return(matrix.GetSubMatrix(new MatrixTools(matrix).FindTextSubmatrix())); }
private void PrepareImage() { workMatrix = new ImageMatrix(new Bitmap(Image.FromFile(simplePageUrl))); BlurClearer clearer = new BlurClearer(workMatrix); clearer.ClearShadows(); MatrixTools tools = new MatrixTools(workMatrix); matrix = workMatrix.GetSubMatrix(tools.FindTextSubmatrix()); }
private void ClearPicture(ImageMatrix matrix) { var clearer = new BlurClearer(matrix); clearer.ClearShadows(); }