JP2000293678A - Image processor - Google Patents

Image processor

Info

Publication number
JP2000293678A
JP2000293678A JP11102008A JP10200899A JP2000293678A JP 2000293678 A JP2000293678 A JP 2000293678A JP 11102008 A JP11102008 A JP 11102008A JP 10200899 A JP10200899 A JP 10200899A JP 2000293678 A JP2000293678 A JP 2000293678A
Authority
JP
Japan
Prior art keywords
block
image data
data
image
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
Application number
JP11102008A
Other languages
Japanese (ja)
Inventor
Makoto Sano
誠 佐野
Shusuke Tanimoto
周介 谷本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP11102008A priority Critical patent/JP2000293678A/en
Publication of JP2000293678A publication Critical patent/JP2000293678A/en
Pending legal-status Critical Current

Links

Landscapes

  • Record Information Processing For Printing (AREA)
  • Image Input (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To quickly conduct the rotation processing of image data. SOLUTION: This image processor is provided with an image memory 1 which stores image data to be rotated, a block deciding part 2 which divides the image data stored in the image memory 1 into blocks with the number of dots corresponding to the multiple of the number of pixels which can be transferred at once and whose at least one side has the data bus width of a central processing unit, and decides the block to be rotated, a buffer memory 3 which temporarily stores the image data for the number of lines corresponding to the number of dots which can be transferred under one time of data transfer instruction by the central processing unit among the image data of the block decided by the block deciding part 2, and an address controlling part 4 which decides a writing address in a storage memory 5 corresponding to the angle of rotation for the image data for the plural lines stored in the buffer memory 3.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、デジタル複写機等
で取り込んだイメージデータやホストコンピュータから
送信されたイメージデータを回転処理して出力する画像
処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus for rotating and outputting image data taken in by a digital copying machine or the like or image data transmitted from a host computer.

【0002】[0002]

【従来の技術】ページプリンタ装置では、上位装置(ホ
ストコンピュータ等)から受け取ったPDL(ページ記
述言語)を解釈し、出力装置の解像度に合わせたラスタ
データに変換して用紙に印字出力を行っている。通常、
PDLに含まれる描画オブジェクトは、文字や図形など
の描画命令と、各画素の色値や濃度値を表すビット列と
から成るイメージ描画命令から構成される。そして、文
字や図形はそれぞれ専用の描画手段によって指定された
大きさや色、濃度を持ったラスタデータに変換され、出
力ページ上のPDLで指定された位置に書き込まれる。
2. Description of the Related Art A page printer interprets a PDL (page description language) received from a higher-level device (such as a host computer), converts the PDL into raster data corresponding to the resolution of an output device, and prints out the data on paper. I have. Normal,
The drawing object included in the PDL is composed of a drawing command such as a character or a figure, and an image drawing command including a bit string representing a color value and a density value of each pixel. Then, the characters and graphics are converted into raster data having the size, color, and density specified by the dedicated drawing means, respectively, and written at the position specified by the PDL on the output page.

【0003】一方、PDLにおけるイメージ描画命令は
階調数や解像度などが異なる複数の画像フォーマットに
対応しているのが一般的であり、画像処理装置ではPD
Lによる指定値や出力部の解像度等に合わせてイメージ
データの解像度変換、色変換、拡大縮小処理、あるいは
使用メモリ量節約のための圧縮、伸長処理等を行い、出
力ページ上のPDLで指定された位置に書き込まれる。
On the other hand, an image drawing command in a PDL generally corresponds to a plurality of image formats having different gradation numbers and resolutions.
Performs image data resolution conversion, color conversion, enlargement / reduction processing, or compression / decompression processing to save the amount of memory used in accordance with the designated value of L and the resolution of the output unit, etc., and is specified by the PDL on the output page. Is written to the specified position.

【0004】さらに、PDLで指定された出力用紙と実
際に印字する用紙の向きが異なる場合や、両面印刷機能
を有するプリンタにおいて用紙の表裏で画像の天地が逆
になるのを防止する場合等には、必要に応じて前記用紙
に印字出力するラスタデータやイメージデータに対する
画像回転処理が行われる。
Further, in the case where the direction of the output paper specified by the PDL and the paper to be actually printed are different, or in the case of a printer having a double-sided printing function, the image is prevented from being inverted on the front and back of the paper. The image rotation processing is performed on raster data or image data to be printed out on the paper as needed.

【0005】従来、少ないメモリで大きな画像の回転を
行う処理は、特開平3−37774号公報等に開示され
るように、イメージデータを複数のブロックに分割し、
1ライン分のイメージデータを格納可能なバッファメモ
リを用意し、回転対象のイメージデータを1ライン単位
でバッファメモリに読み出し、書き込み先ブロックの位
置と回転角度から書き込みアドレスを計算し、バッファ
メモリからイメージデータを格納するメモリへ書き込む
処理を繰り返すことで実現される。この際、画像データ
の読み出し、書き込み処理はすべて1ピクセル毎に行わ
れるため、画像全体を回転されるのに要する画像データ
の読み出し、書き込みの回数はその画像の総ピクセル数
と等しくなる。
Conventionally, a process for rotating a large image with a small amount of memory is performed by dividing image data into a plurality of blocks as disclosed in Japanese Patent Application Laid-Open No. 3-37774.
Prepare a buffer memory that can store one line of image data, read the image data to be rotated into the buffer memory on a line-by-line basis, calculate the write address from the position and rotation angle of the destination block, and read the image from the buffer memory. This is realized by repeating the process of writing data to the memory that stores data. At this time, since the reading and writing processes of the image data are all performed for each pixel, the number of times of reading and writing the image data required to rotate the entire image is equal to the total number of pixels of the image.

【0006】[0006]

【発明が解決しようとする課題】しかし、近年プリンタ
の高解像度化やカラー化の進展によって画像のデータ量
は著しく増加しており、これによって画像格納に必要な
メモリ量の増加だけではなく、MPUで実行されるデー
タ転送命令の回数増加に起因する画像回転処理時間の増
大も大きな問題となってきている。特に、昨今では多く
のMPUにキャッシュ機構が内蔵されているため、デー
タの転送命令が増加するとMPU内部で暗黙のうちにキ
ャッシュのフラッシュが頻繁に発生し、プリンタ装置の
処理速度低下を引き起こすことになる。
However, in recent years, the amount of image data has been remarkably increased due to the progress of higher resolution and colorization of printers, and this has caused not only an increase in the amount of memory required for storing images, but also an increase in MPU. Also, an increase in the image rotation processing time due to an increase in the number of data transfer instructions executed by the computer has become a serious problem. In particular, since many MPUs have a built-in cache mechanism these days, if the number of data transfer instructions increases, cache flushing frequently occurs implicitly inside the MPU, causing a reduction in the processing speed of the printer device. Become.

【0007】[0007]

【課題を解決するための手段】本発明は、このような課
題を解決するために成された画像処理装置である。すな
わち、本発明の画像処理装置は、回転対象のイメージデ
ータを格納するイメージメモリと、イメージメモリに格
納されたイメージデータを、少なくとも一辺が中央処理
装置のデータバス幅で一度に転送可能なピクセル数の倍
数に対応したドット数をもつブロックに分割し、回転対
象となるブロックを決定するブロック決定手段と、ブロ
ック決定手段で決定されたブロックのイメージデータの
うち、中央処理装置による1回のデータ転送命令で転送
可能なドット数に対応するライン数分のイメージデータ
を一時格納するバッファメモリと、バッファメモリに格
納された複数ライン分のイメージデータに対して回転角
度に応じた格納メモリ書き込みアドレスを決定するアド
レス制御手段とを備えている。
SUMMARY OF THE INVENTION The present invention is an image processing apparatus designed to solve such a problem. That is, the image processing apparatus of the present invention includes an image memory for storing image data to be rotated, and the number of pixels at least one side of which can transfer image data stored in the image memory at a time with the data bus width of the central processing unit. Block deciding means for dividing into blocks having the number of dots corresponding to a multiple of, and determining a block to be rotated, and one-time data transfer by the central processing unit among image data of the blocks decided by the block deciding means Determines buffer memory for temporarily storing image data for the number of lines corresponding to the number of dots that can be transferred by the instruction, and storage memory write address according to the rotation angle for image data for multiple lines stored in the buffer memory Address control means.

【0008】このような本発明では、イメージデータの
回転を行うにあたり、回転対象のイメージデータを、少
なくとも一辺が中央処理装置のデータバス幅で一度に転
送可能なピクセル数の倍数に対応したドット数となるブ
ロックに分割し、回転対象となるブロックをブロック決
定手段で決定し、イメージメモリに格納してからアドレ
ス制御手段のアドレス制御で格納メモリへ回転した状態
で格納している。このバッファメモリとしてブロックの
幅に対応し、中央処理装置による1回のデータ転送命令
で転送可能なドット数に対応した複数ライン分を用意す
ることで、データバス幅に対応したバッファメモリへの
データ格納を行うことができるとともに、バッファメモ
リから中央処理装置による1回のデータ転送命令で転送
可能なドット数のデータをパッキングして順次格納メモ
リに書き込むことができ、必要最小限のデータ転送命令
で読み出し、書き込みを行うことができるようになる。
According to the present invention, when rotating image data, the number of dots corresponding to a multiple of the number of pixels that can be transferred at a time with at least one side of the image data to be rotated with the data bus width of the central processing unit. , And the block to be rotated is determined by the block determining means, stored in the image memory, and then stored in a rotated state in the storage memory by the address control of the address control means. By preparing a plurality of lines corresponding to the number of dots that can be transferred by one data transfer instruction by the central processing unit corresponding to the block width as the buffer memory, data to the buffer memory corresponding to the data bus width is prepared. In addition to storing data, the data of the number of dots that can be transferred from the buffer memory by a single data transfer instruction by the central processing unit can be packed and sequentially written to the storage memory. Reading and writing can be performed.

【0009】[0009]

【発明の実施の形態】以下、本発明の画像処理装置にお
ける実施の形態を図に基づいて説明する。図1は、本実
施形態における画像処理装置を説明するブロック図であ
る。すなわち、この画像処理装置は、入力したイメージ
データを格納するイメージメモリ1と、イメージメモリ
1に格納されたイメージデータを複数のブロックに分割
し、回転対象となるブロックを決定するブロック決定部
2と、回転対象のブロックのイメージデータのうち複数
ライン分を一時格納するバッファメモリ3と、バッファ
メモリ3に一時格納されたイメージデータに対して回転
角度に応じた格納メモリ5への書き込みアドレスを決定
するアドレス制御部4とから構成されている。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of an image processing apparatus according to the present invention. FIG. 1 is a block diagram illustrating an image processing apparatus according to the present embodiment. That is, the image processing apparatus includes an image memory 1 for storing input image data, a block determining unit 2 for dividing the image data stored in the image memory 1 into a plurality of blocks, and determining a block to be rotated. A buffer memory 3 for temporarily storing a plurality of lines of the image data of the block to be rotated and a write address to the storage memory 5 corresponding to the rotation angle for the image data temporarily stored in the buffer memory 3 are determined. And an address control unit 4.

【0010】このうち、イメージメモリ1は、スキャナ
で取り込んだイメージデータやネットワークを介してホ
ストコンピュータから送られてきたイメージデータを一
時格納する。
The image memory 1 temporarily stores image data captured by a scanner and image data transmitted from a host computer via a network.

【0011】また、ブロック決定部2は、イメージメモ
リ1に格納されたイメージデータを、少なくとも一辺が
中央処理装置(以下、「MPU」と言う。)のデータバ
ス幅で一度に転送可能なピクセル数の倍数に対応したド
ット数(ピクセル数)をもつブロックに分割し、回転対
象となるブロックを決定する部分である。例えば、MP
Uのデータバス幅が16ビットで、1ピクセル当たりの
ビット数が4ビットの場合、4の倍数の正方領域を1つ
のブロックとする。なお、ブロックは長方形領域でもよ
い。これにより、イメージメモリ1からバッファメモリ
3へイメージデータを転送するにあたり、データバスを
有効に利用できることになる。
The block determining unit 2 determines the number of pixels that can transfer image data stored in the image memory 1 at a time at least on one side with a data bus width of a central processing unit (hereinafter, referred to as “MPU”). This is a part that divides into blocks having the number of dots (number of pixels) corresponding to a multiple of, and determines the block to be rotated. For example, MP
When the data bus width of U is 16 bits and the number of bits per pixel is 4 bits, a square area that is a multiple of 4 is defined as one block. Note that the block may be a rectangular area. As a result, the data bus can be used effectively when transferring image data from the image memory 1 to the buffer memory 3.

【0012】また、バッファメモリ3は、ブロック決定
部2で決定されたブロックのイメージデータのうち、M
PUによる1回のデータ転送命令で転送可能なドット数
(ピクセル数)に対応するライン数分のイメージデータ
を一時格納する。
The buffer memory 3 stores the M data of the image data of the block determined by the block determination unit 2.
The image data for the number of lines corresponding to the number of dots (the number of pixels) that can be transferred by one data transfer command by the PU is temporarily stored.

【0013】アドレス制御部4は、バッファメモリ3に
格納された複数ライン分のイメージデータに対して読み
出しアドレスと、格納メモリ5への書き込みアドレスと
を制御する。このアドレス制御によって、バッファメモ
リ3から読み出されたイメージデータは、所定の角度回
転した状態で格納メモリ5に格納される。
The address control section 4 controls a read address and a write address to the storage memory 5 for a plurality of lines of image data stored in the buffer memory 3. By this address control, the image data read from the buffer memory 3 is stored in the storage memory 5 while being rotated by a predetermined angle.

【0014】図2は、本実施形態の画像処理装置におけ
る画像回転処理の流れを説明するフローチャートであ
る。本実施形態では、イメージメモリ1(図1参照)に
格納された任意サイズのイメージデータを幅、高さが等
しく、各々アライメントが取られたサイズの複数のブロ
ックに分割して回転処理を行う。そこで、先ず、ステッ
プS101において、イメージメモリ1上に格納された
イメージデータの行、列各々の方向のブロック分割数を
取得する。
FIG. 2 is a flowchart illustrating the flow of an image rotation process in the image processing apparatus according to the present embodiment. In the present embodiment, rotation processing is performed by dividing image data of an arbitrary size stored in the image memory 1 (see FIG. 1) into a plurality of blocks each having the same width and height and each having an aligned size. Therefore, first, in step S101, the number of block divisions in the row and column directions of the image data stored in the image memory 1 is obtained.

【0015】ここで、(ブロックの高さ×列方向のブロ
ック分割数)および(ブロックの幅×行方向のブロック
分割数)は、各々回転対象となるイメージデータの高さ
および幅と等しいか、またはそれより大きくなるので、
図3に示すようにブロックの周囲にイメージデータのな
い余白部分ができることがある。
Here, (the height of the block × the number of block divisions in the column direction) and (the width of the block × the number of block divisions in the row direction) are equal to the height and width of the image data to be rotated, respectively. Or larger,
As shown in FIG. 3, a blank portion without image data may be formed around a block.

【0016】そこで、後の処理で各ビクセルがイメージ
データ、余白のどちらであるかを識別できるよう、ステ
ップS102の処理でブロック境界からイメージデータ
部分までのオフセット値として各ブロックの余白のピク
セル数を取得する(図3参照)。
In step S102, the number of pixels in the margin of each block is set as an offset value from the block boundary to the image data portion so that each pixel can be identified as image data or a margin in a later process. Acquire (see FIG. 3).

【0017】次に、ステップS103で回転するイメー
ジデータを一時的に格納するため、ブロックと同じ幅と
持ち、MPUにおける1回のデータ転送命令で転送可能
なピクセル数と同じライン数のバッファメモリ3(図1
参照)を確保する。続いて、ステップS104で、回転
処理後のイメージデータを格納するための領域として、
(ブロック当たりのピクセル数×列方向のブロック分割
数×行方向のブロック分割数)に等しいサイズの格納メ
モリ5(図1参照)を確保する。
Next, in step S103, the buffer memory 3 having the same width as the block and having the same number of pixels as the number of pixels that can be transferred by one data transfer instruction in the MPU to temporarily store the rotating image data. (Figure 1
See). Subsequently, in step S104, as an area for storing the image data after the rotation processing,
A storage memory 5 (see FIG. 1) having a size equal to (the number of pixels per block × the number of block divisions in the column direction × the number of block divisions in the row direction) is secured.

【0018】ここで、この領域の先頭アドレスはMPU
のデータバス幅でアライメントが取られていなければな
らない。次いで、ステップS105〜S112のループ
処理にて、各ブロックに対してイメージデータの回転処
理を行う。ここでは、回転処理の対象となるブロックの
移動順序として、図3に示す最上行最左列を最初とし、
行方向に順に右へ移動し、ある行の一番右まできたら次
の列の一番左に戻るという規則に従っている場合を例と
する。
Here, the start address of this area is MPU
The data bus width must be aligned. Next, in the loop processing of steps S105 to S112, rotation processing of image data is performed on each block. Here, as the moving order of the block to be subjected to the rotation processing, the uppermost row and the leftmost column shown in FIG.
An example is a case in which the rule moves to the right in the row direction and returns to the leftmost position in the next column when the rightmost position in a certain row is reached.

【0019】先ず、ステップS105で、最初に処理対
象となるブロックを最上行最左列に設定する。次に、ス
テップS106で回転角度をもとに処理対象となるブロ
ックが回転後のイメージにおいて貼り付けられるブロッ
クを決定する。図4は、回転後のブロックを説明する図
で、(a)は回転前の状態、(b)は反時計方向に90
度回転した状態、(c)は時計方向に90度回転した状
態を示している。すなわち、図4(a)に示す最上行最
左列のブロックを反時計方向に90度回転する場合に
は、(b)に示すように最下行最左列のブロックに貼り
付けられ、時計方向に90度回転する場合には、(c)
に示すように最上行最右列のブロックに貼り付けられる
ことになる。
First, in step S105, the block to be processed is set in the uppermost row and the leftmost column. Next, in step S106, a block to which a block to be processed is pasted in the rotated image is determined based on the rotation angle. 4A and 4B are diagrams for explaining a block after rotation. FIG. 4A shows a state before rotation, and FIG.
(C) shows a state rotated 90 degrees clockwise. That is, when the block in the uppermost row and the leftmost column shown in FIG. 4A is rotated counterclockwise by 90 degrees, the block is pasted to the block in the lowermost row and the leftmost column as shown in FIG. To rotate 90 degrees to (c)
As shown in the above, it is pasted to the block in the top row and right column.

【0020】次に、ステップS107で処理対象のブロ
ックのイメージデータを一旦ステップ103で確保した
バッファメモリ3(図1参照)に転送した後、回転させ
て、ステップS104で確保した格納メモリ5(図1参
照)へ、ステップS106で決定した貼り付け先のブロ
ックに貼り付ける処理を行う。この部分の処理の詳細は
後述する。
Next, in step S107, the image data of the block to be processed is temporarily transferred to the buffer memory 3 (see FIG. 1) secured in step 103, and then rotated, and the storage memory 5 secured in step S104 (see FIG. 1). 1), a process of pasting to the block of the paste destination determined in step S106 is performed. Details of the processing of this part will be described later.

