IMAGE PROCESSING METHOD
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method for effecting a diversification processing, e.g., shadowing, to a dot-matrixed bit-map image data.
Hitherto, a method has been proposed for forming a modified letter, e.g., a bordered letter, shadowed letter and so forth, by effecting a diversification processing on dot-matrixed letter data. According to this method, first and second data are formed by incrementing or decrementing the coordinates of the points where the levels of the dot signals are changed from white to black and vice versa in the dot-matrixed letter data both in the direction of main scan and in the direction of auxiliary scan perpendicular to the main scan. Then, a logical sum or logical product of these first and second data is further logically processed together with the dotmatrixed letter data, whereby a modified letter is formed. Thus, the diversification processing for forming a modified letter relies upon shifting of the coordinates of the contour of the dot-matrixed letter up and down and to the left and right. This method is disclosed in, for example, Japanese Patent Application No. 145986/1983.
The above-mentioned method, however, is applied only to letter image which permits an easy pickup of contour coordinate data, and cannot be applied to bitmap image data. Conventionally, therefore, a diversification processing of the image data has been conducted by forming a plurality of data by shifting the image data in a dot-by-dot fashion and determining logical sum or logical product of such data.
Thus, in the known diversification process for the bit-map image data, the image data is shifted only in dot-by-dot manner, so that the processing times increases in proportion to increase in the amount of processing, which is inconvenient particularly when the amount of processing is large.
SUMMARY OF THE INVENTION
Accordingly, an object of the present invention is to provide an image processing method which is capable of performing at a high speed a diversification processing on bit-map image data, thereby overcoming the above-described problems of the prior art.
To this end, according to the present invention, there is provided an image processing method for effecting a diversification processing on a dot-matrixed bit-map original image data in an amount of n and m dots (n and m being integers which are elementary to each other), the method comprising: forming a predetermined image data on the basis of the quotient (m/n) of the amounts n and m of amounts of the processing; forming at least two work areas equivalent to the image data of; and successively writing the predetermined image data on the original image data in the work area, thereby conducting the diversification processing at a high speed.
The nature, principle and utility of the invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIGS. 1 and 2 are flow charts illustrating an embodiment of the image processing method of the present 5 invention.
DESCRIPTION OF THE PREFERRED
An embodiment of the image processing method will 10 be described with reference to flow charts shown in FIGS. 1 and 2. This embodiment is for shadowing a dot-matrixed bit-map original data in an amount of n dots to the right and m dots to the upper side of the original image. The numbers n and m dots in this case 15 are determined to meet the following conditions. m>n
m and n are positive integers m and n are elementary to each other In the Step SI 1, |_m/nj and Pm/iT] are computed 20 and determined as M and N, respectively, where [m/nj and fm/n] respectively represent intergers obtained by rounding off and rounding up the decimals of the quotient "m/n." In the step S12, three work areas which are equivalent to original image data are pre25 pared. These three areas are referred to as work memories A, B and C, respectively. Then, a process A is started (see FIG. 2). When M and N are equal to each other, two work memories are used. The process A is a process for enlarging the original image data by (M — 1) 30 dots and (N — 1) dots, respectively, to the upper side. In Step SI, (M — 1) is expressed as a binary code in the following formula (1).
M - 1 = 2 0/2''
where, a,- represents digit bits, while '<*2 (M— 1)
40 represents an integer obtained by rounding off the decimal part of'°«2(M-l).
In Step S2, three work areas which are equivalent to the original image data are prepared. These three areas are referred to as work memories 1, 2 and 3, respec
45 tively. In Step S3, the above-mentioned image data are written in the work memories 1 and 2, and all the bits in the work memory 3 are cleared to "0". Then, the digit bits a, of the binary number (M — 1) are examined beginning with the least significant digit. Namely, conditions
50 i=0 and j = 1 are set in Step S4, and whether a<, is "0" or "1" is determined in Step S5. When a0 is "0", the data written in the work memory 1 is written in the work memory 3 in the Step S8. Then, data written in the work memory 3 is dot-shifted an amount 2°= 1(2'), and
SS the logical sum of the dot-shifted data and the data written in the work memory 1 is written into the work memory 1 in Step S9. Step SI0 sets the condition of i=i+1 =0+1 +1 and Step Sll determines whether the (M —1) has the next digit bit. When there is the next
60 digit bit, the process returns to Step S5 to determine whether the next digit bit a/is "0" or "1". On the other hand, when a„is determined to be "1" in the Step S5, the data in the work memory 1 is dot-shifted by l(j) dots, and the logical sum of the dot-shifted data and data
65 written in the work memory 2 is written in the work memory 2 in the Step S6. Step S7 sets conditions of j=j+2'=l + 20=2, while the Step S10 sets the condition of i=i+l=0+l = l. Then, the Step Sll is exe