JPH11224331A - Raster image generation device and raster image generation method - Google Patents
Raster image generation device and raster image generation methodInfo
- Publication number
- JPH11224331A JPH11224331A JP10025295A JP2529598A JPH11224331A JP H11224331 A JPH11224331 A JP H11224331A JP 10025295 A JP10025295 A JP 10025295A JP 2529598 A JP2529598 A JP 2529598A JP H11224331 A JPH11224331 A JP H11224331A
- Authority
- JP
- Japan
- Prior art keywords
- image
- partial
- space
- raster
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 74
- 230000015654 memory Effects 0.000 claims abstract description 221
- 238000012545 processing Methods 0.000 claims abstract description 50
- 230000009467 reduction Effects 0.000 claims abstract description 49
- 238000006243 chemical reaction Methods 0.000 claims description 113
- 230000009466 transformation Effects 0.000 claims description 56
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 33
- 238000001514 detection method Methods 0.000 claims description 16
- 238000009877 rendering Methods 0.000 claims description 5
- 238000013519 translation Methods 0.000 claims description 4
- 238000013507 mapping Methods 0.000 claims description 2
- 230000001131 transforming effect Effects 0.000 claims description 2
- 239000000872 buffer Substances 0.000 abstract description 24
- 238000010586 diagram Methods 0.000 description 29
- 238000005070 sampling Methods 0.000 description 15
- 229920000740 poly(D-lysine) polymer Polymers 0.000 description 14
- 238000007906 compression Methods 0.000 description 7
- 230000006835 compression Effects 0.000 description 7
- 239000011159 matrix material Substances 0.000 description 7
- 230000002441 reversible effect Effects 0.000 description 4
- 239000004065 semiconductor Substances 0.000 description 4
- 230000001174 ascending effect Effects 0.000 description 3
- 230000006866 deterioration Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 235000010724 Wisteria floribunda Nutrition 0.000 description 2
- 239000013256 coordination polymer Substances 0.000 description 2
- 230000006837 decompression Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000013139 quantization Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- PCTMTFRHKVHKIS-BMFZQQSSSA-N (1s,3r,4e,6e,8e,10e,12e,14e,16e,18s,19r,20r,21s,25r,27r,30r,31r,33s,35r,37s,38r)-3-[(2r,3s,4s,5s,6r)-4-amino-3,5-dihydroxy-6-methyloxan-2-yl]oxy-19,25,27,30,31,33,35,37-octahydroxy-18,20,21-trimethyl-23-oxo-22,39-dioxabicyclo[33.3.1]nonatriaconta-4,6,8,10 Chemical compound C1C=C2C[C@@H](OS(O)(=O)=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H]([C@H](C)CCCC(C)C)[C@@]1(C)CC2.O[C@H]1[C@@H](N)[C@H](O)[C@@H](C)O[C@H]1O[C@H]1/C=C/C=C/C=C/C=C/C=C/C=C/C=C/[C@H](C)[C@@H](O)[C@@H](C)[C@H](C)OC(=O)C[C@H](O)C[C@H](O)CC[C@@H](O)[C@H](O)C[C@H](O)C[C@](O)(C[C@H](O)[C@H]2C(O)=O)O[C@H]2C1 PCTMTFRHKVHKIS-BMFZQQSSSA-N 0.000 description 1
- 241000255777 Lepidoptera Species 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
- Storing Facsimile Image Data (AREA)
- Editing Of Facsimile Originals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、プリンタあるいは
ラスタ出力装置用のラスタ画像データの生成方法あるい
は描画を行うための画像描画装置に関する。特に、ラス
タ入力画像に関して、画像にアフィン変換を施し、任意
の形状に切り抜き、出力画像上の任意の場所に描画する
ためのラスタ画像生成装置およびラスタ画像生成方法に
関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for generating raster image data for a printer or a raster output device or an image drawing apparatus for performing drawing. In particular, the present invention relates to a raster image generating apparatus and a raster image generating method for performing affine transformation on an image, cutting out the image into an arbitrary shape, and drawing the image at an arbitrary position on an output image.
【0002】[0002]
【従来の技術】文字データの他に、直線、曲線、多角形
等のグラッフィックデータ(これらをラインアートと呼
ぶ)や、写真、手書き文書、印刷物等をスキャン入力し
たスキャンドイメージをプリンタ等に出力するための画
像記述方法としてページ記述言語(以下ではPDLと略
記する)が広く用いられている。代表的なPDLとして
Xerox社のInterpress(Xerox社の
登録商標)、AdobeSystems社のPostS
cript(Adobe Systems社の登録商
標)が知られている。Interpressの詳細につ
いては、S.J.HarrigtonとR.R.Buc
kley著「INTERPRESS:The Sour
ce Book−The Document and
PageDescription Language
for PerformancePrinting−」
Brendy(1988),邦訳「インタープレス−電
子出版のためのページ記述言語−」丸善(1989)に
記載されている。PostScriptの詳細について
は、Adobe Systems著「PostScri
pt Language Reference Man
ual Second Edition」Addiso
n−Wesley(1990),邦訳「ページ記述言語
PostScriptリファレンス・マニュアル第2
版」アスキー(1991)に記載されている。2. Description of the Related Art In addition to character data, graphic data such as straight lines, curves, and polygons (these are referred to as line art), and scanned images obtained by scanning and inputting photographs, handwritten documents, printed matter, etc., are output to a printer or the like. A page description language (hereinafter abbreviated as PDL) is widely used as an image description method for performing the above. Representative PDLs include Xerox Interpress (registered trademark of Xerox) and Adobe Systems PostS.
Script (registered trademark of Adobe Systems) is known. For details of Interpress, see S.M. J. Harrigton and R.M. R. Buc
INTERPPRESS: The Sour
ce Book-The Document and
Page Description Language
for PerformancePrinting- "
Brendy (1988), Japanese translation, "Interpress-A Page Description Language for Electronic Publishing-", Maruzen (1989). For more information on PostScript, see "PostScript" by Adobe Systems.
pt Language Reference Man
ual Second Edition "Addiso
n-Wesley (1990), Japanese translation “Page Description Language PostScript Reference Manual No. 2
Edition "ASCII (1991).
【0003】スキャンドイメージ部分の画像は、画素の
2次元集合であるラスタで表現される。ラスタは直交座
標上に画素を配置したデータ構造である。ラスタの入出
力は、画素をまずX軸方向に走査しながら1行分入力あ
るいは出力し、次いで走査をY軸方向に1行ずらして同
様に1行分入力あるいは出力する。これを全ての行につ
いて行うことで画像の入力あるいは出力を達成する。X
軸方向の走査を主走査、Y軸方向の走査を副走査ともい
う。[0003] The image of the scanned image portion is represented by a raster which is a two-dimensional set of pixels. A raster is a data structure in which pixels are arranged on rectangular coordinates. For raster input / output, pixels are first input or output while scanning in the X-axis direction for one row, and then scanning is shifted by one row in the Y-axis direction to similarly input or output one row. By performing this for all rows, input or output of an image is achieved. X
Scanning in the axial direction is also called main scanning, and scanning in the Y-axis direction is also called sub-scanning.
【0004】PDLでは、画像出力デバイスの解像度と
は独立にラインアートとスキャンドイメージの画像デー
タを取り扱うことが出来るよう設計されている。例え
ば、PostScriptではユーザが定義した任意の
空間(ユーザ空間)でラインアートを記述でき、Pos
tScript処理系がIOTの解像度に依存したデバ
イス空間に変換する。スキャンドイメージデータについ
ては任意の解像度のラスタを入力しそれをデバイス空間
に変換する。スキャンドイメージとして入力されるラス
タ画像をソース画像とも呼び、PDLでは任意の数のソ
ース画像を1枚の出力画像(デバイス画像と呼ぶ)に描
画することができる。[0004] The PDL is designed to be able to handle line art and scanned image data independently of the resolution of the image output device. For example, in PostScript, line art can be described in an arbitrary space (user space) defined by a user.
The tScript processing system converts the data into a device space depending on the resolution of the IOT. As for the scanned image data, a raster having an arbitrary resolution is input and converted into a device space. A raster image input as a scanned image is also called a source image, and in PDL, an arbitrary number of source images can be drawn on one output image (called a device image).
【0005】PostScriptには3つの空間、す
なわち、ユーザ空間,デバイス空間,ソース空間が有
る。PostScriptは無限のサイズと精度のユー
ザ空間に対して描画を行う。デバイス空間はイメージを
出力するデバイスに依存した有限の範囲と精度を有する
空間である。ユーザ空間からデバイス空間への写像はア
フィン変換を用いて定義され、その変換マトリクスをM
1とする。ソース空間は画素が1辺の長さ1の正方形と
なるように定義された空間で、ユーザ空間との関係はユ
ーザ空間からソース空間へのアフィン変換M2を用いて
定義される。従ってソース空間からデバイス空間へのア
フィン変換Mは、まずソース空間からユーザ空間へアフ
ィン変換M2-1を行い(アフィン変換M2-1は変換M2
の逆変換である)、次いでユーザ空間からデバイス空間
へアフィン変換M1を行えばよい。したがって、ソース
空間からデバイス空間へのアフィン変換Mは、M2-1お
よびM1によって下式のように表現される。[0005] PostScript has three spaces: a user space, a device space, and a source space. PostScript draws in a user space of infinite size and precision. The device space is a space having a finite range and accuracy depending on a device that outputs an image. The mapping from user space to device space is defined using an affine transformation, and the transformation matrix is
Let it be 1. The source space is a space defined such that each pixel is a square having a side length of 1, and the relationship with the user space is defined using an affine transformation M2 from the user space to the source space. Therefore, the affine transformation M from the source space to the device space first performs an affine transformation M2 -1 from the source space to the user space (the affine transformation M2 -1 is a transformation M2
The affine transformation M1 may be performed from the user space to the device space. Therefore, the affine transformation M from the source space to the device space is represented by M2 -1 and M1 as follows.
【0006】[0006]
【数1】M=M1・M2-1 である。## EQU1 ## M = M1 · M2 −1
【0007】また、ソース空間の座標(x,y)とデバ
イス空間の座標(X,Y)は下記に示す式で結び付けら
れる。The coordinates (x, y) in the source space and the coordinates (X, Y) in the device space are linked by the following equation.
【0008】[0008]
【数2】(X,Y,1)T=M・(x,y,1)T (x,y,1)T=M-1・(X,Y,1)T なお、ここで(v1,v2,v3)Tはベクトル(v1,
v2,v3)の転置を意味する。(X, Y, 1) T = M · (x, y, 1) T (x, y, 1) T = M −1 · (X, Y, 1) T where (v 1, v 2, v 3) T is the vector (v 1,
v 2 , v 3 ).
【0009】アフィン変換マトリクスMの具体的な内容
は、下式に示すものである。The specific contents of the affine transformation matrix M are shown in the following equation.
【0010】[0010]
【数3】 (Equation 3)
【0011】であり、各要素は任意の値(ただし逆行列
M-1が存在せねばならない)を取りうる。[0011] Each element can take an arbitrary value (however, an inverse matrix M -1 must exist).
【0012】拡大/縮小,回転は要素a,b,c,dに
より表現され、平行移動は要素u,vで表現される。The enlargement / reduction and rotation are represented by elements a, b, c and d, and the translation is represented by elements u and v.
【0013】[0013]
【数4】X=ax+by+u Y=cx+dy+vX = ax + by + u Y = cx + dy + v
【0014】[0014]
【数5】下記の条件、 ad−bc≠0## EQU5 ## The following condition, ad-bc ≠ 0
【0015】が成立する時には逆変換マトリクスM-1が
存在し、逆変換マトリクスM-1の各要素を下記の様に、[0015] there is a reverse transformation matrix M -1 when the is established, each element of the inverse transform matrix M -1 as shown below,
【0016】[0016]
【数6】 (Equation 6)
【0017】と書くと、それぞれの要素は下記に示すよ
うに記述できる。Then, each element can be described as shown below.
【0018】[0018]
【数7】a’= d/(ad−bc) b’=−b/(ad−bc) c’=−c/(ad−bc) d’= a/(ad−bc) u’=(bv−du)/(ad−bc) v’=(cu−av)/(ad−bc)A ′ = d / (ad-bc) b ′ = − b / (ad−bc) c ′ = − c / (ad−bc) d ′ = a / (ad−bc) u ′ = ( bv-du) / (ad-bc) v '= (cu-av) / (ad-bc)
【0019】したがってデバイス空間の座標(X,Y)
から、ソース空間上の対応する座標(x,y)を容易に
求めることができる。Therefore, the coordinates (X, Y) of the device space
, The corresponding coordinates (x, y) on the source space can be easily obtained.
【0020】[0020]
【数8】x=a’X+b’Y+u’ y=c’X+d’Y+v’X = a'X + b'Y + u'y = c'X + d'Y + v '
【0021】デバイス画像の座標(X,Y)の画素を決
定するためには上式を用いてソース画像の座標(x,
y)を求めてその画素を読み出せばよい。これを逆サン
プリングと呼ぶ。In order to determine the pixel at the coordinates (X, Y) of the device image, the coordinates (x,
It is sufficient to read out the pixel for y). This is called inverse sampling.
【0022】PDLで記述された画像表現を描画処理し
画像出力デバイスに出力する為の画素情報を作る技術
は、例えば、小野澤らにより著された「複数のページ記
述言語に対応するデコンポーザ」富士ゼロックステクニ
カルレポート,No.8,pp.61−68,(199
3)や、堀らにより発明され特開平5−224637号
公報において公開された技術がある。Techniques for drawing image processing described in PDL and generating pixel information for output to an image output device are described in, for example, "Decomposer for Multiple Page Description Languages" written by Onozawa et al., Fuji Xerox Technical Report, No. 8, pp. 61-68, (199
3) and a technique invented by Hori et al. And disclosed in JP-A-5-224637.
【0023】これらの技術は一般に計算機システム上で
処理ステップを記述したソフトウェアを用いて実施する
ことが可能である。These techniques can generally be implemented on a computer system using software describing processing steps.
【0024】特開平5−224637号公報に開示され
る技術では、PDLを入力部にて入力し、インタプリタ
でPDLを解釈実行する。その結果、描画情報はデバイ
ス空間の走査線上のセグメント情報として記憶手段に格
納される。走査線上の連続画素が同一属性を持つ線分を
セグメントとする。ラインアートで描画されるデバイス
画素に関しては、画素が同じ色を有するとき同一属性と
する。スキャンドイメージで描画されるデバイス画素に
関しては、同一のソース画像に由来する場合同一属性と
する。セグメント情報は、C言語風に記述すると、例え
ば次のような結合リスト構造を有するデータ構造を持
つ。In the technique disclosed in Japanese Patent Application Laid-Open No. Hei 5-224637, a PDL is input at an input unit, and the PDL is interpreted and executed by an interpreter. As a result, the drawing information is stored in the storage unit as segment information on a scanning line in the device space. A line segment in which continuous pixels on a scanning line have the same attribute is defined as a segment. Device pixels drawn in line art have the same attribute when the pixels have the same color. Device pixels rendered in a scanned image have the same attribute when they are derived from the same source image. The segment information has a data structure having, for example, the following combined list structure when described in a C language style.
【0025】[0025]
【数9】 (Equation 9)
【0026】走査線上のセグメントは左(X座標値の小
さいほう)から右(X座標値の大きいほう)へ結合リス
トで表現されている。セグメント1個が結合リストのノ
ード1個で表現される。セグメントはX座標X0からX
1までの範囲に存在し、ポインタppでその画素値は指
し示される。あるセグメントのノードのnextフィー
ルドは右隣のセグメントのノードを指している。走査線
上の右端のノードでは、右端であることを示すためにn
extフィールドに特別な値、例えばNULL(=0)
を入れる。dpフィールドはセグメントがラインアート
の描画に由来するか、スキャンドイメージの描画に由来
するかを示す。スキャンドイメージの場合、セグメント
の左端画素はポインタppで示されるアドレス、その右
隣の画素はpp+1のアドレス、更に右隣の画素はpp
+2のアドレスという形で画素をアクセスする。The segments on the scanning line are represented by a combined list from the left (smaller X coordinate value) to the right (larger X coordinate value). One segment is represented by one node in the linked list. The segment is from X coordinate X0 to X
The pixel value exists in the range up to 1, and the pixel value is indicated by the pointer pp. The next field of the node of a certain segment points to the node of the segment on the right. At the rightmost node on the scan line, n to indicate the rightmost
A special value in the ext field, for example, NULL (= 0)
Insert The dp field indicates whether the segment is derived from drawing a line art or a scanned image. In the case of a scanned image, the leftmost pixel of the segment is the address indicated by the pointer pp, the pixel on the right is the address of pp + 1, and the pixel on the right is pp
The pixel is accessed in the form of a +2 address.
【0027】デバイス画像は複数の走査線で構成され
る。デバイス画像の高さすなわち走査線数をHDとす
る。デバイス画像全体表現するためには、上記データ構
造へのポインタから構成される要素数HDの配列dev
Imageを設け、Y番目の配列要素がデバイス空間の
Y座標がYの走査線の左端のセグメントのノードへのポ
インタとなるように配列devImageを設定する。
この配列の定義をC言語ふうに記述すると以下のように
なる。The device image is composed of a plurality of scanning lines. Assume that the height of the device image, that is, the number of scanning lines is HD. In order to represent the entire device image, an array dev of the number of elements HD composed of pointers to the above data structure
Image is provided, and the array devImage is set so that the Y-th array element is a pointer to the node of the leftmost segment of the Y scan line in the device space.
The definition of this array is described as follows in C language.
【0028】[0028]
【数10】struct edge_list* de
vImage[HD];[Mathematical formula-see original document] structure edge_list * de
vImage [HD];
【0029】特開平5−224637号公報に記載の技
術では、ビデオ信号生成部でセグメントの情報を走査順
に読み出し、画素へのポインタを用いて出力画素を読み
出し、出力部へ送る。ここの一般的な処理手順をC言語
ふうに記述すると以下のようになる。In the technique described in Japanese Patent Application Laid-Open No. Hei 5-224637, the video signal generation unit reads segment information in the order of scanning, reads output pixels using pointers to pixels, and sends the output pixels to the output unit. The general processing procedure here is described as follows in C language.
【0030】[0030]
【数11】 [Equation 11]
【0031】ソース画像をイメージ変換部にてイメージ
変換後、デバイス画像用に変換されたスキャンドイメー
ジ画像はページメモリにサイズがWD×HD画素の画像
として走査順に格納されている。スキャンドイメージの
セグメントのノードのppはページメモリに格納された
画素を指している。その画素は該セグメントの左端画素
に対応する画素である。After the source image is image-converted by the image converter, the scanned image image converted for the device image is stored in the page memory as an image of WD × HD pixels in the scanning order. The pp of the node of the segment of the scanned image indicates a pixel stored in the page memory. The pixel is a pixel corresponding to the left end pixel of the segment.
【0032】特開平5−224637号公報で開示され
る従来技術では、イメージ変換部で拡大、縮小と、回転
といったアフィン変換を含む変形処理を行う。ラスタ画
像のアフィン変換については既に多くの技術が知られて
いるが、大まかに下記4種類に分類できる。In the prior art disclosed in Japanese Patent Application Laid-Open No. 5-224637, a transformation process including affine transformation such as enlargement / reduction and rotation is performed by an image conversion unit. Many techniques are already known for affine transformation of raster images, but they can be roughly classified into the following four types.
【0033】A)斜交軸変換と、90°回転と、拡大/
縮小とを組み合せたもの。例えば特開昭62−1776
75に開示され、ソース画像を90°回転し、縮小をと
もなった斜交軸変換を行い、−90°回転し、拡大をと
もなった斜交軸変換を行うことで、任意の拡大/縮小と
回転を実現する。上記一連の処理において、処理ステッ
プ間では各処理の入力側の画像と出力側の画像ををそれ
ぞれバッファメモリに格納する必要がある。従って、す
くなくとも画像2面分のページメモリを設ける必要があ
る。A) Oblique axis conversion, 90 ° rotation, enlargement /
Combination with reduction. For example, JP-A-62-1776
75, the source image is rotated by 90 °, the oblique axis conversion with reduction is performed, and the source image is rotated by −90 ° and the oblique axis conversion with enlargement is performed. To achieve. In the above series of processing, between the processing steps, it is necessary to store the image on the input side and the image on the output side of each processing in the buffer memory. Therefore, it is necessary to provide a page memory for at least two images.
【0034】B)ソース画像の画素をデバイス画像上の
対応する場所にコピーするもの。ソース座標からデバイ
ス座標を決定することを順サンプリングと呼ぶ。具体的
には図22aに示すように、ソース画像の画素座標
(x,y)を変換マトリクスMで線形変換してデバイス
空間の座標(X,Y)を求め、デバイス空間の画素位置
にソース画像の該画素をコピーするものである。例えば
特開昭61−88374、特開昭62−20074、特
開昭62−139082、特開昭63−184878、
特開平4−55986、特開平5−250466等に開
示されている。この技術では、入力画像の走査順に処理
できるので、処理済画像用のページメモリを設ける必要
がある。B) Copying pixels of a source image to corresponding locations on a device image. Determining the device coordinates from the source coordinates is called forward sampling. Specifically, as shown in FIG. 22A, the pixel coordinates (x, y) of the source image are linearly transformed by a transformation matrix M to obtain the coordinates (X, Y) of the device space, and the source image is located at the pixel position of the device space. Is copied. For example, JP-A-61-88374, JP-A-62-20074, JP-A-62-139082, JP-A-63-184878,
It is disclosed in JP-A-4-55986 and JP-A-5-250466. In this technique, since the input image can be processed in the scanning order, it is necessary to provide a page memory for the processed image.
【0035】C)デバイス座標に対応するソース座標を
求めソース画像を読みデバイス画像の画素を得るもの。
デバイス座標からソース座標を決定することを逆サンプ
リングと呼ぶ。具体的には図22bに示すように、デバ
イス空間の画素座標(X,Y)を逆変換マトリクスM-1
で線形変換してソース空間での座標(x,y)を求め、
ソース画像の該画素をデバイス空間(X,Y)にコピー
するものである。例えば特開昭62−145483、特
開昭62−256089、特開63−116193、特
開昭63−129476、特開平4−64177等に開
示されている。この技術では処理前画像用ページメモリ
が必要である。更に、特開平5−224637の技術に
組合わせるためには別のページメモリが必要なので、合
計画像2面分のページメモリを設ける必要がある。C) Obtaining source coordinates corresponding to device coordinates and reading a source image to obtain pixels of the device image.
Determining the source coordinates from the device coordinates is called inverse sampling. Specifically, as shown in FIG. 22B, the pixel coordinates (X, Y) in the device space are converted to the inverse transformation matrix M -1.
To obtain the coordinates (x, y) in the source space,
The pixel of the source image is copied to the device space (X, Y). For example, it is disclosed in JP-A-62-145483, JP-A-62-256089, JP-A-63-116193, JP-A-63-129476, and JP-A-4-64177. This technique requires a page memory for unprocessed images. Further, in order to combine with the technique of JP-A-5-224637, a separate page memory is required, so it is necessary to provide a page memory for a total of two images.
【0036】D)拡大/縮小を行うステップと、回転を
行うステップとの2ステップでアフィン変換を行う。、
処理ステップ間では各処理の入力側の画像と出力側の画
像ををそれぞれページメモリに格納する必要があるた
め、画像2面分のページメモリを設ける必要がある。D) An affine transformation is performed in two steps, a step of enlarging / reducing and a step of rotating. ,
Since it is necessary to store the image on the input side and the image on the output side of each processing in the page memory between the processing steps, it is necessary to provide a page memory for two images.
【0037】上記いずれの技術を用いても画像全体を格
納するページメモリを少なくとも1個必要とする。Any of the above techniques requires at least one page memory for storing the entire image.
【0038】[0038]
【発明が解決しようとする課題】特開平5−22463
7の技術では、描画情報をセグメントで表現することに
よりデバイス画像形成に必要なメモリのサイズを削減で
きるが、削減に有効な部分はラインアートとして描画さ
れた部分のみである。スキャンドイメージの描画の為に
は、アフィン変換の為と画像そのものを保持するために
少なくとも画像1面分のメモリ(これをページメモリと
呼ぶ)が必要である。例えば解像度600SPIでA4
サイズのフルカラーラスタデータを1画素をシアン、マ
ゼンタ、イエロー、ブラックの4色計4Byteで表現
するとデデータ量は約140MByteとなる。Problems to be Solved by the Invention
In the technology of No. 7, the size of the memory required for forming the device image can be reduced by expressing the drawing information in segments, but the portion effective for the reduction is only the portion drawn as line art. In order to render a scanned image, a memory for at least one image (called a page memory) is required for affine transformation and for holding the image itself. For example, A4 at resolution of 600 SPI
If one pixel of the full-color raster data of the size is expressed by a total of 4 bytes of four colors of cyan, magenta, yellow, and black, the amount of data becomes about 140 MByte.
【0039】ページメモリは一般に半導体メモリ特にD
RAM(ダイナミック・ランダム・アクセス・メモリ)
を用いて構成される。DRAMを用いるのは半導体メモ
リの中では安価なメモリデバイスであるからである。し
かし、A4サイズ画像で140MByte、A3サイズ
画像で280MByteものメモリを設けることはDR
AMを用いてもたいへん高価である。A page memory is generally a semiconductor memory, especially a D memory.
RAM (Dynamic Random Access Memory)
It is configured using DRAM is used because it is an inexpensive memory device among semiconductor memories. However, providing a memory of 140 Mbytes for an A4 size image and 280 Mbytes for an A3 size image is DR.
It is very expensive to use AM.
【0040】計算機において、大きなデータをそのデー
タサイズよりも小さなメモリを用いて処理する技術とし
て仮想記憶が知られている。仮想記憶の一般原理につい
てはJohn L.Hennessy & David
A.Patterson両氏によるテキストブック
“Computer Architecture AQ
uantitative Approach”,Sec
ond Edition;1996;Morgan K
aufmann Publishers,Inc.の
5.7章に記載されているので説明を省略する。ページ
メモリを仮想記憶技術を用いて構成すると、A4サイズ
で140MByteのデータを主記憶と2次記憶を構成
する磁気ディスクとの間で転送することになるが、磁気
ディスクの読み書きのスピードはたかだか10MByt
e/secなので、主記憶と2次記憶間の往復の転送に
要する時間は28秒以上かかる。仮想記憶の導入により
半導体メモリをより安価な磁気ディスクに置き換えるこ
とでコストは改善されるが処理速度が低下するという別
の問題が発生する。Virtual storage is known as a technique for processing large data using a memory smaller than the data size in a computer. For general principles of virtual memory, see John L. Hennessy & David
A. A textbook “Computer Architecture AQ” by Paterson
Authentic Approach ", Sec
on Edition; 1996; Morgan K
aufmann Publishers, Inc. The description is omitted because it is described in Chapter 5.7. When the page memory is configured by using the virtual storage technology, 140 Mbytes of A4 size data is transferred between the main storage and the magnetic disk constituting the secondary storage, but the read / write speed of the magnetic disk is at most 10 MByte.
Because of e / sec, the time required for the round-trip transfer between the main memory and the secondary memory takes 28 seconds or more. Replacing the semiconductor memory with a cheaper magnetic disk by the introduction of virtual storage improves cost but causes another problem that processing speed is reduced.
【0041】特開昭62−154152、特開平7−1
21690に開示される技術では、画像をブロックに分
割して小画像を作成し小画像毎に圧縮して磁気ディスク
に記憶し、処理に必要な部分を伸張して画素として主記
憶に格納する。これにより2次記憶との間のデータ転送
量を減すことが可能になるが、新たな画像領域が主記憶
に無く、かつ、主記憶にその領域をロードする空き領域
が無い場合には、まず現在使用中の領域の一つを選び、
選ばれた領域を圧縮し、圧縮データを2次記憶に送るこ
とで主記憶に新たな画像領域のためのスペースを作り、
2次記憶より該領域の圧縮データを読み出し、それを伸
張して画像に戻し、それを主記憶の該エリアに書き込
む。その後、主記憶での画像領域不在により中断してい
た処理を再開する。したがって、画像の圧縮と伸張処理
をシーケンシャルに行わねばならない為、処理時間が長
くなるという問題が発生する。また、画像処理のシーケ
ンスによっては特定の小画像について圧縮/伸張を何度
も繰り返すケースも発生するため、その部分の画像は画
像の圧縮/伸張にともない画質が劣化する問題もある。
なぜならば画像を効率よく圧縮するためしばしば非可逆
圧縮が用いられるためである。JP-A-62-154152, JP-A-7-1
According to the technique disclosed in JP 21690, an image is divided into blocks, small images are created, compressed for each small image, stored on a magnetic disk, and a portion required for processing is expanded and stored as pixels in a main memory. This makes it possible to reduce the amount of data transferred to and from the secondary storage. However, if there is no new image area in the main storage and there is no free space in the main storage to load the area, First, select one of the areas currently in use,
By compressing the selected area and sending the compressed data to the secondary storage, a space is created in the main storage for a new image area,
The compressed data of the area is read from the secondary storage, decompressed and returned to an image, and written to the area of the main storage. Thereafter, the processing interrupted by the absence of the image area in the main memory is restarted. Therefore, since the image compression and decompression processes must be performed sequentially, there is a problem that the processing time becomes longer. Also, depending on the sequence of image processing, compression / expansion of a specific small image may be repeated many times, so that there is a problem in that the image quality of the image in that portion deteriorates due to the image compression / expansion.
This is because lossy compression is often used to efficiently compress an image.
【0042】今日のゼログラフィ技術を用いた画像出力
装置は、富士ゼロックス株式会社が製造販売するDoc
u Color 4040画像出力装置のように1秒に
40枚のフルカラー出力が可能なものがある。このよう
な高速の画像出力装置を効率よく利用するためにはPD
L処理側も1枚あたり1.5秒以下で処理を行うことが
望まれる。すなわちスキャンドイメージの描画も1.5
秒以下で処理する必要がある。An image output apparatus using today's xerography technology is a Doc manufactured and sold by Fuji Xerox Co., Ltd.
Some uColor 4040 image output devices can output 40 full-color images per second. In order to use such a high-speed image output device efficiently, a PD
It is desired that the L processing side also performs processing in 1.5 seconds or less per sheet. That is, the drawing of the scanned image is also 1.5.
It must be processed in seconds or less.
【0043】ラスタは2次元構造を持った画素の集合体
であるが、計算機システムのメモリは1次元構造を取っ
ている。そこで、ラスタをメモリに格納する際には、通
常、主走査方向に1行分の画素をメモリの連続する場所
に格納し、そこに連続する場所に次の行の画素を1行分
格納し、それ以降の行も同様に格納する。このため、あ
る画素(ただし画像の左右両端を除く)の左右にある画
素はメモリ上でも隣接するアドレスに格納されるが、あ
る画素の上下にある画素は画素1行分に相当するアドレ
ス(これをAWとする)離れた場所に格納される。解像
度600SPIのA4サイズの画像では1行は約500
0画素(横長配置の場合)あるいは約7000画素(縦
長配置の場合)となる。従って1画素を4Byteとす
るとAWは縦置きの場合約20000Byte相当、横
置きの場合約28000Byte相当となる。A raster is an aggregate of pixels having a two-dimensional structure, but the memory of the computer system has a one-dimensional structure. Therefore, when storing the raster in the memory, usually, one row of pixels in the main scanning direction is stored in a continuous location of the memory, and the next row of pixels is stored in the continuous location in the continuous location. , And subsequent rows are stored similarly. For this reason, pixels on the left and right of a certain pixel (excluding the left and right ends of the image) are stored in adjacent addresses in the memory, but pixels above and below a certain pixel are stored in addresses corresponding to one pixel row (this Is AW). One line is about 500 for an A4 size image with a resolution of 600 SPI.
The number of pixels is 0 (in the case of the horizontal arrangement) or about 7,000 pixels (in the case of the vertical arrangement). Therefore, if one pixel is 4 bytes, the AW is equivalent to about 20,000 bytes in the case of a vertical arrangement, and is equivalent to about 28000 bytes in the case of a horizontal arrangement.
【0044】±90°回転のアフィン変換は、y軸方向
に順次画素を読み出しx軸方向に画素を書き込むあるい
は出力することで実現できる。メモリからの画素の読み
出しはアドレスAW分のとびとびの場所に発生する。The affine transformation of ± 90 ° rotation can be realized by sequentially reading pixels in the y-axis direction and writing or outputting pixels in the x-axis direction. Reading of pixels from the memory occurs at discrete locations for the address AW.
【0045】±N×180°(Nは整数)を除く任意の
角度の回転を伴うアフィン変換では、ソース画像上で走
査線に沿って画素を読み出し座標変換後のデバイス画像
に格納する場合の書き込み先アドレス、あるいはデバイ
ス画像上で走査線に沿った画素を逆変換を用いてソース
画像から読み出す場合の読み出し先アドレスは、メモリ
上ではとびとびの場所に発生する。書き込み先アドレス
あるいは読み出し先アドレス距離は角度に依存するがお
おむねAWのオーダーである。In affine transformation involving rotation at an arbitrary angle except ± N × 180 ° (N is an integer), writing is performed when pixels are read out along a scanning line on a source image and stored in a device image after coordinate conversion. A destination address or a read destination address when pixels along a scanning line on a device image are read from a source image using inverse conversion occurs at discrete locations in the memory. The write destination address or the read destination address distance depends on the angle, but is generally on the order of AW.
【0046】今日の高性能計算機のCPUは300MH
z以上すなわちサイクルタイム3.3ns以下で動作
し、複数(2〜3)命令を1サイクルで実行することが
できる。このようなCPUでは約1サイクルに1回メモ
リアクセス命令を実行することになる。一方メインメモ
リを構成するDRAMのロウ・アドレス・サイクルタイ
ムは100ns程度、カラム・アドレス・アクセスタイ
ムは高速ページモードのDRAMで40ns程度、ED
O(Extended Data Output)モー
ドのDRAMで25ns程度、Synchromous
DRAMの場合10ns程度である。CPUのメモリ
アクセスレートとDRAMのレートとの間には大きな開
きがあり、CPUがいくら高速でもDRAMのアクセス
時には待ちが発生し処理速度は大幅に低下してしまう。
この問題を解決するために今日の計算機ではキャッシュ
メモリを用いた階層化記憶機構を採用している。キャッ
シュメモリの一般原理についてはJohn L.Hen
nessy & DavidA.Patterson両
氏によるテキストブック“Computer Arch
itecture A Quantitative A
pproach”,Second Edition;1
996;Morgan KaufmannPublis
hers,Inc.の5.2章に記載されているので説
明を省略するが、一般にCPUのメモリアクセスパター
ンには、ある時刻にアクセスしたメモリ・ロケーション
をその後アクセスする確率は高いという時間的局所性
と、あるメモリロケーションをアクセスしたらその近傍
をアクセスする確率は高いという空間的局所性がある。
一方、半導体メモリには、小容量のメモリはアクセスタ
イムが小さいすなわち速いが、大容量のメモリはアクセ
スタイムが大きいすなわち遅いという性質がある。CP
UとDRAMの間に小容量の高速メモリを1層もしくは
複数層に配置し、CPUが参照するデータを小容量高速
メモリに置くよう制御する。この小容量高速メモリをキ
ャッシュメモリと呼ぶ。CPUがアクセスを要求するデ
ータがキャッシュメモリにあればキャッシュメモリから
データを供給する。データがキャッシュメモリに無い場
合はDRAMで構成されるメインメモリを読み、CPU
が読み出し要求した語とその近傍の語からなるブロック
をまとめてキャッシュメモリに書き込み、CPUへ読み
出した語を返す。今日の高性能計算機ではCPUチップ
上にCPUと同じクロックで動作する1’stキャッシ
ュメモリを設け、チップ外にCPUよりも遅いクロック
で動作する2’ndキャッシュを設けることが多い。
1’stキャッシュのサイズは16KByte〜64K
Byte程度、2’ndキャッシュは1’stキャッシ
ュよりも大きく256KByte〜1MByte程度で
ある。The CPU of today's high-performance computer is 300 MHZ
It operates at a time of z or more, that is, a cycle time of 3.3 ns or less, and can execute a plurality of (2 to 3) instructions in one cycle. In such a CPU, a memory access instruction is executed about once per cycle. On the other hand, the DRAM constituting the main memory has a row address cycle time of about 100 ns, a column address access time of about 40 ns in a high speed page mode DRAM, and an ED.
O (Extended Data Output) mode DRAM, about 25 ns, Synchronous
In the case of a DRAM, it is about 10 ns. There is a large difference between the memory access rate of the CPU and the rate of the DRAM, and even if the CPU is high speed, a wait occurs when accessing the DRAM, and the processing speed is greatly reduced.
In order to solve this problem, today's computers employ a hierarchical storage mechanism using a cache memory. For general principles of cache memory, see John L. Hen
nessy & David A. A textbook “Computer Arch” by both Paterson
item A Quantitative A
Propach ", Second Edition; 1
996; Morgan Kaufmann Publics
hers, Inc. Since the description is omitted in Section 5.2, the memory access pattern of the CPU generally includes a temporal locality that a memory location accessed at a certain time has a high probability of subsequently accessing the memory location, and a certain memory When a location is accessed, there is a spatial locality that the probability of accessing the vicinity is high.
On the other hand, a semiconductor memory has a property that a small-capacity memory has a short access time, that is, fast, whereas a large-capacity memory has a long access time, that is, a slow access time. CP
A small-capacity high-speed memory is arranged in one or a plurality of layers between the U and the DRAM, and control is performed so that data referred to by the CPU is placed in the small-capacity high-speed memory. This small-capacity high-speed memory is called a cache memory. If the data requested by the CPU is in the cache memory, the data is supplied from the cache memory. If the data is not in the cache memory, the main memory constituted by the DRAM is read and the CPU
Collectively writes in the cache memory a block consisting of the word requested to be read and words in the vicinity of the word, and returns the read word to the CPU. In today's high-performance computers, a 1'st cache memory that operates at the same clock as the CPU is provided on a CPU chip, and a 2'nd cache that operates at a clock slower than the CPU is often provided outside the chip.
The size of the 1'st cache is 16 KB to 64 KB
Approximately Byte, the 2'nd cache is larger than the 1'st cache and is approximately 256 KB to 1 MByte.
【0047】回転を伴うアフィン変換の逆サンプリング
におけるキャッシュメモリの動作を説明する。ここでは
回転角を90°とする。この場合1デバイス画素毎にソ
ース座標上をΔx=0,Δy=1移動して画素を逆サン
プリングする。ある画素の逆サンプリングの際には以下
に示す動作が生じる。その画素はそれ以前にアクセスさ
れていないのでキャッシュミスが発生し、メインメモリ
のDRAMに読み出しが発生し、その間CPUは停止す
る。キャッシュの制御システムは該画素と隣接アドレス
に格納されているその左右(x軸方向)の画素も読み出
しキャッシュメモリに格納する。CPUは次の画素(デ
バイス空間上での右隣り)の逆サンプリングとしてソー
ス空間上1行下の画素をアクセスする。その画素はまだ
キャッシュに格納されていないので再びキャッシュミス
が発生し、CPUはDRAMからの読み出しを待つ。デ
バイス空間の走査線上を逆サンプリングする過程ではこ
のように全画素のアクセスにおいてキャッシュがミス
し、CPUはDRAMの動作を待つことになる。CPU
は次いでデバイス空間上1行下の走査線の逆サンプリン
グを行う。この場合の逆サンプリング先の画素は上行の
走査線の画素の逆サンプリングの際にキャッシュメモリ
に格納された。しかし、キャッシュメモリのサイズは有
限であり、1走査線上の画素は通常キャシュのエントリ
数(ブロックの数)よりも多いため、一旦キャッシュに
格納された画素はその後のキャッシュミスによりキャッ
シュメモリから追い出されてしまいこの時点ではキャッ
シュに存在しない。従って、再びキャッシュミスが発生
する。この走査線上の画素全てに同様なキャッシュミス
が発生し、逆サンプリングの度にDRAMから画素を読
むことになる。以上述べたことは全走査線に発生し、C
PUはキャッシュから直ちに画素値を受け取れず、遅い
DRAMを待って処理を進めることになる。1走査線分
に相当するアドレス上の距離ではDRAMはカラムアド
レスのみを変える高速モードが使えるアドレス範囲を越
えている為DRAMアクセス毎にロウアドレスを新たに
あたえねばならない。その場合のDRAMの動作速度は
たかだか10MHz程度である。CPUは300MHz
のクロックで動作可能だが逆サンプリング過程ではキャ
ッシュメモリが全く働かないため、実質10MHzのD
RAMの動作スピードで全体の処理がすすむ。The operation of the cache memory in the inverse sampling of the affine transformation involving rotation will be described. Here, the rotation angle is 90 °. In this case, pixels are inversely sampled by moving Δx = 0 and Δy = 1 on the source coordinates for each device pixel. At the time of inverse sampling of a certain pixel, the following operation occurs. Since the pixel has not been accessed before that, a cache miss occurs, a read occurs in the DRAM of the main memory, and the CPU stops during that time. The cache control system also reads out the right and left (x-axis direction) pixels stored at the address adjacent to the pixel and stores it in the cache memory. The CPU accesses the pixel one row down in the source space as the inverse sampling of the next pixel (on the right in the device space). Since the pixel has not been stored in the cache yet, a cache miss occurs again, and the CPU waits for reading from the DRAM. In the process of reverse sampling on the scanning lines in the device space, the cache misses in accessing all the pixels, and the CPU waits for the operation of the DRAM. CPU
Then performs an inverse sampling of the scan line one row down in device space. In this case, the pixel of the inverse sampling destination was stored in the cache memory at the time of inverse sampling of the pixel of the upper scanning line. However, since the size of the cache memory is finite and the number of pixels on one scanning line is usually larger than the number of entries (the number of blocks) in the cache, the pixels once stored in the cache are evicted from the cache memory due to a subsequent cache miss. At this point, it does not exist in the cache. Therefore, a cache miss occurs again. A similar cache miss occurs in all the pixels on this scanning line, and the pixels are read from the DRAM every time the reverse sampling is performed. What has been described above occurs in all scanning lines, and C
The PU cannot immediately receive the pixel value from the cache and waits for a slow DRAM to proceed with the processing. At a distance on an address corresponding to one scanning line, the DRAM exceeds the address range in which the high-speed mode for changing only the column address can be used. Therefore, a new row address must be given each time the DRAM is accessed. The operating speed of the DRAM in that case is at most about 10 MHz. CPU is 300MHz
, But the cache memory does not work at all during the reverse sampling process, so the D
Overall processing proceeds at the operating speed of the RAM.
【0048】以上述べたケースはCPUのキャシュメモ
リが作用できない特別なケースではない。Δy≠0のと
きにはメインメモリ上のとびとびのメモリロケーション
にアクセスが発生するので同様にキャッシュメモリの効
果は無い。唯一Δy=0のときのみは連続するアドレス
方向にアクセスが発生するので、キャッシュメモリの先
読み効果(空間的局所性)が有効に作用する。しかし、
一般のプログラム実行時のキャッシュ動作に比較すると
キャッシュミスははるかに多い。The case described above is not a special case in which the cache memory of the CPU cannot operate. When .DELTA.y.noteq.0, access is made to discrete memory locations on the main memory, so that there is no effect of the cache memory. Only when Δy = 0, an access occurs in a continuous address direction, so that the prefetch effect (spatial locality) of the cache memory works effectively. But,
There are many more cache misses compared to the cache operation at the time of general program execution.
【0049】解像度600SPI,A4サイズの画像で
は、逆サンプリングのキャッシュミスに伴う35×10
6回のメインメモリへの読み出しが発生する。DRAM
のロウ・アドレス・サイクルタイムは100ns(mi
n)程度なのでDRAMアクセスのみで合計3.4秒か
かる。ほかにDRAMのコントローラのオーバヘッド時
間とシステムバスのオーバーヘッド時間とがかかるので
CPUの待ち時間の総和は更に長くなる。CPUは他の
処理のためにも時間を要する。したがって画像出力装置
に見合った性能すなわち1.5秒/枚で画像を処理でき
ない。DRAMのアクセスがボトルネックとなっている
のでマルチプロセッサ技術を用いてCPUの数を増やし
ても改善できない。For an image with a resolution of 600 SPI and A4 size, 35 × 10
Six reads to main memory occur. DRAM
Has a row address cycle time of 100 ns (mi
n), it takes 3.4 seconds in total for only DRAM access. In addition, since the overhead time of the DRAM controller and the overhead time of the system bus are required, the total wait time of the CPU is further increased. The CPU also takes time for other processing. Therefore, an image cannot be processed at a performance corresponding to the image output apparatus, that is, 1.5 seconds / sheet. Since access to the DRAM is a bottleneck, it cannot be improved even if the number of CPUs is increased using multiprocessor technology.
【0050】[0050]
【課題を解決するための手段】上述したような従来技術
の有する様々な課題を解決するために、本発明のラスタ
画像生成装置およびラスタ画像生成方法は、以下に説明
するような構成を有することを特徴とする。In order to solve the above-mentioned various problems of the prior art, a raster image generating apparatus and a raster image generating method according to the present invention have the following configurations. It is characterized by.
【0051】本発明のラスタ画像生成方法は、ラスタ画
像を複数の部分画像に分割する画像分割ステップと、画
像分割ステップにおいて得られた部分画像を符号化し該
部分画像の符号を得る符号化ステップと、符号化ステッ
プにおいて得られた部分画像の符号の復号順を決定する
復号順決定ステップと、復号順決定ステップにおいて決
定された順番に従って、部分画像の符号を復号し、部分
画像をメモリ手段に格納する復号ステップと、第1の座
標空間で表現された幾何情報を第2の座標空間に変換す
る座標空間変換ステップと、第2の座標空間での幾何位
置に対応するメモリ手段上のアドレスを生成するアドレ
ス生成ステップと、アドレス生成ステップにおいて生成
されたアドレスを用いてメモリ手段を読み出すステップ
とを有することを特徴とする。A raster image generating method according to the present invention includes an image dividing step of dividing a raster image into a plurality of partial images, an encoding step of encoding the partial images obtained in the image dividing step, and obtaining a code of the partial images. A decoding order determining step for determining a decoding order of the codes of the partial images obtained in the encoding step; and decoding the codes of the partial images in accordance with the order determined in the decoding order determining step, and storing the partial images in the memory means. Decoding step, a coordinate space conversion step of converting the geometric information expressed in the first coordinate space into the second coordinate space, and generating an address on the memory means corresponding to the geometric position in the second coordinate space. And a step of reading out the memory means using the address generated in the address generating step. And butterflies.
【0052】また、本発明のラスタ画像生成方法におい
て、第1の座標空間はデバイス空間であり、第2の座標
空間はソース空間であって、座標空間変換ステップは、
デバイス空間上でのスキャンドイメージの描画幾何形状
を形成するラスタスキャン情報をソース空間へ逆変換
し、ソース空間での幾何情報すなわちラスタスキャン情
報を得るステップであり、アドレス生成ステップは、座
標空間変換ステップにおいて得たソース空間上でのラス
タスキャン情報を用いてデバイス空間のスキャンドイメ
ージの画素に対応するメモリ手段上の部分画像の画素の
アドレス情報を生成するステップであり、該アドレス情
報を用いて順にメモリ手段から画素を読み出してデバイ
ス空間でのスキャンドイメージの画素を順に獲得する構
成を有することを特徴とする。In the raster image generating method according to the present invention, the first coordinate space is a device space, the second coordinate space is a source space, and the coordinate space conversion step is as follows.
Inverting raster scan information forming a drawing geometry of a scanned image on a device space into a source space to obtain geometric information in the source space, that is, raster scan information. Generating address information of the pixels of the partial image on the memory means corresponding to the pixels of the scanned image in the device space using the raster scan information on the source space obtained in the step, and using the address information. It is characterized in that pixels are sequentially read from the memory means and pixels of the scanned image in the device space are sequentially acquired.
【0053】また、本発明のラスタ画像生成方法は、さ
らに画像分割ステップにおいて得られた部分画像と、ラ
スタ画像生成装置に入力される描画情報から得られる幾
何形状との重なり合いを調べる重なり検出ステップと、
重なり検出ステップでの重なり検出結果に応じて、デバ
イス画像の描画に寄与する部分画像を選択する部分画像
選択ステップとを有し、符号化ステップは、部分画像選
択ステップにおいて選択された部分画像についてのみ符
号化し部分画像の符号を得るステップであることを特徴
とする。Further, the raster image generating method of the present invention further comprises an overlap detecting step for checking an overlap between the partial image obtained in the image dividing step and a geometrical shape obtained from drawing information input to the raster image generating apparatus. ,
A partial image selection step of selecting a partial image that contributes to the drawing of the device image according to the overlap detection result in the overlap detection step, and the encoding step is performed only for the partial image selected in the partial image selection step. The encoding step is a step of obtaining a code of the partial image.
【0054】また、本発明のラスタ画像生成方法におい
て、重なり検出ステップは、描画情報からスキャンドイ
メージの輪郭情報を読み出し、読み出されたスキャンド
イメージの描画の際に指定されたアフィン変換の逆変換
を実行して、輪郭情報をスキャンドイメージのソース空
間に写像し、該写像されたソース空間の輪郭の内側部分
あるいは該輪郭上に重なる部分画像の領域を検出するス
テップであることを特徴とする。In the raster image generating method according to the present invention, the overlap detecting step reads out the outline information of the scanned image from the drawing information, and performs the inverse of the affine transformation designated at the time of drawing the read scanned image. Performing a transformation to map the contour information to the source space of the scanned image, and to detect an area of the partial image which is inside or overlaps the contour of the mapped source space. I do.
【0055】さらに、本発明のラスタ画像生成方法は、
ラスタ画像の縮小を実行して縮小ラスタ画像を生成する
縮小ラスタ画像生成ステップを有し、画像分割ステップ
は、該縮小ラスタ画像生成ステップにおいて生成された
縮小ラスタ画像について部分画像への分割を実行するこ
とを特徴とする。Further, the raster image generating method of the present invention
A reduced raster image generating step of performing reduction of the raster image to generate a reduced raster image, wherein the image dividing step executes division of the reduced raster image generated in the reduced raster image generating step into partial images It is characterized by the following.
【0056】また、本発明のラスタ画像生成装置は、ラ
スタ画像を複数の部分画像に分割する画像分割手段と、
画像分割手段によって生成された部分画像を符号化し部
分画像の符号を得る符号化手段と、符号化手段によって
生成された部分画像の符号を復号しメモリ手段に格納す
る復号手段と、第1の座標空間で表現された幾何情報を
第2の座標空間に変換する座標空間変換手段と、第2の
座標空間での幾何位置に対応するメモリ手段上のアドレ
スを生成するアドレス変換手段と、符号化手段によって
生成された部分画像の符号を復号する復号順を決定する
復号順決定手段とを備え、復号順決定手段により決定し
た復号順に従って復号された部分画像をメモリ手段に格
納し、第1の座標空間の幾何情報を座標変換手段に与え
その出力をアドレス変換手段に供給して得たメモリアド
レスを用いてメモリ手段に格納された部分画像の画素を
読み出す構成を有することを特徴とする。The raster image generating apparatus according to the present invention further comprises: an image dividing means for dividing the raster image into a plurality of partial images;
Coding means for coding the partial image generated by the image dividing means to obtain the code of the partial image; decoding means for decoding the code of the partial image generated by the coding means and storing the code in the memory means; Coordinate space converting means for converting geometric information expressed in a space into a second coordinate space; address converting means for generating an address on a memory means corresponding to a geometric position in the second coordinate space; Decoding order determining means for determining a decoding order for decoding the codes of the partial images generated by the decoding means, wherein the partial images decoded in accordance with the decoding order determined by the decoding order determining means are stored in the memory means, and the first coordinates A configuration is provided in which the pixels of the partial image stored in the memory means are read out using the memory address obtained by providing the geometric information of the space to the coordinate conversion means and supplying the output to the address conversion means. And wherein the Rukoto.
【0057】また、本発明のラスタ画像生成装置におい
て、第1の座標空間はデバイス空間であり、第2の座標
空間はソース空間であって、座標空間変換手段は、デバ
イス空間上でのスキャンドイメージの描画幾何形状を形
成するラスタスキャン情報をソース空間へ逆変換し、ソ
ース空間での幾何情報すなわちラスタスキャン情報を得
る手段であり、アドレス変換手段は、座標空間変換手段
において得たソース空間上でのラスタスキャン情報を用
いてデバイス空間のスキャンドイメージの画素に対応す
るメモリ手段上の部分画像の画素のアドレス情報を生成
する手段であり、アドレス変換手段によって生成された
アドレス情報を用いて順にメモリ手段から画素を読み出
してデバイス空間でのスキャンドイメージの画素を順に
獲得する構成を有することを特徴とする。In the raster image generating apparatus according to the present invention, the first coordinate space is a device space, the second coordinate space is a source space, and the coordinate space converting means scans on the device space. The raster scan information forming the drawing geometric shape of the image is inversely transformed into the source space to obtain the geometric information in the source space, that is, the raster scan information. Means for generating address information of the pixels of the partial image on the memory means corresponding to the pixels of the scanned image in the device space using the raster scan information in the device space, and sequentially using the address information generated by the address conversion means. A configuration is provided in which pixels are read from the memory means and pixels of a scanned image in the device space are sequentially acquired. And wherein the Rukoto.
【0058】また、本発明のラスタ画像生成装置は、さ
らに画像分割手段において生成された部分画像と、ラス
タ画像生成装置に入力される描画情報から得られる幾何
形状との重なり合いを検出する重なり検出手段を有し、
重なり検出手段での重なり検出結果に応じて、デバイス
画像の描画に寄与する部分画像を選択して、該選択され
た部分画像についてのみ符号化手段によって符号化し部
分画像の符号を得ることを特徴とする。The raster image generating apparatus according to the present invention further comprises an overlap detecting means for detecting an overlap between the partial image generated by the image dividing means and a geometric shape obtained from drawing information input to the raster image generating apparatus. Has,
Selecting a partial image that contributes to the drawing of the device image in accordance with the result of the overlap detection by the overlap detection unit, and encoding only the selected partial image by the encoding unit to obtain a code of the partial image. I do.
【0059】さらに本発明のラスタ画像生成装置は、画
像分割手段において生成された部分画像と、ラスタ画像
生成装置に入力される描画情報から得られる幾何形状と
の重なり合いを検出する重なり検出手段を有し、重なり
検出手段での重なり検出結果に応じて部分画像を選択的
に分割手段で読み出して、該読み出された部分画像につ
いて符号化手段で符号化することを特徴とする。Further, the raster image generating apparatus of the present invention has an overlap detecting means for detecting an overlap between the partial image generated by the image dividing means and a geometric shape obtained from drawing information inputted to the raster image generating apparatus. The partial image is selectively read by the dividing means in accordance with the result of the overlap detection by the overlap detecting means, and the read partial image is encoded by the encoding means.
【0060】さらに本発明のラスタ画像生成装置におい
て、重なり検出手段は、描画情報からスキャンドイメー
ジの輪郭情報を読み出し、読み出されたスキャンドイメ
ージの描画の際に指定されたアフィン変換の逆変換を実
行して、輪郭情報をスキャンドイメージのソース空間に
写像し、該写像されたソース空間の輪郭の内側部分ある
いは該輪郭上に重なる部分画像の領域を検出する構成を
有することを特徴とする。Further, in the raster image generating apparatus according to the present invention, the overlap detecting means reads out the outline information of the scanned image from the drawing information, and performs an inverse transformation of the affine transformation designated when the read out scanned image is drawn. Executing contour information in the source space of the scanned image, and detecting an inner part of the contour of the mapped source space or an area of a partial image overlapping the contour. .
【0061】さらに本発明のラスタ画像生成装置は、ラ
スタ画像の縮小を実行して縮小ラスタ画像を生成する縮
小手段を有し、画像分割手段は、縮小手段において生成
された縮小ラスタ画像について部分画像への分割を実行
することを特徴とする。Further, the raster image generating apparatus of the present invention has a reducing means for reducing the raster image to generate a reduced raster image, and the image dividing means includes a partial image processing unit for the reduced raster image generated by the reducing means. Is performed.
【0062】さらに本発明のラスタ画像生成装置は、復
号手段を用いて実行される部分画像の復号タイミング位
置と、座標変換手段において変換が実行される第1の座
標空間の変換タイミング位置とを同期させて動作する構
成としたことを特徴とする。Further, the raster image generating apparatus of the present invention synchronizes the decoding timing position of the partial image executed by the decoding means with the conversion timing position in the first coordinate space where the conversion is executed by the coordinate conversion means. It is characterized in that it is configured to operate by making it operate.
【0063】さらに本発明のラスタ画像生成装置は、ア
ドレス変換手段に第2の座標空間とメモリアドレスとを
関係づけるテーブルを持ち、該テーブルは、入力ラスタ
画像ごと、個々に独立したテーブルによって構成されて
いることを特徴とする。Further, the raster image generating apparatus of the present invention has a table for associating the second coordinate space with the memory address in the address converting means, and the table is constituted by an independent table for each input raster image. It is characterized by having.
【0064】請求項1、2および5に記載の発明では、
ソースラスタ画像をそのままあるいは縮小した上で複数
の所定の大きさの部分画像に分割する。ここで分割され
た部分画像を部分画像毎に符号化し、元の部分画像より
もデータ量が小さな符号を得る。符号をメモリ手段に格
納する。デバイス画像をラスタ順に走査した場合に前記
部分画像が走査上に出現する順番を調べ、その順を部分
画像符号の復号順とする。この復号順に従い、符号を復
号し部分画像を再生しメモリ手段の所定の場所に格納す
る。デバイス空間を第1の座標空間、ソース空間を第2
の座標空間とする。デバイス空間上でのスキャンドイメ
ージの描画幾何形状を形成するラスタスキャン情報をソ
ース空間へ逆変換し、ソース空間での幾何情報すなわち
ラスタスキャン情報を得る。ここで得たソース空間上で
のラスタスキャン情報を用いてデバイス空間のスキャン
ドイメージの画素に対応するメモリ手段上の部分画像の
画素のアドレス情報を生成する。このアドレス情報を用
いて順にメモリ手段より画素を読み出してデバイス空間
でのスキャンドイメージの画素を順に得る。According to the first, second and fifth aspects of the present invention,
The source raster image is divided into a plurality of partial images of a predetermined size as it is or after being reduced. Here, the divided partial images are encoded for each partial image, and a code having a smaller data amount than the original partial image is obtained. The code is stored in the memory means. When the device images are scanned in raster order, the order in which the partial images appear on the scan is checked, and that order is defined as the decoding order of the partial image codes. In accordance with the decoding order, the code is decoded, the partial image is reproduced, and stored in a predetermined location of the memory means. Device space is the first coordinate space, source space is the second
Coordinate space. Raster scan information forming the drawing geometric shape of the scanned image in the device space is inversely transformed into the source space to obtain geometric information in the source space, that is, raster scan information. Using the obtained raster scan information in the source space, the address information of the pixels of the partial image on the memory means corresponding to the pixels of the scanned image in the device space is generated. Using the address information, the pixels are sequentially read from the memory means to sequentially obtain the pixels of the scanned image in the device space.
【0065】請求項3、4および5の発明では、ソース
ラスタ画像をそのままあるいは縮小した上で複数の所定
の大きさの部分画像に分割する。ソース画像がデバイス
空間上で描画される部分の幾何形状を求め、この幾何形
状と部分画像とが重なり合う関係にあるか否かを調べ
る。重なり合い関係にある部分画像についてはそれらを
部分画像毎に符号化し、元の部分画像よりもデータ量が
小さな符号を得る。符号をメモリ手段に格納する。デバ
イス画像をラスタ順に走査した場合に前記部分画像が走
査上に出現する順番を調べ、その順を部分画像符号の復
号順とする。この復号順に従い、符号を復号し部分画像
を再生しメモリ手段の所定の場所に格納する。デバイス
空間を第1の座標空間、ソース空間を第2の座標空間と
する。デバイス空間上でのスキャンドイメージの描画幾
何形状を形成するラスタスキャン情報をソース空間へ逆
変換し、ソース空間での幾何情報すなわちラスタスキャ
ン情報を得る。ここで得たソース空間上でのラスタスキ
ャン情報を用いてデバイス空間のスキャンドイメージの
画素に対応するメモリ手段上の部分画像の画素のアドレ
ス情報を生成する。このアドレス情報を用いて順にメモ
リ手段より画素を読み出してデバイス空間でのスキャン
ドイメージの画素を順に得る。According to the third, fourth and fifth aspects of the present invention, the source raster image is divided into a plurality of partial images of a predetermined size as it is or after being reduced. The geometrical shape of the portion where the source image is drawn in the device space is determined, and it is checked whether or not the geometrical shape and the partial image are in an overlapping relationship. The partial images having an overlapping relationship are encoded for each partial image, and a code having a smaller data amount than the original partial image is obtained. The code is stored in the memory means. When the device images are scanned in raster order, the order in which the partial images appear on the scan is checked, and that order is defined as the decoding order of the partial image codes. In accordance with the decoding order, the code is decoded, the partial image is reproduced, and stored in a predetermined location of the memory means. The device space is defined as a first coordinate space, and the source space is defined as a second coordinate space. Raster scan information forming the drawing geometric shape of the scanned image in the device space is inversely transformed into the source space to obtain geometric information in the source space, that is, raster scan information. Using the obtained raster scan information in the source space, the address information of the pixels of the partial image on the memory means corresponding to the pixels of the scanned image in the device space is generated. Using the address information, the pixels are sequentially read from the memory means to sequentially obtain the pixels of the scanned image in the device space.
【0066】請求項6,7および11に記載の発明で
は、ソース空間のラスタ画像を分割手段を用いてそのま
まあるいは所定の縮小率で縮小した上で、所定の大きさ
の複数の部分画像に分割する。各々の部分画像を符号化
手段に供給し部分画像の符号を得る。符号化することで
データ量を小さくする。部分画像の符号をメモリ手段に
格納する。復号順決定手段はデバイス画像をラスタ順に
走査した場合に前記部分画像が走査上に出現する順番を
調べ、その順を部分画像符号の復号順とする。復号手段
は復号順決定手段が決定した復号順に従って、部分画像
の符号を復号し部分画像を作る。その部分画像はメモリ
手段の所定の場所に格納される。デバイス空間を第1の
座標空間、ソース空間を第2の座標空間とする。座標変
換手段は、デバイス空間で表現されたスキャンドイメー
ジの描画幾何形状を形成するラスタスキャン情報を入力
し、ソース空間へ逆変換し、ソース空間での幾何情報す
なわちラスタスキャン情報を出力する。アドレス生成手
段は、ソース空間でのラスタスキャン情報を入力し、デ
バイス空間のスキャンドイメージの画素に対応するメモ
リ手段上の部分画像の画素のアドレス情報を生成する。
このアドレス情報を用いてメモリ手段に格納された部分
画像の画素を順次読み出すことで、デバイス画像のスキ
ャンドイメージ部の画素を得る。According to the present invention, a raster image in a source space is divided into a plurality of partial images of a predetermined size after being directly reduced by a dividing means or at a predetermined reduction ratio. I do. Each partial image is supplied to the encoding means to obtain the code of the partial image. The amount of data is reduced by encoding. The code of the partial image is stored in the memory means. The decoding order determining means checks the order in which the partial images appear on the scan when the device images are scanned in the raster order, and determines the order as the decoding order of the partial image codes. The decoding means decodes the codes of the partial images according to the decoding order determined by the decoding order determining means to create a partial image. The partial image is stored at a predetermined location in the memory means. The device space is defined as a first coordinate space, and the source space is defined as a second coordinate space. The coordinate conversion means inputs raster scan information forming a drawing geometric shape of the scanned image represented in the device space, performs inverse conversion to the source space, and outputs geometric information in the source space, that is, raster scan information. The address generation unit inputs raster scan information in the source space and generates address information of a pixel of the partial image on the memory unit corresponding to a pixel of the scanned image in the device space.
The pixels of the scanned image portion of the device image are obtained by sequentially reading the pixels of the partial image stored in the memory means using the address information.
【0067】請求項8、10および11の発明では、ソ
ース空間のラスタ画像を分割手段を用いてそのままある
いは所定の縮小率で縮小した上で、所定の大きさの複数
の部分画像に分割する。重なり検出手段は、ソース画像
がデバイス空間上で描画される部分の幾何形状を求め、
この幾何形状と部分画像とが重なり合う関係にあるか否
かを調べる。符号化手段は、重なり検出手段で重なり合
いを検出した部分画像について、各々の部分画像を入力
し符号化を行い部分画像の符号を得る。符号化すること
でデータ量を小さくする。部分画像の符号をメモリ手段
に格納する。復号順決定手段はデバイス画像をラスタ順
に走査した場合に前記部分画像が走査上に出現する順番
を調べ、その順を部分画像符号の復号順とする。復号手
段は復号順決定手段が決定した復号順に従って、部分画
像の符号を復号し部分画像を作る。その部分画像はメモ
リ手段の所定の場所に格納される。デバイス空間を第1
の座標空間、ソース空間を第2の座標空間とする。座標
変換手段は、デバイス空間で表現されたスキャンドイメ
ージの描画幾何形状を形成するラスタスキャン情報を入
力し、ソース空間へ逆変換し、ソース空間での幾何情報
すなわちラスタスキャン情報を出力する。アドレス生成
手段は、ソース空間でのラスタスキャン情報を入力し、
デバイス空間のスキャンドイメージの画素に対応するメ
モリ手段上の部分画像の画素のアドレス情報を生成す
る。このアドレス情報を用いてメモリ手段に格納された
部分画像の画素を順次読み出すことで、デバイス画像の
スキャンドイメージ部の画素を得る。According to the eighth, tenth and eleventh aspects of the present invention, the raster image in the source space is divided into a plurality of partial images of a predetermined size after being reduced by a dividing means as it is or at a predetermined reduction ratio. The overlap detecting means obtains a geometric shape of a portion where the source image is drawn in the device space,
It is checked whether or not this geometrical shape and the partial image are in an overlapping relationship. The encoding unit inputs and encodes each of the partial images for which the overlap has been detected by the overlap detection unit to obtain a code of the partial image. The amount of data is reduced by encoding. The code of the partial image is stored in the memory means. The decoding order determining means checks the order in which the partial images appear on the scan when the device images are scanned in the raster order, and determines the order as the decoding order of the partial image codes. The decoding means decodes the codes of the partial images according to the decoding order determined by the decoding order determining means to create a partial image. The partial image is stored at a predetermined location in the memory means. Device space first
And the source space is a second coordinate space. The coordinate conversion means inputs raster scan information forming a drawing geometric shape of the scanned image represented in the device space, performs inverse conversion to the source space, and outputs geometric information in the source space, that is, raster scan information. The address generation means inputs raster scan information in the source space,
Address information of pixels of the partial image on the memory means corresponding to the pixels of the scanned image in the device space is generated. The pixels of the scanned image portion of the device image are obtained by sequentially reading the pixels of the partial image stored in the memory means using the address information.
【0068】請求項9、10および11の発明では、ソ
ース空間のラスタ画像を分割手段を用いてそのままある
いは所定の縮小率で縮小した上で、所定の大きさの複数
の部分画像に分割する。重なり検出手段は、ソース画像
がデバイス空間上で描画される部分の幾何形状を求め、
この幾何形状と部分画像とが重なり合う関係にあるか否
かを調べる。分割手段は、重なり検出手段で重なりを検
出した部分画像について部分画像作り、部分画像を符号
化手段へ出力する。符号化手段は、各々の部分画像を入
力し符号化を行い部分画像の符号を得る。符号化するこ
とでデータ量を小さくする。部分画像の符号をメモリ手
段に格納する。復号順決定手段はデバイス画像をラスタ
順に走査した場合に前記部分画像が走査上に出現する順
番を調べ、その順を部分画像符号の復号順とする。復号
手段は復号順決定手段が決定した復号順に従って、部分
画像の符号を復号し部分画像を作る。その部分画像はメ
モリ手段の所定の場所に格納される。デバイス空間を第
1の座標空間、ソース空間を第2の座標空間とする。座
標変換手段は、デバイス空間で表現されたスキャンドイ
メージの描画幾何形状を形成するラスタスキャン情報を
入力し、ソース空間へ逆変換し、ソース空間での幾何情
報すなわちラスタスキャン情報を出力する。アドレス生
成手段は、ソース空間でのラスタスキャン情報を入力
し、デバイス空間のスキャンドイメージの画素に対応す
るメモリ手段上の部分画像の画素のアドレス情報を生成
する。このアドレス情報を用いてメモリ手段に格納され
た部分画像の画素を順次読み出すことで、デバイス画像
のスキャンドイメージ部の画素を得る。According to the ninth, tenth and eleventh aspects of the present invention, the raster image in the source space is divided into a plurality of partial images of a predetermined size after being reduced by a dividing means as it is or at a predetermined reduction ratio. The overlap detecting means obtains a geometric shape of a portion where the source image is drawn in the device space,
It is checked whether or not this geometrical shape and the partial image are in an overlapping relationship. The dividing unit forms a partial image for the partial image for which the overlap is detected by the overlap detecting unit, and outputs the partial image to the encoding unit. The encoding means inputs each partial image and performs encoding to obtain a code of the partial image. The amount of data is reduced by encoding. The code of the partial image is stored in the memory means. The decoding order determining means checks the order in which the partial images appear on the scan when the device images are scanned in the raster order, and determines the order as the decoding order of the partial image codes. The decoding means decodes the codes of the partial images according to the decoding order determined by the decoding order determining means to create a partial image. The partial image is stored at a predetermined location in the memory means. The device space is defined as a first coordinate space, and the source space is defined as a second coordinate space. The coordinate conversion means inputs raster scan information forming a drawing geometric shape of the scanned image represented in the device space, performs inverse conversion to the source space, and outputs geometric information in the source space, that is, raster scan information. The address generation unit inputs raster scan information in the source space and generates address information of a pixel of the partial image on the memory unit corresponding to a pixel of the scanned image in the device space. The pixels of the scanned image portion of the device image are obtained by sequentially reading the pixels of the partial image stored in the memory means using the address information.
【0069】請求項12の発明では、復号手段が復号順
決定手段が決定した復号順に従って部分画像の符号を復
号し部分画像を復元しメモリ手段に格納するタイミング
と、第1の座標空間すなわちデバイス空間での描画情報
を走査線順に読み出し座標変換手段で第2の座標空間す
なわちソース空間へ逆変換し座標変換手段が更に該座標
値をメモリ手段の該アドレスに変換しメモリ手段をアク
セスする一連の処理のタイミングとを同期させる。According to the twelfth aspect, the decoding means decodes the code of the partial image in accordance with the decoding order determined by the decoding order determining means, restores the partial image, and stores the partial image in the memory means. The drawing information in the space is read out in the order of the scanning line, and the coordinate conversion means reversely converts the information into the second coordinate space, that is, the source space. Synchronize the processing timing.
【0070】請求項13の発明では、アドレス変換手段
はソース画像毎に独立したアドレス変換テーブルを参照
して、第2の座標空間すなわちソース空間での該部分画
像位置からメモリ手段での該部分画像の格納場所を得
て、該画素のアドレスを計算し、該画素の値を得る。According to the thirteenth aspect of the present invention, the address conversion means refers to an independent address conversion table for each source image and converts the partial image position in the second coordinate space, that is, the source space, into the partial image in the memory means. , The address of the pixel is calculated, and the value of the pixel is obtained.
【0071】[0071]
【発明の実施の形態】以下本発明のラスタ画像生成方法
およびラスタ画像生成装置の詳細を3つの実施例により
説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The details of a raster image generating method and a raster image generating apparatus according to the present invention will be described with reference to three embodiments.
【0072】[実施例1]まず、第1の実施例のラスタ
画像生成方法およびラスタ画像生成装置の処理の手順を
図1を用いて説明する。処理は途中でプロセスをフォー
クし、複数のプロセスが同期を取りつつ協調動作して処
理を行う。[Embodiment 1] First, a raster image generating method and a processing procedure of a raster image generating apparatus according to a first embodiment will be described with reference to FIG. The process forks a process in the middle, and a plurality of processes cooperate while performing synchronization to perform the process.
【0073】処理手順の最初のステップS01では、描
画情報が記述されたPDLを入力する。次にステップS
02で、入力されたPDLをインタプリタで解釈実行す
る。インタプリタがスキャンドイメージの描画要求を検
出すると、ステップS10からS13までの一連の処理
からなるプロセスをフォークし、そのプロセスはS03
以降のステップと並行に動作する。In the first step S01 of the processing procedure, a PDL describing drawing information is input. Next, step S
At 02, the input PDL is interpreted and executed by the interpreter. When the interpreter detects a scan image drawing request, it forks a process consisting of a series of processes from steps S10 to S13, and the process forks a process S03.
Operate in parallel with the following steps.
【0074】ステップS10ではスキャンドイメージの
画像を入力する。画像はラスタデータあるいはデータ圧
縮のため符号の形式で入力される。後者の場合、ここの
ステップで符号を復号しラスタデータにする。以降この
ラスタデータをソース画像とする。ステップS11では
ソース画像を、64×64画素の正方形の部分画像でタ
イル状に分割する。なお、分割の際にインタープリタの
指示により、ソース画像を縮小したうえで64×64画
素の部分画像に分割することもある。縮小を行った場合
は、縮小後の画像を以降ソース画像と見なして処理す
る。ステップS12では部分画像毎に画像を符号化す
る。その際に、後述のステップS20にて作られた重な
り情報を参照し、該部分画像の符号化条件がTRUEの
時のみ符号化を行う。ここで作られた符号は、ステップ
13にて部分画像の場所に応じたメモリロケーションに
書き込まれる。各部分画像の符号化と符号の書き込みが
全て完了したら、このプロセスは終了する。In step S10, a scanned image is input. The image is input in the form of raster data or a code for data compression. In the latter case, the code is decoded into raster data in this step. Hereinafter, this raster data is used as a source image. In step S11, the source image is divided into tiles by a square partial image of 64 × 64 pixels. At the time of division, the source image may be reduced and then divided into a partial image of 64 × 64 pixels according to an instruction of the interpreter. When the image is reduced, the image after the reduction is regarded as a source image and processed. In step S12, an image is encoded for each partial image. At this time, the encoding is performed only when the encoding condition of the partial image is TRUE with reference to the overlapping information created in step S20 described later. The code created here is written in a memory location corresponding to the location of the partial image in step 13. When the encoding of each partial image and the writing of the code are all completed, the process ends.
【0075】ステップS02におけるインタープリタの
実行の結果、PDLの描画情報に応じて各種の描画指
令、例えば文字の描画、直線の描画、曲線の描画、閉空
間の塗りつぶし等の指令がステップS03に送られる。
ステップS03では前記描画指令に基づいてデバイス空
間での描画情報が形成される。実施例では特開平5−2
24637号公報において開示される技術と同様の技術
を用いており、描画情報はデバイス空間の走査線上のセ
グメント情報として生成され記録される。インタープリ
タが1ページ分の描画の終了を検出すると、3つのプロ
セスをフォークする。一つはステップS20からS21
までの一連の処理からなるプロセスで、二つめはステッ
プS22からS24までの一連の処理からなるプロセス
で、三つめはステップS30からS34までの一連の処
理からなるプロセスである。As a result of the execution of the interpreter in step S02, various drawing commands, such as drawing characters, drawing straight lines, drawing curves, and filling closed spaces, are sent to step S03 in accordance with the PDL drawing information. .
In step S03, drawing information in the device space is formed based on the drawing command. In the embodiment, Japanese Patent Laid-Open No.
The technique similar to the technique disclosed in Japanese Patent No. 24637 is used, and the drawing information is generated and recorded as segment information on a scanning line in the device space. When the interpreter detects the end of drawing for one page, it forks three processes. One is from step S20 to S21
The second is a process consisting of a series of processes from steps S22 to S24, and the third is a process consisting of a series of processes from steps S30 to S34.
【0076】ステップS20では、ソース画像を分割し
た各部分画像がデバイス画像のスキャンドイメージ部分
の描画に寄与するかを調べる。PostScriptの
ようなPDLでは、ソース画像をアフィン変換した後に
任意の図形形状で切り抜いた上でデバイス画像上に描画
する。更に、デバイス画像上に描画した後に、スキャン
ドイメージ画像上に任意のラインアートを重ね書きする
こともある。このため、デバイス空間でのスキャンドイ
メージ部分の輪郭形状は任意の形状となる。この輪郭形
状の内側あるいは輪郭形状と交差する部分画像に存在す
る画素のみがデバイス画像の描画に貢献する。描画に無
効な部分画像をステップS12にて符号化しステップS
13にてメモリに書きこんでも意味がない。そこで有効
な部分画像すなわち部分画像と任意の形状の閉領域との
重ね合わせを検出し、それを符号化条件すなわち重なり
情報としてステップS12に通知する。In step S20, it is determined whether or not each of the partial images obtained by dividing the source image contributes to the rendering of the scanned image portion of the device image. In PDL such as PostScript, a source image is affine-transformed, cut out in an arbitrary figure shape, and then drawn on a device image. Furthermore, after drawing on a device image, an arbitrary line art may be overwritten on a scanned image image. For this reason, the contour shape of the scanned image portion in the device space has an arbitrary shape. Only pixels existing inside the contour shape or in a partial image intersecting with the contour shape contribute to drawing of the device image. In step S12, a partial image invalid for drawing is encoded.
There is no point in writing to memory at 13. Therefore, the superposition of the effective partial image, that is, the partial image and the closed region of an arbitrary shape is detected, and this is notified to the step S12 as the encoding condition, that is, the overlap information.
【0077】ステップS21では有効な部分画像の集合
をデバイス画像に写像し、デバイス空間の走査線を上か
ら下へ走査した際に、走査線上に新たに出現する部分画
像を調べる。走査線毎に新規出現部分画像の一覧を記載
した表を用意する。この表では部分画像は走査線順にソ
ートされ並んでいる。デバイス画像の出力では走査線順
にスキャンし画素を出力するので、この表を利用し、走
査線Yの出力の前に走査線Yにて新規に出力する部分画
像を復号すればよい。従って、この表の作成が復号順の
決定となる。復号順情報はステップS22に伝えられ
る。ステップS21が完了したらこのプロセスは終了す
る。In step S21, a set of valid partial images is mapped onto a device image, and when a scan line in the device space is scanned from top to bottom, a new partial image that appears on the scan line is examined. A table in which a list of newly appearing partial images is prepared for each scanning line is prepared. In this table, the partial images are sorted and arranged in the scanning line order. Since the output of the device image is performed by scanning in the scanning line order and outputting the pixels, this table may be used to decode the partial image newly output on the scanning line Y before outputting the scanning line Y. Therefore, creation of this table determines the decoding order. The decoding order information is transmitted to step S22. This process ends when step S21 is completed.
【0078】ステップS22ではステップS21で作成
された復号順情報を用いて、ステップS13にてメモリ
書き込まれた部分画像の符号をメモリより読み出す。ス
テップS23では符号を復号し部分画像を復元し、ステ
ップ24で部分画像をメモリに書き込む。復号順情報に
記載された部分画像全てに関して符号のメモリ読み出し
/復号/画像のメモリ書き込みの処理が完了したらこの
プロセスは完了する。In step S22, the code of the partial image written in the memory in step S13 is read from the memory using the decoding order information created in step S21. In step S23, the code is decoded to restore the partial image, and in step 24, the partial image is written to the memory. This process is completed when the code memory read / decode / image memory write processing is completed for all the partial images described in the decoding order information.
【0079】ステップS30とS33は描画情報である
画素セグメントにより選択的に起動される。画素セグメ
ントがラインアートのものの場合は、ステップS33に
て1+X1−X0個(ただし、X0はセグメント左端の
X座標、X1は右端)の同じ色の画素を作り、ステップ
S34で出力する。画素セグメントがスキャンドイメー
ジの場合は、まずステップS30にてデバイス空間での
セグメントの始点から終点までの各画素の座標をソース
空間に座標変換しソース空間上での該画素の座標を得
る。次いでステップS31で各ソース座標値を該画素の
メモリ上でのアドレスに変換し、そのアドレスを用いて
ステップS32にてメモリより画素を読み出し、ステッ
プS34にて出力する。ステップS34にてメモリより
読み出す画素はステップS24にてメモリに書き込まれ
た画素である。以上の処理を1ページ分、すなわち、最
初の走査線から最後の走査線まで、走査線上の左端のセ
グメントから順に右端のセグメントについて行う。1ペ
ージ分の処理が完了したらこのプロセスは終了する。Steps S30 and S33 are selectively activated by a pixel segment which is drawing information. If the pixel segment is a line art, 1 + X1-X0 pixels (where X0 is the X coordinate of the left end of the segment and X1 is the right end) are created in step S33 and output in step S34. When the pixel segment is a scanned image, first, in step S30, the coordinates of each pixel from the start point to the end point of the segment in the device space are converted to the source space to obtain the coordinates of the pixel in the source space. Next, in step S31, each source coordinate value is converted into an address of the pixel on the memory, the pixel is read from the memory in step S32 using the address, and output in step S34. The pixel read from the memory in step S34 is the pixel written in the memory in step S24. The above processing is performed for one page, that is, for the rightmost segment in order from the leftmost segment on the scanning line from the first scanning line to the last scanning line. This process ends when the processing for one page is completed.
【0080】本発明の第1の実施例の全体のブロック図
を図2に示す。本実施例では、CPU1とI/O手段2
とメモリ4とをバス3で接続した計算機システム上に構
成されている。CPU1はメモリ4に格納されたプログ
ラムの命令語を読み出し実行する。プログラムの実行の
過程で、メモリ4に格納された各種データがCPU1に
ロードされ、プログラムに従って各種演算が行われ、結
果がメモリ4に格納される。I/O手段2は、キーボー
ド、CRTディスプレイ、磁気ディスク、フロッピィデ
ィスクドライブ、CD−ROMドライブ、ネットワーク
I/F等である。キーボードとCRTディスプレイはオ
ペレータが計算機システムを操作するために用いられ
る。磁気ディスクは各種データをファイルとして長期的
あるいは一時的に格納するために用いる。フロッピィデ
ィスクドライブはフロッピィディスクを読み書きするた
めに用い、主な利用目的はシステムの初期化や故障診断
の為のプログラムをロードすることである。CD−RO
MドライブはCD−ROMを読む為に用い、各種のアプ
リケーションプログラム等をインストールするために使
う。FIG. 2 shows an overall block diagram of the first embodiment of the present invention. In this embodiment, the CPU 1 and the I / O means 2
And a memory 4 on a computer system connected by a bus 3. The CPU 1 reads and executes a program instruction word stored in the memory 4. In the course of the execution of the program, various data stored in the memory 4 is loaded into the CPU 1, various operations are performed according to the program, and the result is stored in the memory 4. The I / O means 2 is a keyboard, a CRT display, a magnetic disk, a floppy disk drive, a CD-ROM drive, a network I / F, and the like. The keyboard and CRT display are used by the operator to operate the computer system. The magnetic disk is used to store various data as a file for a long term or temporarily. The floppy disk drive is used for reading and writing a floppy disk, and its main purpose is to load a program for initializing the system and diagnosing a failure. CD-RO
The M drive is used to read a CD-ROM, and is used to install various application programs and the like.
【0081】メモリ4は計算機システムの主記憶であ
る。PDLのインタープリタ10はプログラムの形態で
メモリ4に格納されている。描画情報生成手段11、重
なり検出手段12、復号順決定手段13も同様にプログ
ラムの形態でメモリ4に格納されている。これらはCP
U1によって実行され。The memory 4 is a main memory of the computer system. The PDL interpreter 10 is stored in the memory 4 in the form of a program. The drawing information generating means 11, the overlap detecting means 12, and the decoding order determining means 13 are also stored in the memory 4 in the form of a program. These are CP
Performed by U1.
【0082】ネットワークI/Fを用いてPDLで記述
した画像情報を受信し、磁気ディスクに格納する。それ
を磁気ディスクから読み出しメモリ4に格納する。イン
タープリタ10はメモリ4上のPDL記述を解釈し実行
する。インタープリタ10は実行の結果として、描画指
令を描画情報生成手段11に与える。描画情報生成手段
11は、各種描画指令をデバイス空間の解像度の描画情
報に変換する。フォント、グラフィクス、スキャンドイ
メージの描画指令は、特開平5−224637に開示さ
れる技術を用いて、デバイス空間の走査線に沿ったセグ
メント情報に変換され、描画情報16としてメモリ4に
格納される。本実施例では特開平5−224637とは
異なり、スキャンドイメージの外接矩形の処理は行う
が、スキャンドイメージそのものについてはここでは処
理しない。The image information described in PDL is received using the network I / F and stored in the magnetic disk. It is read from the magnetic disk and stored in the memory 4. The interpreter 10 interprets and executes the PDL description on the memory 4. The interpreter 10 gives a drawing command to the drawing information generating means 11 as a result of the execution. The drawing information generating means 11 converts various drawing commands into drawing information of the resolution of the device space. The rendering command of the font, graphics, and scanned image is converted into segment information along the scanning lines of the device space using the technology disclosed in Japanese Patent Application Laid-Open No. 5-224637 and stored in the memory 4 as the rendering information 16. . In the present embodiment, unlike Japanese Patent Application Laid-Open No. 5-224637, processing of a circumscribed rectangle of a scanned image is performed, but processing of the scanned image itself is not performed here.
【0083】重なり検出手段12は、メモリ4に格納さ
れた描画情報16を読み出し、スキャンドイメージの輪
郭情報と部分画像との重なりを検出し、部分画像毎の重
なり情報14をメモリ4に格納する。重なり検出の詳細
については後段で詳細に説明する。The overlap detecting means 12 reads the drawing information 16 stored in the memory 4, detects the overlap between the outline information of the scanned image and the partial image, and stores the overlap information 14 for each partial image in the memory 4. . The details of the overlap detection will be described later.
【0084】復号順決定手段13は、メモリ4に格納さ
れた重なり情報14を読み出し、部分画像の符号を復号
する際の復号順を決定し、復号順情報15をメモリ4に
格納する。復号順の決定の詳細については後段で詳細に
説明する。The decoding order determining means 13 reads the overlapping information 14 stored in the memory 4, determines the decoding order when decoding the codes of the partial images, and stores the decoding order information 15 in the memory 4. The details of the determination of the decoding order will be described later.
【0085】ネットワークI/Fを用いてスキャンドイ
メージの画像データを入力し、一旦磁気ディスクに格納
する。それを磁気ディスクから読み出し、バス3を経由
し、画像入力手段20に与える。画像入力手段20は縮
小手段21と行バッファ24と結合している。行バッフ
ァ手段24は更に分割手段22と結合している。分割手
段22の出力は符号化手段23に供給されるよう構成さ
れている。符号化手段23の出力である部分画像の符号
17はメモリ4に格納される。縮小手段21はラスタ画
像を行バッファ24に書き込む際に画像を縮小する。符
号化手段23は、符号化の際にメモリ4に格納された重
なり情報14を参照して、符号化すべき部分画像につい
てのみ符号化を行う。The image data of the scanned image is input using the network I / F, and is temporarily stored on the magnetic disk. It is read from the magnetic disk and provided to the image input means 20 via the bus 3. The image input means 20 is connected to the reduction means 21 and the row buffer 24. The row buffer means 24 is further connected to the dividing means 22. The output of the dividing unit 22 is configured to be supplied to the encoding unit 23. The code 17 of the partial image output from the encoding means 23 is stored in the memory 4. The reduction unit 21 reduces the size of the raster image when writing the raster image into the row buffer 24. The encoding unit 23 encodes only the partial image to be encoded with reference to the overlap information 14 stored in the memory 4 at the time of encoding.
【0086】復号手段25は、メモリ4に格納された復
号順情報15に基づいて、メモリ4に格納された該部分
画像の符号17をバス3を経由し入力し、復号し、該部
分画像を作り、それをメモリ28に格納する。The decoding means 25 inputs the code 17 of the partial image stored in the memory 4 via the bus 3 based on the decoding order information 15 stored in the memory 4, decodes the code, and decodes the partial image. And store it in memory 28.
【0087】座標変換手段26はメモリ4に格納されて
いる描画情報16のスキャンドイメージに関連するセグ
メント情報を入力し、デバイス空間で表現されたセグメ
ント上の画素の座標をソース空間上の線分上の画素の座
標に変換する。ラインアートに関連するセグメント情報
は座標変換手段26とアドレス変換手段27とメモリ2
8を通らず直接画像出力手段29に供給される。座標変
換手段26の出力であるソース空間の座標情報はアドレ
ス変換手段27に供給される。アドレス変換手段27
は、ソース空間の座標情報をメモリ28上の該当する部
分画像の該当する画素のアドレスに変換し、アドレスを
メモリ手段28に送る。メモリ手段28は、アドレス変
換手段27から与えられたアドレスでメモリ上の部分画
像の画素を読み出し、読み出した画素を画像出力手段2
9に供給する。画像出力手段29はラインアートのセグ
メント情報からラインアートの画素を生成し、スキャン
ドイメージの画素と組み合せて出力画像としてIOT
(Image OutputTerminal:画像出
力装置)へ出力する。The coordinate conversion means 26 inputs the segment information relating to the scanned image of the drawing information 16 stored in the memory 4 and converts the coordinates of the pixels on the segment expressed in the device space into the line segments in the source space. Convert to the coordinates of the upper pixel. The segment information related to the line art is stored in a coordinate conversion unit 26, an address conversion unit 27, and a memory 2.
8 and is supplied directly to the image output means 29. The coordinate information of the source space, which is the output of the coordinate conversion means 26, is supplied to the address conversion means 27. Address conversion means 27
Converts the coordinate information of the source space into the address of the corresponding pixel of the corresponding partial image on the memory 28, and sends the address to the memory means 28. The memory means 28 reads out the pixels of the partial image on the memory at the address given from the address conversion means 27 and outputs the read out pixels to the image output means 2.
9. The image output means 29 generates a line art pixel from the line art segment information and combines it with the scanned image pixel to produce an IOT as an output image.
(Image Output Terminal: image output device).
【0088】次に第1の実施例の各手段についてより詳
細に説明する。Next, each means of the first embodiment will be described in more detail.
【0089】描画情報生成手段11は、インタープリタ
10が指示したフォント、グラフィクス、スキャンドイ
メージの輪郭等を、デバイス空間の解像度での形状に変
換し、デバイス空間の走査線上のセグメントで表現す
る。実施例の描画情報生成手段11は、従来技術で説明
したデータ構造に類似した構造を用いてデバイス画像の
全走査線上の全セグメントを表現し、描画情報16とし
てメモリ4に格納する。本実施例では描画情報の生成は
特開平5−224637に開示される技術と同様の技術
で行う。The drawing information generating means 11 converts the fonts, graphics, contours of the scanned image, etc. specified by the interpreter 10 into a shape at the resolution of the device space, and expresses them as segments on the scanning lines of the device space. The drawing information generating unit 11 of the embodiment expresses all segments on all the scanning lines of the device image using a structure similar to the data structure described in the related art, and stores it as the drawing information 16 in the memory 4. In the present embodiment, the generation of the drawing information is performed by the same technology as the technology disclosed in Japanese Patent Application Laid-Open No. 5-224637.
【0090】その結果、例えば図3に示すデバイス画像
の走査線Y1に関する描画情報16は図4に例示する様
なかたちで表現される。全走査線は配列devImag
e[]よりアクセス可能である。配列devImage
[]は走査線数HDの要素を持ち、各配列要素は各走査
線の左端セグメントのノードへのポインタである。走査
線Y1について走査する場合はまずdevImage
[Y1]を読み出し、走査線左端のセグメントのノード
へのポインタを得る。次にそのポインタを用いて左端の
セグメントのノードを得る。X座標が0からX1−1ま
での左端セグメントSeg1の色はラインアートの白で
あり、ノード内のポインタppは白い画素をさし、dp
は0、nextは右隣のセグメントのノードを指す。左
から2番目のセグメントSeg2は文字「A」の一部で
あり、X座標はX1からX2−1まで、ラインアートに
由来し、色は灰色である。左から3番目のセグメントS
eg3はX座標X2からX3−1までを占め文字「A」
の背景部分でラインラートで色は白である。左から4番
目のセグメントSeg4はX座標X3からX4−1まで
を占め文字「A」の一部でラインラートで色は灰色であ
る。左から5番目のセグメントSeg5はX座標X4か
らX5−1までを占めラインラートで色は白である。左
から6番目のセグメントSeg6はX座標X5からX6
−1までを占めスキャンドイメージに由来する。左から
7番目のセグメントSeg7は右端のセグメントであり
X座標X6からWD−1までを占めラインラートで色は
白である。描画情報16には各セグメントの情報すなわ
ち、セグメントの左端と右端のX座標値(それぞれx0
とx1)、セグメントの色情報等へのポインタpp、セ
グメントがラインアートあるいはスキャンドイメージに
由来することを示すフラグdp、右隣りのセグメントの
ノードへのポインタnextが該セグメントのノードに
格納されている。従来技術ではポインタppは画素デー
タへのポインタであったが、実施例ではppはラインア
ートのセグメントでは画素データへのポインタ、スキャ
ンドイメージのセグメントでは後述のテーブルへのポイ
ンタである。セグメントSeg1,Seg3,Seg
5,Seg7はラインアート由来の白のセグメントなの
で、それぞれのノードのppは白い画素値のデータを格
納するエリアへのポインタを有し、dpには0が入る。
セグメントSeg2とSeg4はラインラート由来の灰
色のセグメントなので、それぞれのノードのppには灰
色の画素値を格納するエリアへのポインタを有し、dp
には0が入る。セグメントSeg6はスキャンドイメー
ジに由来するセグメントであり、ppにはメモリ28に
格納される部分画像へのポインタのテーブルへのポイン
タが格納され、dpにはスキャンドイメージのセグメン
トを示す為1が設定される。右端のセグメントSeg7
にはnextにNULLが設定される。As a result, for example, the drawing information 16 relating to the scanning line Y1 of the device image shown in FIG. 3 is expressed in the form illustrated in FIG. All scan lines are in the array devImag
It is accessible from e []. Array devImage
[] Has elements of the number of scanning lines HD, and each array element is a pointer to a node of the left end segment of each scanning line. When scanning with respect to the scanning line Y1, first, devImage
[Y1] is read, and a pointer to the node of the segment at the left end of the scanning line is obtained. Next, the node of the leftmost segment is obtained using the pointer. The color of the left end segment Seg1 whose X coordinate is from 0 to X1-1 is white of the line art, the pointer pp in the node indicates a white pixel, and dp
Indicates 0, and next indicates the node of the segment on the right. The second segment Seg2 from the left is a part of the character "A", the X coordinate is from X1 to X2-1, derived from line art, and the color is gray. Third segment S from the left
eg3 occupies the X coordinates X2 to X3-1 and the character "A"
The color is white in the linerat in the background part of. The fourth segment Seg4 from the left occupies the X coordinates X3 to X4-1, is part of the character "A", and is line-latched and gray in color. The fifth segment Seg5 from the left occupies the X coordinates X4 to X5-1 and is a line rate and white in color. The sixth segment Seg6 from the left is from X coordinate X5 to X6
-1 and derived from scanned images. The seventh segment Seg7 from the left is the rightmost segment, occupies the X coordinate X6 to WD-1, and is a line rate and white in color. The drawing information 16 includes information on each segment, that is, the X coordinate values of the left end and the right end of the segment (x0 respectively).
X1), a pointer pp to the color information of the segment, a flag dp indicating that the segment is derived from line art or a scanned image, and a pointer next to the node of the segment on the right side are stored in the node of the segment. I have. In the related art, the pointer pp is a pointer to pixel data, but in the embodiment, pp is a pointer to pixel data in a line art segment and a pointer to a table described later in a scanned image segment. Segment Seg1, Seg3, Seg
Since 5, Seg7 is a white segment derived from line art, pp of each node has a pointer to an area for storing data of white pixel values, and 0 is entered in dp.
Segments Seg2 and Seg4 are gray segments derived from Rheinrad, so each node pp has a pointer to an area for storing gray pixel values, and dp
Is 0. The segment Seg6 is a segment derived from the scanned image. A pointer to a table of pointers to partial images stored in the memory 28 is stored in pp, and 1 is set in dp to indicate a segment of the scanned image. Is done. Right end segment Seg7
Is set to NULL for next.
【0091】デバイス画像におけるスキャンドイメージ
部分は、図5の512×512画素の正方形のソース画
像abcdをアフィン変換し、図6に示すようなデバイ
ス空間上の平行四辺形ABCDを得て、それを長方形E
FGHでクリッピングし、内側をデバイス画像上に描画
したものである。The scanned image portion of the device image is obtained by affine transforming a 512 × 512 pixel square source image abcd of FIG. 5 to obtain a parallelogram ABCD on the device space as shown in FIG. Rectangle E
Clipping is performed by FGH, and the inside is drawn on a device image.
【0092】ソース画像abcdは8×8個の部分画像
に分割出来る。部分画像をデバイス空間に写像すると図
6に示す8×8個の平行四辺形になる。The source image abcd can be divided into 8 × 8 partial images. When the partial image is mapped to the device space, it becomes an 8 × 8 parallelogram shown in FIG.
【0093】ソース画像がBx×By個の部分画像に分
割出来る場合、重なり情報14は図7に示すようにBx
×By個の要素を持つテーブルとして構成され、メモリ
4に格納されている。テーブルのエントリは1(真)ま
たは0(偽)の論理値を格納する。If the source image can be divided into Bx × By partial images, the overlap information 14 is Bx × By as shown in FIG.
It is configured as a table having × By elements and stored in the memory 4. An entry in the table stores a logical value of 1 (true) or 0 (false).
【0094】重なり検出手段12は、まず重なり情報1
4のテーブルの全エントリを0にする。その後、重なり
検出手段12は、メモリ4に格納された描画情報16よ
りスキャンドイメージの輪郭情報を読み出し、それを該
スキャンドイメージの描画の際に指定されたアフィン変
換の逆変換を施し、輪郭情報をスキャンドイメージのソ
ース空間に写像する。デバイス画像のスキャンドイメー
ジ部分の描画に貢献する画素は逆変換された輪郭形状の
内側にある。従って、逆変換された外形形状の内側に存
在する部分画像あるいは輪郭上に存在する部分画像のみ
がデバイス画像の描画に寄与する。従って、重なり検出
手段12はそのような部分画像を選べばよい。部分画像
の選択は次のように行う。描画情報16中のスキャンド
イメージのセグメントを順次読み出し、該セグメントを
逆変換し、ソース空間に写像する。セグメントはデバイ
ス空間で幅X1−X0、高さ1の長方形なので、逆変換
するとソース空間上では平行四辺形となる。この平行四
辺形と重なる部分画像を見つける。これは部分画像の解
像度で平行四辺形を描画すること、すなわち、平行四辺
形を部分画像の精度で解像度変換することに等しい。図
形の解像度変換については多くの技術が知られており、
例えばJames D.FoleyとAndries
Van Dam共著のテキストブック「コンピュータ・
グラフクス」の11章に代表的な技術が記載されてい
る。本実施例では11.7章に記載されているスキャン
・ライン・アルゴリズムを用いて解像度変換を行う。解
像度変換の結果、該平行四辺形のと重なる部分画像が検
出される。図8は図5のソース画像の部分画像において
逆変換された輪郭形状efghと重なる部分画像をグレ
ーで示している。細長い平行四辺形はデバイス空間のセ
グメントを逆変換したものである。セグメントの平行四
辺形毎に部分画像との重なりを検出し、重なっていた部
分画像の和集合をとればよい。重なり検出手段12は、
重なり情報14のテーブルにおいて、検出された部分画
像に対応するエントリに1を書き込む。重なり検出手段
12は描画情報16の全スキャンドイメージ由来のセグ
メントに関して以上の処理を行う。処理終了後、重なり
情報14にはデバイス画像に寄与する部分画像全てのエ
ントリに1が書き込まれている。図5のソース画像にア
フィン変換とクリッピングを行い図6のデバイス画像と
した場合の重なり情報14を図9に例として示す。The overlap detecting means 12 first sets the overlap information 1
All entries in the table No. 4 are set to 0. Thereafter, the overlap detecting means 12 reads out the outline information of the scanned image from the drawing information 16 stored in the memory 4 and performs an inverse transformation of the affine transformation designated when drawing the scanned image, thereby obtaining the outline. Map the information into the source space of the scanned image. Pixels that contribute to rendering the scanned image portion of the device image are inside the inversely transformed contour shape. Therefore, only a partial image existing inside the inversely transformed outer shape or a partial image existing on the contour contributes to the drawing of the device image. Therefore, the overlap detecting means 12 may select such a partial image. Selection of a partial image is performed as follows. The segments of the scanned image in the drawing information 16 are sequentially read, and the segments are inversely transformed and mapped to the source space. Since the segment is a rectangle having a width of X1-X0 and a height of 1 in the device space, it becomes a parallelogram in the source space when inversely transformed. Find the partial image that overlaps this parallelogram. This is equivalent to drawing a parallelogram at the resolution of the partial image, that is, converting the resolution of the parallelogram with the accuracy of the partial image. Many techniques are known for resolution conversion of figures.
For example, James D. Foley and Andries
A textbook co-authored by Van Dam "Computer
Representative techniques are described in Chapter 11 of "Graphics". In the present embodiment, resolution conversion is performed using the scan line algorithm described in section 11.7. As a result of the resolution conversion, a partial image overlapping with the parallelogram is detected. FIG. 8 shows, in gray, a partial image that overlaps with the inversely transformed contour shape efgh in the partial image of the source image in FIG. The elongated parallelogram is the inverse of a segment in device space. The overlap with the partial image may be detected for each parallelogram of the segment, and the union of the overlapping partial images may be obtained. The overlap detection means 12
In the table of the overlapping information 14, "1" is written in the entry corresponding to the detected partial image. The overlap detecting means 12 performs the above processing on the segments of the drawing information 16 derived from all the scanned images. After the processing is completed, 1 is written in the overlap information 14 in the entries of all the partial images that contribute to the device image. FIG. 9 shows an example of the overlap information 14 when the affine transformation and clipping are performed on the source image of FIG. 5 to obtain the device image of FIG.
【0095】復号順決定手段13は、まず、部分画像の
4個の頂点のうち、デバイス空間に変換した際にY座標
値が最小となる頂点を選び出し、それを部分画像の代表
点とする。復号順決定手段13はメモリ4に格納された
重なり情報14よりデバイス画像の描画に寄与する全部
分画像(xB,yB)について、代表点の座標(64・
xB+xoff,64・yB+yoff)をアフィン変
換し、Y座標値Y(xB,yB)と部分画像番号(x
B,yB)の組を得る。ここで、xoffとyoffは
次のように与えられる。The decoding order determining means 13 first selects, from among the four vertices of the partial image, the vertex having the minimum Y coordinate value when converted to the device space, and sets it as the representative point of the partial image. The decoding order determining means 13 determines the coordinates (64 ·) of the representative point for all partial images (xB, yB) contributing to the drawing of the device image from the overlap information 14 stored in the memory 4.
xB + xoff, 64 · yB + yoff) is affine-transformed, and the Y coordinate value Y (xB, yB) and the partial image number (x
B, yB). Here, xoff and yoff are given as follows.
【0096】[0096]
【表1】 [Table 1]
【0097】次に、各部分画像のY(xB,yB)の値
に関して昇順にソートし、結果を復号順情報15として
メモリ4に格納する。Next, the values of Y (xB, yB) of each partial image are sorted in ascending order, and the result is stored in the memory 4 as decoding order information 15.
【0098】以上の過程を、図5のソース画像にアフィ
ン変換とクリッピングを施し図6に示す様にデバイス画
像に描画する場合を例に説明する。この例では部分画像
の左上頂点が部分画像の代表点となる。従ってアフィン
変換後の代表点のY座標値Y(xB,yB)は、The above process will be described by taking as an example a case where the source image shown in FIG. 5 is subjected to affine transformation and clipping and is drawn on a device image as shown in FIG. In this example, the upper left vertex of the partial image is a representative point of the partial image. Therefore, the Y coordinate value Y (xB, yB) of the representative point after affine transformation is
【0099】[0099]
【数12】Y(xB,yB)=64・c・xB+64・
dy・B+v となる。ここでc,d,vはアフィン変換のパラメータ
である。## EQU12 ## Y (xB, yB) = 64.c.xB + 64.
dy · B + v. Here, c, d, and v are affine transformation parameters.
【0100】デバイス画像のスキャンドイメージの描画
寄与する部分画像は図8に灰色で示した部分であり、こ
れらのY(xB,yB)をそれぞれ計算し、昇順に並べ
た時の部分画像の順番は、(2,0),(1,1),
(0,2),(3,0),(2,1),(1,2),
(0,3),.....となる。復号順決定手段13
は、この順番に従って、Y(xB,yB)の値と部分画
像番号(xB,yB)を図11に示すような形で復号順
情報15としてメモリ4に格納する。The partial images contributing to the drawing of the scanned image of the device image are the parts shown in gray in FIG. 8, and their Y (xB, yB) are calculated, and the order of the partial images when they are arranged in ascending order Are (2,0), (1,1),
(0,2), (3,0), (2,1), (1,2),
(0,3),. . . . . Becomes Decoding order determining means 13
Stores the value of Y (xB, yB) and the partial image number (xB, yB) in the memory 4 as the decoding order information 15 in the form shown in FIG.
【0101】デバイス画像の出力時の走査はY=0の走
査線より始まり、Yの値を1づづ増し、HD−1に達す
るまで行う。従って、出力時の走査において、デバイス
画像に貢献する部分画像が走査線と交差する最初の点は
部分画像の代表点である。また、Y(xB,yB)が小
さな値をとる部分画像より順に走査線上に現れる。従っ
て部分画像の代表点のY(xB,yB)値で昇順にソー
トした順に部分画像の符号を復号して部分画像に戻し、
走査線Yのスキャンを行う前に部分画像が復元されてい
るように制御する。これにより、走査線Yのスキャン時
荷はスキャンドイメージの画素を直ちに得ることができ
る。図10を例にすると、デバイス空間の走査線Yを0
から順に走査する場合、まずY=Y(1,1)までに部
分画像(1,1)の符号を復号しておく。Y=Y(0,
2)までに部分画像(0,2)を復号しておく以下同様
に部分画像(3,0),(2,1),(1,2),
(0,3),....をそれぞれY=Y(xB,yB)
になる前に復号しておく。このように、Y(xB,y
B)でソートした順に部分画像の符号を復号すること
で、デバイス画像の走査時までに部分画像を用意するが
可能となる。The scanning at the time of outputting the device image starts from the scanning line of Y = 0, and is performed until the value of Y is increased by one and reaches HD-1. Therefore, in scanning at the time of output, the first point where the partial image contributing to the device image intersects the scanning line is a representative point of the partial image. Further, Y (xB, yB) appears on the scanning line in order from the partial image having a small value. Accordingly, the codes of the partial images are decoded and returned to the partial images in the order sorted in ascending order by the Y (xB, yB) values of the representative points of the partial images,
Control is performed so that the partial image is restored before scanning the scanning line Y. Thus, the scanning load of the scanning line Y can immediately obtain the pixels of the scanned image. In the example of FIG. 10, the scanning line Y in the device space is set to 0.
When scanning in order from, the code of the partial image (1, 1) is decoded before Y = Y (1, 1). Y = Y (0,
The partial image (0, 2) is decoded by 2). Similarly, the partial images (3, 0), (2, 1), (1, 2),
(0,3),. . . . Respectively, Y = Y (xB, yB)
Before decryption. Thus, Y (xB, y
By decoding the codes of the partial images in the order sorted in B), it becomes possible to prepare the partial images by the time of scanning the device image.
【0102】画像入力手段20は、入力された画像デー
タが符号化されたデータの時には画像の符号を復号しラ
スタデータの形式にし、スキャン順に画素を縮小手段に
供給する。実施例においてはスキャンドイメージの圧縮
にしばしば用いられるJPEG符号用のデコーダを備え
ている。When the input image data is encoded data, the image input means 20 decodes the code of the image to form raster data, and supplies the pixels to the reduction means in the order of scanning. In the embodiment, a decoder for a JPEG code which is often used for compression of a scanned image is provided.
【0103】ソース画像のサイズを幅WS,高さHSと
する。縮小後のソース画像のサイズを幅Wi,高さHi
とする。x軸方向の画像の縮小率をnx、y軸方向の画
像の縮小率をnyとする。nxが3の場合画像はx軸方
向に1/3のサイズに縮小される。nyが2の場合画像
はy軸方向に1/2のサイズに縮小される。The size of the source image is assumed to be width WS and height HS. The size of the reduced source image is defined as width Wi and height Hi.
And The reduction ratio of the image in the x-axis direction is nx, and the reduction ratio of the image in the y-axis direction is ny. When nx is 3, the image is reduced to 1/3 in the x-axis direction. When ny is 2, the image is reduced to half the size in the y-axis direction.
【0104】縮小手段21と分割手段22と行バッファ
24は互いに結合しており、これらをまとめてブロック
図12に示す。行バッファ24はRAMで構成されてお
り、縮小手段21にて生成された書き込みアドレスのメ
モリ位置に入力画素を書き込む。書き込みは縮小手段2
1にて生成されたライトイネーブル信号WEにより制御
される。読み出しアドレスは分割手段22よりRAMに
供給され、該画素が出力され、画素は符号化手段23に
送られる。行バッファは縮小後のソース画像の走査線を
64本格納することができる。実施例では合計512K
×4バイトのSRAMを用いており、1行の長さは最大
8K(8192)画素となっている。1画素は4バイト
で4色成分までサポートできる。The reducing means 21, the dividing means 22, and the row buffer 24 are connected to each other, and they are collectively shown in FIG. The row buffer 24 is composed of a RAM, and writes an input pixel at a memory position of a write address generated by the reduction unit 21. Writing is reduction means 2
1 is controlled by the write enable signal WE generated in step S1. The read address is supplied from the dividing unit 22 to the RAM, the pixel is output, and the pixel is sent to the encoding unit 23. The row buffer can store 64 scan lines of the reduced source image. 512K in total in the embodiment
A × 4 byte SRAM is used, and the length of one row is a maximum of 8K (8192) pixels. One pixel can support up to four color components in four bytes.
【0105】縮小手段21には、ソース画像の画素のx
座標位置をカウントするxSカウンタ210、y座標位
置をカウントするySカウンタ211、nxカウンタ2
12、nyカウンタ213、縮小後のソース画像のx座
標位置をカウントするxiカウンタ214、縮小後のソ
ース画像のy座標位置をカウントするyiカウンタ21
5、ANDゲート216、アドレス生成器217とが備
えられている。The reducing means 21 supplies x of the pixel of the source image.
XS counter 210 for counting coordinate positions, yS counter 211 for counting y coordinate positions, nx counter 2
12, an ny counter 213, an xi counter 214 for counting the x coordinate position of the reduced source image, and a yi counter 21 for counting the y coordinate position of the reduced source image
5, an AND gate 216 and an address generator 217 are provided.
【0106】図13に示す縮小手段の動作のタイミング
図とともに縮小手段21の動作を説明する。The operation of the reduction means 21 will be described with reference to the timing chart of the operation of the reduction means shown in FIG.
【0107】xsカウンタ210は画素を入力するごと
に0からWS−1まで1つづつ増加する。WS−1に達
した時に新たな画素を入力すると0に戻る。これはソー
ス画像を1行入力終えたことを意味し、1行入力終了は
ySカウンタ211とnyカウンタに通知される。The xs counter 210 increases by one from 0 to WS-1 each time a pixel is input. When a new pixel is input when the value reaches WS-1, the value returns to 0. This means that one line of the source image has been input, and the end of the input of one line is notified to the yS counter 211 and the ny counter.
【0108】ySカウンタ211はソース画像を1行入
力するごとに0からHS−1まで1つづつ増加する。H
S−1のときに1行入力が完了したら0にもどる。これ
はソース画像の入力の完了を意味する。The yS counter 211 increases by one from 0 to HS-1 each time one line of the source image is input. H
When the input of one line is completed at S-1, the process returns to 0. This means that the input of the source image has been completed.
【0109】nxカウンタ212は1画素入力するごと
に0からnx−1までカウントアップし、nx−1に達
したら画素入力で再び0に戻る。nxカウンタの値が0
を示すとき、それxiカウンタ214とANDゲート2
16に通知される。nxカウンタはソース画像のx方向
縮小の際に画素を間引くタイミングを示す。nxカウン
タの値が0以外の時には画素を間引く。例えば、nx=
2の場合nxカウンタが1の時には画素を間引く。従っ
てソース画像はx軸方向に1/2に縮小する。nx=3
の場合nxカウンタが1〜2の時には画素を間引く。こ
れによりソース画像はx軸方向に1/3に縮小する。ソ
ース画像の縮小を行わない時にはnxとして1を設定す
る。この場合nxカウンタは常に0を保つのでx軸方向
の画素間引きは発生せず、ソース画像のx軸方向の縮小
は生じない。The nx counter 212 counts up from 0 to nx-1 each time one pixel is input, and when it reaches nx-1, returns to 0 again with pixel input. nx counter value is 0
Indicates that the xi counter 214 and the AND gate 2
16 is notified. The nx counter indicates the timing of thinning out pixels when the source image is reduced in the x direction. When the value of the nx counter is other than 0, pixels are thinned out. For example, nx =
In the case of 2, when the nx counter is 1, pixels are thinned out. Therefore, the source image is reduced by half in the x-axis direction. nx = 3
In this case, when the nx counter is 1 or 2, pixels are thinned out. As a result, the source image is reduced to 1/3 in the x-axis direction. When the reduction of the source image is not performed, 1 is set as nx. In this case, since the nx counter always keeps 0, no pixel thinning in the x-axis direction occurs, and no reduction in the x-axis direction of the source image occurs.
【0110】xiカウンタ214はnxカウンタ=0の
通知毎に0からWi−1まで1つづつ増加する。Wi−
1の時にnxカウンタ=0の通知を受けたら0に戻る。
これは縮小後のソース画像の1行が終わったことを意味
し、これはアドレス生成器217に通知される。The xi counter 214 increases by one from 0 to Wi-1 every time the nx counter = 0 is notified. Wi-
When the notification of nx counter = 0 is received at the time of 1, it returns to 0.
This means that one line of the reduced source image has been completed, and this is notified to the address generator 217.
【0111】nyカウンタ213はソース画像1行入力
するごとに0からny−1までカウントアップし、ny
−1に達したらソース画像1行の入力の通知で再び0に
戻る。nyカウンタの値が0を示す時、それはyiカウ
ンタ215とANDゲート216に通知される。nyカ
ウンタはソース画像のy方向縮小の際に画素を間引くタ
イミングを示す。nyカウンタの値が0以外の時には画
素を間引く。例えば、ny=2の場合nyカウンタが1
の時には走査線を間引く。従ってソース画像はy軸方向
に1/2に縮小する。ny=3の場合nyカウンタが1
〜2の時には走査線を間引く。これによりソース画像は
y軸方向に1/3に縮小する。ソース画像の縮小を行わ
ない時にはnyとして1を設定する。この場合nyカウ
ンタは常に0を保つのでy軸方向の走査線の間引きは発
生せず、ソース画像のy軸方向の縮小は生じない。The ny counter 213 counts up from 0 to ny-1 every time one line of the source image is input.
When it reaches -1, it returns to 0 again by the notification of the input of one line of the source image. When the value of the ny counter indicates 0, it is notified to the yi counter 215 and the AND gate 216. The ny counter indicates the timing of thinning out pixels when the source image is reduced in the y direction. When the value of the ny counter is other than 0, pixels are thinned out. For example, when ny = 2, the ny counter is 1
At this time, the scanning lines are thinned out. Therefore, the source image is reduced by half in the y-axis direction. When ny = 3, the ny counter is 1
In the case of 22, the scanning lines are thinned out. Thereby, the source image is reduced to 1/3 in the y-axis direction. When the source image is not reduced, 1 is set as ny. In this case, since the ny counter always keeps 0, no thinning of the scanning lines in the y-axis direction occurs, and no reduction of the source image in the y-axis direction occurs.
【0112】yiカウンタ214はnyカウンタ=0の
通知毎に0からHi−1まで1つづつ増加する。Hi−
1の時にnyカウンタ=0の通知を受けたら0に戻る。
これはソース画像入力の完了を意味する。yiカウンタ
214は更に、64行毎の入力完了も検出する。64行
毎の入力完了およびソース画像の入力完了は分割手段2
2に通知される。The yi counter 214 increases by one from 0 to Hi-1 every time the ny counter = 0 is notified. Hi-
When the notification of the ny counter = 0 is received at the time of 1, it returns to 0.
This means that the input of the source image has been completed. The yi counter 214 also detects completion of input every 64 lines. Completion of input every 64 lines and completion of input of source image
2 is notified.
【0113】ANDゲート216はnxカウンタ=0か
つnyカウンタ=0の条件を検出する。この条件が真の
とき該入力画素はxおよびy方向のいずれにも間引かな
い画素である。したがってANDゲート216の出力を
行バッファ24のRAMへのライトイネーブル信号WE
として供給する。WE信号荷より、RAMはこの時の入
力画素を書き込む。その際の書き込み先アドレスについ
ては以下で詳細に説明する。The AND gate 216 detects the condition of nx counter = 0 and ny counter = 0. When this condition is true, the input pixel is a pixel that is not thinned out in any of the x and y directions. Therefore, the output of the AND gate 216 is used as the write enable signal WE to the RAM of the row buffer 24.
Supply as The RAM writes the input pixel at this time based on the WE signal. The write destination address at that time will be described in detail below.
【0114】アドレス生成器217は、xiカウンタ2
14の値とyiカウンタ215の値を利用し、下記に示
す様にアドレスを生成する。The address generator 217 has the xi counter 2
Using the value of 14 and the value of the yi counter 215, an address is generated as shown below.
【0115】[0115]
【数13】書き込みアドレス=8192×(yiカウン
タの値%64)+xiカウンタの値## EQU13 ## Write address = 8192 × (value of yi counter% 64) + value of xi counter
【0116】ここで「%」は剰余を取る演算を意味す
る。行バッファのRAMの連続する8K語を縮小後のソ
ース画像の1行に固定的に割当てている。行バッファの
RAMにおける画素の割当てを図14に模式的に示す。
RAMの最初の8192語には、縮小後のソース画像の
1行目、65行目、129行目、193行目...が格
納される。2行目、66行目等はその次の8192語に
格納される。以下同様に64行目、128行目等がRA
Mの最後の8192語に格納される。従って図14から
わかるように行バッファのRAMには横1列分の部分画
像が格納される。Here, "%" means an operation for taking a remainder. Continuous 8K words in the RAM of the row buffer are fixedly assigned to one row of the reduced source image. FIG. 14 schematically shows pixel assignment in the row buffer RAM.
The first 8192 words of the RAM contain the first, 65th, 129th, 193rd,. . . Is stored. The second and 66th lines are stored in the next 8192 words. Similarly, the 64th line, the 128th line, etc.
Stored in the last 8192 words of M. Therefore, as can be seen from FIG. 14, a partial image for one horizontal row is stored in the RAM of the row buffer.
【0117】分割手段22にはアドレス生成器220と
xBカウンタ221とyBカウンタ222とが設けられ
ている。The dividing means 22 is provided with an address generator 220, an xB counter 221 and a yB counter 222.
【0118】アドレス生成器は、yiカウンタ214の
64行の入力完了の通知を受けることで起動され、行バ
ッファのRAMの画素アドレスを生成する。生成された
アドレスはRAMに供給され、RAMから画素を読み出
し、出力画素として符号化手段23に送る。画素の読み
出しは符号化手段23から供給される画素出力ストロー
ブ信号によって同期するよう制御される。画素ストロー
ブ信号はアドレス生成器220に与えられるよう構成さ
れており、アドレス生成器220は画素ストローブ信号
がアサートされている時のみ画素読み出しアドレスを更
新する。アドレス生成器220はRAMに格納された部
分画像を左から右へ(図14参照)、部分画像について
は部分画像内の64個の8×8画素ブロックを図15a
に示すような順に、8×8画素ブロック内の画素につい
ては図15bに示すような順で読み出す様にアドレスを
生成する。すなわち、読み出しアドレスは、The address generator is activated upon receiving notification of the completion of the input of the 64 rows of the yi counter 214, and generates a pixel address of the RAM of the row buffer. The generated address is supplied to the RAM, the pixel is read from the RAM, and sent to the encoding unit 23 as an output pixel. The reading of the pixels is controlled so as to be synchronized by the pixel output strobe signal supplied from the encoding means 23. The pixel strobe signal is configured to be provided to the address generator 220, which updates the pixel read address only when the pixel strobe signal is asserted. The address generator 220 moves the partial image stored in the RAM from left to right (see FIG. 14) and, for the partial image, 64 64 × 8 pixel blocks in the partial image as shown in FIG.
The addresses are generated such that the pixels in the 8 × 8 pixel block are read in the order shown in FIG. That is, the read address is
【0119】[0119]
【数14】読み出しアドレス=64xB+Offset
1(x’,y’)+Offset2(x”,y”) となる。## EQU14 ## Read address = 64 × B + Offset
1 (x ′, y ′) + Offset2 (x ″, y ″).
【0120】ここでxBは部分画像のx座標方向の番号
であり、x’,y’はそれぞれ8×8画素ブロックの
x,y座標方向のブロック番号、x”,y”はそれぞれ
8×8画素ブロック内の座標位置とすると、Offse
t1(x’,y’)とOffset2(x”,y”)は
それぞれ、Here, xB is the number of the partial image in the x coordinate direction, x 'and y' are the block numbers of the 8 × 8 pixel block in the x and y coordinate directions, and x ″ and y ″ are 8 × 8. If the coordinate position is within the pixel block, Offse
t1 (x ′, y ′) and Offset2 (x ″, y ″) are respectively
【0121】[0121]
【数15】 Offset1(x’,y’)=65536y’+8
x’ Offset2(x”,y”)=8192y”+x” である。15] Offset1 (x ′, y ′) = 65536y ′ + 8
x ′ Offset2 (x ″, y ″) = 8192y ″ + x ″.
【0122】変数xB,x’,y’,x”,y”の制御
アルゴリズムをC言語風に記述すると下記の様になる。When the control algorithm of the variables xB, x ', y', x ", y" is described in C language style, the following is obtained.
【0123】[0123]
【数16】 (Equation 16)
【0124】この様な順番で画素を読み出すことで、部
分画像内部の画素を後述の符号化手段23のためのラス
タ・ブロック変換して読み出すことができる。By reading out the pixels in such an order, the pixels in the partial image can be converted into raster blocks for the encoding means 23 described later and read out.
【0125】xBカウンタ221はyiカウンタ214
の64行入力完了通知により0にクリアされる。xBの
カウントアップはxBカウンタ221が行う。部分画像
内の64×64画素を読み出すたびにxBの値は1増加
する。xBの値は0から縮小後のソース画像の1走査線
上に乗る部分画像数Bxより1つ小さな値までインクリ
メントされる。最後にxB=Bxとなる時に、横1列分
の部分画像を出力し終えたことをyBカウンタ222に
通知する。xB=Bxのときには読み出しアドレスの生
成は行われない。その後yiカウンタ214の64行入
力完了通知がきて0にクリアされる。The xB counter 221 is a yi counter 214
Is cleared to 0 by the completion notification of the input of 64 lines. The xB counter 221 counts up xB. Each time 64 × 64 pixels in the partial image are read, the value of xB increases by one. The value of xB is incremented from 0 to a value one smaller than the number Bx of partial images on one scanning line of the reduced source image. Lastly, when xB = Bx, it notifies the yB counter 222 that the output of the partial image for one horizontal row has been completed. When xB = Bx, no read address is generated. After that, the completion of the input of 64 lines of the yi counter 214 is notified and cleared to zero.
【0126】yBカウンタ222はソース画像の入力の
際に0にクリアされ、xBカウンタ221が横1列分の
部分画像を出力し終えたことを通知する毎に値を+1イ
ンクリメントする。The yB counter 222 is cleared to 0 when a source image is input, and increments the value by +1 each time the xB counter 221 notifies that a partial image for one row has been output.
【0127】図16に示すように縮小後のソース画像の
左上を原点として一致させて部分画像が配置される。部
分画像は縮小後のソース画像を覆う様に配置される。す
なわち、BxはWi−1<64Bxを満たす最小の整数
となる。同様にByはHi−1<64Byを満たす最小
の整数となる。部分画像切り出しの順は左上隅の部分画
像よりまず横方向に切り出していき、右端まで達したら
1行下の部分画像を同様にきりだし、以降同様に最終行
まで行う。As shown in FIG. 16, partial images are arranged so as to coincide with each other using the upper left of the reduced source image as the origin. The partial image is arranged so as to cover the reduced source image. That is, Bx is a minimum integer satisfying Wi-1 <64Bx. Similarly, By is a minimum integer satisfying Hi-1 <64By. The partial image is cut out first in the horizontal direction from the partial image at the upper left corner. When the partial image is reached to the right end, the partial image one line below is cut out in the same manner, and thereafter the same is performed to the last line.
【0128】xBカウンタとyBカウンタは部分画像
(xB,yB)の座標番号を示しており、出力画素とと
もに符号化手段23に送られる。The xB counter and the yB counter indicate the coordinate numbers of the partial images (xB, yB), and are sent to the encoding means 23 together with the output pixels.
【0129】符号化手段23は、JPEG(Joint
Photographic Expert Grou
p)のベースライン・プロセス・アルゴリズムを用い
る。このアルゴリズムは画像を8×8画素のブロックに
分割し、ブロックに離散コサイン変換を施した後に量子
化をしハフマン符号化するものである。アルゴリズムと
実施の詳細に関しては例えばCQ出版発行の月刊誌イン
ターフェースの1991年12月号160〜182ペー
ジに記載されているのでここでは説明を省略する。JP
EGはスキャンドイメージの標準的な圧縮/伸張アルゴ
リズムであり、符号化することでデータ量を平均1/1
0に削減することができる。分割手段22により行バッ
ファ24より図15に示す順に読み出された画素は符号
化手段13に入力する。符号化手段は8×8画素ブロッ
ク単位に離散コサイン変換と量子化とハフマン符号化を
行う。符号出力はメモリ4に書き込まれる。メモリ4上
には図17に示すように部分画像の座標番号(xB,y
B)のテーブルが設けられている。符号はlink部分
と符号格納部から構成される結合リスト構造のデータ構
造に格納される。このデータ構造のlink部は4バイ
トで次のノードへのポインタが格納される。末端のノー
ドのlink部には末端を示すマークとしてNULLが
格納される。符号格納部は60バイトである。1個のノ
ードの符号格納部に格納しきれない符号はlink部が
指す次のノードの符号格納部に格納される。末端のノー
ドの符号格納部には未使用部分があるかもしれない。部
分画像符号の末端には符号の終わりを示す為のEOC
(End Of Code)符号が入る。符号化手段2
3は部分画像(xB,yB)の符号の生成の際に以下の
様に動作し、符号をメモリ4に格納していく。[0129] The encoding means 23 uses JPEG (Joint).
Photographic Expert Grou
Use the baseline process algorithm in p). This algorithm divides an image into blocks of 8 × 8 pixels, subjects the blocks to discrete cosine transform, and then performs quantization and Huffman coding. The details of the algorithm and the implementation are described in, for example, the monthly magazine interface published by CQ Publishing, December 1991, pages 160 to 182, and the description is omitted here. JP
EG is a standard compression / decompression algorithm for scanned images.
It can be reduced to zero. The pixels read from the row buffer 24 by the dividing means 22 in the order shown in FIG. 15 are input to the encoding means 13. The encoding means performs discrete cosine transform, quantization, and Huffman encoding in units of 8 × 8 pixel blocks. The code output is written to the memory 4. As shown in FIG. 17, the coordinate numbers (xB, y
A table B) is provided. The code is stored in a data structure of a linked list structure including a link part and a code storage unit. The link part of this data structure stores a pointer to the next node in 4 bytes. NULL is stored in the link part of the terminal node as a mark indicating the terminal. The code storage is 60 bytes. Codes that cannot be stored in the code storage unit of one node are stored in the code storage unit of the next node indicated by the link unit. There may be unused portions in the sign storage of the terminal node. EOC at the end of the partial image code to indicate the end of the code
(End Of Code) code is entered. Encoding means 2
Reference numeral 3 operates as follows when codes of the partial image (xB, yB) are generated, and stores the codes in the memory 4.
【0130】1) まず未使用のノードを1個取り出
し、そのアドレスを前記テーブルの場所(xB,yB)
に格納する。 2) そのノードの符号格納部に符号を順に書き込んで
いく。 3) もし符号格納部にEOC符号を書きおえたら、ノ
ードのlink部にNULLを書き込み部分画像(x
B,yB)の符号符号書き込みは終了する。 4) もしEOC符号を書きおえる前に符号格納部が一
杯になったら、新しい未使用ノードを1個とりだし、そ
のアドレスを現ノードのlink部に書き込み、以降新
しいノードについてステップ2)へ行き処理を繰り返
す。1) First, one unused node is taken out and its address is stored in the table at the location (xB, yB)
To be stored. 2) Codes are sequentially written to the code storage of the node. 3) If the EOC code is rewritten in the code storage unit, NULL is written in the link part of the node and the partial image (x
(B, yB) is completed. 4) If the code storage unit becomes full before the EOC code can be rewritten, one new unused node is taken out, its address is written into the link part of the current node, and thereafter, the process goes to step 2) for the new node and the processing is performed. repeat.
【0131】このようにすることで、可変長符号を効率
よくメモリ4に格納出来、かつ、簡単に部分画像の符号
を読み出すことができる。By doing so, the variable length code can be efficiently stored in the memory 4 and the code of the partial image can be easily read.
【0132】符号化手段23は、更に、部分画像(x
B,yB)の符号化を行う際にはメモリ4に格納された
重なり情報14のテーブル(図7参照)を参照し、(x
B,yB)に対応する要素が1の時すなわち論理的に真
の時にのみ符号化を行い、0すなわち偽のときには分割
手段22から供給される画素を捨てる。この場合図8に
示されるテーブルの該当箇所には符号が無いことを意味
するNULLが書き込まれる。The encoding means 23 further outputs the partial image (x
When encoding (B, yB), the table of the overlap information 14 (see FIG. 7) stored in the memory 4 is referred to, and (x, yB) is referred to.
Encoding is performed only when the element corresponding to (B, yB) is 1, that is, when the element is logically true. In this case, NULL indicating that there is no code is written in the corresponding portion of the table shown in FIG.
【0133】復号化手段25は、走査線番号Yを参照
し、メモリ4に格納された復号順情報15の該走査線に
関連する部分画像番号(xB,yB)を読み出す。メモ
リ4に格納された部分画像の符号17のテーブル(図1
7参照)から(xB,yB)を利用して該部分画像の符
号の結合リスト構造体をアクセスする。結合リスト構造
体のノード部分の符号格納部より符号を読み、JPEG
ベースライン・アルゴリズムの復号器に符号を供給す
る。ノードのlink部がNULLならば符号格納部の
60バイトを復号器に供給した後、該部分画像の符号の
復号を終える。ノード部がNULLではないならば符号
格納部の60バイト全てを復号器に供給した後、lin
k部をたどり次のノードについて同様の処理を行う。l
ink部がNULLの場合復号器は符号格納分の60バ
イトのデコード途中でEOC符号を発見する。復号器は
EOC符号後のデータを捨てる。復号化手段25は64
×64画素の部分画像の画素を得て、メモリ28に格納
する。The decoding means 25 refers to the scanning line number Y and reads out the partial image number (xB, yB) related to the scanning line in the decoding order information 15 stored in the memory 4. Table 17 of the partial image stored in the memory 4 (FIG. 1)
7), the combined list structure of the codes of the partial images is accessed using (xB, yB). The code is read from the code storage of the node part of the linked list structure,
Supply the code to the decoder for the baseline algorithm. If the link part of the node is NULL, after supplying 60 bytes of the code storage part to the decoder, decoding of the code of the partial image is finished. If the node part is not NULL, after supplying all 60 bytes of the code storage part to the decoder, lin
The same processing is performed for the next node by following the k section. l
When the “ink” part is NULL, the decoder finds the EOC code in the middle of decoding 60 bytes for storing the code. The decoder discards the data after the EOC code. The decoding means 25 is 64
The pixels of the partial image of x64 pixels are obtained and stored in the memory 28.
【0134】座標変換手段26の構成を図18に示す。
図18に示すように座標変換手段26は、4個の乗算器
2601,2602,2603,2604と、6個の加
算器2605,2606,2607,2608,261
3,2614と、2個のセレクタ2609,2610
と、2個のレジスタ2611,2612と、減算器26
15と、ダウンカウンタ2616と、制御回路2617
とを備えている。座標変換手段26は、逆変換すなわち
デバイス空間からソース空間への座標変換のパラメータ
(a’,b’,c’,d’,u’,v’)を入力する。
これらパラメータはインタプリタ10がアフィン変換の
パラメータより計算して座標変換手段26に供給する。
座標変換手段26は、更に、セグメントのY座標値Y、
セグメントの左端X座標値X0、右端X座標値X1を入
力する。FIG. 18 shows the structure of the coordinate conversion means 26.
As shown in FIG. 18, the coordinate conversion means 26 includes four multipliers 2601, 602, 2603, and 2604 and six adders 2605, 2606, 2607, 2608, and 261.
3, 2614 and two selectors 2609, 2610
, Two registers 2611 and 2612, and a subtractor 26
15, a down counter 2616, and a control circuit 2617
And The coordinate transformation means 26 receives parameters (a ', b', c ', d', u ', v') for inverse transformation, that is, coordinate transformation from the device space to the source space.
These parameters are calculated by the interpreter 10 from the affine transformation parameters and supplied to the coordinate transformation means 26.
The coordinate conversion means 26 further calculates the Y coordinate value Y of the segment,
A left end X coordinate value X0 and a right end X coordinate value X1 of the segment are input.
【0135】乗算器2601,2602と加算器260
5,2607とは図11に示す様に接続されており、こ
れらを用いて、Multipliers 2601 and 2602 and adder 260
5, 2607 are connected as shown in FIG. 11, and by using these,
【0136】[0136]
【数17】x0=a’・X0+b’・Y+u’ を求める。X0 = a'.X0 + b'.Y + u 'is obtained.
【0137】また、乗算器2603,2604と加算器
2606,2608とは図18に示す様に接続されてお
り、これらを用いて、The multipliers 2603 and 2604 and the adders 2606 and 2608 are connected as shown in FIG.
【0138】[0138]
【数18】y0=c’・X0+d’・Y+v’ を求める。(x0,y0)はセグメントの左端点(X
0,Y)をソース空間上に逆変換した座標である。## EQU18 ## y0 = c'.X0 + d'.Y + v 'is obtained. (X0, y0) is the left end point (X
(0, Y) are transformed back into the source space.
【0139】制御回路2617は、セグメントの左端点
(X0,Y)が入力され(x0,y0)が計算された時
に、セレクタ2609と2610を制御し、x0とy0
の値をそれぞれレジスタ2611と2612にロードす
るよう制御する。レジスタ2611は座標変換後のソー
ス空間のx座標、レジスタ2612は座標変換後のソー
ス空間のy座標を保持し、それぞれの出力をアドレス変
換手段27へ出力する。デバイス空間での右方向への1
画素の移動すなわちベクトル(1,0)の移動は、ソー
ス空間ではベクトル(a’,c’)の移動に相当する。
そこで、加算器2613を用いてレジスタ2611の値
とa’とを加えることで次の画素のx座標値を、加算器
2614を用いてレジスタ2612の値と’とを加える
ことで次の画素の座標値を求めることできる。When the left end point (X0, Y) of the segment is input and (x0, y0) is calculated, the control circuit 2617 controls the selectors 2609 and 2610 to control x0 and y0.
Is loaded into the registers 2611 and 2612, respectively. The register 2611 holds the x-coordinate of the source space after the coordinate conversion, and the register 2612 holds the y-coordinate of the source space after the coordinate conversion. 1 to the right in device space
The movement of the pixel, that is, the movement of the vector (1, 0) corresponds to the movement of the vector (a ′, c ′) in the source space.
Therefore, the x-coordinate value of the next pixel is added by adding the value of the register 2611 and a 'using the adder 2613, and the value of the register 2612 and' are added by using the adder 2614 to obtain the next pixel. Coordinate values can be obtained.
【0140】減算器2615はX1とX0を入力し、セ
グメントの両端のX座標値の差を取り、セグメント長に
関する情報X1−X0を得、ダウンカウンタ2616に
供給する。ダウンカウンタ2616は値を調べ、値が0
より大きい間カウンタの値を1づつ減らしていき、0の
場合には信号zeroに1を出力し、値を0のまま保
つ。ダウンカウンタ2616はセグメント上の画素数分
の繰り返しを制御するために用いる。信号zero=1
の時はセグメントの右端画素を処理していることを意味
し、制御回路は新たなセグメントのデータが入力される
まで処理をxとyの生成を停止するよう制御信号を生成
する。The subtractor 2615 inputs X1 and X0, obtains the difference between the X coordinate values at both ends of the segment, obtains information X1-X0 regarding the segment length, and supplies it to the down counter 2616. The down counter 2616 checks the value, and if the value is 0
While the value is larger, the value of the counter is decremented by one, and when it is 0, 1 is output to the signal zero and the value is kept at 0. The down counter 2616 is used to control repetition for the number of pixels on the segment. Signal zero = 1
Means that the right end pixel of the segment is being processed, and the control circuit generates a control signal so that the processing stops generating x and y until data of a new segment is input.
【0141】座標変換手段26は、0からHD−1まで
1づつ増加する走査線番号Yを受けて、各走査線毎にメ
モリ4に格納された描画情報16から該走査線に関連す
るセグメント情報を、走査線の左端のセグメントから右
隣のセグメントへ順次読み出す。走査線上のセグメント
情報は既に説明したように結合リスト形式のデータ構造
で表現されており、左セグメントから右セグメントへポ
インタで結合している。配列devImageは走査線
番号をインデックスとしてアクセスする配列で、各要素
にはその走査線の左端のセグメントに関連するノードへ
のポインタが格納されている。走査線上のセグメントの
座標変換手段は以下の手順で動作する。The coordinate conversion means 26 receives the scanning line number Y which increases by one from 0 to HD-1, and obtains the segment information related to the scanning line from the drawing information 16 stored in the memory 4 for each scanning line. Are sequentially read from the leftmost segment of the scanning line to the rightmost segment. The segment information on the scanning line is represented by a data structure in a linked list format as described above, and is linked from the left segment to the right segment by a pointer. The array devImage is an array accessed using a scan line number as an index, and each element stores a pointer to a node associated with the leftmost segment of the scan line. The coordinate conversion means of the segment on the scanning line operates in the following procedure.
【0142】1.走査線番号Yを用いてdevImag
e[Y]を読み出し左端のセグメントのノードのアドレ
スを得る。1. DevImag using scan line number Y
e [Y] is read to obtain the address of the node of the leftmost segment.
【0143】2.該ノードのアドレスを利用し該ノード
の内容を読む。これによりノードの左端X座標X0、右
端X座標X1、ポインタpp、フラグdp、右隣のノー
ドへのポインタnextを得る。[0143] 2. The contents of the node are read using the address of the node. Thus, a left end X coordinate X0, a right end X coordinate X1, a pointer pp, a flag dp, and a pointer next to a node on the right side are obtained.
【0144】3.フラグdpが0ならば、該ノードはラ
インアートのノードであり、ポインタppでメモリ4を
アクセスして画素の値Pを得て、データのセット(X1
−X0+1,P)を画像出力手段29に供給する。X1
−X0+1はセグメント長である。[0144] 3. If the flag dp is 0, the node is a line art node. The memory 4 is accessed by the pointer pp to obtain the pixel value P, and the data set (X1
−X0 + 1, P) is supplied to the image output means 29. X1
-X0 + 1 is the segment length.
【0145】フラグdpが0でないならば、該ノードは
スキャンドイメージのノードであるので、既に説明した
手段でデバイス空間座標からソース空間座標に変換した
X1−X0+1個の座標値をアドレス変換手段27に供
給し、ポインタppの値もアドレス変換手段27に供給
する。If the flag dp is not 0, the node is a node of a scanned image. Therefore, the X1-X0 + 1 coordinate values converted from the device space coordinates into the source space coordinates by the means described above are used as the address conversion means 27. And the value of the pointer pp is also supplied to the address conversion means 27.
【0146】4. ポインタnextを調べる。NUL
Lならば右側にセグメントは無いので処理を終了する。
NULLでないならばnetxtの値を新たなノードの
アドレスとし、上記処理ステップ2へ行く。[0146] 4. Check the pointer next. NUL
If L, there is no segment on the right side, so the process ends.
If it is not NULL, the value of netxt is set as the address of the new node, and the process proceeds to the processing step 2.
【0147】1本の走査線上のセグメントの座標変換が
終わったら、座標変換手段26は走査線信号Yにより次
の走査線に関するセグメントの座標変換を指示されるの
を待つ。After the coordinate conversion of the segment on one scanning line is completed, the coordinate conversion means 26 waits for the instruction of the coordinate conversion of the segment for the next scanning line by the scanning line signal Y.
【0148】メモリ28にはデバイス画像の出力中の走
査線と重なり合う部分画像が格納される。図19に示す
ようにメモリ28には更に部分画像の座標(xB,y
B)と部分画像が格納されているアドレスを結び付ける
アドレス変換テーブル280が格納されている。アドレ
ス変換テーブル280はxBとyBを用いてアクセスす
るテーブルで、そこにはメモリ28に格納されている部
分画像(xB,yB)のアドレスが格納されている。ア
ドレス変換手段27は、座標変換手段26より、デバイ
ス空間の画素毎にポインタppの値と座標変換後のソー
ス空間での座標値(x,y)とを入力する。画素の座標
(x,y)から該画素が属する部分画像(xB,yB)
を決定するのは容易である。x,yをそれぞれ64で割
って商をxB,yBとすればよい。部分画像内の画素の
座標位置(xoffset,yoffset)はx,y
をそれぞれ64で割ったときの余りをxoffset,
yoffsetとする。具体的には、xの下位6bit
をxoffsetとし、残りの上位bitをxBとす
る。同様にyの下位6bitをyoffsetとし、残
りの上位bitをyBとする。The memory 28 stores a partial image that overlaps the scanning line being output of the device image. As shown in FIG. 19, the memory 28 further stores the coordinates (xB, y
An address conversion table 280 for linking B) with the address where the partial image is stored is stored. The address conversion table 280 is a table accessed using xB and yB, and stores the address of the partial image (xB, yB) stored in the memory 28. The address conversion unit 27 inputs the value of the pointer pp and the coordinate value (x, y) in the source space after the coordinate conversion for each pixel in the device space from the coordinate conversion unit 26. The partial image (xB, yB) to which the pixel belongs from the coordinates (x, y) of the pixel
Is easy to determine. The quotients may be xB and yB by dividing x and y by 64, respectively. The coordinate position (xoffset, yoffset) of the pixel in the partial image is x, y
Xoffset, the remainder when each is divided by 64,
yoffset. Specifically, the lower 6 bits of x
Is xoffset, and the remaining upper bits are xB. Similarly, the lower 6 bits of y are set to yoffset, and the remaining upper bits are set to yB.
【0149】描画情報生成手段11はスキャンドイメー
ジのセグメントのノードのポインタppにアドレス変換
テーブル280のアドレスを格納するよう動作する。従
ってアドレス変換手段27は座標変換手段により渡され
たポインタppを用いてメモリ28内のアドレス変換テ
ーブルの場所を知る。(x,y)より得た(xB,y
B)を用いてアドレス変換テーブルの該エントリを読み
出し、メモリ28にある該部分画像のベースアドレスを
得る。ベースアドレスと(xoffset,yoffs
et)を用いて該画素のアドレスを決定し、メモリ28
の該アドレスを読み出す。読み出された画素は画像出力
手段29に送られる。The drawing information generating means 11 operates to store the address of the address conversion table 280 in the pointer pp of the node of the segment of the scanned image. Therefore, the address conversion means 27 knows the location of the address conversion table in the memory 28 using the pointer pp passed by the coordinate conversion means. (XB, y) obtained from (x, y)
The entry of the address conversion table is read using B), and the base address of the partial image in the memory 28 is obtained. Base address and (xoffset, yoffs
et) to determine the address of the pixel, and
Is read out. The read pixels are sent to the image output means 29.
【0150】図19は、走査線Y上のスキャンドイメー
ジのセグメントが部分画像(0,2),(1,2),
(1,1),(2,1),(2,0)を通る時のメモリ
28の内容を模式的に示している。FIG. 19 shows that the segments of the scanned image on the scanning line Y are the partial images (0, 2), (1, 2),
The contents of the memory 28 when passing through (1, 1), (2, 1), and (2, 0) are schematically shown.
【0151】画像出力手段29は、セグメントがスキャ
ンドイメージに由来する場合、アドレス変換手段28に
よってメモリ28から読み出された画素をそのまま出力
する。セグメントがラインアートに由来する場合、画像
変換手段26から得た画素情報Pとセグメントの長さL
を用いて、画素値PをL回出力する。画像出力手段29
からはデバイス画像の画素がラスタスキャン順に出力さ
れ、出力画素はIOTに送られ、紙やCRT上に画像を
形成する。If the segment is derived from a scanned image, the image output means 29 outputs the pixels read from the memory 28 by the address conversion means 28 as they are. If the segment is derived from line art, the pixel information P obtained from the image conversion means 26 and the length L of the segment
Is used to output the pixel value P L times. Image output means 29
, The pixels of the device image are output in the raster scan order, and the output pixels are sent to the IOT to form an image on paper or a CRT.
【0152】ここで改めて縮小手段21の用途を説明す
る。図21のaに示すようなソース画像を仮定する。説
明のためにこのソース画像は8×8画素のサイズとす
る。このソース画像を−45°の回転とx,y両方向と
も1/(2√2)の縮小を行いデバイス画像に描画する
ものとする。その際のデバイス空間での走査線を逆変換
した直線が図21aの斜めの直線である。直線上の黒点
はデバイス空間の画素の位置、すなわち、逆サンプリン
グの際にデバイス画像のセグメントを逆変換しソース画
像の画素をサンプリングする場所である。この例のよう
に縮小率が1/2よりも大きい場合、ソース画像上の飛
び飛びの位置の画素のみが読み出される。図21aの例
では、ソース画像には合計64画素あるが、サンプリン
グされてデバイス画像の形成に寄与する画素は8画素の
みである。全画素の7/8は無駄である。これら無駄な
画素を沢山含む部分画像を行バッファ24から読み出し
符号化手段23で符号化し符号をメモリ4に格納する
と、行バッファ24からの読み出し時間が余分にかか
り、符号化手段23での処理時間が長くなり、符号サイ
ズも大きくなるのでメモリ4への書き込み時間も長くな
り、部分画像の符号17格納の為の領域も多く必要であ
る。また、メモリ4からの符号の読み出し時間も長くな
り、復号化手段25での処理時間も長くなる。また、走
査線上のスキャンドイメージのセグメントはより多くの
部分画像と重なる為、メモリ28にはより多くの部分画
像を格納せねばならず、メモリ28のサイズを大きくせ
ねばならない。すなわち、メモリサイズが大きくなりコ
ストが増大するという問題と処理時間が長くなるという
問題が発生する。この問題はアフィン変換の縮小率が大
きいほど深刻になる。Here, the use of the reducing means 21 will be described again. Assume a source image as shown in FIG. For the sake of explanation, this source image has a size of 8 × 8 pixels. It is assumed that the source image is drawn on the device image by performing a rotation of −45 ° and reducing 1 / (2√2) in both the x and y directions. The straight line obtained by inversely converting the scanning line in the device space at that time is the oblique straight line in FIG. 21A. The black points on the straight line are the positions of the pixels in the device space, that is, the places where the segments of the device image are inversely transformed and the pixels of the source image are sampled at the time of inverse sampling. When the reduction ratio is larger than 1/2 as in this example, only pixels at discrete positions on the source image are read. In the example of FIG. 21a, the source image has a total of 64 pixels, but only 8 pixels are sampled and contribute to the formation of the device image. 7/8 of all pixels are useless. When the partial image including many useless pixels is read from the row buffer 24 and encoded by the encoding unit 23 and the code is stored in the memory 4, extra time is required to read from the row buffer 24, and the processing time in the encoding unit 23 Becomes longer and the code size becomes larger, so that the writing time to the memory 4 becomes longer, and a larger area for storing the code 17 of the partial image is required. In addition, the time required to read the code from the memory 4 is increased, and the processing time in the decoding unit 25 is also increased. Further, since the segment of the scanned image on the scanning line overlaps with more partial images, more partial images must be stored in the memory 28 and the size of the memory 28 must be increased. That is, there is a problem that the memory size increases and the cost increases, and a problem that the processing time increases. This problem becomes more serious as the reduction ratio of the affine transformation increases.
【0153】縮小手段21は、アフィン変換の縮小率が
大きい場合に用いる。図21bは縮小手段21にnx=
2,ny=2を設定し図21aのソース画像をx方向に
1/2、y方向に1/2に縮小して得た縮小後のソース
が像である。縮小手段21で縮小を行った場合、インタ
プリタ10と描画情報生成手段11は縮小手段21での
縮小を考慮し、縮小後のソース画像をあたかもソース画
像と見なして描画情報16等を作成し、座標変換手段2
6に供給する逆変換パラメータ(a’,b’,c’,
d’,u’,v’)を決定する。図21bの縮小画像で
は合計16個の画素の内8個の画素がデバイス画像の描
画に寄与する。このため、ソース画像の縮小を行わない
場合に比べ、処理時間は短縮し、符号と部分画像を格納
するためのメモリ領域も小さくすることができる。The reduction means 21 is used when the reduction ratio of the affine transformation is large. FIG. 21B shows that nx =
2, ny = 2 is set, and the reduced source obtained by reducing the source image of FIG. 21A to 1 / in the x direction and に in the y direction is an image. When the reduction is performed by the reduction unit 21, the interpreter 10 and the drawing information generation unit 11 consider the reduction by the reduction unit 21 and create the drawing information 16 and the like as if the reduced source image is regarded as a source image. Conversion means 2
6, the inverse transformation parameters (a ′, b ′, c ′,
d ', u', v ') are determined. In the reduced image of FIG. 21B, eight pixels out of a total of sixteen pixels contribute to drawing of the device image. Therefore, as compared with the case where the source image is not reduced, the processing time can be reduced, and the memory area for storing codes and partial images can be reduced.
【0154】[実施例2]第2の実施例のブロック図を
図20に示す。本実施例はIIT(画像入力装置)で入
力したラスタ画像を0°もしくは90°回転し、拡大/
縮小してIOTに出力する為の装置(複写機)に実施し
たものである。本実施例は第1の実施例と似ているが、
入力画像は直接画像入力手段20に供給される。また、
メモリ4には描画情報生成手段11と符号順決定手段1
3のためのプログラムが格納されている。CPUが前者
のプログラムを実行すると、描画情報16がメモリ4に
格納される。CPU1が後者プログラムを実行すると、
復号順情報15が作成され、メモリ4に格納される。[Embodiment 2] FIG. 20 shows a block diagram of the second embodiment. In the present embodiment, a raster image input by an IIT (image input device) is rotated by 0 ° or 90 ° to enlarge /
This is implemented in a device (copier) for reducing and outputting to the IOT. This embodiment is similar to the first embodiment, but
The input image is directly supplied to the image input means 20. Also,
In the memory 4, the drawing information generating means 11 and the code order determining means 1
3 are stored. When the CPU executes the former program, the drawing information 16 is stored in the memory 4. When CPU1 executes the latter program,
Decoding order information 15 is created and stored in the memory 4.
【0155】拡大/縮小率と回転角は複写機のパネルの
ボタンによって指定される。これら情報はI/O手段2
を通じて入力しする。The enlargement / reduction ratio and the rotation angle are designated by buttons on the panel of the copying machine. These information are stored in the I / O means 2
Enter through.
【0156】描画情報生成手段11は拡大/縮小率と回
転角をもとに出力画像の形状を計算し、セグメント情報
を作成し描画情報16としてメモリ4に格納する。第2
の実施例では、デバイス画像には、上下左右のマージン
部分の白い領域とデバイス画像中央部に位置する入力し
たスキャンドイメージとが描画される。上マージンと下
マージン部分のの各走査線には幅がWDの白セグメント
が1個のみ存在する。それ以外の部分の各走査線には、
3個のセグメントが存在し、左端セグメントは左マージ
ンの幅を持った白セグメント、真ん中のセグメントは入
力画像として入力したスキャンドイメージのセグメン
ト、右端セグメントは右マージンの幅を持った白セグメ
ントである。描画情報生成手段11は、更に、拡大/縮
小率と回転角とから縮小手段の縮小率nxとnyと逆変
換パラメータ(a’,b’,c’,d’,u’,v’)
を計算し、nxとnyを縮小手段21に設定し、逆変換
パラメータを座標変換手段26に設定する。The drawing information generating means 11 calculates the shape of the output image based on the enlargement / reduction ratio and the rotation angle, creates segment information and stores it as drawing information 16 in the memory 4. Second
In the embodiment, a white region of the upper, lower, left, and right margins and an input scanned image located at the center of the device image are drawn on the device image. Each scanning line in the upper margin and the lower margin has only one white segment having a width of WD. For each scanning line in the other part,
There are three segments, the left end segment is a white segment having a left margin width, the middle segment is a scanned image segment input as an input image, and the right end segment is a white segment having a right margin width. . The drawing information generation unit 11 further calculates the reduction ratios nx and ny of the reduction unit and the inverse conversion parameters (a ′, b ′, c ′, d ′, u ′, v ′) based on the enlargement / reduction ratio and the rotation angle.
Is calculated, nx and ny are set in the reduction means 21, and the inverse transformation parameter is set in the coordinate transformation means 26.
【0157】復号順決定手段13は回転角をもとに復号
順を決定する。0°の回転の場合、まずBx個の部分画
像(n,0)(n=0からBx−1まで)を復号し、そ
の後順次各64ライン間にBx個の部分画像(n,1)
(n=0からBx−1まで)、部分画像(n,2)(n
=0からBx−1まで)、部分画像(n,3)(n=0
からBx−1まで)、を復号し、最後に部分画像(n,
By−1)(n=0からBx−1まで)を復号するの
で、以上の順番と走査線番号とを復号順情報15として
メモリ手段4に格納する。90°の回転の場合、まずB
y個の部分画像(Bx−1,n)(n=0からBy−1
まで)を復号し、その後順次各64ライン間にBy個の
部分画像(Bx−2,n)(n=0からBy−1ま
で)、部分画像(Bx−3,n)(n=0からBy−1
まで)、部分画像(Bx−4,n)(n=0からBy−
1まで)、を復号し、最後に部分画像(0,n)(n=
0からBy−1まで)を復号するので、以上の順番と走
査線番号とを復号順情報15としてメモリ手段4に格納
する。The decoding order determining means 13 determines the decoding order based on the rotation angle. In the case of a rotation of 0 °, Bx partial images (n, 0) (from n = 0 to Bx−1) are first decoded, and then Bx partial images (n, 1) are sequentially arranged between 64 lines.
(N = 0 to Bx−1), partial image (n, 2) (n
= 0 to Bx−1), partial image (n, 3) (n = 0)
To Bx-1), and finally, the partial image (n,
By-1) (n = 0 to Bx-1) is decoded, and the above order and scanning line number are stored in the memory means 4 as decoding order information 15. For a 90 ° rotation, first B
y partial images (Bx-1, n) (n = 0 to By-1
), And then sequentially by-line the By partial images (Bx−2, n) (n = 0 to By−1) and the partial images (Bx−3, n) (n = 0 to By-1
), Partial image (Bx−4, n) (n = 0 to By−
1), and finally, the partial image (0, n) (n =
(From 0 to By-1), the above order and the scanning line number are stored in the memory means 4 as decoding order information 15.
【0158】IITにて原稿をスキャンして作ったラス
タデータは入力画像として画像入力手段20に供給され
る。画像入力手段20は入力した画像データを縮小手段
21に供給する。縮小手段21と行バッファ24と分割
手段22は第1の実施例で説明したのと同様に作用し、
部分画像を切り出し画素を符号化手段23に順次供給す
る。The raster data generated by scanning the original in the IIT is supplied to the image input means 20 as an input image. The image input unit 20 supplies the input image data to the reduction unit 21. The reducing means 21, the row buffer 24 and the dividing means 22 operate in the same manner as described in the first embodiment,
The partial image is cut out and pixels are sequentially supplied to the encoding unit 23.
【0159】符号化手段23は部分画像を無条件に符号
化し部分画像の符号17をメモリ4に格納する。複写機
では入力したスキャンドイメージの全てを出力すること
が殆どなので、選択的に部分画像の符号化を行っても符
号化を省略できる部分画像はほとんど無い。そこで、第
2の実施例の符号化手段23では選択的な符号化を行わ
ない。符号化アルゴリズムおよび符号のメモリ4への書
き込み方は第1の実施例で説明したのと同じである。The encoding means 23 encodes the partial image unconditionally and stores the code 17 of the partial image in the memory 4. Since most of the input scanned images are output in a copying machine, almost no partial image can be omitted even if the partial image is selectively encoded. Therefore, the encoding means 23 of the second embodiment does not perform selective encoding. The encoding algorithm and the method of writing the code in the memory 4 are the same as those described in the first embodiment.
【0160】復号手段25、座標変換手段26、アドレ
ス変換手段27、メモリ28、画像出力手段29は第1
の実施例と同じ構成を持ち、これらは第1の実施例と同
様に動作する。すなわち、復号順情報15を読み、デバ
イス画像の出力用走査線番号Yに同期して部分画像の符
号を復号しメモリ28に格納する。同時に走査線番号Y
の走査線上のセグメントの情報を描画情報16より読み
出し、座標変換手段27でセグメントをソース空間での
画素座標に変換し、アドレス変換手段27で画素座標を
メモリ28のアドレスに変換し、そのアドレスを用いて
メモリ28に格納されている部分画像の画素を読み出し
画像出力手段29に供給し、出力画像としてIOTに出
力する。The decoding means 25, the coordinate conversion means 26, the address conversion means 27, the memory 28, and the image output means 29
This embodiment has the same configuration as that of the first embodiment, and operates in the same manner as the first embodiment. That is, the decoding order information 15 is read, the code of the partial image is decoded in synchronization with the output scanning line number Y of the device image, and stored in the memory 28. At the same time, scanning line number Y
Is read from the drawing information 16, the segment is converted to pixel coordinates in the source space by the coordinate conversion means 27, the pixel coordinates are converted to the address of the memory 28 by the address conversion means 27, and the address is The pixels of the partial image stored in the memory 28 are read and supplied to the image output means 29, and output to the IOT as an output image.
【0161】[実施例3]第3の実施例では、図23に
示すようにメモリ28にソース画像毎にアドレス変換テ
ーブルを設ける。図24の走査線Y1上のセグメントは
図25に例示するような形で描画情報としてメモリ4に
格納されている。[Embodiment 3] In the third embodiment, an address conversion table is provided in the memory 28 for each source image as shown in FIG. The segment on the scanning line Y1 in FIG. 24 is stored in the memory 4 as drawing information in a form as illustrated in FIG.
【0162】第3の実施例の座標変換手段26のブロッ
ク図を図26に示す。新たにCAM(Content
Address Memory)手段2618が設けら
れている。CAM手段2618の入力には描画情報16
から読み出したセグメントのノードのppの値(アドレ
ス変換テーブルのアドレス)が入力し、CAM手段26
18の出力から逆変換パラメータ(a’,b’,c’,
d’,u’,v’)が供給されるよう構成されている。
CAM手段のエントリのタグ部にはソース画像に対応す
るアドレス変換テーブルのアドレスが格納され、データ
部には逆変換パラメータが格納されている。CAM手段
は入力されたppの値と各エントリのタグ部との一致を
調べ、一致したエントリのデータ部を出力する。FIG. 26 shows a block diagram of the coordinate conversion means 26 of the third embodiment. New CAM (Content
Address Memory) means 2618 is provided. The drawing information 16 is input to the input of the CAM unit 2618.
Pp value (address of the address conversion table) of the segment node read from the
18 to the inverse transformation parameters (a ′, b ′, c ′,
d ′, u ′, v ′).
The address of the address conversion table corresponding to the source image is stored in the tag part of the entry of the CAM means, and the inverse conversion parameter is stored in the data part. The CAM unit checks whether the input pp value matches the tag portion of each entry, and outputs the data portion of the matched entry.
【0163】インタプリタ10と描画情報生手段とは、
ソース画像ごとのアドレス変換テーブルのアドレスと逆
変換パラメータとを座標変換手段26のCAM手段に格
納する。The interpreter 10 and the drawing information generating means
The address of the address conversion table and the inverse conversion parameter for each source image are stored in the CAM unit of the coordinate conversion unit 26.
【0164】座標変換手段26はセグメントのノードを
読み出し、ppの値でCAM手段を読み出し逆変換パラ
メータを得る。ソース画像毎にアドレス変換テーブルが
存在するので、ppの値はソース画像毎にユニークな値
となる。従って、ソース画像毎に逆変換パラメータを得
ることが出来、座標変換手段26はソース画像毎に異な
る逆変換を実施出来る。逆変換で得たソース座標値とp
pの値はアドレス変換手段27に渡される。The coordinate conversion means 26 reads the node of the segment, reads the CAM means with the value of pp, and obtains an inverse conversion parameter. Since an address conversion table exists for each source image, the value of pp is unique for each source image. Accordingly, an inverse transformation parameter can be obtained for each source image, and the coordinate transformation means 26 can perform a different inverse transformation for each source image. Source coordinate value obtained by inverse transformation and p
The value of p is passed to the address conversion means 27.
【0165】アドレス変換手段27は、ppの値を用い
てソース画像毎にユニークなアドレス変換テーブルを用
いてメモリ28での画素のアドレスをえる。画素のアド
レスの作り方は第1の実施例で説明したので省略する。The address conversion means 27 obtains the address of a pixel in the memory 28 using a unique address conversion table for each source image using the value of pp. The method of creating the pixel address has been described in the first embodiment, and a description thereof will be omitted.
【0166】[他の実施形態]以上説明した実施例では
行バッファ24とメモリ4とメモリ28とを備えている
が、本発明ではこれらは物理的に分離したメモリ手段で
ある必要はなく、1個あるいは2個のメモリ手段を共有
していてもよい。[Other Embodiments] In the embodiment described above, the row buffer 24, the memory 4 and the memory 28 are provided. However, in the present invention, these need not be physically separate memory means, One or two memory means may be shared.
【0167】以上説明した実施例では、縮小手段は整数
単位縮小しかできないが、本発明はこれに限定されるも
のではなく、任意の割合の縮小を行うように縮小手段を
構成してもよい。また、その際に隣接画素を用いた補間
を行うように縮小手段と行バッファと分割手段を構成す
ることもできる。このように構成すると縮小に伴う画質
劣化(例えばジャギーやモアレ)を減らすことができ
る。In the embodiment described above, the reduction means can perform only integer unit reduction, but the present invention is not limited to this, and the reduction means may be configured to perform reduction at an arbitrary ratio. At that time, the reduction unit, the row buffer, and the division unit can be configured to perform interpolation using adjacent pixels. With this configuration, it is possible to reduce image quality deterioration (for example, jaggy or moiré) due to reduction.
【0168】以上説明した実施例では、アドレス変換手
段は逆変換で得たソース空間の座標値の直近の画素をメ
モリ28より読み出し画像出力手段に供給するよう構成
されているが、本発明はこれに限定されるものではな
く、ソース空間の座標値に隣接する画素を補完して画素
値を得るように構成してもよい。このように構成すると
アフィン変換に伴う画質劣化(例えばジャギー)を減ら
すことができる。In the embodiment described above, the address conversion means is configured to read out the pixel closest to the coordinate value in the source space obtained by the inverse conversion from the memory 28 and supply it to the image output means. However, the present invention is not limited to this, and a configuration may be adopted in which a pixel value is obtained by complementing a pixel adjacent to a coordinate value in the source space. With this configuration, it is possible to reduce image quality deterioration (for example, jaggy) due to affine transformation.
【0169】以上説明した実施例では、描画情報16は
デバイス画像の走査線のセグメントとして描画情報を保
持し座標変換手段26は線分の座標変換を行うよう構成
されているが、本発明はこれに限定されるものではな
く、例えば、走査線に並行な台形、長方形、三角形を描
画情報の保持に用いてもよい。In the embodiment described above, the drawing information 16 is configured to hold the drawing information as a scanning line segment of the device image, and the coordinate conversion means 26 performs the coordinate conversion of the line segment. However, for example, a trapezoid, rectangle, or triangle parallel to the scanning line may be used for holding the drawing information.
【0170】以上説明した実施例では、部分画像をサイ
ズ64×64画素の正方形としたが、本発明はこれに限
定されるものではなく、正方形を長方形としてもよく、
またサイズを変えてもよい。部分画像のサイズを2のべ
き乗とすると、ソース空間の座標値からの部分画像の番
号と部分画像内の画素位置の計算が容易になるの。部分
画像のサイズを大きくすると、各種テーブルのサイズを
小さく出来るが、メモリ28にて部分画像を保持するた
めのエリアが大きくなる。一方、部分画像のサイズを小
さくすると、各種テーブルのサイズは大きくなるが、メ
モリ28にて部分画像を保持するためのエリアは小さく
なる。600SPIのA4〜A3サイズの画像を扱う場
合には64×64画素の部分画像がコストと性能の点で
好ましい。In the embodiment described above, the partial image is a square of size 64 × 64 pixels. However, the present invention is not limited to this, and the square may be a rectangle.
Also, the size may be changed. If the size of the partial image is a power of 2, it is easy to calculate the number of the partial image from the coordinate values in the source space and the pixel position in the partial image. If the size of the partial image is increased, the size of various tables can be reduced, but the area for holding the partial image in the memory 28 increases. On the other hand, when the size of the partial image is reduced, the size of various tables increases, but the area for holding the partial image in the memory 28 decreases. When dealing with an A4-A3 size image of 600 SPI, a partial image of 64 × 64 pixels is preferable in terms of cost and performance.
【0171】[0171]
【発明の効果】上述したように、この発明によれば、ス
キャンドイメージの回転、拡大縮小、あるいはより一般
的なアフィン変換処理や、スキャンドイメージの任意の
外形形状によるクリッピング処理や、スキャンドイメー
ジの上にラインアートを重ね書きする処理等において、
ソース画像入力時に、ソース画像を必要に応じて縮小し
たうえでソース画像を部分画像に分割し、デバイス画像
の描画に寄与する部分画像のみを符号化することでデー
タ量を縮小して保持し、デバイス画像のラスタスキャン
の際に逆サンプリングを用いて部分画像を参照する順を
決定しておき、ラスタスキャンと同期を取りつつ前記順
に従って部分画像の符号を復号することで、画像のラス
タスキャンの際に必要な部分画像のみを画像として保持
し、それらに対して逆サンプリングを行うことで、アフ
ィン変換とスキャンドイメージの輪郭内部の画素の出力
を行う。こうすることで、スキャンドイメージの処理に
必要なメモリを大幅に削減することができ低価格な処理
装置をうることができる。また、符号化によりスキャン
ドイメージのデータ量を減らすことで転送時間を減らす
ことができるので、前記画像処理を高速に実行できる。
また、部分画像は1回符号化され1回復号されるだけな
ので、非可逆圧縮アルゴリズムを用いても画像の劣化を
最小限に押さえることができる。As described above, according to the present invention, rotation, scaling, or more general affine transformation processing of a scanned image, clipping processing using an arbitrary external shape of a scanned image, scanning In the process of overwriting line art on the image,
At the time of inputting the source image, the source image is reduced as necessary, the source image is divided into partial images, and only the partial images that contribute to the drawing of the device image are encoded, thereby reducing and holding the data amount. In the raster scan of the device image, the order of referring to the partial images is determined using inverse sampling, and the codes of the partial images are decoded in accordance with the order while synchronizing with the raster scan. At this time, only the necessary partial images are held as images, and inverse sampling is performed on them to perform affine transformation and output of pixels inside the outline of the scanned image. By doing so, the memory required for processing the scanned image can be significantly reduced, and a low-cost processing device can be obtained. Further, since the transfer time can be reduced by reducing the data amount of the scanned image by encoding, the image processing can be executed at high speed.
Further, since the partial image is encoded once and decoded only once, even if the lossy compression algorithm is used, the deterioration of the image can be minimized.
【0172】復号手段25の部分画像の復号タイミング
と、座標変換手段26とアドレス変換手段27の走査線
に関するタイミングとの同期を取ることで、座標変換手
段26とアドレス変換手段27が部分画像を必要とする
直前に復号手段25で復号しメモリ28に格納できるた
め、メモリ28の部分画像の格納の為に必要なエリアの
サイズを最小限にすることができ、装置のコストを下げ
ることが出来る。復号手段25と座標変換手段26およ
びアドレス変換手段27とは同時に動作可能なように構
成されているて、更に、出力走査時に走査線をスキャン
するときには部分画像が復元されてメモリ28に格納さ
れているので、座標変換手段26とアドレス変換手段2
7は直ちにメモリ28を読むことが可能となり、処理を
高速化することができる。By synchronizing the decoding timing of the partial image by the decoding means 25 with the timing regarding the scanning line of the coordinate conversion means 26 and the address conversion means 27, the coordinate conversion means 26 and the address conversion means 27 need the partial image. Immediately before, the data can be decoded by the decoding means 25 and stored in the memory 28, so that the size of the area required for storing the partial image in the memory 28 can be minimized, and the cost of the apparatus can be reduced. The decoding means 25, the coordinate conversion means 26 and the address conversion means 27 are configured to be operable simultaneously. Further, when scanning a scanning line during output scanning, a partial image is restored and stored in the memory 28. Therefore, the coordinate conversion means 26 and the address conversion means 2
7, the memory 28 can be read immediately, and the processing can be speeded up.
【0173】縮小手段21を用いてあらかじめソース画
像を縮小した上で部分画像を作ることができるので、部
分画像画像の数を減らすことが出来る。これにより、メ
モリ4に格納する部分画像の符号の総量を減らすことが
可能となる。また、メモリ28に格納すべき部分画像数
を減らすことが出来るのでメモリ28の部分画像の格納
の為に必要なエリアのサイズを最小限にすることができ
る。これらメモリサイズの減少により、装置のコストを
下げることが出来る。また、部分画像のデータの総量も
減るため、データ転送時間が減り、処理を高速化するこ
とができる。Since the partial image can be created after the source image has been reduced in advance using the reducing means 21, the number of partial image images can be reduced. This makes it possible to reduce the total amount of codes of the partial images stored in the memory 4. Further, since the number of partial images to be stored in the memory 28 can be reduced, the size of the area required for storing the partial images in the memory 28 can be minimized. These reductions in memory size can reduce the cost of the device. Further, since the total amount of data of the partial image is also reduced, the data transfer time is reduced, and the processing can be sped up.
【0174】メモリ28にソース画像毎にアドレス変換
テーブルを格納し、描画情報16におけるスキャンドイ
メージのセグメントにはのアドレス変換テーブルへのポ
インタには該セグメントに関連するアドレス変換テーブ
ルへのポインタを格納するようにした。アドレス変換手
段27は、ソース画像毎にアドレス変換を行うことがで
きる。これにより、デバイス画像に任意の数のソース画
像を同時に描画する場合においても、メモリの使用量を
減らしてコストを削減でき、処理を高速化でき、像の劣
化を最小限に押さえることができる。An address conversion table is stored in the memory 28 for each source image, and a pointer to an address conversion table for a segment of a scanned image in the drawing information 16 is a pointer to an address conversion table related to the segment. I did it. The address conversion means 27 can perform address conversion for each source image. As a result, even when an arbitrary number of source images are simultaneously drawn on a device image, the amount of memory used can be reduced, costs can be reduced, processing can be speeded up, and image degradation can be minimized.
【図1】 本発明の実施例1の処理のステップを示すフ
ローチャートを示す図である。FIG. 1 is a diagram illustrating a flowchart illustrating steps of a process according to a first embodiment of the present invention.
【図2】 本発明の実施例1のブロック図を示す図であ
る。FIG. 2 is a diagram illustrating a block diagram of a first embodiment of the present invention.
【図3】 デバイス画像の例を示す図である。FIG. 3 is a diagram illustrating an example of a device image.
【図4】 図2における走査線Y1の描画情報の内部表
現を示す図である。FIG. 4 is a diagram showing an internal representation of drawing information of a scanning line Y1 in FIG.
【図5】 ソース画像の例を示す図である。FIG. 5 is a diagram illustrating an example of a source image.
【図6】 デバイス空間上でのソース画像とデバイス画
像の関係を示す図である。FIG. 6 is a diagram illustrating a relationship between a source image and a device image in a device space.
【図7】 重なり情報の表現形式を示す図である。FIG. 7 is a diagram showing an expression format of overlap information.
【図8】 部分画像と輪郭形状の重なりを示す図であ
る。FIG. 8 is a diagram showing an overlap between a partial image and a contour shape.
【図9】 重なり情報の例を示す図である。FIG. 9 is a diagram illustrating an example of overlap information.
【図10】 復号の順番を説明する図である。FIG. 10 is a diagram illustrating the order of decoding.
【図11】 復号順情報の例を示す図である。FIG. 11 is a diagram illustrating an example of decoding order information.
【図12】 縮小手段と分割手段と行バッファの構成を
示すブロック図を示す図である。FIG. 12 is a block diagram showing a configuration of a reducing unit, a dividing unit, and a row buffer.
【図13】 縮小手段と分割手段と行バッファの動作を
示すタイミング図である。FIG. 13 is a timing chart showing the operation of the reducing means, the dividing means, and the row buffer.
【図14】 行バッファ内のアドレスと使い方を示す図
である。FIG. 14 is a diagram showing addresses in a row buffer and how to use them.
【図15】 画素の読み出し順序を示す図である。FIG. 15 is a diagram illustrating a reading order of pixels.
【図16】 部分画像の切り出し順序を示す図である。FIG. 16 is a diagram showing the cutout order of partial images.
【図17】 部分画像の符号のメモリ内での格納を示す
図である。FIG. 17 is a diagram illustrating storage of codes of partial images in a memory.
【図18】 座標変換手段のブロック図である。FIG. 18 is a block diagram of a coordinate conversion unit.
【図19】 アドレス変換テーブルと部分画像の関係を
示す図である。FIG. 19 is a diagram illustrating a relationship between an address conversion table and a partial image.
【図20】 本発明の第2の実施例のブロック図であ
る。FIG. 20 is a block diagram of a second embodiment of the present invention.
【図21】 縮小手段の作用の説明図である。FIG. 21 is an explanatory diagram of an operation of a reduction unit.
【図22】 アフィン変換と逆変換の説明図である。FIG. 22 is an explanatory diagram of affine transformation and inverse transformation.
【図23】 第3の実施例でのアドレス変換テーブルと
部分画像の関係を示す図である。FIG. 23 is a diagram illustrating a relationship between an address conversion table and a partial image according to the third embodiment.
【図24】 デバイス画像の例を示す図である。FIG. 24 is a diagram illustrating an example of a device image.
【図25】 図23における走査線Y1の描画情報の内
部表現を示す図である。25 is a diagram showing an internal representation of drawing information of a scanning line Y1 in FIG.
【図26】 第3の実施例での座標変換手段の実施例を
示す図である。FIG. 26 is a diagram showing an embodiment of the coordinate conversion means in the third embodiment.
1 CPU、2 I/O手段、3 バス、4 メモリ、
10 インタープリタ、11 描画情報生成手段、12
重なり検出手段、13 復号順決定手段、14 重な
り情報、15 復号順情報、16 描画情報、17 分
割画像の符号、20 画像入力手段、21 縮小手段、
22 分割手段、23 符号化手段、24 行バッフ
ァ、25 復号手段、26 座標変換手段、27 アド
レス変換手段、28 メモリ、29 画像出力手段、2
601,2602,2603,2604 乗算器、26
05,2604,2607,2608,2613,26
14 加算器、2609,2610 セレクタ、261
1,2612 レジスタ、2615 減算器、2616
ダウンカウンタ、2617 制御回路1 CPU, 2 I / O means, 3 buses, 4 memories,
Reference Signs List 10 interpreter, 11 drawing information generating means, 12
Overlap detection means, 13 decoding order determination means, 14 overlap information, 15 decoding order information, 16 drawing information, 17 divided image code, 20 image input means, 21 reduction means,
22 division means, 23 encoding means, 24 row buffers, 25 decoding means, 26 coordinate conversion means, 27 address conversion means, 28 memory, 29 image output means, 2
601, 602, 2603, 2604 multiplier, 26
05, 2604, 2607, 2608, 2613, 26
14 adder, 2609, 2610 selector, 261
1,612 register, 2615 subtractor, 2616
Down counter, 2617 control circuit
Claims (13)
生成方法であり、 ラスタ画像を複数の部分画像に分割する画像分割ステッ
プと、 前記画像分割ステップにおいて得られた部分画像を符号
化し該部分画像の符号を得る符号化ステップと、 前記符号化ステップにおいて得られた部分画像の符号の
復号順を決定する復号順決定ステップと、 前記復号順決定ステップにおいて決定された順番に従っ
て、前記部分画像の符号を復号し、前記部分画像をメモ
リ手段に格納する復号ステップと、 第1の座標空間で表現された幾何情報を第2の座標空間
に変換する座標空間変換ステップと、 前記第2の座標空間での幾何位置に対応する前記メモリ
手段上のアドレスを生成するアドレス生成ステップと、 前記アドレス生成ステップにおいて生成されたアドレス
を用いてメモリ手段を読み出すステップとを有すること
を特徴とするラスタ画像生成方法。1. A raster image generating method in a raster image generating apparatus, comprising: an image dividing step of dividing a raster image into a plurality of partial images; and encoding a partial image obtained in the image dividing step to encode the partial image. An encoding step of obtaining a partial image obtained in the encoding step; a decoding order determining step of determining a decoding order of the code of the partial image obtained in the encoding step; and decoding the code of the partial image according to the order determined in the decoding order determining step. A decoding step of storing the partial image in a memory unit; a coordinate space conversion step of converting geometric information expressed in a first coordinate space into a second coordinate space; and a geometric space in the second coordinate space. An address generation step of generating an address on the memory means corresponding to a position; Raster image generation method characterized by a step of reading the memory means by using the dress.
り、前記第2の座標空間はソース空間であって、 前記座標空間変換ステップは、デバイス空間上でのスキ
ャンドイメージの描画幾何形状を形成するラスタスキャ
ン情報をソース空間へ逆変換し、ソース空間での幾何情
報すなわちラスタスキャン情報を得るステップであり、 前記アドレス生成ステップは、前記座標空間変換ステッ
プにおいて得たソース空間上でのラスタスキャン情報を
用いてデバイス空間のスキャンドイメージの画素に対応
する前記メモリ手段上の部分画像の画素のアドレス情報
を生成するステップであり、 該アドレス情報を用いて順に前記メモリ手段から画素を
読み出してデバイス空間でのスキャンドイメージの画素
を順に獲得する構成を有することを特徴とする請求項1
に記載のラスタ画像生成方法。2. The method according to claim 1, wherein the first coordinate space is a device space, the second coordinate space is a source space, and the coordinate space conversion step is a step of converting a drawing geometry of the scanned image in the device space. Inversely converting the raster scan information to be formed into a source space to obtain geometric information in the source space, that is, raster scan information, wherein the address generation step includes a raster scan on the source space obtained in the coordinate space conversion step. Generating address information of the pixels of the partial image on the memory means corresponding to the pixels of the scanned image in the device space by using the information, and sequentially reading the pixels from the memory means using the address information, Claims characterized by having a configuration for sequentially acquiring pixels of a scanned image in space Item 1
2. The raster image generation method according to 1.
記ラスタ画像生成装置に入力される描画情報から得られ
る幾何形状との重なり合いを調べる重なり検出ステップ
と、 前記重なり検出ステップでの重なり検出結果に応じて、
デバイス画像の描画に寄与する部分画像を選択する部分
画像選択ステップとを有し、 前記符号化ステップは、前記部分画像選択ステップにお
いて選択された部分画像についてのみ符号化し部分画像
の符号を得るステップであることを特徴とする請求項1
または2記載のラスタ画像生成方法。3. The method according to claim 1, wherein the raster image generating method further includes an overlap detecting step of checking an overlap between the partial image obtained in the image dividing step and a geometric shape obtained from drawing information input to the raster image generating apparatus. And according to the overlap detection result in the overlap detection step,
A partial image selecting step of selecting a partial image that contributes to drawing of the device image, wherein the encoding step is a step of encoding only the partial image selected in the partial image selecting step to obtain a sign of the partial image. 2. The method according to claim 1, wherein
Or the raster image generation method according to 2.
報からスキャンドイメージの輪郭情報を読み出し、読み
出されたスキャンドイメージの描画の際に指定されたア
フィン変換の逆変換を実行して、前記輪郭情報を前記ス
キャンドイメージのソース空間に写像し、該写像された
ソース空間の輪郭の内側部分あるいは該輪郭上に重なる
前記部分画像の領域を検出するステップであることを特
徴とする請求項3記載のラスタ画像生成方法。4. The overlap detecting step reads out outline information of a scanned image from the drawing information, and executes an inverse transformation of an affine transformation designated when the read scanned image is drawn. 4. A step of mapping contour information to a source space of the scanned image and detecting an inner part of the contour of the mapped source space or a region of the partial image overlapping the contour. The described raster image generation method.
縮小ラスタ画像生成ステップを有し、 前記画像分割ステップは、該縮小ラスタ画像生成ステッ
プにおいて生成された縮小ラスタ画像について部分画像
への分割を実行することを特徴とする請求項1乃至4い
ずれかに記載のラスタ画像生成方法。5. The reduced raster image generating method further includes a reduced raster image generating step of generating a reduced raster image by performing reduction of the raster image. 5. The raster image generating method according to claim 1, wherein the generated reduced raster image is divided into partial images.
と、 前記画像分割手段によって生成された部分画像を符号化
し部分画像の符号を得る符号化手段と、 前記符号化手段によって生成された部分画像の符号を復
号しメモリ手段に格納する復号手段と、 第1の座標空間で表現された幾何情報を第2の座標空間
に変換する座標空間変換手段と、 前記第2の座標空間での幾何位置に対応する前記メモリ
手段上のアドレスを生成するアドレス変換手段と、 前記符号化手段によって生成された部分画像の符号を復
号する復号順を決定する復号順決定手段とを備え、 前記復号順決定手段により決定した復号順に従って復号
された部分画像を前記メモリ手段に格納し、前記第1の
座標空間の幾何情報を前記座標変換手段に与えその出力
を前記アドレス変換手段に供給して得たメモリアドレス
を用いて前記メモリ手段に格納された部分画像の画素を
読み出す構成を有することを特徴とするラスタ画像生成
装置。6. A raster image generating apparatus, comprising: an image dividing unit that divides a raster image into a plurality of partial images; an encoding unit that encodes a partial image generated by the image dividing unit to obtain a code of the partial image; Decoding means for decoding the code of the partial image generated by the encoding means and storing it in a memory means; coordinate space converting means for converting geometric information expressed in a first coordinate space into a second coordinate space; Address conversion means for generating an address on the memory means corresponding to a geometric position in the second coordinate space; decoding order determination for determining a decoding order for decoding a code of the partial image generated by the encoding means Means for storing a partial image decoded according to the decoding order determined by the decoding order determining means in the memory means, and storing the geometric information of the first coordinate space in the memory means. Raster image generating apparatus characterized by having the structure of reading the pixels of the stored partial image in the memory means with a memory address given its output obtained by supplying to said address translation means to target conversion means.
り、前記第2の座標空間はソース空間であって、 前記座標空間変換手段は、デバイス空間上でのスキャン
ドイメージの描画幾何形状を形成するラスタスキャン情
報をソース空間へ逆変換し、ソース空間での幾何情報す
なわちラスタスキャン情報を得る手段であり、 前記アドレス変換手段は、前記座標空間変換手段におい
て得たソース空間上でのラスタスキャン情報を用いてデ
バイス空間のスキャンドイメージの画素に対応する前記
メモリ手段上の部分画像の画素のアドレス情報を生成す
る手段であり、 前記アドレス変換手段によって生成されたアドレス情報
を用いて順に前記メモリ手段から画素を読み出してデバ
イス空間でのスキャンドイメージの画素を順に獲得する
構成を有することを特徴とする請求項6に記載のラスタ
画像生成装置。7. The first coordinate space is a device space, the second coordinate space is a source space, and the coordinate space conversion means converts a drawing geometric shape of the scanned image on the device space. Means for inversely transforming the raster scan information to be formed into a source space to obtain geometric information in the source space, ie, raster scan information, wherein the address conversion means performs raster scan on the source space obtained by the coordinate space conversion means. Means for generating address information of pixels of the partial image on the memory means corresponding to the pixels of the scanned image in the device space using the information, and sequentially using the address information generated by the address conversion means. Means for reading pixels from the means and sequentially acquiring the pixels of the scanned image in the device space The raster image generating apparatus according to claim 6, wherein:
ラスタ画像生成装置に入力される描画情報から得られる
幾何形状との重なり合いを検出する重なり検出手段を有
し、 前記重なり検出手段での重なり検出結果に応じて、デバ
イス画像の描画に寄与する部分画像を選択して、該選択
された部分画像についてのみ前記符号化手段によって符
号化し部分画像の符号を得ることを特徴とする請求項6
または7に記載のラスタ画像生成装置。8. The apparatus according to claim 1, wherein the raster image generating apparatus further includes an overlap detection unit configured to detect an overlap between the partial image generated by the image dividing unit and a geometric shape obtained from drawing information input to the raster image generating apparatus. Means for selecting a partial image that contributes to the rendering of a device image in accordance with the result of the overlap detection by the overlap detection means, and encoding only the selected partial image by the encoding means, The code is obtained.
Or the raster image generating device according to 7.
ラスタ画像生成装置に入力される描画情報から得られる
幾何形状との重なり合いを検出する重なり検出手段を有
し、 前記重なり検出手段での重なり検出結果に応じて部分画
像を選択的に前記分割手段で読み出して、該読み出され
た部分画像について前記符号化手段で符号化することを
特徴とする請求項6または7に記載のラスタ画像生成装
置。9. The raster image generating device, comprising: an overlap detecting unit configured to detect an overlap between the partial image generated by the image dividing unit and a geometric shape obtained from drawing information input to the raster image generating unit. Wherein the partial image is selectively read out by the division unit in accordance with an overlap detection result by the overlap detection unit, and the read-out partial image is encoded by the encoding unit. Item 8. The raster image generation device according to item 6 or 7.
からスキャンドイメージの輪郭情報を読み出し、読み出
されたスキャンドイメージの描画の際に指定されたアフ
ィン変換の逆変換を実行して、前記輪郭情報を前記スキ
ャンドイメージのソース空間に写像し、該写像されたソ
ース空間の輪郭の内側部分あるいは該輪郭上に重なる前
記部分画像の領域を検出する構成を有することを特徴と
する請求項8または9記載のラスタ画像生成装置。10. The overlap detecting unit reads out outline information of a scanned image from the drawing information, and executes an inverse transformation of an affine transformation designated when drawing the read scanned image, 9. The image processing apparatus according to claim 8, wherein contour information is mapped to a source space of the scanned image, and a portion inside the contour of the mapped source space or a region of the partial image overlapping the contour is detected. Or the raster image generating apparatus according to 9.
縮小手段を有し、 前記画像分割手段は、前記縮小手段において生成された
縮小ラスタ画像について部分画像への分割を実行するこ
とを特徴とする請求項6乃至10いずれかに記載のラス
タ画像生成装置。11. The raster image generating apparatus further includes a reducing unit that generates a reduced raster image by performing reduction of the raster image, and the image dividing unit includes a reduced raster image generated by the reducing unit. 11. The raster image generating apparatus according to claim 6, wherein the image is divided into partial images.
記復号手段を用いて実行される部分画像の復号タイミン
グ位置と、前記座標変換手段において変換が実行される
第1の座標空間の変換タイミング位置とを同期させて動
作する構成としたことを特徴とする請求項6乃至11い
ずれかに記載のラスタ画像生成装置。12. In the raster image generating apparatus, a decoding timing position of a partial image executed by using the decoding means and a conversion timing position of a first coordinate space where conversion is executed by the coordinate conversion means are determined. 12. The raster image generating apparatus according to claim 6, wherein the raster image generating apparatus operates synchronously.
記アドレス変換手段に第2の座標空間とメモリアドレス
とを関係づけるテーブルを持ち、該テーブルは、入力ラ
スタ画像ごと、個々に独立したテーブルによって構成さ
れていることを特徴とする請求項6乃至12いずれかに
記載のラスタ画像生成装置。13. The raster image generating apparatus, wherein the address conversion means has a table for associating a second coordinate space with a memory address, and the table is constituted by an independent table for each input raster image. The raster image generating apparatus according to claim 6, wherein:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10025295A JPH11224331A (en) | 1998-02-06 | 1998-02-06 | Raster image generation device and raster image generation method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10025295A JPH11224331A (en) | 1998-02-06 | 1998-02-06 | Raster image generation device and raster image generation method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH11224331A true JPH11224331A (en) | 1999-08-17 |
Family
ID=12162039
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP10025295A Pending JPH11224331A (en) | 1998-02-06 | 1998-02-06 | Raster image generation device and raster image generation method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH11224331A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7474928B2 (en) * | 2005-04-15 | 2009-01-06 | Autodesk Canada Co. | Hybrid vector/raster based paint |
| JP2009110368A (en) * | 2007-10-31 | 2009-05-21 | Brother Ind Ltd | Image processing program |
| US8139082B2 (en) | 2005-05-02 | 2012-03-20 | Canon Kabushiki Kaisha | Image processing apparatus and its control method, and program |
-
1998
- 1998-02-06 JP JP10025295A patent/JPH11224331A/en active Pending
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7474928B2 (en) * | 2005-04-15 | 2009-01-06 | Autodesk Canada Co. | Hybrid vector/raster based paint |
| US8139082B2 (en) | 2005-05-02 | 2012-03-20 | Canon Kabushiki Kaisha | Image processing apparatus and its control method, and program |
| JP2009110368A (en) * | 2007-10-31 | 2009-05-21 | Brother Ind Ltd | Image processing program |
| US8320016B2 (en) | 2007-10-31 | 2012-11-27 | Brother Kogyo Kabushiki Kaisha | Image processing method for fast fill-in of a figure and computer readable medium therefor |
| US8472077B2 (en) | 2007-10-31 | 2013-06-25 | Brother Kogyo Kabushiki Kaisha | Image processing method for fast fill-in of a figure and computer readable medium therefor |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100597879B1 (en) | Method and apparatus for building rasterized lines of bitmap data to be printed using a piecewise-linear direct memor access addressing mode of retrieving bitmap data line segments | |
| US7142213B2 (en) | Graphics drawing device and method | |
| JPH0863144A (en) | Font processing device and font processing method | |
| US5867612A (en) | Method and apparatus for the fast scaling of an image | |
| US8659620B2 (en) | Methods and apparatus for rendering images | |
| US5889893A (en) | Method and apparatus for the fast rotation of an image | |
| JPH08297737A (en) | Method and apparatus for clipping of arbitrary graphic | |
| JP3791259B2 (en) | Outline smoothing processing method | |
| US5537131A (en) | Character generating method and apparatus | |
| EP1014306B1 (en) | Antialiased high-resolution frame buffer architecture | |
| JP3037854B2 (en) | Character generation method and device | |
| KR100302163B1 (en) | Character generating method and apparatus | |
| JP3009525B2 (en) | Vector image drawing equipment | |
| JP2634851B2 (en) | Image processing device | |
| JPH11224331A (en) | Raster image generation device and raster image generation method | |
| JP2726271B2 (en) | Patching system | |
| US6101290A (en) | Bandwidth efficient image transformations on a multiprocessor | |
| JP4325812B2 (en) | Vector image drawing circuit and vector image drawing method | |
| KR900002631B1 (en) | Image data processing method and apparatus | |
| JP3211591B2 (en) | Image processing device | |
| JP3350324B2 (en) | Character output device | |
| JP2006031160A (en) | Graphic object processing method | |
| JP3365068B2 (en) | Image processing device | |
| JP2004326528A (en) | Image processor and image processing method | |
| JP2814709B2 (en) | Drawing data creation device |