【0021】続いて、ステップS108で、処理対象の
ブロックがその行の右端かどうかを判定し、右端でない
場合はステップS109で処理対象のブロックを1列右
へ移動してステップS106へ戻り、右端の場合はステ
ップS110で最下行かどうかを判定し、最下行でなけ
ればステップS111、ステップS112で処理対象の
ブロックを1行下の最左列へ移動してステップS106
へ戻る。最下行であれば全ブロックの回転処理が終了し
ているため、ループ処理を抜ける。この時点でステップ
S104で確保したメモリ上に回転されたイメージデー
タが格納されることになる。
Subsequently, in step S108, it is determined whether the block to be processed is at the right end of the row. If not, the block to be processed is moved right by one column in step S109, and the process returns to step S106. In step S110, it is determined whether or not the block is the bottom row. If not, the block to be processed is moved to the leftmost column one row below in step S111 and step S112.
Return to If it is the bottom line, the rotation processing of all blocks has been completed, and the processing exits from the loop processing. At this point, the rotated image data is stored in the memory secured in step S104.

【0022】次に、前述したステップS107のブロッ
ク回転・貼り付け処理の詳細について図5のフローチャ
ートに沿って説明する。この処理は、イメージメモリ1
(図1参照)上に格納されたブロックのイメージデータ
を一旦バッファメモリ3(図1参照)に転送しながら指
定された角度で回転し、回転処理後のイメージデータを
格納メモリ5(図1参照)の指定されたブロックの領域
に貼り付けるものである。
Next, the details of the block rotation / pasting processing in step S107 will be described with reference to the flowchart of FIG. This processing is performed in the image memory 1
(See FIG. 1) The image data of the block stored above is rotated at a designated angle while being temporarily transferred to the buffer memory 3 (see FIG. 1), and the image data after the rotation processing is stored in the storage memory 5 (see FIG. 1). ) Is attached to the area of the specified block.

