Search Images Maps Play YouTube News Gmail Drive More »
Advanced Patent Search | Page images | Web History | Sign in

Patents

  
[table][merged small][table][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][table]
[blocks in formation]

1 2

map. In such a case, one has to provide additional mem

IMAGE DATA PROCESSING METHOD FOR ory field in correspondence to coordinates outside of

COMPRESSING AN IMAGE BY the image field for accommodating these coordinate

APPROXIMATING CURVES USING A data. Such a procedure invites unwanted increase of

POLYNOMIAL 5 memory space or amount of information to be processed.

This application is a continuation of U.S. patent application Ser. No. 07/391,788, filed Aug. 9, 1989, now SUMMARY OF THE INVENTION abandoned. Accordingly, it is a general object of the present BACKGROUND OF THE INVENTION 10 invention to provide a novel and useful image process

The present invention generally relates to processing in? meth°d wherein the aforementioned problems are

of image data and more particularly to an image data eliminated.

processing method for compressing two-dimensional Another and more specific object of the present incurve image data and for expanding the information )5 vention is to provide an image processing method thus compressed. wherein a two-dimensional curve is compressed effecIn a field of image processing, a two-dimensional tively without losing smoothness of the curve when the curve image is usually decomposed into a number of curve is reproduced.

segments, and vectors are assigned in correspondence Another object of the present invention is to repro

to each of the segments. Thus, the curve is represented 20 duce an image which closely represents an original

by a number of vectors each corresponding to the seg- image from a compressed image data.

ment. In such a method, when the curve has a large Another object of the present invention is to provide

curvature, a large number of vectors are needed. Asso- a method of image data compression wherein determi

ciated therewith, information to be processed is in- natjon 0f control points for describing a given image is

creased, which causes a difficulty in transmission or 25 performed easily and automatically on a basis of origi

storage in memory. Further, such a method has a prob- na, image represented in a form of bit map.

lem of synthesizing a smooth curve as the synthesis of Another object of the present invention is to provide

the curve .s made on the basis of connection of a num- an image processing method for compressing an infor.

ber of these segments. mation of a two-dimensional curve by four independent

In order to avoid these problems, there has been ,n ,. .. . _ 4 . ¥ . . . ,

proposed to use the Bezier's equation for approximation 30 coordinate parameters, first one specifying an inma of the curve. According to this method, the curve is P0lnt °' the curve' sec0"d onf specifying a term.na approximated by the following equation: P0lnt ofJhe cuTMe'.thlrd one loca*ed on a tangential

passing through the initial point of the curve, and fourth

B(X.Y)=A(\-i)+iP(\-i)2i +iQ(\-i)i1+Eii (l) one located on another tangential passing through the

^ terminal point of the curve, wherein a line specified by

where B(X,Y) represents a coordinate of the two-di- the last two coordinate parameters maintains a tangen

mensional curve, A and E respectively stand for an tial contact with the curve, and further for reproducing

initial point and a terminal point of the curve, P' and Q' the image thus compressed according to an equation: respectively stand for an initial point and a terminal

point of a line which characterizes the shape of the 40 ...
curve and also tangential directions at points A and E, +W£?-W-3)£)(i-t);-+£
and t stands for a parameter specifying position of a

point on the curve between the point A and the point E. where A stands for the first coordinate parameter, E

The parameter t assumes a value zero (0) at the point A stands for the second coordinate parameter, P stands for

and a value one (1) at the point E. According to Eq.(l), 45 the third coordinate parameter, Q stand for the fourth

the curve is characterized by only four points A, E, P' coordinate parameter, c and d are predetermined coeffi

and Q'. cients, and t is a parameter between zero and one repre

FIGS. 1(A) and (B) show typical examples of such senting position of a point on the curve. According to

curves B1-B6, or ... wherein the shape of the the present invention, processing of the two-dimen

curve is determined by the coordinate of the initial 50 siona] curve becomes easy as the Jast menti0ned line

point A and the terminal point E as well as initial points connecting the third and fourth coordinate parameters

Pi'-P*' and terminal points Qi'-Q6, corresponding to maintains the tangential contact with the curve and the

the points P and Q . coordinate parameters defining the line are determined

J^,.0??,TM. ^JTMTM ... ... T^u « as an intersection of said line with a tangential of the Pl'Ql' P2 Q2 P3 Q3 . respectively connecting the 55 ^ h ^ ^ ^

