Image processing method and apparatus therefor

Abstract: The image processing device finds core linear segments of a linework image by thinning processing; provides a mask area for each end point of the linear segments; integrates the mask areas overlapping with each other into a sum area; with respect to each sum area, finds effective linear segments which have only one end point within each sum area; and judges a feature point in each sum area according to the number of the effective linear segments. Therefore, the device is advantageous in that the feature points are classified more accurately because the linear segments irrelevant to judging the feature points (such as those produced due to distortion and line missing) can be eliminated in the judgment. It is also advantageous in that the data amount to be handled is small and classifying is completed at a high speed since the feature points are classified after vectorization of raster data.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an image processing method and apparatus therefor for classifying feature points existing in an image. Description of the Related Art As shown in Fig. 1, linework images generally have several types of feature points such as an open-end point P1, a connection point P2, and a branch point P3. According to the related art, the feature points of a linework image are classified into these types as follows: Firstly the linework image including several linear segments represented by raster data is thinned through thinning processing or core-line formation processing, whereby vector data is obtained representing thinned linear segments of respective parts of the linework image. Each thinned linear segment usually has a width of one pixel. Secondly end points of the thinned linear segments are detected. Then a certain mask area of a predetermined size is applied at each end point. Finally the end point is classified as an N-branch point, where N is an integer, when the mask area includes N pieces of thinned linear segments which have only one end point within the mask area. Fig. 2A shows a T-shaped linework image, and Fig. 2B shows its thinned linear segments. Linear segments V1, V4, and V5 have only one end point within a mask area MA, and other linear segments V2 and V3 have their both end points within the mask area MA. According to the above method of classification, therefore, the true point in the mask area MA is recognized as a 3-branch point. In the vicinity of a branch point p3 and a connection point p2, however, a line missing (Fig. 3A) and a protrusion (Fig. 3B) occasionally occurs, and these deformations lead to unsuccessful classifying of the feature points, unless the length and the width of the mask area MA is suitable for the linework images. The same problems occur when a distortion or a break in an image is produced in the process of vectorization of the raster data through the thinning processing or core-line formation processing. For example, in the case of the T-shaped figure explained above (Fig. 2A), some distortion occurs in the vicinity of the 3-branch point Pa, through the thinning processing. In the case of the arrow-shaped figure shown in Fig. 4A, in the process of drawing a core line between outlines (Fig. 4B), a line missing occurs in the vicinity of a 3-branch point Pb as shown in Fig. 4C. Such distortion and line missing may result in incorrect classifying of the feature points. PATTERN RECOGNITION vol. 21, no. 5, 1988, ELMSFORD, NY, USA, pages 525 - 537, D. D. KERRICK AND A. C. BOVIK, 'MICROPROCESSOR-BASED RECOGNITION OF HANDPRINTED CHARACTERS FROM A TABLET INPUT' discloses to "logically" join all endpoints lying within a threshold distance of one another and to remove these endpoints from consideration as features. A concept of producing a sum area and counting the number of linear segments with only one endpoint of them in the sum area is not disclosed. From VDE-FACHBERICHTE 35: MUSTERERKENNUNG 1983; VORTRÄGE DES 5. DAGM-XYMPOSIUMS, VDE-VERLAG BERLIN/OFFENBACH DE October 1983, KARLSRUHE DE, pages 161 - 166, W. DOSTER AND R. OED 'ZUR BILDANALYSE BEI DER HANDSCHRIFTLICHEN DIREKTEINGABE' it is known to produce and merge rectangular areas around handwritten linear segments for identifying a handwritten word comprising these linear segments. SUMMARY OF THE INVENTION An object of the present invention is to resolve the above-described problems and, based on the vectorized linear segments, to facilitate easy and accurate classifying of the feature points existing in an image. The present invention is directed to an image processing apparatus for finding and classifying feature points existing in a linework image comprising: (a) linear segment detecting means for detecting linear segments representing core parts of the linework image by thinning processing, to thereby produce vector data representing the linear segments; (b) mask area establishment means for establishing mask areas for respective end points of the linear segments; (c) sum area production means for producing a sum area of the mask areas overlapping with each other; (d) set finding means for, with respect to each of the sum areas, finding a set of effective linear segments which have only one end point within each of the sum areas; and (e) feature point classifying means for classifying the feature points in each of the sum areas according to the number of elements of the set. The present invention is further directed to an image processing method for finding and classifying feature points existing in a linework image comprising: (a) detecting linear segments representing core parts of the linework image by thinning processing, to thereby producing vector data representing the linear segments; (b) establishing mask areas for respective end points of the linear segments; (c) producing a sum area of the mask areas overlapping with each other; (d) with respect to each of the sum areas, finding a set of effective linear segments which have only one end point within each of the sum areas; and (e) classifying the feature points in each of the sum areas according to the number of elements of the set. These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS In the accompanying drawings: Fig. 1 illustrates feature points in a line image; Figs. 2A and 2B illustrate distortion in a figure caused by thinning processing; Figs. 3A and 3B illustrate a line missing and a protrusion inherent in an original image, respectively; Figs. 4A, 4B and 4C illustrate a line missing that has occurred in the process of vectorization by the core-line formation processing of an arrow-shaped figure; Fig. 5 is a block diagram showing general structure of an image processing device according to the present invention; Fig. 6 is a block diagram showing a preferred embodiment of an image processing device according to the present invention; Fig. 7 is a flowchart of the procedure of processing an image; Figs. 8A and 8B illustrate how mask areas are established on an arrow-shaped figure; Fig. 9 shows one type of a mask area; Fig. 10 illustrates how sum areas are established; Figs. 11A, 11B, and 11C illustrate how a cross shaped figure is processed by the image processing device; Figs. 12A, 12B, and 12C illustrate how a right-angled corner figure is processed by the image processing device; and Figs. 13A, 13B, and 13C illustrate how eight-line-crossed figure are processed by the image processing device. DESCRIPTION OF THE PREFERRED EMBODIMENT Fig. 5 is a block diagram showing general structure of an image processing device according to the present invention. An image processing device comprises the following elements: Linear segment detecting unit M1: detecting linear segments of respective parts of a line image in the basis of raster data representing the line image, Mask area establishment unit M2: establishing a mask area at each end point of the linear segments, Sum area production unit M3: producing a sum area of the mask areas for the linear segments, Set finding unit M4: finding a set of these linear segments which have only one end point respectively for each of the sum areas, and Feature point classifying unit M5: classifying the feature points in each of the sum areas according to the number of elements of such a found set. Since the effective linear segments are defined on the basis of the sum areas obtained from mask areas, the feature points are classified easily and accurately. Compared with processing by a device which establishes simple-shaped mask areas at the segments, each shape of the sum areas reflects the features of the shape of the figure more, and detection of the global features is enabled by the present invention. Fig. 6 shows a block diagram outlining the configuration of the image processing device as an embodiment of the present invention. As the diagram illustrates, the image processing device comprises a processing unit 10 including a CPU 1, ROM 3 and RAM 5, an image scanner 12 for reading an original image to produce raster data, and a terminal unit 15 for inputting commands for image processing and for displaying processed images. The processing unit 10 is an arithmetic logic circuit. The CPU 1 performs various processing according to software programs stored in the ROM 3. The CPU 1 is connected, by way of a common bus 17, to a vector processor 20, an image input port 22 directly connected to the image scanner 12, and a terminal control unit 25 directly connected to the terminal unit 15. The image scanner 12 optically scans a original placed on an original holder and produces image data of binary data. The CPU 1 develops the image data in a prescribed area of an image buffer included in the image input port 22 according to a command given through the terminal unit 15. The terminal unit 15 gives a series of instructions to perform various image processing operations to the processing unit 10, and displays images on and after the processing on its display unit. The vector processor 20 included in the processing unit 10 performs vector processing of the image data (raster data) developed at the image buffer at the image input port 22 and produces vector data of linear segments existing in the original image. The linear segments are core linear segments of respective line parts of the original image. The line parts of the original image usually have a width of more than several pixels, while the linear segments have a width of one pixel. The "vector processing" in this specification denotes line thinning processing to produce vector data representing the linear segments stated above, and a "vector" denotes a linear segment. The vector data for one linear segment has coordinates of a starting point of the vector, its direction and length. Alternatively, the vector data may have coordinates of the starting point and the ending point. Fig. 7 is a flowchart showing the procedure of feature point finding processing carried out by the processing unit 10. The arrow-shaped figure shown in Fig. 8A is utilized as an example of an original image. At a step 100, the image processing device carries out an image input operation where the raster data read through the image scanner 12 is developed onto the image buffer included in the image input port 22. At a step 110, the linear segment detection is carried out on the basis of the raster data. The detection processing of the linear segments is carried out by the vector processor 20. The detection processing has the steps of: performing the thin-line processing of the original image; recognizing of the thin-line image as a set of linear segments longer than prescribed length; and storing the vector data of the linear segments in a predetermined area of RAM 5. Table 1 shows the vector data of the linear segments where the vector data consist of coordinates of the starting point and ending point. At a step 120, at each end point of the linear segments is established a mask area while the end point is the center of the mask area. Then sum area of the mask areas is calculated at a step 130. The "sum area" is an area which is formed of mask areas overlapping with each other. In the case of this embodiment, the shape of the mask area is a square with an end point of a segment as its center and each side has a length of L; the information of each area is stored in a prescribed area inside the RAM 5 as shown in Table 2, which includes location, size, direction and shape. The size of the mask area may be prescribed in advance or established according to the maximum line width of an original image, reading resolution of the image scanner, etc. As for an ordinary figure, its desirable width is 1.5 or 2 times the maximum line width. Its shape is not limited to a square but various shapes such as a rectangle, a circle, or an oval as shown in Fig. 9. In the case of the arrow-shaped figure shown in Fig. 8A, linear segments v1 to v6 are obtained through vectorization due to a slight distortion in the original. At each end point of the linear segments v1 to v6, mask areas m1 to m7 of L x L pixel matrix are established (step 120). For each mask area, the number of linear segments which have only one end point in the mask area are counted. The number of these linear segments are as follows: Since the mask areas m4 and m6 include both end points of the linear segment v4, the linear segment v4 is not counted in these mask areas. At the step 130, four sum areas m10, m20, m30 and m50, as shown in Fig.10, are recognized. The sum area m30 here is a union of the mask areas m3, m4, m6, and m7. The relation between each mask area and each sum area is stored as interrelated data as Table 2 shows. After recognition of the sum areas in this way, a set of effective linear segments are found for each mask area at a step 140. The effective linear segment is a segment which has only one end point within the corresponding sum area. The number of effective linear segments for respective mask areas m1 to m7 are as follows: Since the mask areas m3, m4, m6, and m7 constitute the sum area m30, the linear segments v3, v4, and v6 which have both end points within the sum area m30 are not counted as effective linear segment. At a step 150, a set of the effective linear segments for each sum area are produced. The effective linear segments for each of the sum areas m10, m20, m30, and m50 are found by collecting the effective linear segments in the mask areas m1 to m7 which constitute the sum area. Table 5 shows the number of effective linear segments thus found: Based on these results, the features of each sum area are decided at a step 160 as follows: In this step, each sum area is assumed to have one feature point of the thinned linework image without distortion and line missing. Then the type of the feature point of each sum area is judged according to the number of effective linear segments in that sum area. Since the number of effective linear segments is one for the sum areas m10, m20 and m50, its feature points are judged to be open-end points. Since the number of effective linear segments is three for the sum area m30, its feature point is judged to be a 3-branch point. Finally the result of each judgment is outputted to the terminal unit 15 at a step 170 and, the present processing routine is terminated. According to the image processing device described above, each sum area is assumed to have one feature point, and the type of the feature point is decided according to the number of the effective linear segments. Therefore the feature points can be easily and accurately classified into respective types regardless of the distorsion and line missing caused by vectorization processing (or thinning processing) of an original linework image and the line missing and protrusion inherent in an original linework image. That is, the shape of a sum area follows the shape of a figure to be processed and those linear segments produced by distortion or line missing are not counted as the effective linear segments. For example, a 4-branch point with a line missing as shown in Figs. 11A, 11B, and 11C, or a connection point with a protrusion as shown in Figs. 12A, 12B, and 12C are judged properly; although these figures are often misjudged by conventional device. The sum area becomes larger as the feature point includes the larger number of branches; thus the classification of the feature point can be performed with the larger sum area. Therefore even a 5-branch point can be classified by one cycle of the processing described above, and thus such a complicated process as to integrate a 4-branch point and a 3-branch point into a 5-branch point is not needed. This advantage becomes more explicit as the number of branches increases. For example, even in a case of a feature point having eight branches with a missing part in the center which is caused by the core-line formation processing, as shown in Figs. 13A, 13B and 13C, the image processing device can easily recognize the feature point as an 8-branch point. Moreover, the image processing device is advantageous because it carries out processing after vectorization, and thus the amount of data to be handled is small and high-speed processing is available. With all these results, feature point classification is possible by a compact system and a variety of processing stated below can be done simply. For example, pre-processing of recognizing image configurations in a layout paper used in the printing and platemaking industry can be carried out easily. The image processing device is also advantageous in increasing the accuracy of figurative recognition of the layout paper figures and decreasing the need for accurate layout paper making. Incidentally, a mask area may be of an oval with its longer axis belong in the linear segment direction. The mask area size may be adjusted according to the line width of an original linework image. Although the present invention has been described and illustrated in detail, it is clearly understood that the same is by way of illustration and example only and is not to be taken by way of limitation, the scope of the present invention being limited only by the terms of the appended claims.