【0023】ここでは、あるブロック内における回転・
貼り付け処理の対象となるピクセルの移動順序として、
最上行最左列を最初とし、行方向に順に右へ移動し、あ
る行の一番右まできたら次の列の一番左に戻るという規
則に従っている場合を例に説明を行う。
Here, the rotation within a certain block
The order in which the pixels to be pasted are moved
An example will be described in which the rule is such that the top row and the leftmost column are the first, the row is moved to the right in order in the row direction, and if it reaches the rightmost position in a row, it returns to the leftmost position in the next column.

【0024】先ず、ステップS201で最初に処理対象
となるピクセルを最上行最左列に設定する。次に、ステ
ップS202で貼り付け回数カウンタをゼロクリアす
る。このカウンタの値は、後ほど貼り付け位置を決定す
る際に参照する。続いて、ステップS203で処理対象
となるピクセルを前述のステップS103(図2参照)
で確保したバッファメモリ3(図1参照)上に転送する
際の書き込み位置を最上行最左列に設定する。
First, in step S201, a pixel to be processed first is set in the uppermost row and the leftmost column. Next, in step S202, the number-of-pastes counter is cleared to zero. The value of this counter will be referred to when determining the pasting position later. Subsequently, the pixel to be processed in step S203 is set in step S103 described above (see FIG. 2).
The writing position for transferring the data to the buffer memory 3 (see FIG. 1) secured in step (1) is set to the uppermost row and the leftmost column.

