USPatent applicationPatented

Method and apparatus for rasterization

Granted 14 Feb 2017 · 2 office actions

Life of the application

11 dated events
⤢ drag to zoom20122014201620182020202220242026202820302032ProsecutionOwnershipTerm & fees
ProsecutionOwnershipTerm & feeshover for detail · click to open

Abstract

The application provides a method for rasterization. According to the method, a primitive may be divided, at a position where a color abruptly changes in the primitive, into a plurality of sub-primitives with continuously and gradually changing colors. Each of the sub-primitives is then rasterized. The present application further provides an apparatus for rasterizing an image. The apparatus may comprise a dividing module configured to divide a primitive at a position where a color abruptly changes into a plurality of sub-primitives with continuously gradually changing colors. Furthermore, the apparatus may comprise a rasterizing module configure to rasterize each of the sub-primitives. The application may improve the speed of the rasterization and the quality of the processed image.

Description

9 parts
›This application is a national phase application of…

This application is a national phase application of International Application No. PCT/CN2011/080804, filed Oct. 14, 2011, designating the United States of America, which claims priority to, and benefit of Chinese Patent Application No. 201010512135.8, filed Oct. 14, 2010, the entirety of both of which are hereby incorporated by reference.

›TECHNICAL FIELD

The present application relates to graphic image processing, in particular, to a method and an apparatus for rasterizing graphic images.

›BACKGROUND

A spatial position of each point in an image is closely related to a color displayed at each point on the page. The relationship between the spatial position and the color is often described by using a continuous function or a piecewise continuous function. The color presented at the position of each point on the primitive is changed gradually, which is known as gradient.

Several types of gradients are defined in the PDF/PostScript standard, including a function gradient, a linear gradient, a circular gradient, a free structure gradient, a staggered structure gradient, Koons gradient, and a tensor gradient. A typical circular gradient is shown in FIG. 1 .

As mentioned above, depending on the gradient, the color displayed at each point on a primitive is calculated through a corresponding function, wherein the spatial position of the point will be taken as an independent variable. For example, the following variables are first defined in the circular gradient:

(a) spatial positions of two circles C0:(x0,y0,r0), C1:(x1,y1,r1); (b) initial parameters of the two circles t 0 ,t 1 ; (c) color at the two periphery for the two circles S0,S1; (d) a spatial color converting function ƒ(t); and (e) all the other points of the spatial space are located at circles Cs: (x c (s),y c (s), r(s)), each of which corresponds to a value of t where t 0 ≦t≦t 1 .

Next, the color displayed at each point between the circles C0 and C1 are calculated by the following functions:

The circle (x c (s),y c (s), r(s)) in each space corresponds to a specific t, and thus the color value of each point at the periphery may be calculated by plugging t into the function ƒ(t). When the primitive is rasterized, space coordinates may be calculated for each point in the gradient space based on space coordinates of the point in the current device page; t is calculated for the point according to the calculated space coordinates and equations set (1.1); and then the final color displayed at the point is calculated.

According to other types of gradients, the primitive may be described and rasterized in a similar way, that is, the initial parameters t 0 , t 1 the initial colors S0, S1, the spatial color function ƒ(t) may also be similarly determined, wherein t 0 ≦t≦t 1 .

It can be seen from the above that each device point covered by the primitive needs to be calculated when the primitive is rasterized. Therefore, the rasterization efficiency is relatively low when the resolution of the device is high. In this regard, when the resolution of the device is high, it needs to reduce the resolution first and then to calculate. After that, the reduced resolution needs to be increased up to the original resolution when the final page is finished. Normally, the ratio of the final resolution to the reduced resolution is called resolution reduction coefficient.

