Image processing method

Abstract: An image processing method for density-weighted distance transformation of 4-neighborhoods or 8-­ neighborhoods, comprising steps of: holding the original image; generating an image of satisfactory high density (hereinafter it is called the highest density) when the density of background pixels are lower than pixels of a configuration; in at the 4-neighborhoods processing, giving each center pixel the lowest density among 4-neighborhoods; adding the image generated by aid giving the lowest density to the original frame memory with the limit of its highest density; repeating above two processing until a process result agree with the previous process result; in the 8-neighborhoods processing, giving each center pixel the lowest density among 8-neighborhoods; adding the image generated by the giving lowest density to the original frame memory with the limit of its highest density; repeating above two processing until a process result agree with the previous result.

Description: FIELD OF THE INVENTION This invention relates to an image processing method particularly to distance transformation, skeltoning, density-weighted distance transformation and density-weighted skeltoning. BACKGROUND OF THE INVENTION Distance transformation and density-weighted distance transformation are supposed to be the best ways to compress image data or to extract characteristics of images. There are two types of process manners for the above processings. Sequential processings and parallel process. Since the sequential process is difficult to be performed by a hardware, it cannot be performed in high speed. The parallel process has disadvantages that the distance value is biased according to scanning direction when processed by one scanning. So parallel process needs a lot of times of scanning. For example as to the image of 4x4 pixels in Fig. 1, when a parallel process with 3x3 convolutions is performed, the hatched pixel of coordinate (3,3) is given a distance value of "3" according to the distance from boundaries of upper and left side. The distance from the right side boundary cannot be found by one scanning. However, the distance of this pixel is "2" from boundaries of right and down side: this means that a bias is arisen from the scanning direction. For improving this disadvantages, one more scanning is necessary. This means that the bigger an image is, the more the number of scanning increases. The document 3RD USA-JAPAN COMPUTER CONFERENCE PROCEEDINGS, SAN FRANCISO, 10th-12th Oct. 1978, pages 104-111; J.-I. Toriwaki et al.: "Applications of neighbourhood logic operators in medical image processing" does disclose a method for density weighted distance transformation including storing an original image; generating a first minimum-processed image by replacing a pixel in an original image with a minimum value of surrounding pixels; generating a first addition-fixed image by adding pixel values of said minimum-processed image to corresponding pixel values of said original image; generating a second minimum-processed image by replacing a pixel in said first addition-fixed image with a minimum value of surrounding pixels; generating a second addition-fixed image by adding pixel values of said second minimum-processed image to corresponding pixel values of said original image; and repeating said steps until an n-th addition-fixed image converges to the grey weighted distance transformation. SUMMARY OF THE INVENTION The present invention has an object to provide image processing methods for the above processing easily performed by a hardware in high speed as set out in claims 1 and 5. According to the present invention, the density-weighted distance transformation is performed, when the background density is "0" for example, a center pixel in each convolution is given a minimal density in the convolution then the image processed is added to the original image for each corresponding pixels. Such processing is repeated. Therefore, evaluation of density and evaluation of distance are independently performed from each other so that the processings are simplified as well as the convergence speed is improved. While in the distance transformation, boundary pixels are given a distance value "n" in the nth scanning and pixels already given a distance is assumed to be a background pixel in the scanning thereafter. The simplicity and high speed of the processing are obtained. BRIEF DESCRIPTION OF THE PREFERRED EMBODIMENT Fig. 1 shows a process of the conventional distance transformation; Fig. 2 shows an image to be processed by an embodiment of density-weighted distance transformation; Fig. 3 shows the result of binarizing of the image in Fig. 2; Fig. 4, Fig. 6, Fig. 8, Fig. 10, Fig. 12, Fig. 14 and Fig. 16 are the results of "the transformation of center pixel to the minimal density in 4-neighborhoods with respect to images in Fig. 3, Fig. 5, Fig. 7, Fig. 9, Fig. 11, Fig. 13 and Fig. 15, respectively; Fig. 5, Fig. 7, Fig. 9, Fig. 11, Fig. 13, Fig. 15 and Fig. 17 are the results of "fixing addition" performed on the images in Fig. 4, Fig. 6,Fig. 8, Fig. 10, Fig. 12, Fig. 14 and Fig. 16, respectively; Fig. 18 shows an image to be processed by the second embodiment; Fig. 19 shows the process result of "fixing addition" in the first scanning; Fig. 21, Fig. 23 and Fig. 25 show the process result after first scanning for "fixing addition"; Fig. 20, Fix. 22 and Fig. 24 show the process result from the second to the fourth scanning for "transformations of center pixel to the minimal density in 4-neighborhoods"; Fig. 26 shows the process result of the first embodiment of distance transformation according to the present invention; Fig. 27 shows a block diagram of an example of an image processing system which can be used for this invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT The first embodiment of the image processing method according to the present invention for density-weighted distance transformation is described below referring to attached drawings. In this embodiment, the process of 4-neighborhoods is performed under the conditions of the density of background density of "0", while the density of pixels in a configuration is "1" or more than "1". Fig. 2 shows an example of an image to be processed: the processes to be performed for the image will be mentioned referring to Fig. 3 to 17. a) Binarizing Since, when the distance values are given as density values to each pixel, the distance is necessary to be distinguished from the density of the original image. The pixels of the original image are transformed to the maximal density value (255 is the maximal density in 8 bits) and background pixels are "0" as they were because the distance is necessary to be distinguished from the original one: this is the binarizing performed there. Binarized image is transformed as shown in Fig. 3; the maximal density is given to all pixels hatched. In this case, the original image is held in a memory as it is and the binarized image is written in another memory. b) Transformation into the minimal density In 3x3 convolutions, selecting the minimal density except for the density of the center pixel, the density of the center pixel is changed to the selected minimal density. The process result is shown in Fig. 4: the density "0" of background pixels is given to boundary pixels and other pixels have maximal density "255". Factors of distance from the boundary to each pixel are evaluated through this process. c) Adding the process result with the original image Next, the image in Fig. 4 is added to the original image in Fig. 2. In this addition, so-called FIX process is performed, that is, the additional result is deemed to be the maximal density when the additional result exceeds the maximal density, it becomes the indicator of pixels incompletely processed. The process result is shown in Fig. 5. The pixels which had density of "0" in Fig. 4 are kept to have the same density of "0", while other pixels are of the density of "255" (shown by hatching). d) Repetition of process b) and c) Similar to the process b), each pixel in the image of Fig. 5 is given a minimal density in 4-neighborhoods. The process result is shown in Fig. 6. The process result is fixing added with the original image. The process result is shown in Fig. 7. These processes are repeated, alternately. The process results are shown in the order of Fig. 8 (Transformation of center pixels into minimal density in 4-neighborhoods)→Fig. 9 (fixing addition)→Fig. 10 (Transformation of center pixels to the minimal density in 4-neighborhoods)→Fig. 11 (fixing addition)→Fig. 12 (Transformation of center pixels to the minimal density in 4-neighborhoods)→Fig. 13 (fixing addition)→Fig. 14 (Transformation of center pixels to the minimal density in 4-neighborhoods)→Fig. 15 (fixing addition)→Fig. 16 (Transformation of center pixels to the minimal density in 4-neighborhoods)→Fig. 17 (fixing addition) e) Discrimination of conclusion condition The process described above is completed when a process result coincides with the previous process result. For example in Fig. 11, the hatched 5 pixels are different from the result of the previous process (Fig. 9). In Fig. 13, hatched 4 pixels are different from the result of the previous process (Fig. 11). In Fig. 15, hatched 3 pixels are different from the result of the previous process (Fig. 13). The disagreements of process results are mainly caused by the existence of local minimum of density in a image. It never happens that successive process results agree to each other until the correct values of distances are obtained. In this embodiment, the process result of Fig. 17 after the fourteenth scanning agrees to the previous process result (Fig. 15): it becomes clear that the process can be concluded. It will easily understood that each of the above process is simple and parallel (not sequential), easy to be performed by hardware, and that the number of scanning necessary for processing is fewer than that of the conventional method. The number of scanning is estimated (2n+2) when the maximal width of an image is "n" pixels. The conclusion condition can be discriminated by the agreement of the process result to the previous process result of the image which is transformed into minimal density in 4-neighborhoods, not processed by fixing addition of center pixels. The processes above converge in extremely high speed and need a few scanning unless there is local minimum density in a image. Figs. 18 to 24 show that the process when the pixels in the configuration same as that in Fig. 2 have flat density of "1". After binarizing similarly in Fig. 3 and transforming the center pixels to the minimal density in 4-neighborhoods, processes are advanced as shown in Fig. 19 (fixing addition)→Fig. 20 (Transforming of center pixels to the minimal density in 4-neighborhoods)→Fig. 21 (fixing addition)→Fig. 22 (Transforming of center pixels to the minimal density in 4-neighborhoods)→Fig. 23 (fixing addition)→Fig. 24 (Transforming of center pixels to the minimal density in 4-neighborhoods)→Fig. 25 (fixing addition). Since the process result of Fig. 25 and the previous process result (Fig. 23) agree to each other, the process is concluded with 9 times scannings. The condition for conclusion decision can be found out by the calculations between images of process results, the previous one and the current one. It is easily performed by a hardware. The background pixels of embodiments described above is "0". As for the reversed imaged whose background pixels are "255", similar process to the above embodiment can be applied after binarizing the configuration pixels to "0", instead of binarizing shown in Fig. 3, then repeating the process of giving the maximal density in 4-neighborhoods to be the center pixel therein and the process of fixing addition. The same processing as the above may be performed, after creating a reversed image. The above embodiment is a process concerning to 4-neighborhoods. With respect to 8-neighborhoods, "the minimal density of 8-neighborhood" is given to the center pixel. Fig. 26 shows the result of distance transformation. An embodiment of the process method is mentioned below. In this embodiment, the process of 4-neighborhoods are performed under the condition that the density of the background pixels is "0" and the density of the configuration pixels are "1" or more. a) Binarizing For the discrimination of unprocessed pixels, binarizing is performed by giving the configuration pixels a density of rarely used as a distance, for example "255". b) Process for boundary pixels Extracting boundary pixels (density is "255" and adjacent to a pixel of density "0"), giving boundary pixels the number of scanning as densities --- the density given to boundary pixel on first scanning is "1". In the process of 4-neighborhoods, the condition of extracting boundary pixels is the condition of 4-neighborhoods; in 8-neighborhoods process, the condition of extracting boundary pixels is the condition of 8-neighborhoods. c) Repetition of b) Repeating the process b), giving the distances to the more inner pixels of a configuration, sequentially. d) Condition of conclusion Conclusion can be decided when no boundary pixel is found in the scanning, or when a process result of scanning agrees to the result of the previous process. Fig. 27 shows an embodiment of an image processing system by which the above image processing method can be performed. This system comprises a plurality of frame memories 1 to 3 connected to a computational portion 5 through a multi-plexer 4. The output of the computational portion 5 is transmitted to one of the memories 1 to 3. The computational portion 5 performs calculation process of calculations between images, fixing addition, selecting the minimal density in 4-neighborhoods etc., and status decision of boundary pixels decision etc. The output of status decision in the calculation portion is inputted to the converting portion 6 and the output of converting portion 6 is transmitted to the memories 1 to 3. The converting portion 6 outputs the result of the density conversion of each pixel according to the output of status decision of the calculation portion 5. The outputs of calculation portion 5 and converting portion 6 are connected to the memories 1 to 3 through bus buffer 7 and the output data is written in one of the memories. When this image processing system is applied to the previous embodiment, each configuration pixel is given the maximal density by binarizing by means of the converting portion 6 in which a threshold is registered. As to "the transformation of the center pixels to the minimal density in 4-neighborhoods" of Fig. 4, Fig. 6, Fig. 8, Fig. 10, Figs. 12, Fig. 14 and Fig. 16, minimal density is calculated through MIN calculation in computational portion 5, and similarly, fixing addition is performed in computational portion 5. During these processes, when the original image is held in memory 1 and the result of fixing addition is written in another memory 2, for example, the result of the transformation of center pixel to the minimal density in next 4-neighborhoods is written on the memory 3. The result of fixing addition of the image in the memory 3 with the original image is written in the same memory 3. The calculation between images for conclusion judgment is performed in computational portion 5 and the number of disagreement of corresponding pixels is registered, for example, in converting portion 6. The conclusion judgment is performed by such as MPU which reads the number of disagreement of pixels from converting portion 6. In the processing of the embodiment in Fig. 26, converting portion 6 is used similarly as the above for binarizing , then, boundary pixels are found in the computational portion 5 and the result of boundary pixel extraction is inputted to converting portion 6. In converting portion 6, the number of scanning registered in advance is outputted and written in the memory when this decision for boundary pixel is "truth". Although only a few exemplary embodiments of this invention have been described in detail above, those skilled in the art will readily appreciate that many modifications are possible in the exemplary embodiments without materially departing from the novel teachings and advantages of this invention.