【0025】次に、ステップS204で処理対象となる
ピクセルが余白かどうかをステップS102(図2参
照)で取得したオフセット値を用いて判定し、イメージ
データがある領域の場合はステップS205でそのピク
セルのデータをバッファメモリ3(図1参照)上の書き
込み位置に転送し、余白の場合にはステップS206で
疑似データとして例えば各色の色値を0としたデータを
転送する。
Next, it is determined in step S204 whether or not the pixel to be processed is a margin using the offset value obtained in step S102 (see FIG. 2). Is transferred to the write position on the buffer memory 3 (see FIG. 1), and in the case of a margin, data in which the color value of each color is set to 0 is transferred as pseudo data in step S206.

【0026】続いて、ステップS207で処理対象のピ
クセルがその行の右端かどうかを判定し、右端でない場
合はステップS208で処理対象のピクセルおよびバッ
ファメモリ3(図1参照)の書き込み位置を1列右へ移
動してステップS204へ戻り、右端の場合はステップ
S209でバッファメモリ3が一杯かどうかを判定し、
一杯でなければステップS210、ステップS211で
処理対象のピクセルおよびバッファメモリ3の書き込み
位置を1行下の最左列へ移動してステップS204へ戻
る。
Subsequently, in step S207, it is determined whether or not the pixel to be processed is at the right end of the row. If not, the pixel to be processed and the write position of the buffer memory 3 (see FIG. 1) are set to one column in step S208. It moves to the right and returns to step S204. If it is the right end, it is determined in step S209 whether or not the buffer memory 3 is full.
If it is not full, in step S210 and step S211, the pixel to be processed and the writing position of the buffer memory 3 are moved to the leftmost column one row below and the process returns to step S204.