Common methods for reducing the resolution are often not flexible. For example, according to some methods, the ratio of the resolution to mesh count of a screening may be determined as the resolution reduction coefficient. According to another method, the ratio of a length of the primitive in the page to the color difference between both ends of the primitive may be determined as the resolution reduction coefficient. The inventors have found that the characteristics of the gradient primitive are not fully considered when reducing the resolution in these methods. As a result, for a relatively gentle color gradient, the current methods may not achieve better rasterization efficiency; on the other hand, for a steep color gradient, they often lose the original characteristics of the primitives. For example, one type of distortions may be that a sawtooth appears at a position of dramatic color transition. An exemplary sawtooth phenomenon is shown in FIG. 2 .

›SUMMARY OF INVENTION

The present application provides a method and an apparatus for rasterizing a primitive of a graphic image to reduce distortion and/or to increase efficiency.

According to one embodiment of the present application, a method for rasterizing a primitive of the graphic image is provided. According to the method, a primitive may be divided, at a position where a color abruptly changes in the primitive, into a plurality of sub-primitives with continuously and gradually changing colors. Each of the sub-primitives is then rasterized.

According to another embodiment of the present application, an apparatus is provided for rasterizing an image. The apparatus may include a dividing module configured to divide a primitive at a position where a color abruptly changes into a plurality of sub-primitives with continuously and gradually changing colors. Furthermore, the apparatus comprises a rasterizing module configure to rasterize each of the sub-primitives.

The method and the apparatus may rasterize the primitive by region so as to avoid the distortion or lower rasterization efficiency due to the fixed resolution reduction coefficient. Thus, the speed of the rasterization and the quality of the image can be improved.

›BRIEF DESCRIPTION OF THE DRAWING

The drawings described herein are used to provide a further understanding to the present application and constitute a part of this specification. Exemplary embodiments of the present application and their descriptions serve to explain the present application and do not constitute improper limitation on the present application. In the drawings:

FIG. 1 is a schematic diagram of a circular gradient.

FIG. 2 is a schematic diagram illustrating a sawtooth pattern when the quality of the rasterization is low.

FIG. 3 is a flowchart illustrating a method for rasterization according to an embodiment of the present application.

FIG. 4 is a schematic diagram of the circular gradient according to an embodiment of the present application.

FIG. 5 is a schematic diagram illustrating the gradient primitive of FIG. 4 being divided into different regions.

FIG. 6 is a final dot matrix of region 1 shown in FIG. 5 .

FIG. 7 is a final dot matrix of region 2 shown in FIG. 5 .

FIG. 8 is a final dot matrix of the gradient primitive shown in FIG. 5 .

FIG. 9 is a schematic diagram illustrating an apparatus for rasterization according to an embodiment of the present application.

›DETAILED DESCRIPTION

Hereinafter, the present application will be explained in detail with reference to the accompanying drawings in connection with the embodiments. It should be noted that the present application refers to the graphic image processing field, and thus it inevitably needs to use colorful images to illustrate the processing of colors. However, the original color images were rendered as black and white pictures due to publishing and printing. This disclosure will try to use the text to illustrate the colors present in the original drawings.

FIG. 3 is a flowchart illustrating a method for rasterization according to an embodiment of the present application. The method comprises the following two steps.

Step S 10 : a primitive at a position where a color abruptly changes therein may be divided into a plurality of sub-primitives with continuously and gradually changing colors.

›Step S 20 : each of the sub-primitives may be rasterized · 1 of 3

In prior art references, a resolution reduction coefficient is often fixedly for a primitive, that is, the primitive as a whole is reduced to a fixed resolution. However, there may be a plurality of regions in the primitive, which are very different in color gradients. For a region with a gentle color gradient, a fixed resolution reduction coefficient may be too high such that an image distortion may incur. But for other regions with dramatic color gradients, a fixed resolution reduction coefficient may be too low resulting in lower rasterization efficiencies.

The method for rasterization in this embodiment comprehensively considers the characteristics of the primitive itself and divides the primitive into a plurality of regions based on the gradient. Therefore, the gradient may be rasterized regionally so as to avoid the image distortion or the lower rasterization efficiency due to the fixed resolution reduction coefficient of the primitive. Thus, the speed of the rasterization and the quality of the image can be improved.