points P, and Q, P2 and Q2, P3 and Qj . . . do not ^ ^ ^ f make contact with respective curves and because of . s _ *, t J? * „ . , this, there arises a problem in that the curve generated P°f/ the. ?"rve: The detection of these tangentials from given control points does not closely reproduce "eluding said line is easily performed automatically by the original image formed in a bit map. In relation with 60 edge detection. As the image reproduced by these four this, automatic contour coding or data compression of coordinate parameters according to the aforementioned the image becomes difficult as the curves which can equation makes a tangential contact with the line conclosely represent the image on the bit map has to be necting the third and fourth coordinate parameters, the specified by the control points which are not on the reproduced image closely represents the original image edge of the image. Further, when the curve is located 65 formed on a bit map. Further, the lines characterizing close to a marginal region of the image to be processed, the shape of the curve does not move outside of image there appears a case in which the points P' and Q' are field secured for the image and the memory space hithlocated outside of image field secured for storing a bit er'to necessary when the Bezier's equation is used for

storing coordinates of the lines which located outside of the image field is saved.

Other objects and further features of the present invention will become apparent from the following detailed description for preferred embodiments when read 5 in conjunction with attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1(A) and (B) are diagrams showing a prior art data compression procedure using the Bezier's equation 10 for a number of curves;

FIGS. 2(A)-(C) are diagrams showing a principle of data compression according to the present invention for various two-dimensional curves;

FIG. 3 is a diagram showing the data compression for 15 a case of Japanese letter "tsu" according to an embodiment of the present invention;

FIG. 4 is an enlarged view showing the compression of data of FIG. 3 in detail;

FIG. 5 is a block diagram showing a procedure for a 20 raster-vector conversion;

FIG. 6 is a block diagram showing a procedure for a vector-raster conversion; and

FIG. 7 is a block diagram showing a printer controller to which the present invention is applied. 25

DETAILED DESCRIPTION

First, the principle of the present invention will be described with reference to FIG. 2(A)-(C). According to the present invention, a two-dimensional curve M(X, 30 Y) is approximated by an equation:

M(X. Y)=A( 1 -r)J+(cP-(c-3)A)(\-t)h

(2)

where A and E stand for the initial and terminal points 35 of the two-dimensional curve, P and Q give the tangential direction at A and E or line PQ making a tangential contact with the two-dimensional curve, and t stands for a parameter which changes its value between zero and one. Similarly to Eq.(l), the parameter t changes 40 between zero and one. Further, c and d in Eq.(2) are predetermined coefficients. Thus, Eq.(2) has a feature in that the line PQ maintains a tangential contact with the curve M(X, Y). The initial point A and the terminal point E are immediately found out by edge detection. 45 The points P and Q, too, is easily determined by detecting a peak point of the curve and by finding out a tangential passing through the peak point. Eq.(2) reproduces the two-dimensional curve with excellent precision particularly when the coefficients c and d are set as 50 c=d=4. The curve represented by such an equation has a preferable feature in that the line PQ extends parallel to a line AE connecting the points A and W.

FIGS. 2(A)-(C) show various curves which are defined by the points A, E, P and Q according to Eq.(2), 55 in which FIGS. 2(A) and (B) respectively show six sets of such curves M1-M6. In the curves M1-M6, the coordinate of the points P and Q are changed from Pi to P6 and from Qi to Q6, respectively. Note that the point P is determined as an intersection of a tangential line AP 60 passing through the initial point A and the line PQ. Similarly, the point Q is determined as an intersection of a tangential line EQ passing through the terminal point E and the line PQ. FIG. 2(C) on the other hand shows eight such curves corresponding to the coordina.te of 65 the points P and Q changing from to P and from Qi to Q8 for a case that the point A agrees with the point E. Note that FIG. 2(A) shows a case in which the line AE

is parallel to the line PQ' and FIG. 2(B) shows a case in which the line PQ is not parallel to the line AE. Here, the line PQ symbolically represents a group of lines Pl-Qi, P2-Q2. P3-Q3

As the curves shown in FIGS. 2(A)-(C) have a common feature in that the line PQ makes a tangential contact with the curve itself, the reproducing of the curve according to Eq.(2) becomes significantly easier and the risk that the points P and Q move outside of the field of the image is avoided.