【0027】バッファメモリ3(図1参照)が一杯の場
合、ステップS212へ進んでバッファメモリ3の内容
を回転しながらステップS104(図2参照)で確保し
た格納メモリ5(図1参照)のステップS106(図2
参照)で指定されたブロックの領域に貼り付ける処理を
行う。この部分の処理の詳細は後述する。
If the buffer memory 3 (see FIG. 1) is full, the flow advances to step S212 to rotate the contents of the buffer memory 3 while rotating the contents of the storage memory 5 (see FIG. 1) in step S104 (see FIG. 2). S106 (FIG. 2
(See Reference)). Details of the processing of this part will be described later.

【0028】貼り付け処理が終了したら、ステップS2
13で貼り付け回数カウンタを+1する。続いて、ステ
ップS214で処理対象のピクセルが最下行かどうかを
判定し、最下行でなければステップS215、ステップ
S216で処理対象のピクセルを1行下の最左列へ移動
してステップS203へ戻る。一方、最下行であればブ
ロック内の全ピクセルの回転処理が終了しているため、
ループ処理を抜ける。この時点、ステップS104(図
2参照)で確保した格納メモリ5(図1参照)上の指定
されたブロックの領域に、回転された処理対象のブロッ
クのイメージデータが格納されていることになる。
When the pasting process is completed, step S2
In step 13, the number of times of pasting is increased by one. Subsequently, in step S214, it is determined whether the pixel to be processed is the bottom row. If not, the pixel to be processed is moved to the leftmost column one row down in steps S215 and S216, and the process returns to step S203. . On the other hand, in the case of the bottom line, the rotation processing of all the pixels in the block has been completed.
Exit from loop processing. At this time, the image data of the rotated block to be processed is stored in the area of the designated block on the storage memory 5 (see FIG. 1) secured in step S104 (see FIG. 2).

【0029】次に、前述したステップS212のデータ
貼り付け処理の詳細について図6のフローチャートに沿
って説明する。この処理は、バッファメモリ3(図1参
照)に転送されたピクセルデータを指定された角度で回
転しながら効率良く格納メモリ5(図1参照)の指定さ
れたブロックに貼り付けるものである。
Next, the details of the data pasting process in step S212 will be described with reference to the flowchart of FIG. In this process, the pixel data transferred to the buffer memory 3 (see FIG. 1) is efficiently attached to the designated block of the storage memory 5 (see FIG. 1) while rotating at the designated angle.