Claims: An image processing method for density weighted distance transformation in images wherein the background density is lower than the density of the included patterns, said method, comprising the steps of storing an original image; generating an index image by replacing the density of all pixels in a pattern by the same maximal value and wherein all background pixels are having a density value of zero; generating a first minimum-processed image by replacing a pixel in said index image with a minimum value of surrounding pixels in a neighborhood; generating a first addition-fixed image by adding pixel values of said minimum-processed image to corresponding pixel values of said original image, and limiting the respective results to said maximal value; generating a second minimum-processed image by replacing a pixel in said first addition-fixed image with a minimum value of surrounding pixels in a neighborhood; and generating a second addition-fixed image by adding pixel values of said second minimum-processed image to corresponding pixel values of said original image, and limiting the respective results to said maximal value. An image processing method according to claim 1, wherein said neighborhood comprises four pixels adjacent to a center pixel, two of said adjacent pixels being horizontally adjacent to the center pixel in the image, two of said adjacent pixels being vertically adjacent to said center pixel. An image procesing method according to claim 1, wherein said neighborhood comprises eight pixels adjacent to a center pixel, two of said adjacent pixels being horizontally adjacent to the center pixel in the image, two of said adjacent pixels being vertically adjacent to said center pixel and four of said adjacent pixels being diagonally adjacent to the center pixel. A method as in claim 1, 2 or 3 comprising steps of generating a plurality of minimum processed and addition-fixed images until an addition-fixed image is substantially identical to a previously generated addition-fixed image. An image processing method for distance transformation of an image having configuration pixels all of the same density in images wherein the background density is lower than the density of the included patterns, said method comprising steps of: storing an original image; generating an index image by replacing the density of all pixels in a pattern by the same maximal value and wherein all background pixels are having a density value of zero; generating a first minimum-processed image by replacing a pixel in said index image with a minimum value of surrounding pixels in a neighborhood; generating a first addition-fixed image by adding pixel values of said minimum processed image to corresponding pixel values of said original image, and limiting the respective results to said maximal value; generating a second minimum-processd image by replacing a pixel in said first addition-fixed image with a minimum value of surrounding pixels in a neighborhood; and generating a second addition-fixed image by adding pixel values of said seond minimum-processed image to corresponding pixel values of said original image, and limiting the respective results to said maximal value. A method as in claim 5 further comprising steps of generating a plurality of minimum-processed and addition-fixed images until an addition-fixed image is substantially identical to a previously generated addition-fixed image.

Inventors: KUMAGAI RYOHEI, KUMAGAI, RYOHEI, KUMAGAI, RYOHEI EZEL INC.
Applicants: EZEL INC, SHARP KK, EZEL INC.
Application year: 1989
Main classification: G06T5
IPC codes: G06T5