For the case of FIG. 2(A) where the line AE is parallel to the line PQ' the condition c = d=4 is satisfied as already described and Eq.(2) can be rewritten as

(3)

M{X. Y) = AO - f)3 + {AP - (4 - 3M)(1 - l)2t +
(40 - (4 - 3)£)(1 - 02 + £r3
= A(\ - /)' + (AP - AM - t)h +
(40 - E){\ - t)2 + El}

For the case of FIGS. 2(B) and (C) where the line AE and PQ are not parallel, the coefficient c and d generally fall in a range between three and four. In the most case, the value of the coefficient becomes about 3.9 which is quite close to four. This means that the curve obtained by applying Eq.(3) to the case where the line AE and the line PQ are not parallel satisfactorily approximates the original curve without visually noticeable deformation.

Next, a first embodiment of the present invention will be described with reference to FIG. 3 showing an example of data compression for a font of Japanese letter (pronounced "tsu"). The font comprises a first curve portion SI inscribing in a quadrangle A1A2P1Q1 defined by an initial point Al and a terminal point A2 as well as other points PI and QI defining a line P1Q1 which, makes a tangential contact with the curve portion S2, and a second curve portion S2 inscribing in a quadrangle A2A3P2Q2 defined by the point A2 acting as the initial point makes a tangential contact with the curve portion S2. Thus, the information which describes the letter can be compressed into two sets of data, one comprising coordinates of the points Al, A2, PI and QI and the other comprising the coordinates of the points A2, A3, P2 and Q2. These points are obtained from the tangentials A1P1, P1Q1, Q1A2 and A2P2, P2Q2, Q2A3 and A3A2. As already noted, the detection of these tangentials can be made easily and automatically from the font formed in the bit map by edge detection.

When the two curves are continuous, the terminal point A2 of the curve portion SI and the initial point A2 of the curve portion S2 become identical. Thus, a curve comprising n curve portions can generally be represented by n+1 coordinates specifying the initial and terminal points A, (i= 1, 2, 3,..., n, n+1) of the curve portions and two coordinates for each of the n curve portions. Thus, the curve can after all be specified by 3n+ l (=n+l+2n) points.

In the case that the coefficients c and d are set to satisfy the relation c=d=4, a line int A2 of the curve portion SI becomes parallel to the line P1Q1 making a tangential contact with the curve portion SI. Thus, the coordinate of the terminal point QI is given by a coordinate pi of the initial point PI in combination with a distance si of the point QI measured from the point PI.

5 6

For the case of the second curve portion S2, the letter wherein the curve SO comprises a curve portion

initial point P2 is located on an extension of a line Q1A2 SO\ corresponding to the curve portion SI of FIG. 3

connecting the point Ql and the point A2 as is clearly and a curve portion SCb corresponding to the curve

illustrated in FIG. 3, and therefore, the coordinate of portion S2 of FIG. 3 and the curve SI comprises a curve

the point P2 can be obtained by the coordinate of the 5 portion SIi and a curve portion SIi. Similarly to the

point A2 in combination with a distance s2 of the point case of FIG. 3, the curve portion SO] is represented by

P2 measured from the point A2. the points Al and A2 as well as points POl and QOl

The position of the point P2 thus represented in terms corresponding to the points Pi and Qi, and the curve

of the distance S2 is then converted to x- and y-coordi- portion SO2 is represented by the points A2 and A3 as

nates by using a general relation x=s.cos0 and y=s.- 10 well as points P02 and Q02 corresponding to the

sin0, where 6 stands for an angle defined between the points P2 and Q2. Further, the curve portion SIi is

line connecting the points and the abscissa as defined in determined by the initial point Al as well as points PI1,

FIG. 3 and s stands for the distance between the two QI1 and a terminal point A4 which correspond to the

points. By using the distance data s which is a scaler parameters A, P, Q and E of Eq.(2) respectively. The

quantity, one can reduce the information to be pro- 15 curve portion Shis determined by the initial point A4

cessed as compared to a case in which the coordinate of and terminal point A3 as well as points PI2 and QI2

the poipts is represented by vectors each comprising which correspond to the parameters A, P, Q and E of

two components. Eq.(2). Note that the points Al, PI1, QI1 and A4 defines

Alternatively, one may obtain the coordinate of the a quadrangle PIIQ1IA4 in which the curve portion SI 1