【0030】先ず、ステップS301でバッファメモリ
3(図1参照)上にあるピクセルのデータの格納メモリ
5(図1参照)上での貼り付け先アドレスを決定する。
これは、回転角度とステップS106(図2参照)で指
定された貼り付け先のブロックおよび前述の貼り付け回
数カウンタの値をもとに行う。
First, in step S301, the destination address of the pixel data on the buffer memory 3 (see FIG. 1) on the storage memory 5 (see FIG. 1) is determined.
This is performed based on the rotation angle, the block to be pasted specified in step S106 (see FIG. 2), and the value of the above-mentioned pasting frequency counter.

【0031】図7は、データ貼り付け処理を説明する模
式図で、反時計方向に90度回転させる場合を例として
いる。このブロックは16ピクセル×16ピクセルの正
方領域になっており、バッファメモリ3はブロックの幅
(16ピクセル)×MPUの1回のデータ転送命令で転
送可能なピクセル数(4ピクセル)から構成されてい
る。したがって、貼り付け回数カウンタは0〜3までカ
ウントアップする。
FIG. 7 is a schematic diagram for explaining the data pasting process, in which the data is rotated by 90 degrees counterclockwise. This block is a square area of 16 pixels × 16 pixels, and the buffer memory 3 is composed of a block width (16 pixels) × the number of pixels (4 pixels) that can be transferred by one data transfer command of MPU. I have. Therefore, the sticking frequency counter counts up from 0 to 3.

【0032】バッファメモリ3に一旦格納されたイメー
ジデータの格納メモリへの貼り付け先アドレスは、貼り
付け回数カウンタと回転角度とで求まる格納メモリの貼
り付け先のブロックの貼り付け先ピクセルの範囲にな
る。
The address to which the image data once stored in the buffer memory 3 is to be pasted to the storage memory is within the range of the pixel to which the block of the storage memory is to be pasted, which is determined by the pasting counter and the rotation angle. Become.

【0033】次に、ステップS302〜ステップS30
7のループ処理によって、バッファメモリ3(図7参
照)内の各ラインの行方向位置が同一なピクセルをひと
かたまりのデータとしてパッキングし、回転後の画像を
格納メモリ5へ貼り付けるようにする。
Next, steps S302 to S30
By the loop process 7, the pixels having the same row direction position of each line in the buffer memory 3 (see FIG. 7) are packed as a group of data, and the rotated image is pasted on the storage memory 5.

【0034】すなわち、ステップS302でバッファ内
の最初に貼り付け対象とするピクセルの行方向位置を一
番左に設定する。次に、ステップS303でバッファメ
モリ3(図7参照)内各行の、貼り付け対象とする行方
向位置のピクセルを読み出し、回転角度に応じた順序で
MPUのデータレジスタに配置する。
That is, in step S302, the position of the pixel to be pasted first in the buffer in the row direction is set to the leftmost position. Next, in step S303, pixels in the row direction to be pasted are read from each row in the buffer memory 3 (see FIG. 7), and are arranged in the data register of the MPU in an order according to the rotation angle.

【0035】ステップS103(図2参照)においてバ
ッファメモリ3(図7参照)を確保する際に、ライン数
はMPUにおける1回のデータ転送命令で転送可能なピ
クセル数と同じにしているため、バッファメモリ3の全
ライン分のピクセルデータがMPUのデータレジスタを
丁度埋めることになる。
In securing the buffer memory 3 (see FIG. 7) in step S103 (see FIG. 2), the number of lines is the same as the number of pixels that can be transferred by one data transfer instruction in the MPU. The pixel data for all lines of the memory 3 just fills the data register of the MPU.

【0036】続いて、ステップS304でレジスタの内
容を回転後画像格納メモリの貼り付け先アドレスに転送
する。この転送命令は1回の実行で複数のピクセルデー
タを転送したことになる。次に、ステップS305でバ
ッファ内の貼り付け対象とするピクセルの行方向位置を
1つ右へずらし、ステップS307で次の貼り付け先ア
ドレスを決定する。
Subsequently, in step S304, the contents of the register are transferred to the paste destination address of the rotated image storage memory. This transfer command transfers a plurality of pixel data in one execution. Next, in step S305, the row direction position of the pixel to be pasted in the buffer is shifted right by one, and in step S307, the next pasting destination address is determined.

【0037】一番右ならバッファ内の全データを貼り付
け終わったことになるため、ループ処理を抜ける。
If it is at the far right, it means that all the data in the buffer has been pasted, and the processing exits from the loop processing.

【0038】図8は、回転貼り付けを説明する模式図で
ある。すなわち、回転元のブロックから読み出されバッ
ファメモリ2に格納されたイメージデータは、一番左の
行から順に同じ行の4ピクセル(A〜D)が読み出され
る。読み出された4ピクセルのデータは、反時計方向に
90度回転する場合には(A、B、C、D)の順に貼り
付け先のブロックの一番下の行から書き込まれ、時計方
向に90度回転する場合には(D、C、B、A)の順に
貼り付け先のブロックの一番上の行から書き込まれる。
FIG. 8 is a schematic diagram for explaining the rotational attachment. That is, in the image data read from the rotation source block and stored in the buffer memory 2, four pixels (A to D) in the same row are read sequentially from the leftmost row. When the read four-pixel data is rotated 90 degrees in the counterclockwise direction, the data is written in the order of (A, B, C, D) from the bottom row of the block to which the data is pasted, and clockwise. When the image is rotated 90 degrees, data is written in the order of (D, C, B, A) from the top row of the block to be pasted.