Claims: An image processing apparatus (10) for finding and classifying feature points existing in a linework image, said feature points being points having a plurality of branches and end points of said linework image, said apparatus comprising: (a) linear segment detecting means (M1) for detecting linear segments representing core parts of said linework image by thinning processing, to thereby produce vector data representing said linear segments; (b) mask area establishment means (M2) for establishing mask areas for respective end points of said linear segments; (c) sum area production means (M3) for producing a sum area of said mask areas overlapping with each other; (d) set finding means (M4) for, with respect to each of said sum areas, finding a set of effective linear segments which have only one end point within each of said sum areas; and (e) feature point classifying means (M5) for classifying said feature points in each of said sum areas according to the number of elements of said set. An image processing apparatus (10) in accordance with claim 1, wherein said feature point classifying means (M5) judges said feature points as end points if the number of effective linear segments is one; judges said feature points as connection points if the number of effective linear segments is two; and judges said feature points as N-branch points having N pieces of branches, where N is an integer at least three, if the number of linear segments is at least three. An image processing apparatus (10) in accordance with claim 1, wherein said mask area establishment means (M2) establishes mask areas as squares, rectangles, circles or ovals. An image processing apparatus (10) in accordance with claim 3, wherein said mask area establishment means (M2) establishes said mask areas as mask areas whose width in a first direction parallel to a longitudinal direction of said linear segment is greater than a width in a second direction perpendicular to said first direction. An image processing apparatus (10) in accordance with claim 1, wherein said mask area establishment means (M2) comprises : (b1) linear segment width measuring means for measuring a width of said linework image; and (b2) area size adjusting means for adjusting the size of said mask areas in proportion to said width. An image processing apparatus (10) in accordance with claim 1, wherein said mask area establishment means (M2) further comprises; mask area information storage means for storing information of each of said mask areas, said information including at least coordinates of location of said mask areas, while allotting a unique identity number to every mask area. An image processing apparatus (10) in accordance with claim 1, wherein said sum area production means (M3) comprises: (c1) identity number assigning means for assigning identity number to each mask area, while assigning an identical identity number to those mask areas which overlap at least partly with each other; and (c2) identical sum area judgement means for judging mask areas allotted with an identical identity number to be included in an identical sum area. An image processing method for finding and classifying feature points existing in a linework image, said feature points being points having a plurality of branches and end points of said linework image, said method comprising: (a) detecting linear segments representing core parts of said linework image by thinning processing, to thereby produce vector data representing said linear segments; (b) establishing mask areas for respective end points of said linear segments; (c) producing a sum area of said mask areas- overlapping with each other; (d) with respect to each of said sum areas, finding a set of effective linear segments which have only one end point within each of said sum areas; and (e) classifying said feature points in each of said sum areas according to the number of elements of said set. An image processing method in accordance with claim 8, wherein said step (e) comprises the steps of: (e1) judging said feature points as end points if the number of effective linear segments is one; (e2) judging said feature points as connection points if the number of effective linear segments is two; and (e3) judging said feature points as N-branch points having N pieces of branches, where N is an integer at least three, if the number of linear segments is at least three. An image processing method in accordance with claim 8, wherein said mask areas are in the form of squares, rectangles, circles or ovals. An image processing method in accordance with claim 10, wherein said mask areas are established as mark areas whose width in a first direction parallel to a longitudinal direction of said linear segment is greater than a width in a second direction perpendicular to said first direction. An image processing method in accordance with claim 8, wherein said step (b) comprises the steps of: (b1) measuring a width of said linework image; and (b2) adjusting the size of said mask areas in proportion to said width. An image processing method in accordance with claim 8, wherein information of each of said mask areas is stored, said information including coordinates of location of said mask areas, while allotting a unique identity number to every mask area. An image processing method in accordance with claim 8, wherein said step (c) comprises the steps of: (c1) assigning an identity number to each mask area, while assigning an identical identity number to those mask areas which overlap at least partly with each other; and (c2) judging mask areas allotted with an identical identity number to be included in an identical sum area.

Inventors: SHIRASAKI AKIHIKO DAINIPPON SC, SHIRASAKI, AKIHIKO, DAINIPPON SCREEN MFG.CO.,LTD.
Applicants: DAINIPPON SCREEN MFG, DAINIPPON SCREEN MFG. CO., LTD.
Application year: 1991
Main classification: G06K9
IPC codes: G06K9, G06T7