points by using a data set comprising a distance data and 20 inscribes, and the points A4, PI2, QI2 and A3 defines a

an argument data of a point with respect to an immedi- quadrangle A4PI2Q12A3 in which the curve portion

ately preceding point. Thus, the coordinate of the point SI2 inscribes. As the data compression for the curve

P2 for example is obtained by adding the x- and y-coor- portions SOi, SO2, SI 1 and SI2 are identical to that of

dinates to the corresponding coordinates of the point the curve portions SI and S2 already described with

Ql which in turn are obtained by adding the x-and 25 reference to FIG. 3, further description will be omitted,

y-coordinates obtained similarly to the x- and y-coordi- When these curves are reproduced according to Eq.(2)

nates of the point PI. When adopting this method, one or (3), area surrounded by the curves SO and SI is filled

may quantize the argument data into sixteen directions by dots as usual.

for example, each separated by 22.5 degrees. In this FIG. 5 shows a raster-vector conversion procedure case, the argument can be digitized by four bit data and 30 for compressing an image data according to Eq.(2) or the information to be processed is further reduced. (3). Referring to the drawing, the image to be cornWhen synthesizing the curve, Eq.(2) is used for each pressed is read by raster scanning and the like in a step of the curve portions and the coordinate of the dots 101, whereby the read image is stored in a pattern memused for displaying the curve portions SI and S2 are ory in a form of a bit map. Next, a contour of the pattern calculated with a sufficient density. The dots thus ob- 35 is extracted from the bit map in a step 102 by edge tained are connected by line segments. It is needless to filtering and the like, and the contour thus obtained is say that the more the number of dots, the more the divided into a number of line portions and curve porsmoothness of the line is improved. As the curve repro- tions on the basis of curvature detection in a step 103. In duced by Eq.(2) always makes tangential contact with a step 104, the line portions extracted in the step 103 is the line PQ defined by the control points P and Q, the 40 compressed into a vector data comprising coordinates reproduced curve from the points A, E, P and Q closely of the initial point and terminal point and the curve represents the original font. portions is compressed into a vector data comprising When decomposing a font into a number of curve coordinates of the four parameters A, E, P and Q of portions having different curvatures and line portions Eq.(2) or Eq.(3). The vector data thus obtained is then having different lengths, the curve is once divided into 45 stored in a memory as shown in a step 105. a number of unit vectors and the segmentation of the When the image data compression method of the curve into the curve portions and the line portions is present invention is applied to a facsimile transmission performed by detecting the change in the direction of system, the vector data is transmitted to a reception side the unit vectors. where the original image is recovered according to a In order to avoid unwanted excessive use of memory 50 vector-raster conversion procedure shown in FIG. 6. or transmission band arising when applying Eq.(2) or Referring to FIG. 6, the vector data is read out in a step Eq.(3) involving four parameters to a case where the 201 from a memory storing the received vector data and curve includes a substantial proportion of line portions, the contour of the curve portion is reproduced in a step it is preferred to separate the line portion from the 202 according to Eq.(2) or Eq.(3). The contour of the curved portion by detecting the directional change of 55 line portion is reproduced from the coordinate of its the unit vector or the curvature. The line portion thus initial point and terminal point as already described. In separated is then represented by the two points corre- a step 203, the overall contour of the original image is sponding to the initial and terminal points. recovered by connecting the contours thus reproduced FIG. 4 shows the data compression of the letter "tsu" Further, an area surrounded by the contour of the for an actual case in which the letter has a finite thick- 60 image thus recovered is filled by dots in a step 204 and ness. After the edge detection of the font "tsu", an edge a bit map of the dots thus obtained is stored in a pattern pattern shown in FIG. 4 is obtained. When the font is memory in a step 205. The bit map thus obtained is represented in a form of bit map, the edge pattern is not converted to a visual image by a printer and the facsimsmooth but comprises a number of steps. For the sake of ile transmission of the image is completed, simplicity and clarity of the illustration, representation 65 It should be noted that the vector data may be repreof the edge pattern by stepped line is omitted. The letter sented by a radial distance and an argument measured comprises a first curve SO defining an outer contour from a reference point instead of representing by the and a second curve SI defining an inner contour of the ordinary x- and y- coordinate as already described.

« PreviousContinue »