摘要 |
<p>PURPOSE:To correctly perform a black/white inversion processing and a ruled line get-over processing by moving a starting point and following up a contour from a moved starting point again when the contour reaches the end of an input image. CONSTITUTION:A variable (p) storing the coordinate in x-axis of a segmentation starting point, a variable indicating the number of columns replaced with white picture elements and a flag value indicating that the entire image buffer is inverted are set to zero, and the first column of the image buffer is replaced with the white picture elements to perform the segmentation by means of a contour follow-up. Characters are segmented by means of the contour follow-up from the center all of the left end of the image buffer toward the right direction. The contour line follow-up is performed from a point at which a black picture element is first hit, and a rectangle given by the minimum value (x1, y1) and the maximum value (x2,y2) of the contour line coordinates is regarded as an area for one character. The z-coordinate value is substituted for the variable (p) every time the profile line follow-up is started. In order to segment the following character, the picture elements are checked and processed rightward from a position a2 obtained from the following formulas: x=x2, y=(y1+y2)/2.</p> |