Image processing method

Abstract: An image processing method for finding concavity of a configuration comprising steps; arranging boundary pixels of the configuration according to chain order with indicating top points on convex hull of the configuration; and determining that a concavity is defined by the boundary pixels when a boundary pixel of a chain code is found, which chain code indicates a concavity.

Description: The present invention relates to a method for concavity detection of a configuration represented by pixels. A handwritten character may be recognized according to the amount and location of concavity and enclosures existing within its configuration. To determine any existing concavity of a configuration it is known and for example described in John H. Munson, "Experiments in the recognition of hand-printed text" to generate a so-called convex hull boundary (CHB) for the respective configuration. The CHB of a two-dimentional figure may be thought of as the outline of a rubber band stretched around the figure. In the case of a quantisized figure, some arbitrariness is required in the specification of the CHB, because a straight line between two points on the image grid does not generally fall on exact grid locations. In the above mentioned document, it is therefore suggested to first locate extremal points of the character image to be identified and to connect these extremal points by a pixel line which follows as close as possible the theorectical straight line between the two extreme points but never falls thereby outside of this theorectical straight line. After the CHB is obtained, the concavity and enclosures of the character image are found by using suitable computer routines. In view of the above it is the object of the present invention to provide an improved method for detecting such concavities. This object is solved by the subject matter of claim 1. Preferred embodiment of the present invention will be described in connection with reference to the accompanying drawings, in which, Figures 1 shows an image configuration comprising several concavities, Figure 2 shows a table of data of boundary pixels of a configuration be processed; Figure 3 is an illustration of a rule employed by the preferred embodiment; Figure 4 shows a portion of the image configuration; Figure 5 shows a further portion of a configuration including concavities; Figure 6 shows an inclined line connecting two adjacent top points of a convex hull; and Figure 7 illustrates a method for generating the convex hull. Fig. 1 shows a configuration including concavities A, B, C, D and E, hatched. A horizontal rectangle R circumscribed about the configuration is shown, as well. The configuration is divided into quadrants from first to fourth by the rectangle R. On tracing boundary pixels of the configuration, boundary pixels from upper side left contact point to left side lower contact point belong to the first quadrant, boundary pixels from left side lower contact point to lower side right contact point belong to the second quadrant, boundary pixels from lower side right contact point to right side upper contact point belong to the third quadrant, and boundary pixels from right side upper contact point to upper side left contact point belong to the fourth quadrant. The number of first to fourth may be changed as far as they are defined according to predetermined rule. Anyway, the information concerning quadrant is important for the processing below. A table in Fig. 2 is generated, which includes informations of boundary pixels arranged in chain code order; whether they are top points on convex hull; x- and y-coordinates thereof; to which quadrant the points belong. In Fig. 2, top points on convex hull are indicated by Y or N, Y means top points and N means not. Figs from 3(a) to 3(d) show the relationship between the quadrant and the chain code. Fig. 3(a) shows chain codes of boundary pixels in the first quadrant but not in a concavity. Fig. 3(b) shows chain codes of boundary pixels in the second quadrant but not in a concavity. Fig. 3(c) shows chain codes of boundary pixels in the third quadrant but not in a concavity. Fig. 3(d) shows chain codes of boundary pixels in the fourth quadrant but not in a concavity. It will be understood from Figs 3(a) to 3(d) that chain code other than from 4 to 6 in the first quadrant indicates a concavity, chain code other than from 6 to 0 in the second quadrant indicates a concavity, chain code other than from 0 to 2 in the third quadrant indicates a concavity, and chain code other than from 2 to 4 in the fourth quadrant indicates a concavity. In the case that no chain code indicating concavity can be found, the following processing is necessary. In Fig. 4, top points P1 and P2 on the convex hull are found. The inclination of the line l connecting P1 and P2 is calculated. The inclination is 5/7=0.714 and the inclination angle ϑ is 35.5 deg. Then boundary pixels are traced from P1 to P2. The distances between the line l and the boundary pixels are evaluated. For calculating the distance, a relationship between the chain code and distance increment Δd is calculated in advance. The distance increment Δd of boundary pixels traced are integrated so as to calculate a distance between the line l and the boundary pixel just traced. As for the configuration in Fig. 4, the relationship is shown in the following Table 1. In Table 1, Δd is defined as positive when it has inward direction from the line l. The boundary pixels from Pb1 to Pb7 between P1 and P2 have distances from the line l, as shown in Table 2. The distances are calculated by the integration of Δd as described above. Here, a rule is applied that boundary pixels between adjacent top points define a concavity when one or more boundary pixels have distance not less than "1" from the line connecting the top points. In Table 2, the pixel Pb6 has distance of "1.135". On tracing boundary pixels from Pb1 toward Pb7, it is found first on the point Pb6 that the boundary pixels define concavity. By counting number of boundary pixels from Pb1 to Pb7 on tracing them, the inner peripheral length of a concavity is calculated. If it is found that the boundary pixels do not define a concavity, the counted value is canceled. The chord length of a concavity is calculated by calculating distance between top points P1 and P2. The distance is calculated by the x- and y-coordinates of P1 and P2. Concavity ratio is calculated from the inner peripheral length, chord length of a concavity and peripheral length of the configuration, as follows. Concavity ratio=(inner peripheral length)/{(peripheral length)x(chord length)} Fig. 5 shows another configuration to be processed. The configuration has boundary pixels from Pb1 to Pb9 between top points P1 and P2. The distances of each boundary pixel from the line l connecting P1 and P2 are shown in Table 3. The inclination of line l is 6/5=1.20, and the inclination angle ϑ is 50.2 deg. In Table 3, Pb2 has a distance more than "1", Pb3 has a distance less than "1", and Pb4 has a distance more than "1" again. In this case, concavity may be defined in two manners. In the first manner, one concavity is defined by the boundary pixels from Pb1 to Pb9. In the second manner, two concavities are defined, that is, one concavity is defined by the boundary pixels from Pb1 to Pb3 and the other concavity is defined by the boundary pixels from Pb4 to Pb9. Table 1 shows distance increment in the first quadrant. The following Table 4 shows distance increment in the quadrants from the second to the fourth. The inclination angle ϑ is defined for each quadrant as shown in Fig. 6. In the above rule, a concavity is defined when one or more boundary pixels has distance not less than "1". Such distance may be another value, for example "2" considering noises. In a practical processing of concavities, data in Table 2 is successively read out, distances are calculated with integrating distance increment, simultaneously the chain codes are evaluated according to the rule shown in Fig. 3. When the integrated value reaches predetermined value or the chain code becomes a value other than the value shown in Fig. 3, a concavity is found. By counting boundary pixels on tracing, inner peripheral length is simultaneously calculated. The chord length is obtained by calculating distance between top points. As for generating an exact convex hull, the inventor invented the following image processing method, which is filed with the European Patent Office with the application No. 89101572.9 published as EP-A-0 380 721. Fig. 7 shows two adjacent top points a and b on convex hull as well as boundary pixels C1 to C9 therebetween. Top points a and b are connected with a line I for defining an inclination from a to b. For generating convex hull, continuous pixel train is generated from a to b. Each pixel of the train is inside of the line as well as the nearest pixel among pixels continuous to the previous pixel on the train. In this case, the pixel train is generated anti-clockwisely. Clockwise pixel train may also be applied. The chain code of each pixel of the chain code train is limited to be "4" or "5". The pixel d′ of chain code "4" next to a is nearer than the pixel d1 of chain code "5". However the pixel of chain code "4" is outside of the line 1. Then the pixel d1 is selected. Thereafter, pixels inside of the line 1 as well as nearest to the line I among the pixels continuous to the previous pixel on the pixel train. The pixels from d2 to d8 are to be selected. The convex hull is exactly generated by the method above. When each pixel of the pixel train generated are indexed by a specified density or any other index, the chord length is defined by the number of indexed pixels. In the configurations generated by subtraction of the original image from the convex hull, the number of boundary pixels without index defines the inner peripheral length of concavity.