In step S 10 , a shape and structure description of the primitive may be scanned and a spatial position of the primitive in a direction of the gradient may be taken as an independent variable. The corresponding parameters for each point with the independent variable may then be calculated. And then it may be determined whether there are discontinuous parameters in the corresponding parameters, if so, the primitive at a position where the parameter abruptly changes would be divided.

In some embodiments, step S 10 may comprise a step of scanning a spatial color function of the primitive to determine if the spatial color function is a piecewise continuous function. If so, the primitive at a position between two adjacent pieces of the piecewise continuous function would be divided.

Generally, the shape and structure description of the primitive may be scanned first, and then the spatial color function may be scanned. In the above embodiment, the position where the color abruptly changes in the primitive can be easily identified.

FIG. 4 is a schematic diagram of the circular gradient according to one exemplary embodiment of the present application. A primitive with 72 dpi is described as below:

t 0 =0.0 t 1 =1.0 Circle 1 The center coordinates: 100.0 100.0 Radius 0 Color C=0.0 M=1.0 Y=0.0 K=0.0 Circle 2 The center coordinates: 300.0 300.0 Radius 120 Color C=1.0 M=0.0 Y=1.0 K=0.0 The spatial color function: C i (t)=A i 0+(A i 1−A i 0)*t A0=[0.0, 1.0, 0.0, 0.0] A1=[1.0, 0.0, 1.0, 0.0] that is, A 1 0=0.0, A 2 0=1.0, A 3 0=0.0, A 4 0=0.0; A 1 1=1.0, A 2 1=0.0, A 3 1=1.0, A 4 1=0.0.

FIG. 5 is a schematic diagram illustrating the gradient primitive of FIG. 4 being divided into different regions. As shown in FIG. 5 , the abruptly changes occur at the periphery t=1.0 in the radial direction in which the two centers of the circles are connected to each other, and thus the primitive may be divided into two parts. One part may be located within the circle of t=1.0, the other part may be located in the other region.

In step S 20 , the respective resolution reduction coefficient for each sub-primitive may be set based on the ratio of the color change to the spatial size of each sub-primitive, and then the resolution of each sub-primitive may be reduced in accordance with the respective resolution reduction coefficient. In addition, each sub-primitive with the reduced resolution may be rasterized, and the resolution of the rasterized sub-primitive is increased back to the original resolution.

In one embodiment, when the primitive is rasterized, the resolution reduction coefficients are dynamically determined so as to ensure optimal output quality and efficiency.

In the step of setting respective resolution reduction coefficient for each sub-primitive, for the spatial color function of the sub-primitive in each color field, it takes a derivative d(s i )/d(l) with respect to a spatial length, where s i is a spatial color function in the i th color field and l is a spatial length. The maximum value max (d(s i )/d(l)) is taken as a quantized value for the color change. And then the resolution reduction coefficient of the sub-primitive nBlockSize may be set based on the quantized value max (d(s i )/d(l)) by rule of:

n BlockSize= L d /( S max /max( d ( s i )/ d ( l ))),

wherein L d is a spatial length in the radial direction of the sub-primitive, and S max is the maximum color difference in the range of the sub-primitive.

The method as described above can be easily implemented to set a resolution reduction coefficient with less calculation. Obviously, the present application is not limited thereto. For example, an average value of d(s i )/d(l) can be taken as the quantized value for the color change.

In one embodiment consistent with FIG. 4 , it may be assumed that the resolution is 600 dpi and the color resolution is 256. The quantized value for the intensity of the color change in two regions and the respective resolution reduction coefficients are calculated, respectively. Since region 1 and region 2 actually are associated with the same spatial color function, the ways for solving the quantized values for the intensity of the color change in two regions are similar.

The following equations can be obtained according to equations (1.1):