【0039】図9は、貼り付け位置を説明する模式図で
ある。上記のように4ピクセルを貼り付け先のブロック
に書き込んだ後は、貼り付け対象の4ピクセルを右に1
つ移動し、反時計方向に90度回転する場合には、先に
書き込んだ4ピクセルの1つ上の行に書き込み、時計方
向に90度回転する場合には、先に書き込んだ4ピクセ
ルの1つ下の行に書き込む。これを順次繰り返すこと
で、バッファメモリ2に格納された全てのイメージデー
タを貼り付け先のブロックに回転した状態で書き込むこ
とができるようになる。
FIG. 9 is a schematic diagram for explaining a sticking position. After writing 4 pixels to the paste destination block as described above, move the 4 pixels to be pasted to the right by 1
If the pixel is rotated 90 degrees counterclockwise, it is written in the row immediately above the previously written 4 pixels, and if it is rotated 90 degrees clockwise, 1 row of the previously written 4 pixels is rotated. Write to the line below. By repeating this sequentially, it becomes possible to write all the image data stored in the buffer memory 2 in the block of the paste destination in a rotated state.

【0040】そして、1つのブロックに対する回転貼り
付け処理が終了した後は、次のブロックで同様な回転貼
り付け処理を繰り返す。全てのブロックの回転貼り付け
処理が終了すると、格納メモリ5(図1参照)に全ての
イメージメモリの回転後のデータが格納されることにな
る。
After the rotation pasting process for one block is completed, the same rotation pasting process is repeated for the next block. When the rotation pasting process for all the blocks is completed, the rotated data of all the image memories is stored in the storage memory 5 (see FIG. 1).

【0041】なお、本実施形態にいて、あるブロック内
の回転処理の対象となるピクセルが余白の場合には、疑
似データとして各色の色値を0としてデータを使用する
代わりに、そのブロックに含まれるイメージデータの最
外周部分のピクセルデータを使用するとも可能である。
これにより、後段の処理において圧縮を行う場合、圧縮
率の改善を図ることが可能となる。
In the present embodiment, when a pixel to be subjected to the rotation process in a certain block is a margin, the data is included in the block as pseudo data instead of using data with the color value of each color being 0. It is also possible to use the pixel data of the outermost peripheral part of the image data to be used.
This makes it possible to improve the compression ratio when performing compression in the subsequent processing.

【0042】[0042]

【発明の効果】以上説明したように、本発明の画像処理
装置によれば次のような効果がある。すなわち、バッフ
ァメモリから格納メモリへのデータ転送を1回の転送命
令によってデータバス幅に応じて複数ピクセル分同時に
行うようにしていることから、データ転送命令の実行回
数を大幅に減少させることが可能となる、中央処理装置
の内部で発生するキャッシュのアクセスを最適化するこ
とが可能となる。これにより、大きな画像データの回転
処理を大幅に高速化することが可能となる。
As described above, the image processing apparatus according to the present invention has the following effects. That is, since the data transfer from the buffer memory to the storage memory is performed simultaneously by a single transfer command for a plurality of pixels according to the data bus width, the number of executions of the data transfer command can be greatly reduced. It is possible to optimize cache access that occurs inside the central processing unit. This makes it possible to significantly speed up the rotation processing of large image data.

【0043】さらに、ブロックにイメージデータの余白
がある場合、その余白部分に疑似データを割り当てるこ
とでブロックのイメージデータを回転処理する際の高速
化を図ることができる。また、余白部分にそのブロック
に含まれるイメージデータの最外周部分のピクセルデー
タを使用することで、後段の処理においてイメージを圧
縮する際の圧縮率を向上させることができ、メモリ量の
削減を図るとが可能となる。
Further, when there is a margin of image data in a block, by assigning pseudo data to the margin portion, it is possible to speed up the rotation processing of the image data of the block. Further, by using the pixel data of the outermost peripheral portion of the image data included in the block in the blank portion, it is possible to improve the compression ratio when compressing the image in the subsequent processing, thereby reducing the amount of memory. It becomes possible.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本実施形態の画像処理装置を説明するブロッ
ク図である。
FIG. 1 is a block diagram illustrating an image processing apparatus according to an embodiment.

【図2】 画像回転処理の流れを説明するフローチャー
トである。
FIG. 2 is a flowchart illustrating a flow of an image rotation process.

【図3】 ブロック内の余白部分を説明する模式図であ
る。
FIG. 3 is a schematic diagram illustrating a blank portion in a block.

【図4】 回転後のブロックを説明する図である。FIG. 4 is a diagram illustrating a block after rotation.

【図5】 回転・貼り付け処理を説明するフローチャー
トである。
FIG. 5 is a flowchart illustrating a rotation / pasting process.

【図6】 貼り付け処理を説明するフローチャートであ
る。
FIG. 6 is a flowchart illustrating a pasting process.

【図7】 データ貼り付け処理を説明する模式図であ
る。
FIG. 7 is a schematic diagram illustrating a data pasting process.

【図8】 回転貼り付けを説明する模式図である。FIG. 8 is a schematic diagram for explaining the rotational attachment.

【図9】 貼り付け位置を説明する模式図である。FIG. 9 is a schematic diagram for explaining a sticking position.

【符号の説明】[Explanation of symbols]

