Image processing method

Abstract: According to the present invention, between two adjacent top points in the convex hull, a pixel inside of and with nearest distance from the line connecting the top points is successively put, from one top point to the other.

Description: In the case of recognizing a hand-written character "R" as shown in Fig. 1, the concavities C1 and C2 and the hole H will be the key points for recognition. It will be understood that the concavities, convexities and holes are important characteristics of a configuration. For extracting these characteristics, for example, a convex hull of a configuration is generated and the original configuration is subtracted from the convex hull. However, in a digital image, the convex hull cannot always be precisely generated. In a digital image, the convex hull is generated by connecting top points successively with lines and by filling the inside of the lines. However, the line in the digital image differs according to the algorithm of line drawing. Thus a one dot deviation may easily occur since an analogue line does not necessarily pass through the center of a digital pixel. When a pixel is selected, as a pixel on the convex hull which differs considerably from the analogue convex hull, the configuration generated by the subtraction of the original image from the convex hull does not correctly represent the characteristics of the character. Usually a digital line is drawn by a graphic processor, i.e according to the algorithm of a processor. When the convex hull is not drawn in a precise manner, the analysis after the above subtraction cannot be well performed. In PROCEEDINGS OF THE FALL JOINT COMPUTER CONFERENCE, San Francisco, California, 9th - 11th December 1968, (AFIPS Conf. Proceedings, vol. 33), pages 1125-1138; J.H. MUNSON: "Experiments in the recognition of hand-printed text: Part 1 - Character recognition", it is suggested, in order to recognise hand-printed character, to generate a convex hull boundary (CHB round the character, whereby this is achieved by determining all extremal points of the character image and connecting thes extremal points by straight lines, whereby a straight line between two extremal points follows as straight as possible a theoretical straight line between the two extremal points but never falls outside of that theoretical straight line. After the CHB is obtained, concavities and enclosures of the character image are found by using appropriate computer routines. In COMP. GRAPH. & IMAGE PROC., vol. 9, no. 2, February 1979, pages 183 - 195, Academic Press Inc.; R.L.T. CEDERBERG: "A new method for vector generation", referring to the Bresenham algorithm, an algorithm for the computation of constants in an equation determining the smoothest digital representation of a straight line is presented. In particular it is suggested to approximate a theoretical straight line by first determining a basic chain code group approximating a portion of the straight line and then to repeat the found basic chain code group in accordance with the length of the straight line to be approximated. It is therefore the object of the present invention to provide an improved method for recognising a configuration by which it is possible to generate a representation of a convex hull boundary of the configuration which, in between two extremal pixels, follows as straight a path as possible while never falling outside the theoretical straight line connecting the extremal pixels. This object is solved by the subject-matter defined in the characterising part of claim 1. A preferred embodiment of the present invention is explained in the following with regard to the accompanying drawings, whereby the drawings show: Fig. 1 - a hand-written character "R"; Fig. 2 - an illustration of the definition of a chain code; Fig. 3 - a diagram showing a concavity of a configuration; and Fig. 4 - an illustration of the 4 quadrants of an image As shown in Fig. 2, a pixel in a digital image has 8 peripheral pixels, so there are 8 directions from one pixel to an adjacent pixel. These directions are represented by Freeman's chain codes, from "0" to "7". A chain code string represents a continuous train of pixels as well as the deviation of each pixel from a line. Fig. 3 shows a concavity of a configuration consisting of extremal points a and b on the convex hull and boundary pixels from C1 to C9. A reference line ℓ is drawn for representing an analogue convex hull. The digital convex hull should never fall outside of the theoretical line ℓ and it should follow the theoretical line ℓ as closely as possible. The respective pixels are selected continuously and successively from one extremal point, for example the point a, to the other. Pixel order may be clockwise or anticlockwise. The anticlockwise order is applied in the following description. A chain code to be given to the extremal point a is "4" or "5" and cannot be other codes. The pixel d' indicated by "4" is nearer than the pixel dl indicated by "5" to the line ℓ. However, the pixel d′ is outside of the line ℓ. Therefore the pixel d1 is selected as a pixel adjacent to the extremal point a for generating the convex hull. In the same manner, pixels from d2 to d8 are continuously and successively selected until extremal point b is reached. The line ℓ is defined by the coordinates of the extremal points a and b. The distance between the line ℓ and each pixel of d1 to d8 is defined by the chain code train given to the pixels from d1 to d8. The inclination of angle ϑ of the line is defined by the coordinates of the extremal points a and b. The distance between the line ℓ and each pixel of d1 to d8 is defined by the inclination angle ϑ and the chain code train. The distance Δ between the line ℓ and the pixel d1 is calculated when the chain code is "5" as follows; Δ = (δ/sin 45°)sin(45° - ϑ) = -δ(sinϑ - cosϑ) where, δ is the width of a pixel as well as the distance between vertically or horizontally adjacent pixels; Δ becomes negative when the pixel is outside of line ℓ. The value Δ for the pixels after the pixel d1 gives distance increase or decrease. When the value Δ for d1 is Δd1 and for d2 Δd2, the distance between the line and the pixel d2 is (Δd1 + Δd2). The value Δ for each chain code may be calculated beforehand. The pixels are selected in a manner that the distance becomes a minimum, and never becomes negative. A configuration can be divided into four quadrants, from the first to the fourth. When upper end pixels of the configuration in Fig. 4 are designated P0 and P7, lower end pixels P3 and P4, left end pixels P1 and P2 and right end pixels P5 and P6, in each of the areas, from P0 to P2, from P2 to P4, from P4 to P6, and from P6 to P0, the distance increase or decrease is defined only by the chain code. The area P0 to P2, P2 to P4, P4 to P6 and P6 to P0 are now called the first, second, third and fourth quadrant, respectively. The distance increase or decrease in each quadrant is shown is Table 1. In Table 1, the inclination ϑ of the line is measured anticlockwisely from a horizontal line and δ designates the distance between horizontally or vertically adjacent pixels. In Fig. 3, distances from the line 1 to pixels of d1 to d8 are calculated as follows; d1: -δ(sinϑ-cosϑ) d2: -δ(sinϑ-cosϑ)-δsinϑ d3: -δ(sinϑ-cosϑ)-2δsinϑ d4: -δ(sinϑ-cosϑ)-3δsinϑ d5: -δ(sinϑ-cosϑ)-4δsinϑ d6: -δ(sinϑ-cosϑ)-5δsinϑ d7: -δ(sinϑ-cosϑ)-6δsinϑ d8: -δ(sinϑ-cosϑ)-7δsinϑ The distance increase or decrease in Table 1 can be easily calculated beforehand when ϑ is determined. Therefore. the trigonometric calculation is not necessary for each pixel.

Claims: Method for recognizing a configuration which has been pixelwise stored in an image processing device, said method comprising generating chain code train segments for describing a convex hull boundary, CHB, of the configuration, said generation including the steps of: determining extremal pixels of the figure which are common with the CHB, calculating straight lines between all adjacent extremal pixels, approximating each straight line by a line defined by a chain code train segment, said line following said straight line as closely as possible but never falling outside the area between said straight line and the configuration, characterised in that the selection of each single chain code element of a chain code train section is achieved by calculating the distance between the respective straight line and the top point of the line as defined by the latest chain code element of the elements of the chain code train section which have already been selected and selecting the next chain code element under the criterion of minimization of said distance. Method according to claim 1, whereby the distance increment or decrement caused by each different chain code element is calculated before a chain-code-train-section is generated. Method according to claim 1 or 2 whereby said calculating includes calculating the inclination angle of the straight line.

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: G06K9, G06T11