[( x 1 −x 0) 2 +( y 1 −y 0) 2 −( r 1 −r 0) 2 ]*s− 2 *s *[( x−x 0)*( x 1 −x 0)+( y−y 0)*( y 1 −y 0)+ r 0*( r 1 −r 0)]+[( x−x 0) 2 +( y−y 0) 2 −r 0 2 ]=0

From the above, it can be seen that 0.0<=s<=1.0, after the high index items are cancelled out, x and y can be regarded as having a linear change similar to that of s. In addition, the color can be regarded as having a linear change similar to that of s according to the spatial color function. Therefore, the color and the spatial position are both linear changed. As a result, for region 1, it may require a total of 180 steps in the radial direction P0→P1 to linearly change from t=0.3 to t=0.1 based on the color resolution of 256 (that is, on the apparatus, it requires a total of 256 steps from 0.0 to 1.0 if the value of the color steps up 1 each time). Further, the number of pixels in the direction P0→P1 is 600*600/72=5000, so the maximum resolution reduction coefficient is 5000/180=27.

›Step S 20 : each of the sub-primitives may be rasterized · 2 of 3

Similarly, the reduction coefficient of region 2 can be solved. The maximum resolution reduction coefficient of region 2 would be 4.

As shown in FIGS. 6 and 7 , dot matrixes of the respective region may be generated based on the actual resolutions.

The method for rasterization further comprises a step of generating a clip path for each sub-primitive when obtaining the plurality of sub-primitives with continuously and gradually changing colors, defining a range of each sub-primitive with the respective clip path when the resolution of the rasterized sub-primitives is increased to the original resolution. The collective set of all the clip paths may form the outline path of the original primitive. As shown in FIG. 5 , after the primitive is divided into two regions, the boundary contours of the two regions may be taken as the clip paths to define the two regions. In one embodiment, an overflow may be avoided when the resolution of sub-primitives are increased back to the original value.

As shown in FIG. 8 , when the two regions are output onto pages, the final output result of the gradient primitive can be achieved. In addition, in this embodiment, no sawtooth appears at a position of color transition of the primitive.

FIG. 9 is a schematic diagram illustrating an apparatus for rasterization according to an embodiment of the present application. The apparatus may comprise a dividing module 10 configured to divide a primitive at a position where a color abruptly changes therein into a plurality of sub-primitives with continuously and gradually changing colors. Furthermore, the apparatus may comprise a rasterizing module 20 configure to rasterize each of the sub-primitives.

The apparatus according to the embodiment may comprehensively consider the characteristics of the primitive itself and divide the primitive into a plurality of regions based on the gradient. Therefore, the apparatus may rasterize the gradient regionally so as to avoid image distortion or lower rasterized efficiency due to the fixed resolution reduction coefficient of the primitive. Thus, the speed of the rasterization and the quality of the image can be improved.

In some embodiments, the dividing module 10 may comprise a first scanning module configured to scan a shape and structure description of the primitive. The dividing module 10 may further comprise a first dividing module configured to take a spatial position in a direction of the gradient as an independent variable and calculate corresponding parameters for each point with the independent variable. In addition, the first dividing module may be configured to determine whether there are discontinuous parameters in the corresponding parameters. If so, the first dividing module may operate to divide the primitive at a position where the parameter abruptly changes. Additionally, the dividing module 10 may further comprise a second scanning module configured to scan a spatial color function of the primitive and a second dividing module configured to divide the primitive at a position between each adjacent two pieces of the piecewise continuous function if the spatial color function is a piecewise continuous function. In the above embodiment, the position where the color abruptly changes in the primitive can be easily identified.