1…イメージメモリ、2…ブロック決定部、3…バッフ
ァメモリ、4…アドレス制御部、5…格納メモリ
DESCRIPTION OF SYMBOLS 1 ... Image memory, 2 ... Block determination part, 3 ... Buffer memory, 4 ... Address control part, 5 ... Storage memory

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 2C087 AB05 BC02 BC05 BC06 BD24 5B047 EA07 EB11 5B057 CA12 CA16 CB12 CB16 CD04 CH11 9A001 BB03 BB04 EE02 HH34 JJ35 KK42  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 2C087 AB05 BC02 BC05 BC06 BD24 5B047 EA07 EB11 5B057 CA12 CA16 CB12 CB16 CD04 CH11 9A001 BB03 BB04 EE02 HH34 JJ35 KK42

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 回転対象のイメージデータを格納するイ
メージメモリと、 前記イメージメモリに格納されたイメージデータを、少
なくとも一辺が中央処理装置のデータバス幅で一度に転
送可能なピクセル数の倍数に対応したドット数をもつブ
ロックに分割し、回転対象となるブロックを決定するブ
ロック決定手段と、 前記ブロック決定手段で決定されたブロックのイメージ
データのうち、中央処理装置による1回のデータ転送命
令で転送可能なドット数に対応するライン数分のイメー
ジデータを一時格納するバッファメモリと、 前記バッファメモリに格納された複数ライン分のイメー
ジデータに対して回転角度に応じた格納メモリ書き込み
アドレスを決定するアドレス制御手段とを備えているこ
とを特徴とする画像処理装置。
1. An image memory for storing image data to be rotated, and at least one side of the image data stored in the image memory corresponds to a multiple of the number of pixels that can be transferred at a time with a data bus width of a central processing unit. Block deciding means for dividing into blocks having the same number of dots and determining a block to be rotated, and transferring the image data of the block decided by the block deciding means by one data transfer instruction by the central processing unit. A buffer memory for temporarily storing image data for a number of lines corresponding to a possible number of dots; and an address for determining a storage memory write address corresponding to a rotation angle for the image data for a plurality of lines stored in the buffer memory. An image processing apparatus comprising: a control unit.
【請求項2】 前記ブロック決定手段で決定したブロッ
クを構成するドットのうちイメージデータのないドット
がある場合、そのドットに疑似データを割り当てること
を特徴とする請求項1記載の画像処理装置。
2. The image processing apparatus according to claim 1, wherein when there is a dot having no image data among the dots constituting the block determined by the block determination means, pseudo data is assigned to the dot.
【請求項3】 前記疑似データは、イメージデータのな
いドットがあるブロックのイメージデータにおける最外
周のデータから成ることを特徴とする請求項2記載の画
像処理装置。
3. The image processing apparatus according to claim 2, wherein the pseudo data comprises outermost data in image data of a block having a dot without image data.
JP11102008A 1999-04-09 1999-04-09 Image processor Pending JP2000293678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11102008A JP2000293678A (en) 1999-04-09 1999-04-09 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11102008A JP2000293678A (en) 1999-04-09 1999-04-09 Image processor

Publications (1)

Publication Number Publication Date
JP2000293678A true JP2000293678A (en) 2000-10-20

Family

ID=14315758

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11102008A Pending JP2000293678A (en) 1999-04-09 1999-04-09 Image processor

Country Status (1)

Country Link
JP (1) JP2000293678A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1507249A1 (en) * 2003-08-12 2005-02-16 ARM Limited Display controller for rotation of display image
JP2012170058A (en) * 2011-02-14 2012-09-06 Xerox Corp Systems, methods and devices for rotating image tiles using line segment read buffers
US8417063B2 (en) 2011-01-19 2013-04-09 Kabushiki Kaisha Toshiba Image processing apparatus and image processing system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1507249A1 (en) * 2003-08-12 2005-02-16 ARM Limited Display controller for rotation of display image
US8417063B2 (en) 2011-01-19 2013-04-09 Kabushiki Kaisha Toshiba Image processing apparatus and image processing system
JP2012170058A (en) * 2011-02-14 2012-09-06 Xerox Corp Systems, methods and devices for rotating image tiles using line segment read buffers

Similar Documents

Publication Publication Date Title
US6860203B2 (en) Method and apparatus for printing computer generated images
US20140362395A1 (en) Image processing apparatus and method
JP4250470B2 (en) Information processing apparatus, information processing method, and print control program
JP2000335022A (en) Printer control device
JP4709317B2 (en) Information processing apparatus, information processing method, and print control program
JP2000293678A (en) Image processor
US20070279420A1 (en) Apparatus for processing print data
JPH05342314A (en) Picture processor
JP2002079712A (en) Printer, method for controlling printer, printing controller, and method for controlling printing controller
JPH10129050A (en) Printing processor
JP2001096854A (en) Apparatus and method for printing processing
JP3997808B2 (en) Drawing processing apparatus and drawing processing method
JPH03114856A (en) Printer data management system
JP3864520B2 (en) Print processing apparatus and print processing method
JP2854434B2 (en) Dot image data shift writing device
JP2739481B2 (en) Page printer
JP2006159458A (en) Image output device
JP2637921B2 (en) Character symbol generator
US20020109853A1 (en) Generating images quickly in raster image processing
US7380069B2 (en) Method and apparatus for DMA-generated memory write-back
JP2005123806A (en) Image processing method and image processing system
JPH05233789A (en) Digital image processor
JPH09274654A (en) Output controller, output control method and storage medium storing control program
JPH04371864A (en) Page printer
JPH11119928A (en) Device and method for processing printing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040319

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070122

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070213

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070416

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070522