private static List <TextBlock> ProcessHorizontalLines(GrayImage image, uint[] vertical) { List <TextBlock> textBlocks = new List <TextBlock>(); List <SplitMultiLines.Line> textLines = SplitMultiLines.SplitProjectDensity(vertical); for (int i = 0; i < textLines.Count; i++) { var density = Projection.ProjectSubImageOnHorizontalLine(image, textLines[i]); textBlocks.AddRange(HorizontalTextProjection.FindAllTextBlock(image, density, textLines[i], i)); } return(textBlocks); }
private static List <TextBlock> ProcessVerticalLines(GrayImage image, uint[] horizontal) { List <TextBlock> textBlocks = new List <TextBlock>(); List <SplitMultiLines.Line> textLines = SplitMultiLines.SplitProjectDensity(horizontal); textLines.Reverse(); //Japanese column is going from right to left for (int i = 0; i < textLines.Count; i++) { var density = Projection.ProjectSubImageOnVerticalLine(image, textLines[i]); textBlocks.AddRange(VerticalTextProjection.FindAllTextBlock(image, density, textLines[i], i)); } return(textBlocks); }