In some embodiments, the rasterizing module 20 may comprise a coefficient setting module configured to set respective resolution reduction coefficient for each sub-primitive based on the ratio of the color change to the spatial size of each sub-primitive. Furthermore, the rasterizing module 20 may comprise a reducing resolution module configured to reduce the resolution of each sub-primitive based on the respective resolution reduction coefficient. In addition, the rasterizing module 20 may further comprise a performing module configured to rasterize each of the sub-primitives, which has a reduced resolution. Furthermore, the rasterizing module 20 may comprise a recovering module configured to increase the resolution of the rasterized sub-primitive back to the original resolution. In some embodiments, when the primitive is rasterized, the resolution reduction coefficients are dynamically determined to ensure optimal output quality and efficiency

In some embodiments, the coefficient setting module may further comprise a derivation module configured to take a derivative d(s i )/d(l) with respect to a spatial length for the spatial color function of the sub-primitive in each color field, where s i is a spatial color function in the i th color field and l is a spatial length. Furthermore, the coefficient setting module may comprise a quantizing module configured to take the maximum value max (d(s i )/d(l)) therein as a quantized value for the color change. In addition, the coefficient setting module may comprise a calculating module configured to set the resolution reduction coefficient of the sub-primitive nBlockSize as nBlockSize=L d /(S max /max(d(s i )/d(l))), where L d is a spatial length in the radial direction of the sub-primitive, and S max is the maximum color difference in the range of the sub-primitive.

The apparatus as described can be easily implemented to set the resolution reduction coefficient with less calculation.

In view of the above, the method and the apparatus according to the embodiments of the present application may achieve an efficient rasterization of the gradient primitive with a high quality. With the method and the apparatus according to the embodiments of the present application, the efficiency of the rasterization can be improved while the quality of the rasterization of the primitive is maintained.

It will be readily apparent to those skilled in the art that the modules or steps of the present application may be implemented with a common computing device. In addition, the modules or steps of the present application can be concentrated or run in a single computing device or distributed in a network composed of multiple computing devices. Optionally, the modules or steps may be achieved by using codes of executable programs, so that they can be stored in the computer storage medium, or the plurality of the modules or steps can be fabricated into an individual integrated circuit module. Therefore, the present application is not limited to any particular hardware, software or combination thereof.

›Step S 20 : each of the sub-primitives may be rasterized · 3 of 3

The foregoing describe only exemplary embodiments of the present application, and it is not intended to limit the present application. Moreover, it will be apparent to those skilled in the art that various modifications and variations can be made to the present application, such as a rasterization of a function gradient, a linear gradient, a circular gradient, a free structure gradient, a staggered structure gradient, Koons gradient and a tensor gradient. Thus, any modifications, equivalent substitutions, improvements etc. within the spirit and principle of the present application should be included within the scope of protection of the application.

1 of 9 part labels are ours — the grant heads the rest

Claims as granted

7 claims

Log in to read the claims of this application.

Log in to unlock

Classifications

3 codes
IPC · International Patent Classification
Section G — Physics
  • G06T11/00
  • G06T11/40
Section H — Electricity
  • H04N1/60

Claim changes

Soon
Coming soonHow the claims changed between publication and grant

See which claims were amended, added or cancelled during examination, with every added and removed word marked.

AmendedAddedCancelledUnchanged

The published claims of this application are not paired with the granted ones in what we hold.

File wrapper

⤢ drag to zoomJul 2011Jan 2012Jul 2012Jan 2013Jul 2013Jan 2014Jul 2014Jan 2015Jul 2015Jan 2016Jul 2016Jan 2017USPTOApplicantNon-final rejectionNotice of allowance
USPTOApplicanthover for detail · click to open
Pendency
5.3 y
1,950 days filing → grant
Office actions
1
non-final + final
Responses
2
1 RCE
Examiner
Aaron M Richer
art unit 2614 · TC 2600
Citations: 12 back · 1 forward

See the full prosecution history — every USPTO and applicant action on this file, in order.

Log in to unlock

Documents

Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.

Log in to unlock

Chain of title

⤢ drag to zoom2014201620182020202220242026202820302032Owner 1Owner 2
Titlehover for detail · click to open

See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.

Log in to unlock