Claims: Method for concavity detection of an image configuration represented by pixels comprising the steps of: determining boundary pixels of the image configuration that are common with a convex hull boundary (CHB) of the image configuration to be top points, determining border pixels among the boundary pixels which define a rectangle circumscribing the image configuration, by which rectangle boundary pixels located between different ones of those border pixels are allocated to different regions of orientation; generating a Freeman chain-code train describing the peripheral of the image configuration as defined by its boundary pixels; and considering a chain-code train section between two adjacent top points as to define a concavity if said chain-code train section comprises other than certain chain codes predefined by the region of orientation to which the boundary pixels described by said chain-code train section belong. Method according to Claim 1 wherein said border pixels are the lowest, the leftmost, the rightmost and the uppermost pixel of the image configuration in respect to a predetermined system of orientation. Method according to Claim 2 wherein the certain chain codes are 4, 5, 6 for chain-code train sections representing boundary pixels between the uppermost and leftmost boundary pixel, 6, 7, 0 for chain-code train sections representing boundary pixels between the leftmost and the lowest boundary pixel, 0, 1 or 2 for chain-code train sections representing boundary pixels between the lowest and the rightmost boundary pixel, and 2, 3, 4 for chain-code train sections representing boundary pixels between the rightmost and the uppermost boundary pixel. Method according to one of the preceeding claims wherein in case that a chain-code train section between two adjacent top points does not indicate a concavity the following steps are executed: calculating the inclination angle of a line connecting the two adjacent top points; generating a chain-code train section describing the respective boundary line between said top points, whereby the distance of each boundary pixel described by the chain-code train section to the connecting line is approximated by the sum of the precalculated-inclination-angle-dependent distance increments which are added by all chain-code elements representing boundary pixels between the top point from which the chain-code train section starts and the boundary pixel of which the distance is currently calculated; and detecting whether any boundary pixel described by the chain-code train section has a distance greater than a predetermined value, indicating the existence of a concavity between said two top points.

Inventors: KUMAGAI RYOHEI C O EZEL INC, KUMAGAI, RYOHEI C/O EZEL INC.
Applicants: EZEL INC, SHARP KK, EZEL INC.
Application year: 1989
Main classification: G06K9
IPC codes: G06T7, G06K9