JP2001086318A - Image processor, image-processing method, image-forming device and recording medium with program recorded therein - Google Patents

Image processor, image-processing method, image-forming device and recording medium with program recorded therein

Info

Publication number
JP2001086318A
JP2001086318A JP25791499A JP25791499A JP2001086318A JP 2001086318 A JP2001086318 A JP 2001086318A JP 25791499 A JP25791499 A JP 25791499A JP 25791499 A JP25791499 A JP 25791499A JP 2001086318 A JP2001086318 A JP 2001086318A
Authority
JP
Japan
Prior art keywords
block
image
restoration
data
output
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.)
Granted
Application number
JP25791499A
Other languages
Japanese (ja)
Other versions
JP3661520B2 (en
Inventor
Masatoshi Matsudaira
平 正 年 松
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP25791499A priority Critical patent/JP3661520B2/en
Publication of JP2001086318A publication Critical patent/JP2001086318A/en
Application granted granted Critical
Publication of JP3661520B2 publication Critical patent/JP3661520B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Image Processing (AREA)
  • Studio Circuits (AREA)
  • Storing Facsimile Image Data (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

PROBLEM TO BE SOLVED: To output compressed image data in the state of being restored and rotated for a prescribed angle at a high speed with less memories by providing a restoration processing part, a restoration information storage part for storing information relating to decoding and a block rotation part for executing the rotation processing of a block to be decoded. SOLUTION: This image processor 100 is provided with a restoration processing part 12, data buffer 14, restoration information storage part 15, block rotation part 16, development control part 17 and output buffer 18. The restoration processing part 12 reads prescribed data from an image file 200, analyzes and restores them, outputs the data to the respective parts as needed and also controls the respective parts. The restoration information storage part 15 stores the information related to a divided block analyzed and restored by the restoration processing part 12, typically DC components and a file pointer. The block rotation part 16 receives the data of the divided block restored in the restoration processing part 12, rotates them by a prescribed rotation angle and outputs them.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像処理装置、画
像処理方法、画像形成装置及びプログラムを記録した記
録媒体に関する。より詳細には、本発明は、圧縮された
画像データを少ないメモリで且つ高速に回転させること
ができる画像処理装置、画像処理方法、画像形成装置及
びプログラムを記録した記録媒体に関する。
The present invention relates to an image processing apparatus, an image processing method, an image forming apparatus, and a recording medium on which a program is recorded. More specifically, the present invention relates to an image processing apparatus, an image processing method, an image forming apparatus, and a recording medium on which a program is recorded, which can rotate compressed image data at a high speed with a small amount of memory.

【0002】[0002]

【従来の技術】近年、画像情報のデジタル化とインター
ネットに代表されるネットワーク化の急速に発展し、各
種のデジタル画像情報が圧縮した状態で取り扱われるこ
とが多い。このような圧縮フォーマットとして最もポピ
ュラーなものに、「JPEG(Joint Photograph Exper
ts Group)」がある。JPEGは、例えば、RGB(赤
緑青)24ビットなどで表現される静止画像情報を圧縮
可能な高能率符号化標準である。
2. Description of the Related Art In recent years, digitization of image information and networking represented by the Internet have been rapidly developed, and various types of digital image information are often handled in a compressed state. One of the most popular compression formats is JPEG (Joint Photograph Exper
ts Group). JPEG is a high-efficiency coding standard capable of compressing still image information represented by, for example, RGB (red, green, blue) 24 bits.

【0003】図22は、JPEGによる圧縮、復元処理
の典型例を表す概念図である。すなわち、同図(a)〜
(d)は、圧縮(符号化)のプロセスを表し、同図
(e)〜(h)は復元(復号化)のプロセスを表す。
FIG. 22 is a conceptual diagram showing a typical example of compression and decompression processing by JPEG. That is, FIG.
(D) shows a process of compression (encoding), and (e) to (h) of FIG. 7 show a process of decompression (decoding).

【0004】JPEG圧縮に際しては、RGBあるいは
Y(輝度)Cb(青色差)Cr(赤色差)などにより表
される原画を、まず、図22(a)に表したように8ピ
クセル×8ピクセルのブロックに分割する。
At the time of JPEG compression, an original image represented by RGB or Y (luminance) Cb (blue difference) Cr (red difference) is first converted into 8 pixels × 8 pixels as shown in FIG. Divide into blocks.

【0005】次に、同図(b)に表したように、ブック
毎にDCT(descrete cosince transform:離散コサイ
ン変換)処理を施す。DCT処理は周波数変換に対応
し、この処理によってブロック画像が周波数により表さ
れる。一般に画像データは、周波数スペクトルの形式で
表すと低周波数帯域において分布が見られ、この結果と
して少ない情報量で符号化を行うことができる。このよ
うに周波数に変換した後にさらに量子化することにより
離散化させる。
Next, as shown in FIG. 1B, a DCT (discrete cosince transform) process is performed for each book. The DCT process corresponds to a frequency transform, and the block image is represented by a frequency by this process. Generally, when image data is represented in the form of a frequency spectrum, a distribution is seen in a low frequency band, and as a result, encoding can be performed with a small amount of information. After the conversion into the frequency, the data is further quantized to be discretized.

【0006】次に、このようにDCT量子化したデータ
を図22(c)に表したように、ジグザク走査して一列
に並べる。そして、エントロピ符号化処理を施すことに
より、同図(d)に表したような符号列とすることがで
きる。
Next, the DCT-quantized data is zigzag-scanned and arranged in a line as shown in FIG. Then, by performing entropy encoding processing, a code string as shown in FIG.

【0007】一方、復元は、上述した一連の処理を逆に
施すことにより、同図(e)〜(h)に表したように実
行される。
On the other hand, restoration is performed as shown in FIGS. 1E to 1H by performing the above-described series of processing in reverse.

【0008】[0008]

【発明が解決しようとする課題】ところで、画像データ
を取り扱うに際して、入力した画像を所定の角度だけ回
転させたい場合がある。例えば、CD−ROMなどの媒
体から、あるいはインターネットなどを介してパーソナ
ルコンピュータに取り込んだJPEG画像をプリンタで
印刷出力する際に、用紙のサイズや画像のレイアウトに
応じて、JPEG画像を90°、180°、あるいは2
70°回転させた状態で出力させたい場合も多い。
Incidentally, when handling image data, it is sometimes desired to rotate an input image by a predetermined angle. For example, when a JPEG image captured from a medium such as a CD-ROM or taken into a personal computer via the Internet or the like is printed out by a printer, the JPEG image is converted to 90 °, 180 ° according to the paper size and image layout. ° or 2
In many cases, it is desired to output the image while rotating it by 70 degrees.

【0009】このような場合に、対象となるJPEG画
像の全体を復元し、しかる後に所定の角度だけ回転処理
を施す方法も考えられる。
In such a case, a method of restoring the entire target JPEG image and then performing a rotation process by a predetermined angle may be considered.

【0010】しかし、この方法によると、復元した画像
の全体を一時的に保持するための大容量メモリが必要と
なるばかりでなく、大容量の画像データを回転処理する
ために回転処理の所要時間も増大し、システムに対する
負荷が大きくなるという問題が生ずる。
However, according to this method, not only a large-capacity memory for temporarily holding the entire restored image is required, but also the time required for the rotation processing for rotating the large-capacity image data. And the load on the system increases.

【0011】例えば、このようなJPEG画像の復元、
保持、回転処理をホストコンピュータで実行することと
すると、ホストのメモリコストが高くなり、また処理の
負荷が増大する。一方、プリンタ側において同様の動作
を実行させるためには、大容量メモリを増設する必要が
あり、コストが大幅に上昇する。
For example, restoration of such a JPEG image,
If the holding and rotation processing is executed by the host computer, the memory cost of the host increases, and the processing load increases. On the other hand, in order to execute the same operation on the printer side, it is necessary to add a large-capacity memory, and the cost is greatly increased.

【0012】一方、近年の画像情報のデジタル化の進展
に伴い、高速なCPUや大容量メモリを必ずしも搭載し
ていないようなデジタル機器、例えば、デジタルカメラ
や各種のゲーム機器などが登場している。これらのデジ
タル機器から圧縮された画像データをそのまま取り出
し、所定の角度だけ回転した状態の画像を形成できる画
像形成装置があると、各種の画像データをさらに便利に
取り扱うことができる。
On the other hand, with the progress of digitization of image information in recent years, digital devices that do not necessarily have a high-speed CPU or a large-capacity memory, such as digital cameras and various game devices, have appeared. . If there is an image forming apparatus capable of directly extracting compressed image data from these digital devices and forming an image rotated by a predetermined angle, various image data can be handled more conveniently.

【0013】本発明は、かかる諸事情の認識に基づいて
なされたものである。すなわち、その目的は、少ないメ
モリで且つ高速に、圧縮された画像データを復元し所定
の角度だけ回転させた状態で、順次出力することができ
る、画像処理装置、画像処理方法、画像形成装置及びプ
ログラムを記録した記憶媒体を提供することにある。
The present invention has been made based on the recognition of such circumstances. That is, an object of the present invention is to provide an image processing apparatus, an image processing method, an image forming apparatus, and an image processing method capable of restoring compressed image data and rotating it by a predetermined angle and outputting the compressed image data sequentially with a small amount of memory and at high speed. An object of the present invention is to provide a storage medium storing a program.

【0014】[0014]

【課題を解決するための手段】上記目的の達成のため
に、本発明の画像処理装置は、原画像をブロック毎に符
号化した符号化成分を有し且つ前記符号化成分に他のブ
ロックとの差分に関する情報を含む符号化画像データを
復号化し所定の角度だけ回転させた状態で出力する画像
処理装置であって、復号化を実行する復元処理部と、復
号化に関する情報を格納する復元情報格納部と、復号化
されたブロックの回転処理を実行するブロック回転部
と、を備え、前記復元処理部は、まず、前記符号化画像
データを最初から順番に復号化し、前記原画像中に予め
定めた起点ブロックを復号化するために必要とされる復
元情報が得られたら前記復元情報格納部に格納し、しか
る後に、前記復元処理部は、前記復元情報格納部に格納
した前記復元情報を利用して前記符号化画像データを前
記起点ブロックから復号化し、前記ブロック回転部は、
前記復元処理部により復号化されたブロックが出力すべ
きブロックの場合は前記所定の角度だけ回転させて出力
することにより、前記原画像を前記所定の角度だけ回転
させた状態とした時に上方に位置するブロックから順に
復号化データを出力可能としたことを特徴とする。
In order to achieve the above object, an image processing apparatus according to the present invention has a coded component obtained by coding an original image for each block, and the coded component includes another coded component. An image processing apparatus that decodes encoded image data including information about the difference between the images and outputs the decoded image data in a state rotated by a predetermined angle, and a restoration processing unit that executes decoding, and restoration information that stores information about decoding. A storage unit, and a block rotation unit that executes rotation processing of the decoded block.The restoration processing unit first decodes the encoded image data in order from the beginning, and stores the decoded image data in the original image in advance. When the restoration information required to decode the determined starting block is obtained, the restoration information is stored in the restoration information storage unit.After that, the restoration processing unit stores the restoration information stored in the restoration information storage unit. Profit The coded image data decoded from the start point block with the block rotating part,
When the block decoded by the restoration processing unit is a block to be output, the block is rotated by the predetermined angle and output, so that the original image is positioned upward when the original image is rotated by the predetermined angle. The decoded data can be output in order from the block to be decoded.

【0015】上記構成によれば、復元した画像全体を格
納するための大容量メモリが不要となり、極めて小さい
メモリを用いて高速に復元・回転処理を実行することが
できる。
According to the above configuration, a large-capacity memory for storing the entire restored image is not required, and the restoration / rotation processing can be executed at a high speed using an extremely small memory.

【0016】ここで、出力バッファをさらに備え、前記
ブロック回転部により前記所定の角度だけ回転させて出
力される前記ブロックは、前記出力バッファ上に展開さ
れることとすると、各ブロックを所定の位置関係に容易
且つ確実に配置して出力できる。
Here, the output buffer further includes an output buffer, and the blocks output by being rotated by the predetermined angle by the block rotating unit are developed on the output buffer. It is possible to easily and reliably arrange and output the relationship.

【0017】また、前記符号化画像データは、JPEG
フォーマットに基づき、前記復元情報は、前記起点ブロ
ックの離散コサイン変換係数のDC成分に関する情報で
あることとすると、最も汎用性のあるJPEG画像ファ
イルを復元回転することができる。
The encoded image data is a JPEG image data.
Assuming that the restoration information is information on the DC component of the discrete cosine transform coefficient of the starting block based on the format, the most versatile JPEG image file can be restored and rotated.

【0018】また、前記角度は、0°以上180°以下
であり、前記起点ブロックは、前記原画像における左端
の一列のブロックを含むこととすると、起点ブロックか
ら順に復元することによって回転後画像を上方のブロッ
クから順に出力することができる。
The angle is not less than 0 ° and not more than 180 °, and if the starting block includes a block in the left end of the original image, the rotated image is restored by sequentially starting from the starting block. Output can be performed sequentially from the upper block.

【0019】または、前記角度は、180°よりも大き
く且つ360°よりも小さく、前記起点ブロックは、前
記原画像における左端の一列のブロックと、それ以外の
一列のブロックと、を含むこととすると、起点ブロック
から復元を進めて目的とするブロックに到達するまでの
処理時間を短縮することができる。
Alternatively, the angle is larger than 180 ° and smaller than 360 °, and the starting block includes a block in one row at the left end of the original image and a block in another row. In addition, it is possible to shorten the processing time from the start of the restoration to the target block after the restoration is advanced.

【0020】また、前記復元情報格納部は、キャッシュ
メモリを有することとすると、復元情報に高速にアクセ
スでき、高速に処理可能となる。
Further, if the restoration information storage section has a cache memory, the restoration information can be accessed at high speed and can be processed at high speed.

【0021】一方、本発明の画像処理方法は、原画像を
ブロック毎に符号化した符号化成分を有し且つ前記符号
化成分に他のブロックとの差分に関する情報を含む符号
化画像データを復号化し所定の角度だけ回転させた状態
で出力する画像処理方法であって、前記符号化画像デー
タを最初から順番に復号化し、原画像中に定めた起点ブ
ロックを復号化するために必要とされる復元情報が得ら
れたら保持し、しかる後に、前記保持した前記復元情報
を利用して前記符号化画像データを前記起点ブロックか
ら復号化し、前記復号化されたブロックが出力すべきブ
ロックの場合は前記所定の角度だけ回転させて出力する
ことにより、前記原画像を前記所定の角度だけ回転させ
た状態とした時に上方に位置するブロックから順に復号
化データを出力可能としたことを特徴とする。
On the other hand, the image processing method of the present invention decodes coded image data having a coded component obtained by coding an original image for each block and including the coded component including information on a difference from another block. An image processing method for outputting the encoded image data in a state where the encoded image data is rotated by a predetermined angle, which is required to decode the encoded image data in order from the beginning and to decode a starting block defined in the original image. When the restoration information is obtained, hold it, and thereafter, decode the coded image data from the starting block using the held restoration information, and if the decoded block is a block to be output, By rotating and outputting the original image by a predetermined angle, when the original image is rotated by the predetermined angle, decoded data can be output in order from the block located above. And said that the content was.

【0022】上記構成によれば、復元した画像全体を格
納するための大容量メモリが不要となり、極めて小さい
メモリを用いて高速に復元・回転処理を実行することが
できる。
According to the above configuration, a large-capacity memory for storing the entire restored image is not required, and the restoration / rotation processing can be executed at a high speed using an extremely small memory.

【0023】一方、本発明の画像形成装置は、原画像を
ブロック毎に符号化した符号化成分を有し且つ前記符号
化成分に他のブロックとの差分に関する情報を含む符号
化画像データを入力し、前記原画像を所定の角度だけ回
転させた状態で出力する画像形成装置であって、復号化
を実行する復元処理部と、復号化に関する情報を格納す
る復元情報格納部と、復号化されたブロックの回転処理
を実行するブロック回転部と、復号化データに基づいて
画像を形成する画像形成手段と、を備え、前記復元処理
部は、まず、前記符号化画像データを最初から順番に復
号化し、原画像中に予め定めた起点ブロックを復号化す
るために必要とされる復元情報が得られたら前記復元情
報格納部に格納し、しかる後に、前記復元処理部は、前
記復元情報格納部に格納した前記復元情報を利用して前
記符号化画像データを前記起点ブロックから復号化し、
前記ブロック回転部は、前記復元処理部により復号化さ
れたブロックが出力すべきブロックの場合は前記所定の
角度だけ回転させて前記復号化データを出力し、前記画
像形成手段は、前記出力された復号化データに基づいて
画像を形成することにより、前記所定の角度だけ回転さ
せた状態の画像を上方のブロックから順次形成可能とし
たことを特徴とする。
On the other hand, the image forming apparatus according to the present invention receives encoded image data having an encoded component obtained by encoding an original image for each block, and including, as the encoded component, information relating to a difference from another block. An image forming apparatus that outputs the original image in a state where the original image is rotated by a predetermined angle, a restoration processing unit that executes decoding, a restoration information storage unit that stores information related to decoding, A block rotator that executes a rotation process of the block, and an image forming unit that forms an image based on the decoded data, wherein the restoration processor first decodes the encoded image data in order from the beginning. When the restoration information required to decode the predetermined starting block in the original image is obtained, the restoration information is stored in the restoration information storage unit. Thereafter, the restoration processing unit stores the restoration information storage unit. By using the restoration information stored decoding the encoded image data from the start point block,
The block rotation unit outputs the decoded data by rotating the block by the predetermined angle when the block decoded by the restoration processing unit is a block to be output, and the image forming unit outputs the decoded data. By forming an image based on the decoded data, an image rotated by the predetermined angle can be sequentially formed from an upper block.

【0024】上記構成によれば、復元した画像全体を格
納するための大容量メモリが不要となり、極めて小さい
メモリを用いて高速に復元・回転処理を実行することが
できる。
According to the above configuration, a large-capacity memory for storing the entire restored image is not required, and the restoration / rotation processing can be executed at a high speed using an extremely small memory.

【0025】ここで、出力バッファをさらに備え、前記
ブロック回転部により前記所定の角度だけ回転させて出
力される前記ブロックの復号化データは、前記出力バッ
ファ上に展開され、前記画像形成手段は、前記出力バッ
ファ上に展開された前記復号化データを読み出して前記
画像を形成することとすると、各ブロックを所定の位置
関係に容易且つ確実に配置して出力できる。
Here, further provided is an output buffer, wherein the decoded data of the block, which is output by being rotated by the predetermined angle by the block rotating unit, is developed on the output buffer, and the image forming means comprises: If the decoded data expanded on the output buffer is read to form the image, the blocks can be easily and reliably arranged in a predetermined positional relationship and output.

【0026】また、前記符号化画像データは、JPEG
フォーマットに基づき、前記復元情報は、前記起点ブロ
ックの離散コサイン変換係数のDC成分に関する情報で
あることとすると、最も汎用性のあるJPEG画像ファ
イルを復元回転することができる。
The coded image data is JPEG
Assuming that the restoration information is information on the DC component of the discrete cosine transform coefficient of the starting block based on the format, the most versatile JPEG image file can be restored and rotated.

【0027】また、前記角度は、0°以上180°以下
であり、前記起点ブロックは、前記原画像における左端
の一列のブロックを含むこととすると、起点ブロックか
ら順に復元することによって回転後画像を上方のブロッ
クから順に出力することができる。
The angle is not less than 0 ° and not more than 180 °, and if the starting block includes a block on the left end of the original image, the rotated image is restored by sequentially starting from the starting block. Output can be performed sequentially from the upper block.

【0028】または、前記角度は、180°よりも大き
く且つ360°よりも小さく、前記起点ブロックは、前
記原画像における左端の一列のブロックと、それ以外の
一列のブロックと、を含むこととすると、起点ブロック
から復元を進めて目的とするブロックに到達するまでの
処理時間を短縮することができる。
Alternatively, the angle is larger than 180 ° and smaller than 360 °, and the starting block includes a block in one row at the left end in the original image and a block in another row. In addition, it is possible to shorten the processing time from the start of the restoration to the target block after the restoration is advanced.

【0029】また、前記復元情報格納部は、キャッシュ
メモリを有することとすると、復元情報に高速にアクセ
スでき、高速に処理可能となる。
Further, if the restoration information storage section has a cache memory, the restoration information can be accessed at high speed and can be processed at high speed.

【0030】また、前記画像形成手段は、前記復号化デ
ータを印刷データに変換する印刷データ生成部と、前記
印刷データに基づいて印刷イメージを生成するイメージ
生成部と、前記印刷イメージに基づいて印刷媒体上に画
像を形成するプリンタエンジンと、を有するインクジェ
ット方式の画像形成手段であることとすれば、インクジ
ェットプリンタがもともと有するイメージバッファを用
いて復元回転処理を実行することも可能であり、コスト
の上昇を抑えつつ、極めて高性能化することができる。
[0030] The image forming means includes a print data generation unit for converting the decrypted data into print data, an image generation unit for generating a print image based on the print data, and a printing unit based on the print image. And a printer engine for forming an image on a medium, if the image forming unit is an ink jet type image forming unit, it is possible to execute the restoration rotation process using the image buffer originally provided in the ink jet printer. Extremely high performance can be achieved while suppressing the rise.

【0031】一方、本発明の記録媒体は、符号化画像デ
ータの復号化を実行する復元処理部と、前記復号化に関
する情報を格納する復元情報格納部と、前記復号化され
たブロックの回転処理を実行するブロック回転部と、を
有し、原画像をブロック毎に符号化した符号化成分を有
し且つ前記符号化成分に他のブロックとの差分に関する
情報を含む符号化画像データを復号化し所定の角度だけ
回転させた状態で出力する画像処理装置を制御するプロ
グラムを格納した記録媒体であって、前記プログラム
は、まず、前記復元処理部に、前記符号化画像データを
最初から順番に復号化させ、原画像中に定めた所定の起
点ブロックを復号化するために必要とされる復元情報が
得られたら前記復元情報格納部に格納させ、しかる後
に、前記復元処理部に、前記復元情報格納部に格納した
前記復元情報を利用させて前記符号化画像データを前記
起点ブロックから復号化させ、前記ブロック回転部に、
前記復元処理部により復号化されたブロックが出力すべ
きブロックの場合は前記所定の角度だけ回転させて出力
させることにより、前記原画像を前記所定の角度だけ回
転させた状態とした時に上方に位置するブロックから順
に復号化データを出力可能としたことを特徴とする。
On the other hand, a recording medium according to the present invention includes a restoration processing section for executing decoding of encoded image data, a restoration information storage section for storing information relating to the decoding, and a rotation processing of the decoded block. And a block rotator that decodes encoded image data having an encoded component obtained by encoding the original image for each block, and including information on a difference between the encoded component and another block. A recording medium storing a program for controlling an image processing apparatus that outputs an image in a state rotated by a predetermined angle, wherein the program first causes the restoration processing unit to decode the encoded image data in order from the beginning. When the restoration information required to decode the predetermined starting block defined in the original image is obtained, the restoration information is stored in the restoration information storage unit. Wherein by using the restoration information stored in the restoration information storing unit is decoding the encoded image data from the start point block, the block rotating part,
When the block decoded by the restoration processing unit is a block to be output, the block is rotated by the predetermined angle and output, so that the original image is positioned upward when the original image is rotated by the predetermined angle. The decoded data can be output in order from the block to be decoded.

【0032】上記構成によれば、復元した画像全体を格
納するための大容量メモリが不要となり、極めて小さい
メモリを用いて高速に復元・回転処理を実行することが
できる。
According to the above configuration, a large-capacity memory for storing the entire restored image is not required, and the restoration / rotation processing can be executed at a high speed using an extremely small memory.

【0033】ここで、前記画像処理装置は、出力バッフ
ァをさらに有し、前記プログラムは、前記ブロック回転
部により前記所定の角度だけ回転させて出力される前記
ブロックを前記出力バッファ上に展開させることとする
と、各ブロックを所定の位置関係に容易且つ確実に配置
して出力できる。
Here, the image processing apparatus further has an output buffer, and the program develops the block output by being rotated by the predetermined angle by the block rotating unit on the output buffer. Then, each block can be arranged and output in a predetermined positional relationship easily and reliably.

【0034】または、本発明の記録媒体は、原画像をブ
ロック毎に符号化した符号化成分を有し且つ前記符号化
成分に他のブロックとの差分に関する情報を含む符号化
画像データを復号化し所定の角度だけ回転させた状態で
出力するプログラムが格納された記録媒体であって、前
記プログラムは、前記符号化画像データを最初から順番
に復号化し、原画像中に定めた所定の起点ブロックを復
号化するために必要とされる復元情報が得られたら保持
し、しかる後に、前記保持した前記復元情報を利用して
前記符号化画像データを前記起点ブロックから復号化
し、前記復号化されたブロックが出力すべきブロックの
場合は前記所定の角度だけ回転させて出力することによ
り、前記原画像を前記所定の角度だけ回転させた状態と
した時に上方に位置するブロックから復号化データを順
に出力可能としたことを特徴とする。
Alternatively, a recording medium according to the present invention decodes encoded image data having an encoded component obtained by encoding an original image for each block, and including the encoded component including information relating to a difference from another block. A recording medium storing a program to be output in a state rotated by a predetermined angle, wherein the program decodes the encoded image data in order from the beginning, and determines a predetermined starting block defined in an original image. When the restoration information required for decoding is obtained, hold it, and thereafter, decode the coded image data from the starting block using the held restoration information, and In the case of the block to be output, the original image is rotated by the predetermined angle and output, so that the original image is positioned upward when the original image is rotated by the predetermined angle. Characterized in that from that block was capable of outputting decoded data sequentially.

【0035】上記構成によれば、復元した画像全体を格
納するための大容量メモリが不要となり、極めて小さい
メモリを用いて高速に復元・回転処理を実行することが
できる。
According to the above configuration, a large-capacity memory for storing the entire restored image is not required, and the restoration / rotation processing can be executed at a high speed using an extremely small memory.

【0036】また、前記符号化画像データは、JPEG
フォーマットに基づき、前記復元情報は、前記起点ブロ
ックの離散コサイン変換係数のDC成分に関する情報で
あることとすると、最も汎用性のあるJPEG画像ファ
イルを復元回転することができる。
The encoded image data is a JPEG image data.
Assuming that the restoration information is information on the DC component of the discrete cosine transform coefficient of the starting block based on the format, the most versatile JPEG image file can be restored and rotated.

【0037】また、前記角度は、0°以上180°以下
であり、前記起点ブロックは、前記原画像における左端
の一列のブロックを含むこととすると、起点ブロックか
ら順に復元することによって回転後画像を上方のブロッ
クから順に出力することができる。
The angle is not less than 0 ° and not more than 180 °, and if the starting block includes a block on the left end of the original image, the rotated image is restored by sequentially starting from the starting block. Output can be performed sequentially from the upper block.

【0038】または、前記角度は、180°よりも大き
く且つ360°よりも小さく、前記起点ブロックは、前
記原画像における左端の一列のブロックと、それ以外の
一列のブロックと、を含むこととすると、起点ブロック
から復元を進めて目的とするブロックに到達するまでの
処理時間を短縮することができる。
Alternatively, the angle may be larger than 180 ° and smaller than 360 °, and the starting block may include a block in the leftmost row of the original image and a block in the other row. In addition, it is possible to shorten the processing time from the start of the restoration to the target block after the restoration is advanced.

【0039】ここで、「記録媒体」とは、例えば、ハー
ドディスク(HD)、DVD−RAM、DVD−RO
M、光磁気記録媒体、フレキシブル・ディスク(FD)
やCD−ROMなどの他に、RAMやROMなどの各種
メモリも含む。
Here, the “recording medium” is, for example, a hard disk (HD), a DVD-RAM, a DVD-RO
M, magneto-optical recording medium, flexible disk (FD)
And various memories such as a RAM and a ROM in addition to the ROM and the CD-ROM.

【0040】また、これらの媒体に記録されるべきプロ
グラムをそのままの状態で、あるいは必要に応じて暗号
化したり、変調をかけたり、圧縮したような状態で、イ
ントラネットやインターネットなどの有線回線や無線回
線を介して頒布しても良い。
In addition, the programs to be recorded on these media may be used as they are, or may be encrypted, modulated, or compressed as necessary. It may be distributed via a line.

【0041】[0041]

【発明の実施の形態】以下、図面を参照しつつ本発明の
実施の形態について説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0042】図1は、本具体例に対応した画像処理装置
の概略構成を表すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an image processing apparatus corresponding to this embodiment.

【0043】すなわち、本発明の画像処理装置10は、
画像ファイル(符号化画像データ)200を読み出すこ
とができる。画像ファイル200は、例えばJPEG形
式により圧縮され、RAM(ramdom access memory)、
CD−ROM(compact disc-read only memory)ある
いはハードディスクなどの各種の格納手段に格納されて
いる。
That is, the image processing apparatus 10 of the present invention
The image file (encoded image data) 200 can be read. The image file 200 is compressed according to, for example, the JPEG format, and includes a RAM (ramdom access memory),
It is stored in various storage means such as a CD-ROM (compact disc-read only memory) or a hard disk.

【0044】画像ファイル200と画像処理装置10と
は、例えば、コンピュータのような同一のシステム内に
設けられていても良く、または、画像ファイル200は
コンピュータなどのホスト機器に格納され、一方、画像
処理装置10は、プリンタなどの別体の機器に設けられ
ているものであっても良い。
The image file 200 and the image processing apparatus 10 may be provided in the same system such as a computer, or the image file 200 is stored in a host device such as a computer. The processing device 10 may be provided in a separate device such as a printer.

【0045】本発明の画像処理装置10は、復元処理部
12と、データバッファ14と、復元情報格納部15
と、ブロック回転部16と、展開制御部17と出力バッ
ファ18とを有する。
The image processing apparatus 10 of the present invention includes a restoration processing unit 12, a data buffer 14, and a restoration information storage unit 15.
, A block rotation unit 16, a development control unit 17, and an output buffer 18.

【0046】復元処理部12は、画像ファイル200か
ら所定のデータを読み出し、解析し、復元(復号化)し
て、必要に応じて各部にデータを出力すると共に各部の
制御も行う。
The restoration processing section 12 reads out predetermined data from the image file 200, analyzes and restores (decodes), outputs data to each section as necessary, and controls each section.

【0047】データバッファ14は、画像ファイル20
0から読み出された圧縮画像データを一次的にバッファ
リングする。
The data buffer 14 stores the image file 20
The compressed image data read from 0 is temporarily buffered.

【0048】復元情報格納部15は、復元処理部が解析
し、復元した分割ブロックに関する情報、典型的には
「DC成分」と「ファイルポインタ」を格納する。な
お、後に詳述するように、この復元情報格納部15は、
頻繁にアクセスする必要があるため、キャッシュメモリ
により構成すると、システムの処理速度を高くすること
ができる。
The restoration information storage unit 15 stores information on the divided blocks analyzed and restored by the restoration processing unit, typically “DC component” and “file pointer”. As described later in detail, the restoration information storage unit 15 stores
Since it is necessary to frequently access the data, it is possible to increase the processing speed of the system by using a cache memory.

【0049】ブロック回転部16は、復元処理部12に
おいて復元された分割ブロックのデータを受け取り、所
定の回転角度だけ回転して出力する。
The block rotation unit 16 receives the data of the divided block restored by the restoration processing unit 12, rotates the data by a predetermined rotation angle, and outputs the data.

【0050】展開制御部17は、ブロック回転部16か
ら出力された分割ブロックのデータを出力バッファ18
に展開するに際して、展開位置を制御する。
The expansion control unit 17 outputs the divided block data output from the block rotation unit 16 to the output buffer 18.
At the time of deployment, the deployment position is controlled.

【0051】出力バッファ18は、復元され回転された
分割ブロックのデータを所定の順序に展開格納し、外部
に出力可能な状態とする。
The output buffer 18 expands and stores the data of the restored and rotated divided block in a predetermined order so that the data can be output to the outside.

【0052】図2は、本発明により画像を回転して復元
する様子を例示した概念図である。また、図3は、本発
明による画像処理装置の動作を概念的に表すフローチャ
ートである。
FIG. 2 is a conceptual diagram illustrating a state in which an image is rotated and restored according to the present invention. FIG. 3 is a flowchart conceptually showing the operation of the image processing apparatus according to the present invention.

【0053】本発明においては、画像ファイル200と
して、原画像を複数のブロックに分割して圧縮したフォ
ーマットのものを対象とする。この典型例は、図22に
表したJPEG標準に基づく画像ファイルである。従っ
て、以下の説明では、符号化標準としてJPEGを用い
た場合を例に挙げて説明する。
In the present invention, the image file 200 has a format in which an original image is divided into a plurality of blocks and compressed. This typical example is an image file based on the JPEG standard shown in FIG. Therefore, in the following description, a case where JPEG is used as an encoding standard will be described as an example.

【0054】本発明においては、このような画像ファイ
ルを回転復元するに際して、まず図3にステップS10
0と表したように、画像ファイルを最初から順に復元す
る。
In the present invention, when such an image file is rotated and restored, first, FIG.
As indicated by 0, the image files are restored sequentially from the beginning.

【0055】そして、予め定めた「起点ブロック」が復
元されたら、ステップS200においてその「起点ブロ
ック」の「復元情報」を格納する。ここで、「復元情
報」とは、典型的には、その「起点ブロック」の「ファ
イルポインタ」と「DC成分」である。また、「起点ブ
ロック」は、後に詳述するように、回転後の画像を上か
ら順に復元するのに都合の良い位置にある分割ブロック
のことである。
When the predetermined "starting block" is restored, the "restoring information" of the "starting block" is stored in step S200. Here, the “restoration information” is typically the “file pointer” and the “DC component” of the “starting block”. The “starting point block” is a divided block located at a position convenient for sequentially restoring the rotated image from the top, as described later in detail.

【0056】そして、「ファイルポインタ」とは、画像
ファイル200において「起点ブロック」のデータが格
納されているアドレスに対応する。
The "file pointer" corresponds to the address where the data of the "starting block" is stored in the image file 200.

【0057】また、「DC成分」とは、図22(b)に
例示したDCT係数のひとつである。
The "DC component" is one of the DCT coefficients exemplified in FIG.

【0058】以下、「DC成分」について補足的に説明
する。
Hereinafter, the "DC component" will be supplementarily described.

【0059】JPEGにおいては、原画像を8ピクセル
×8ピクセルのブロック(以下、「分割ブロック」と称
する)に分割し、ブロック毎にDCT(descrete cosin
ce transform:離散コサイン変換)を施す。原画像の信
号をf(x、y)、DCT変換係数をF(x、y)とす
ると、変換・逆変換には以下の関係式が用いられる。
In JPEG, an original image is divided into blocks of 8 pixels × 8 pixels (hereinafter referred to as “divided blocks”), and DCT (decrete cosin) is performed for each block.
ce transform: discrete cosine transform). Assuming that the signal of the original image is f (x, y) and the DCT transform coefficient is F (x, y), the following relational expression is used for the transform and inverse transform.

【0060】[0060]

【数1】 ここで、上の式は、DCT変換に対応し、下の式は、逆
DCT変換に対応する。 図4(a)は、変換前の実空
間における分割ブロックの画素配列を表し、図4(b)
は、DCT変化された後の周波数空間におけるDCT係
数の配列を概念的に表す説明図である。
(Equation 1) Here, the upper equation corresponds to the DCT transform, and the lower equation corresponds to the inverse DCT transform. FIG. 4A shows a pixel array of a divided block in a real space before conversion, and FIG.
FIG. 4 is an explanatory diagram conceptually showing an arrangement of DCT coefficients in a frequency space after DCT change.

【0061】ここで、DCT変換係数F(u、v)は6
4個存在する。これらのうちで、F(0、0)が「DC
成分」、残りの63個が「AC成分」と称され、uまた
はvが大きいほど高い空間周波数成分に相当する。
Here, the DCT transform coefficient F (u, v) is 6
There are four. Of these, F (0,0) is "DC
The component and the remaining 63 are called "AC components", and the larger u or v is, the higher the spatial frequency component is.

【0062】このようにして得られた64個のDCT係
数は、次に、量子化処理によってレベル数が離散化され
る。そして、量子化の後に、図22(c)に表したよう
に、周波数空間においてジグザグ走査により2次元的な
配列を1次元の配列に変換してからエントロピー符号化
処理が施される。
Next, the 64 DCT coefficients thus obtained are subjected to quantization processing to discretize the number of levels. Then, after the quantization, as shown in FIG. 22C, a two-dimensional array is converted into a one-dimensional array by zigzag scanning in a frequency space, and then entropy encoding processing is performed.

【0063】但し、「DC成分」については、順に符号
化される分割ブロックのうちの直前の分割ブロックの
「DC成分」との差分がエントロピー符号化される。こ
れは、「DC成分」すなわち、画像情報の平均値は隣接
ブロック間で大きく変化しないために、差分値の分散が
小さいという統計的な性質に基づく。
However, regarding the “DC component”, the difference from the “DC component” of the immediately preceding divided block among the sequentially encoded divided blocks is entropy-encoded. This is based on the statistical property that the “DC component”, that is, the average value of the image information does not greatly change between adjacent blocks, and thus the variance of the difference value is small.

【0064】以上の説明から分かるように、JPEG符
号化においては、「DCT係数」のうちの「DC成分」
に関しては、直前の分割ブロックとの差分について符号
化されている。従って、画像中の途中にある分割ブロッ
クのみを復元したい場合であっても、原画像の1番目の
分割ブロック(通常は、左上端の分割ブロックであ
る)、つまり符号化画像データを最初から順に復元し、
「DC成分」を累算する必要がある。
As can be seen from the above description, in the JPEG encoding, the “DC component” of the “DCT coefficient”
Is encoded with respect to the difference from the immediately preceding divided block. Therefore, even when it is desired to restore only the divided blocks in the middle of the image, the first divided block of the original image (usually, the upper left divided block), that is, the encoded image data is sequentially read from the beginning. Restore,
The “DC component” needs to be accumulated.

【0065】例えば、図2に表した具体例においては、
原画像の左端の1列のブロックB(1,1)〜B(1、
N)のそれぞれを「起点ブロック」とする。そして、復
元処理部12は、まず原画像全体を順に復元しながら、
これら「起点ブロック」の「ファイルポインタ」と「D
C成分」とを求めて、復元情報格納部15に格納する。
これが、図3にステップS100及びS200として表
したプロセスである。
For example, in the specific example shown in FIG.
One row of blocks B (1,1) to B (1,
Each of N) is defined as a “starting block”. Then, the restoration processing unit 12 first restores the entire original image in order,
The “file pointer” and “D” of these “starting blocks”
The “C component” is obtained and stored in the restoration information storage unit 15.
This is the process represented as steps S100 and S200 in FIG.

【0066】次に、図3にステップS300で表したよ
うに、復元情報を利用して起点ブロックから復元を開始
する。つまり、復元情報格納部15に格納した「起点ブ
ロック」のデータを利用して、符号化画像データを途中
から復元する。そして、復元されたブロックが、回転後
の上端のブロックでない場合(ステップS400:N
o)は、復元を続行する(ステップS500)。一方、
復元されたブロックが、回転後の上端のブロックである
場合(ステップS400:Yes)は、ステップS60
0に進み、そのブロックを回転して出力する。
Next, as shown in step S300 in FIG. 3, restoration is started from the starting block using restoration information. That is, the encoded image data is restored from the middle using the data of the “starting block” stored in the restoration information storage unit 15. Then, when the restored block is not the upper end block after the rotation (step S400: N
o), the restoration is continued (step S500). on the other hand,
If the restored block is the upper-end block after rotation (Step S400: Yes), Step S60
Go to 0, rotate the block and output.

【0067】例えば図2に表したように、原画像を右回
りに90°回転した状態で復元し出力する場合について
説明すると、原画像の左端の分割ブロックB(1、1)
〜B(1、N)は、90°回転することにより、画像の
上端に来る。つまり、90°回転させた復元画像を上端
から順に得るためには、原画像の左端の一列の分割ブロ
ックB(1、N)〜B(1、1)をそれぞれ「起点ブロ
ック」とすると都合が良い。
For example, as shown in FIG. 2, the case where the original image is restored and output in a state where the original image is rotated clockwise by 90 ° will be described. The leftmost divided block B (1,1) of the original image will be described.
BB (1, N) comes to the upper end of the image by rotating 90 °. That is, in order to sequentially obtain the restored images rotated by 90 ° from the upper end, it is convenient to set the divided blocks B (1, N) to B (1, 1) on the left end of the original image as “starting blocks”. good.

【0068】これらの「起点ブロック」の「ファイルポ
インタ」と「DC成分」をステップS200において予
め格納しておけば、画像ファイル200の所定のアドレ
スに直ちにアクセスし、目的の起点ブロックを直ちに復
元することができる。
If the "file pointer" and "DC component" of these "starting blocks" are stored in advance in step S200, a predetermined address of the image file 200 is immediately accessed, and the target starting block is immediately restored. be able to.

【0069】図2に表した具体例の場合には、起点ブロ
ックのそれぞれが回転後に画像の上端に来るので、ステ
ップS600に進み、復元した分割ブロックB(1、
N)〜B(1、1)をそれぞれ90°回転し、出力バッ
ファ18上に展開する。
In the case of the specific example shown in FIG. 2, since each of the starting blocks comes to the upper end of the image after rotation, the process proceeds to step S600, where the restored divided block B (1,
N) to B (1, 1) are each rotated by 90 ° and developed on the output buffer 18.

【0070】次に、分割ブロックB(2、N)〜B
(2、1)について、同様に復元、回転し、出力バッフ
ァ18上に展開する。以降、同様のプロセスを繰り返す
ことにより、回転した状態の復元画像を上端から順に得
ることができる。
Next, the divided blocks B (2, N) to B
(2, 1) is similarly restored, rotated, and developed on the output buffer 18. Thereafter, by repeating the same process, a restored image in a rotated state can be obtained in order from the upper end.

【0071】以下、図2に表したようにJPEG画像を
右回りに90°回転させて出力する場合の動作について
さらに詳細に説明する。
The operation in the case where the JPEG image is rotated clockwise by 90 ° and output as shown in FIG. 2 will now be described in further detail.

【0072】図5は、本具体例に係る画像処理方法を表
すフローチャートである。
FIG. 5 is a flowchart showing an image processing method according to this example.

【0073】まず、図5にステップS12と表したよう
に、復元処理部12において画像ファイルポインタを初
期化する。つまり、対象とするJPEG画像データに関
する読み出し位置を初期化する。また、以下のステップ
においては、例えば、画像ファイル200から新しいデ
ータを読み出すにあたって、前回の読み出しバイト数だ
けファイルポインタを進めるようにする。
First, as indicated by step S12 in FIG. 5, the image processing unit 12 initializes the image file pointer. That is, the reading position for the target JPEG image data is initialized. In the following steps, for example, when reading new data from the image file 200, the file pointer is advanced by the number of previously read bytes.

【0074】次に、ステップS14において、復元処理
部12は、データバッファ14上に256バイトのバッ
ファ領域を確保する。これは、JPEG符号化の対象と
なるカラー画像情報は、(R、G、B)または(Y、C
b、Cr)または(Y、M、C、K)の各要素毎に、ベ
ースライン・システムの場合には1画素あたりの階調が
8ビット精度であるからである。つまり、8ピクセル×
8ピクセルの分割ブロックのビット数は、圧縮されてい
る関係上64ビット以下であり、4色表示の場合でも、
64×4=256ビット以下となる。なお、JPEGの
拡張システムの場合には、1画素あたりの階調は12ビ
ット精度であるので、これに合わせて、例えば、384
バイトのメモリ領域を確保すれば良い。
Next, in step S14, the restoration processing section 12 secures a buffer area of 256 bytes in the data buffer 14. This is because color image information to be JPEG-encoded is (R, G, B) or (Y, C
This is because, for each element of (b, Cr) or (Y, M, C, K), in the case of the baseline system, the gradation per pixel has 8-bit precision. That is, 8 pixels x
The number of bits of the 8-pixel divided block is 64 bits or less due to compression, and even in the case of 4-color display,
64 × 4 = 256 bits or less. In the case of the JPEG extension system, the gradation per pixel is 12-bit precision.
It is sufficient to secure a byte memory area.

【0075】次に、ステップS16において、画像ファ
イル200から最初の256バイトのデータを読み出
し、データバッファ14に格納する。
Next, in step S 16, the first 256 bytes of data are read from the image file 200 and stored in the data buffer 14.

【0076】次に、ステップS18において、格納した
画像データ上のタグデータを解析する。ここで「タグデ
ータ」とは、JPEGデータの符号化フォーマットの詳
細パラメータ、例えば、量子化のための量子化テーブル
などに関する情報を含むデータである。
Next, in step S18, the tag data on the stored image data is analyzed. Here, “tag data” is data including detailed parameters of an encoding format of JPEG data, for example, information on a quantization table for quantization and the like.

【0077】「タグデータ」の解析が未了の場合(ステ
ップS20:No)は、ステップS16に戻り、ファイ
ルポインタを256バイト進めて、次の256バイトの
データを読み出し、タグデータの解析を続行する。
If the analysis of the "tag data" is not completed (step S20: No), the process returns to step S16, advances the file pointer by 256 bytes, reads the next 256-byte data, and continues the analysis of the tag data. I do.

【0078】一方、「タグデータ」の解析が終了した場
合(ステップS20:Yes)は、ステップS22に進
み、バッファデータが空であるかを判断する。この判断
は、復元処理部12が実行することができる。ここで、
データバッファ14に読み込み済みのデータのうちで
「タグデータ」に関するものは、消費されている。つま
り、データバッファ14のバッファデータが空でない場
合(ステップS22:No)は、分割ブロックに関する
圧縮データがバッファリングされていることになるの
で、ステップS26に進んでこの圧縮データの復元を実
行する。
On the other hand, if the analysis of the “tag data” has been completed (step S20: Yes), the process proceeds to step S22, where it is determined whether or not the buffer data is empty. This determination can be performed by the restoration processing unit 12. here,
Of the data that has been read into the data buffer 14, data related to “tag data” has been consumed. That is, when the buffer data of the data buffer 14 is not empty (step S22: No), it means that the compressed data relating to the divided block is buffered, and the process proceeds to step S26 to restore the compressed data.

【0079】一方、バッファデータが空の場合(ステッ
プS22:Yes)は、ステップS24に進み、画像フ
ァイル200から256バイトのデータをデータバッフ
ァ14に読み込む。そして、ステップS26においてこ
の圧縮データの復元処理を実行する。この復元処理の内
容は、例えば、図22に概念的に表したものであり、復
元処理部12によって実行される。
On the other hand, if the buffer data is empty (step S22: Yes), the flow advances to step S24 to read 256 bytes of data from the image file 200 into the data buffer 14. Then, in step S26, the compressed data is decompressed. The content of the restoration processing is conceptually shown in FIG. 22, for example, and is executed by the restoration processing unit 12.

【0080】次に、ステップS28において、復元処理
部12は、8ピクセル×8ピクセルの分割ブロックの復
元を終了したかを判断する。未了の場合(ステップS2
8:No)は、ステップS24に戻り、画像ファイル2
00から次の256バイトの圧縮データを読み出す。
Next, in step S28, the restoration processing unit 12 determines whether or not restoration of a divided block of 8 pixels × 8 pixels has been completed. If not completed (step S2
8: No) returns to step S24 to return to image file 2
The next 256 bytes of compressed data are read from 00.

【0081】一方、分割ブロックの復元が終了した場合
(ステップS28:Yes)は、ステップS30に進
み、復元した分割ブロックが「起点ブロック」、すなわ
ち本具体例の場合には、原画像の左端のブロックB
(1,1)〜B(1,N)のいずれかであるかを判断す
る。
On the other hand, if the restoration of the divided block has been completed (step S28: Yes), the flow advances to step S30, and the restored divided block is the "starting block", that is, in the case of this specific example, the left end of the original image. Block B
It is determined whether any one of (1,1) to B (1, N).

【0082】左端のブロックでない場合(ステップS3
0:No)、すなわち、「起点ブロック」でない場合
は、ステップS24に戻り、圧縮データの読み出し、復
元を行う。なお、復元処理部12は、このようにして次
々と分割ブロックを復元するに際して、「DC成分」を
内部に保持し、累算することにより算出する。
If the block is not the left end block (step S3
0: No), that is, if it is not the “starting block”, the flow returns to step S24 to read and decompress the compressed data. When restoring the divided blocks one after another in this way, the restoration processing unit 12 holds the “DC component” internally and calculates by accumulating the “DC component”.

【0083】一方、左端のブロックである場合(ステッ
プS30:Yes)、ステップS32に進み、そのブロ
ックに対応する「ファイルポインタ」と「DC成分」と
を復元情報格納部15にキャッシュする。この「ファイ
ルポインタ」は、画像ファイル200中で、「起点ブロ
ック」に対応する圧縮データのアドレスを表すものであ
る。従って、ここでキャッシュする「ファイルポイン
タ」は、「起点ブロック」の圧縮データの始まり位置と
することが便利である。
On the other hand, if it is the leftmost block (step S30: Yes), the process proceeds to step S32, and the "file pointer" and the "DC component" corresponding to the block are cached in the restoration information storage unit 15. This “file pointer” indicates the address of the compressed data corresponding to the “start block” in the image file 200. Therefore, it is convenient that the “file pointer” to be cached here is the start position of the compressed data of the “start block”.

【0084】次に、ステップS32において、画像デー
タの全てを処理したか否かを判断する。未了の場合(ス
テップS32:No)は、ステップS24に戻り、圧縮
データの読み出し、復元、判断、キャッシュを繰り返
す。
Next, in step S32, it is determined whether or not all of the image data has been processed. If not completed (step S32: No), the process returns to step S24, and the reading, decompression, determination, and caching of the compressed data are repeated.

【0085】ここまでが、図3に表したステップS10
0に対応するステップである。ここまでのステップが終
了した状態では、復元情報格納部15には、「起点ブロ
ック」の「ファイルポインタ」と「DC成分」とが格納
されている。
Up to this point, step S10 shown in FIG.
This is the step corresponding to 0. In the state where the steps up to this point are completed, the “file pointer” and “DC component” of the “starting block” are stored in the restoration information storage unit 15.

【0086】この様子は、図2の左下に概念的に表し
た。つまり、本具体例においては、原画像の左端の一列
のブロックを「起点ブロック」と定義したので、起点ブ
ロック格納部15には、ブロックB(1,1)〜B
(1,N)の「ファイルポインタ」と「DC成分」と
が、スキャンの順番に1番目からN番目まで格納されて
いる。ここで、所定数Nは、原画像の高さをYピクセル
とした時に、N=Y/8と表すことができる。
This situation is conceptually shown in the lower left of FIG. That is, in this specific example, since the block in the leftmost column of the original image is defined as the “starting block”, the starting block storage unit 15 stores the blocks B (1, 1) to B (
The “file pointer” and the “DC component” of (1, N) are stored from the first to the Nth in the order of scanning. Here, the predetermined number N can be expressed as N = Y / 8, where the height of the original image is Y pixels.

【0087】このようにして「起点ブロック」について
の情報が揃ったら、復元と回転の操作を開始する。
When the information on the “starting point block” has been prepared in this way, the restoration and rotation operations are started.

【0088】すなわち、画像データの処理が終了した場
合(ステップS32:Yes)は、ステップS52にお
いて「垂直展開ポインタ」をゼロに設定し、さらに、ス
テップS54において「水平展開ポインタ」もゼロに設
定する。これらのポインタは、出力バッファ18上で復
元画像データの展開位置を指定するものであり、展開制
御部17に設けられる。また、これらのポインタは、例
えば、復元処理部12が設定することができる。
That is, when the processing of the image data is completed (step S32: Yes), the "vertical development pointer" is set to zero in step S52, and the "horizontal development pointer" is also set to zero in step S54. . These pointers are used to designate the development position of the restored image data on the output buffer 18, and are provided in the development control unit 17. In addition, these pointers can be set by the restoration processing unit 12, for example.

【0089】次に、ステップS56において、復元処理
部18は、読み出しパラメータiを所定数Nに設定す
る。この所定数Nは、前述したように、「起点ブロッ
ク」として定義した左端の一番下の分割ブロックB
(1,N)の番号に対応する。
Next, in step S56, the restoration processing section 18 sets the read parameter i to a predetermined number N. The predetermined number N is, as described above, the lowermost lowermost divided block B defined as the “starting block”.
It corresponds to the number (1, N).

【0090】つまり、図2に表したように、画像を90
°回転すると、回転前の画像の左端の一番下の分割ブロ
ックB(1,N)が、回転後の画像の上端の一番左側に
来る。従って、原画像の左端のブロックをブロックB
(1、N)からブロックB(1,1)に向かって順に復
元すれば、回転後の画像の上端のブロック行の左から右
に向かって復元データが得られることとなる。
That is, as shown in FIG.
When rotated, the leftmost lowermost divided block B (1, N) of the image before rotation comes to the leftmost position at the upper end of the image after rotation. Therefore, the leftmost block of the original image is
By sequentially restoring from (1, N) to block B (1, 1), restored data can be obtained from left to right in the block row at the upper end of the rotated image.

【0091】すなわち、ステップS58において、復元
処理部12は、復元情報格納部15のi番目のキャッシ
ュから分割ブロックB(1,N)の「ファイルポイン
タ」を取得する。
That is, in step S58, the restoration processing unit 12 acquires the “file pointer” of the divided block B (1, N) from the i-th cache of the restoration information storage unit 15.

【0092】そして、ステップS60において、画像フ
ァイル200から256バイトの圧縮データを読み出
し、データバッファ14に格納する。
Then, in step S60, 256 bytes of compressed data are read from the image file 200 and stored in the data buffer 14.

【0093】復元処理部18は、この圧縮データを、復
元し(ステップS62)、分割ブロックの復元が終了し
たかを判断する(ステップS64)。復元が未了の場合
(ステップS64:No)は、ステップS60に戻り、
次の256バイトの圧縮データを読み込んで復元を続行
する。
The decompression processing unit 18 decompresses the compressed data (step S62), and determines whether the decompression of the divided block is completed (step S64). If the restoration has not been completed (step S64: No), the process returns to step S60,
The next 256 bytes of compressed data are read in and decompression is continued.

【0094】分割ブロックの復元が終了した場合(ステ
ップS64:Yes)は、この復元データをブロック回
転部16に送り、右回りに90°回転する。このように
回転した画像データは、回転後の画像において上端の一
番左側の分割ブロックに対応する。そこで、ステップS
68において、展開制御部17は、この画像データを、
垂直展開ポインタと水平展開ポインタの設定値に従って
出力バッファ18上に展開する。
When the restoration of the divided block is completed (Step S64: Yes), the restored data is sent to the block rotating unit 16 and rotated 90 ° clockwise. The image data rotated in this way corresponds to the leftmost divided block at the upper end in the rotated image. Therefore, step S
At 68, the development control unit 17 converts this image data into
The data is developed on the output buffer 18 according to the set values of the vertical development pointer and the horizontal development pointer.

【0095】次に、ステップS70において、この状態
での「ファイルポインタ」と「DC成分」を復元情報格
納部15のi番目のキャッシュに保持する。例えば、i
=Nの場合を例に挙げると、ここで保持される「ファイ
ルポインタ」は、原画像において左から2番目の列の一
番下の分割ブロックB(2、N)の「ファイルポイン
タ」であり、ここで保持される「DC成分」は、その直
前すなわち左から1番目の一番下の分割ブロックB
(1、N)の「DC成分」に対応する。
Next, in step S 70, the “file pointer” and the “DC component” in this state are stored in the i-th cache of the restoration information storage unit 15. For example, i
Taking the case of = N as an example, the “file pointer” held here is the “file pointer” of the lowest divided block B (2, N) in the second column from the left in the original image. The “DC component” held here is the immediately preceding, that is, the first lowermost divided block B from the left.
This corresponds to the “DC component” of (1, N).

【0096】次に、ステップS72において、次の分割
ブロックB(1、N−1)の展開に備えて、水平展開ポ
インタを8だけ増加させ、同時に読み出しパラメータi
を1だけ減少させる。
Next, in step S72, the horizontal development pointer is increased by 8 in preparation for the development of the next divided block B (1, N-1), and at the same time, the read parameter i is increased.
Is reduced by one.

【0097】そして、パラメータiがゼロでない場合
(ステップS74:No)は、ステップS58に戻り、
次の分割ブロックの圧縮データを読み出し、復元して、
出力バッファ18に展開する。
If the parameter i is not zero (step S74: No), the process returns to step S58.
Read and decompress the compressed data of the next divided block,
The output is expanded to the output buffer 18.

【0098】パラメータiがゼロになった状態(ステッ
プS74:Yes)においては、原画像の左端の一列の
分割ブロックB(1、1)〜B(1、N)の全てを復元
し、90°回転させて出力バッファ18上に展開した状
態が完成している。つまり、出力バッファ18には、9
0°回転した復元画像の上から8ピクセル分のストライ
プ状の領域が展開されている。
In the state where the parameter i becomes zero (step S74: Yes), all the divided blocks B (1, 1) to B (1, N) in the leftmost column of the original image are restored, and 90 ° is obtained. The state where the image is rotated and developed on the output buffer 18 is completed. That is, 9 is stored in the output buffer 18.
A striped area of 8 pixels is developed from the top of the restored image rotated by 0 °.

【0099】次に、ステップS76において、出力バッ
ファ18の垂直展開ポインタを8だけ増加させる。これ
は、次の8ピクセル分のブロック行B(2、N)〜B
(2、1)の展開に備えるためである。
Next, in step S76, the vertical development pointer of the output buffer 18 is increased by 8. This means that block rows B (2, N) to B for the next 8 pixels
This is to prepare for the development of (2, 1).

【0100】この状態で、ステップS78において、圧
縮画像データの復元が終了したかを判断する。
In this state, it is determined in step S78 whether or not the restoration of the compressed image data has been completed.

【0101】圧縮画像データの復元が未了の場合(ステ
ップS78:No)は、ステップS54に戻り、原画像
において左端からみて次の列の分割ブロック、すなわ
ち、回転画像において上端からみて次の行の分割ブロッ
クのデータ読み出し、復元、回転、展開を実行する。
If the decompression of the compressed image data has not been completed (step S78: No), the process returns to step S54, and the divided block of the next column as viewed from the left end in the original image, that is, the next row as viewed from the upper end in the rotated image. Read out, restore, rotate, and expand the divided blocks.

【0102】一方、画像ファイルの復元が終了した場合
(ステップS78:Yes)は、一連の画像処理を終了
する。
On the other hand, if the restoration of the image file has been completed (step S78: Yes), a series of image processing ends.

【0103】以上、説明したように、本発明によれば、
圧縮された画像ファイルを途中から復元するために便利
な「起点ブロック」を予め定めておき、一度連続的に復
元することによって、これら「起点ブロック」の「ファ
イルポインタ」と「DC成分」とを格納しておく。そし
て、これらのデータを利用することによって、圧縮デー
タを途中から迅速に復元し、適宜回転させて出力バッフ
ァ上に展開することによって、回転させた状態の画像を
上端から順次出力することができる。
As described above, according to the present invention,
A "start block", which is convenient for restoring the compressed image file from the middle, is determined in advance, and the "file pointer" and "DC component" of the "start block" can be determined by continuously restoring once. Store it. By utilizing these data, the compressed data can be quickly restored from the middle, rotated appropriately and expanded on the output buffer, so that the rotated image can be sequentially output from the upper end.

【0104】本発明によれば、復元した画像の全体を一
旦格納するための大容量のメモリは必要としない。
According to the present invention, a large-capacity memory for temporarily storing the entire restored image is not required.

【0105】また、本発明によれば、出力バッファ18
は、復元された画像全体を格納するだけのメモリ容量は
要しない。つまり、図示しない各種の入力機器は、出力
バッファ18の上に展開された画像データを随時読み出
すことによって、回転された画像データを上端から順に
受け取ることができる。従って、図1に例示した出力バ
ッファ18は、出力画像を部分的にバッファリングでき
れば十分である。例えば、そのメモリ容量は、1列の分
割ブロックに対応する高さ8ピクセルの領域を格納でき
れば良い。従って、極めて少ないメモリ容量で圧縮画像
データを回転した状態で復元し出力することができる。
Also, according to the present invention, the output buffer 18
Does not require a memory capacity sufficient to store the entire restored image. That is, various input devices (not shown) can read rotated image data from the upper end in order from the upper end by reading out the image data expanded on the output buffer 18 as needed. Therefore, it is sufficient for the output buffer 18 illustrated in FIG. 1 to partially buffer the output image. For example, the memory capacity only needs to be able to store an 8-pixel high area corresponding to one column of divided blocks. Therefore, the compressed image data can be restored and output in a rotated state with an extremely small memory capacity.

【0106】また、本発明によれば、復元情報格納部1
5に要所ブロックの「ファイルポインタ」と「DC成
分」とをキャッシュしておくことにより、画像ファイル
200から所定の分割ブロックに対応する圧縮データを
迅速に読み出し、迅速に復元することができる。さら
に、ステップS66に表したような回転処理は、8ピク
セル×8ピクセルという極めて小さなブロック単位で行
えば良いので、回転処理も極めて迅速に実行することが
できる。
According to the present invention, the restoration information storage unit 1
By caching the “file pointer” and the “DC component” of the key block at 5, the compressed data corresponding to the predetermined divided block can be quickly read from the image file 200 and quickly restored. Furthermore, since the rotation processing as shown in step S66 may be performed in a very small block unit of 8 pixels × 8 pixels, the rotation processing can be executed very quickly.

【0107】以上、圧縮画像ファイルから90°回転さ
せた状態の復元画像を形成する具体例について説明し
た。
The specific example of forming a restored image rotated by 90 ° from a compressed image file has been described above.

【0108】次に、右回りに180°回転させた状態の
復元画像を形成する具体例について説明する。
Next, a specific example of forming a restored image rotated 180 ° clockwise will be described.

【0109】図6は、本具体例に係る画像処理方法を概
念的に表す説明図である。
FIG. 6 is an explanatory view conceptually showing an image processing method according to this example.

【0110】また、図7は、本具体例に係る画像処理方
法を表すフローチャートである。図7に関しては、前述
した図5と同一のステップには同一の符号を付して詳細
な説明は省略する。
FIG. 7 is a flowchart showing an image processing method according to this example. 7, the same steps as those in FIG. 5 described above are denoted by the same reference numerals, and detailed description thereof will be omitted.

【0111】本具体例においても、図6に表したよう
に、「起点ブロック」として、原画像の左端の一列の分
割ブロックB(1、1)〜B(1、N)を定義すること
ができる。つまり、図7のステップS12〜S34は、
図5に関して前述したステップと同様とすることができ
る。
Also in this specific example, as shown in FIG. 6, it is possible to define a row of divided blocks B (1, 1) to B (1, N) on the left end of the original image as a “starting block”. it can. That is, steps S12 to S34 in FIG.
It can be similar to the steps described above with reference to FIG.

【0112】さて、画像を180°回転させると、これ
らの分割ブロックB(1、1)〜B(1、N)は回転後
の画像上では右端に来る。そして、原画像の一番下の分
割ブロックB(1、N)は、回転画像の上では、右端の
列の一番上に180°回転した状態で配置される。従っ
て、原画像の起点ブロックの一番下のブロックB(1、
N)をまず復元し、180°回転させて出力バッファ1
8の右上に展開する。
When the image is rotated by 180 °, these divided blocks B (1,1) to B (1, N) come to the right end on the rotated image. Then, the lowermost divided block B (1, N) of the original image is arranged at the top of the rightmost column on the rotated image while being rotated by 180 °. Therefore, the lowermost block B (1,
N) is first restored and rotated 180 ° to output buffer 1
Expand to the top right of 8.

【0113】この処理のために、まず、図7のステップ
S51において、読み出しパラメータi=Nとし、ステ
ップS52において垂直展開ポインタ=0、ステップS
54Aにおいて、水平展開ポインタを(画像幅−8)と
する。
For this processing, first, in step S51 of FIG. 7, the read parameter i = N, the vertical development pointer = 0 in step S52,
At 54A, the horizontal development pointer is set to (image width−8).

【0114】次に、ステップS58〜S64において、
分割ブロックB(1、N)の圧縮データを読み出して復
元する。
Next, in steps S58 to S64,
The compressed data of the divided block B (1, N) is read and decompressed.

【0115】次に、ステップS66Aにおいて、復元し
た8×8分割ブロックB(1、N)を180°回転さ
せ、ステップS68において出力バッファ18上に展開
する。ステップS74Aにおいて水平ポインタを8だけ
減少させるのは、次の分割ブロックB(2、N)を、出
力バッファ18上において、展開済みの分割ブロックB
(1、N)の左側に展開するからである。
Next, in step S66A, the restored 8 × 8 divided block B (1, N) is rotated by 180 °, and is expanded on the output buffer 18 in step S68. The reason why the horizontal pointer is decreased by 8 in step S74A is that the next divided block B (2, N) is stored in the output buffer 18 in the expanded divided block B
This is because it is developed on the left side of (1, N).

【0116】ステップS58〜74Aの一連のループを
繰り返し、ステップ74Aにおいて水平展開ポインタが
ゼロよりも小さくなった場合(ステップS74A:Ye
s)は、出力バッファ18上に、1行分の分割ブロック
B(1、N)〜B(M、N)復元画像が展開されてい
る。そこで、ステップS76Aにおいて、2行目の分割
ブロックB(1、N−1)〜B(M、N−1)を展開す
るために、垂直展開ポインタを8だけ増加させ、同時
に、読み出しパラメータiを1だけ減少させる。
A series of loops of steps S58 to 74A are repeated, and when the horizontal development pointer becomes smaller than zero in step 74A (step S74A: Ye
In s), the restored images of the divided blocks B (1, N) to B (M, N) for one row are developed on the output buffer 18. Therefore, in step S76A, in order to expand the divided blocks B (1, N-1) to B (M, N-1) on the second row, the vertical expansion pointer is increased by 8 and at the same time, the read parameter i is changed. Decrease by one.

【0117】そして、出力バッファが一杯でなく、画像
ファイルの復元が未了の場合(ステップS78:No)
は、ステップS54Aに戻り、次のブロック行を復元出
力する。
When the output buffer is not full and the restoration of the image file has not been completed (step S78: No)
Returns to step S54A, and restores and outputs the next block row.

【0118】以上説明したように、180°回転した状
態で復元する場合も、原画像の左端の一列のブロックB
(1、1)〜B(1、N)を「起点ブロック」とし、こ
れらを下側の分割ブロックから順に復元することによ
り、回転した復元画像を上端から順に出力することがで
きる。
As described above, when the image is restored in a state where it is rotated by 180 °, the block B in the leftmost column of the original image
By setting (1,1) to B (1, N) as “starting blocks” and sequentially restoring them from the lower divided block, rotated restored images can be output in order from the upper end.

【0119】次に、右回りに270°回転させた状態の
復元画像を形成する具体例について説明する。
Next, a specific example of forming a restored image rotated 270 ° clockwise will be described.

【0120】図8は、本具体例に係る画像処理方法を概
念的に表す説明図である。
FIG. 8 is an explanatory diagram conceptually showing the image processing method according to this example.

【0121】また、図9は、本具体例に係る画像処理方
法を表すフローチャートである。図9に関しては、前述
した図5あるいは図7と同一のステップには同一の符号
を付して詳細な説明は省略する。
FIG. 9 is a flowchart showing an image processing method according to this example. 9, the same steps as those in FIG. 5 or FIG. 7 described above are denoted by the same reference numerals, and detailed description thereof will be omitted.

【0122】本具体例においても、図8に表したよう
に、「起点ブロック」として、原画像の左端の一列の分
割ブロックB(1、1)〜B(1、N)を定義すること
ができる。つまり、図7のステップS12〜S34は、
図5に関して前述したステップと同様とすることができ
る。
Also in this specific example, as shown in FIG. 8, it is possible to define one row of divided blocks B (1, 1) to B (1, N) on the left end of the original image as a "starting block". it can. That is, steps S12 to S34 in FIG.
It can be similar to the steps described above with reference to FIG.

【0123】さて、画像を270°回転させると、これ
らの分割ブロックB(1,1)〜B(1、N)は回転後
の画像上では下端に来る。そこで、原画像の起点ブロッ
クB(1、1)から順に復元を進めてブロックB(M、
1)を復元できたら、これを180°回転させて出力バ
ッファ18の左上に展開する。
Now, when the image is rotated by 270 °, these divided blocks B (1,1) to B (1, N) come to the lower end on the rotated image. Therefore, the restoration is advanced in order from the starting block B (1, 1) of the original image, and the block B (M,
If 1) can be restored, it is rotated by 180 ° and developed on the upper left of the output buffer 18.

【0124】この処理のために、まず、図9のステップ
S52において垂直展開ポインタ=0、ステップS54
において水平展開ポインタ=0、ステップS56におい
て読み出しパラメータi=1とする。
For this processing, first, in step S52 in FIG. 9, the vertical development pointer = 0, and step S54
, The horizontal development pointer = 0, and the read parameter i = 1 in step S56.

【0125】次に、ステップS58〜S65において、
目的とする分割ブロックにたどり着くまでデータ読み出
し、復元を繰り返す。例えば、回転後の画像の上端のブ
ロックB(M、1)の復元データを得るためには、起点
ブロックB(1、1)から復元を繰り返す。同様に、例
えば、回転後の画像の上端のブロックB(M、x)の復
元データを得るためには、起点ブロックB(1、x)か
ら復元を繰り返す。目的の分割ブロックの復元が終了し
たか否かは、ステップS65において判断する。
Next, in steps S58 to S65,
Data read and restoration are repeated until the target divided block is reached. For example, in order to obtain restoration data of the block B (M, 1) at the upper end of the rotated image, restoration is repeated from the starting block B (1, 1). Similarly, for example, in order to obtain restoration data of the block B (M, x) at the upper end of the rotated image, restoration is repeated from the starting block B (1, x). It is determined in step S65 whether or not the restoration of the target divided block has been completed.

【0126】目的の分割ブロックの復元データが得られ
た場合(ステップS65:Yes)は、ステップS66
Bに進み、復元した8×8分割ブロックを270°回転
させ、ステップS68において出力バッファ18上に展
開する。
If the restored data of the target divided block has been obtained (step S65: Yes), the process proceeds to step S66.
Proceeding to B, the restored 8 × 8 divided block is rotated by 270 °, and is developed on the output buffer 18 in step S68.

【0127】次に、ステップS72において、次の分割
ブロックの展開に備えて水平展開ポインタを8だけ増加
し、読み出しパラメータiを1だけ増加する。
Next, in step S72, the horizontal development pointer is increased by 8 and the read parameter i is increased by 1 in preparation for the development of the next divided block.

【0128】ステップS58〜74Bの一連のループを
繰り返し、ステップ74Bにおいて読み出しパラメータ
iがブロック個数Nよりも大きくなった場合(ステップ
S74A:Yes)は、出力バッファ18上に、1行分
の分割ブロックの復元画像が展開されている。そこで、
ステップS76において、次の行の分割ブロックを展開
するために、垂直展開ポインタを8だけ増加させ。
A series of loops of steps S58 to 74B is repeated, and if the read parameter i becomes larger than the number N of blocks in step 74B (step S74A: Yes), one row of divided blocks is stored in the output buffer 18. The restored image has been expanded. Therefore,
In step S76, the vertical development pointer is increased by 8 in order to expand the divided block of the next row.

【0129】そして、出力バッファが一杯でなく、画像
ファイルの復元が未了の場合(ステップS78:No)
は、ステップS52に戻り、次のブロック行を復元出力
する。
When the output buffer is not full and the restoration of the image file has not been completed (step S78: No)
Returns to step S52 to restore and output the next block row.

【0130】以上説明したように、270°回転した状
態で復元する場合も、原画像の左端の一列のブロックB
(1、1)〜B(1、N)を「起点ブロック」とし、こ
れらを起点として、順に復元を繰り返すことにより、目
的とする分割ブロックの復元データを得ることができ
る。
As described above, when the image is restored while being rotated by 270 °, the block B in the leftmost column of the original image
By setting (1,1) to B (1, N) as “starting blocks” and using these as starting points, the restoration is repeated in order, so that the restored data of the target divided block can be obtained.

【0131】但し、右回りに270°回転させる場合
に、「起点ブロック」として、原画像の左端の一列のブ
ロックB(1、1)〜B(1、N)を選択すると、回転
画像の上端付近のブロックに辿りつくまで、復元を繰り
返す必要があり、処理時間がやや長くなる。そこで、こ
のような場合には、「起点ブロック」を複数ライン設け
ると良い。
However, in the case of rotating 270 ° clockwise, if one row of blocks B (1,1) to B (1, N) on the left end of the original image is selected as the “starting block”, the upper end of the rotated image It is necessary to repeat restoration until reaching a nearby block, and the processing time is slightly longer. Therefore, in such a case, it is preferable to provide a plurality of lines of “starting point blocks”.

【0132】図10は、「起点ブロック」を複数ライン
設けた場合を例示する概念図である。すなわち、同図の
例においては、原画像において、左端の一列のブロック
B(1、1)〜B(1、N)と、中央付近の一列のブロ
ックB(c、1)〜B(c、N)とをそれぞれ「起点ブ
ロック」とする。図示したように、これらブロック列1
とブロック列2の「ファイルポインタ」と「DC成分」
とは、キャッシュ1とキャッシュ2に分割して格納して
も良い。
FIG. 10 is a conceptual diagram exemplifying a case where a plurality of “starting point blocks” are provided. That is, in the example shown in the drawing, in the original image, one row of blocks B (1, 1) to B (1, N) and one row of blocks B (c, 1) to B (c, N) are each referred to as a “start block”. As shown in FIG.
File pointer "and" DC component "of block sequence 2
May be stored separately in the cache 1 and the cache 2.

【0133】そして、回転した画像上で見て、領域1に
属する分割ブロックは、ブロック列2の対応する分割ブ
ロックを起点として復元し、領域2に属する分割ブロッ
クは、ブロック列1の対応する分割ブロックを起点とし
て復元する。このようにすれば、目的とする分割ブロッ
クにたどり着くまでの復元処理の回数を半減することが
でき、より高速に処理することができる。
Then, as viewed on the rotated image, the divided blocks belonging to the area 1 are restored starting from the corresponding divided blocks in the block sequence 2, and the divided blocks belonging to the area 2 are restored to the corresponding divided blocks in the block sequence 1. Restore from block. By doing so, the number of times of restoration processing until reaching the target divided block can be halved, and processing can be performed at higher speed.

【0134】もちろん、3ライン以上のブロック列を
「起点ブロック」とすれば、さらに高速に処理すること
ができる。
Of course, if a block row of three or more lines is set as a "starting block", processing can be performed at a higher speed.

【0135】以上、簡単に理解できる具体例として、9
0°、180°または270°回転させた状態で復元す
る方法を説明した。
As described above, as a specific example that can be easily understood, 9
The method of restoring the image while rotating it by 0 °, 180 ° or 270 ° has been described.

【0136】しかし、本発明は、これらの具体例に限定
される訳ではない。すなわち、本発明によれば、任意の
角度だけ回転させた状態で復元画像を出力することがで
きる。
However, the present invention is not limited to these specific examples. That is, according to the present invention, a restored image can be output while being rotated by an arbitrary angle.

【0137】図11〜図14は、本発明により任意の角
度だけ回転させて復元出力する様子を例示する概念図で
ある。
FIG. 11 to FIG. 14 are conceptual diagrams illustrating the manner in which the image is rotated and output by an arbitrary angle and restored and output according to the present invention.

【0138】例えば、図11は、原画像を右回りに90
°未満の任意の角度だけ回転させる場合を表している。
For example, FIG. 11 shows that the original image is 90 degrees clockwise.
It shows a case where the rotation is made by an arbitrary angle less than °.

【0139】この場合には、例えば、原画像の左端の一
列の分割ブロックB(1,1)〜B(1,N)を「起点
ブロック」として決定することができる。そして、回転
後の画像を上端から順番に出力するためには、回転画像
において、「1」、「2」、「3」、・・・・と付した
ような順番で分割ブロックを順次、復元し、回転し、出
力バッファ18上に展開すれば良い。
In this case, for example, the divided blocks B (1,1) to B (1, N) in one row on the left end of the original image can be determined as the “starting block”. Then, in order to output the rotated image in order from the upper end, in the rotated image, the divided blocks are sequentially restored in the order of “1”, “2”, “3”,. Then, it is sufficient to rotate and develop the image on the output buffer 18.

【0140】この際に、分割ブロックの復元の順序は、
復元処理部12が決定することができる。これは、具体
的には、回転角度に応じた各ブロックの上下関係を演算
することによって決定できる。また、このようにして決
定された順序で復元した分割ブロックは、所定の角度だ
け回転させて、出力バッファ18上の所定の位置に展開
する。この際の展開位置も、復元処理部12が回転角度
に応じて演算し、決定することができる。
At this time, the order of restoring the divided blocks is as follows.
The restoration processing unit 12 can make the determination. Specifically, this can be determined by calculating the vertical relationship of each block according to the rotation angle. Further, the divided blocks restored in the order determined in this way are rotated by a predetermined angle and developed at a predetermined position on the output buffer 18. The deployment position at this time can also be calculated and determined by the restoration processing unit 12 according to the rotation angle.

【0141】同様の処理は、図12〜図14に例示した
場合にも実行可能である。すなわち、図12は、原画像
を右回りに90°よりも大きく180°よりも小さい任
意の角度だけ回転させる場合を表している。
The same processing can be executed in the cases illustrated in FIGS. That is, FIG. 12 shows a case where the original image is rotated clockwise by an arbitrary angle greater than 90 ° and smaller than 180 °.

【0142】この場合にも、原画像の左端の一列の分割
ブロックB(1,1)〜B(1,N)を「起点ブロッ
ク」として決定することができる。そして、回転後の画
像を上端から順番に出力するためには、図13の回転画
像において、「1」、「2」、「3」、・・・・と付し
たような順番で分割ブロックを順次、復元し、回転し、
出力バッファ18上に展開すれば良い。
Also in this case, the divided blocks B (1,1) to B (1, N) in one row at the left end of the original image can be determined as the “starting block”. Then, in order to output the rotated image in order from the upper end, in the rotated image of FIG. 13, the divided blocks are arranged in the order of “1”, “2”, “3”,. Sequentially, restore, rotate,
What is necessary is just to expand on the output buffer 18.

【0143】一方、図13は、原画像を右回りに180
°よりも大きく270°よりも小さい任意の角度だけ回
転させる場合を表している。
On the other hand, FIG. 13 shows that the original image is rotated clockwise by 180 degrees.
It shows a case in which it is rotated by any angle greater than 270 ° and less than 270 °.

【0144】また、図14は、原画像を右回りに270
°よりも大きく360°よりも小さい任意の角度だけ回
転させる場合を表している。
FIG. 14 shows that the original image is rotated 270 clockwise.
It shows a case in which it is rotated by any angle larger than 360 ° and smaller than 360 °.

【0145】これらの場合にも、原画像の左端の一列の
分割ブロックB(1,1)〜B(1,N)を「起点ブロ
ック」として決定することができる。但し、回転後の画
像を上端から順番に出力するためには、同図において、
「1」、「2」、「3」、・・・・と付したような順番
で分割ブロックを復元する必要があり、「起点ブロッ
ク」から遠くなるために、処理に時間がかかる。そこ
で、図10に関して前述した場合と同様に、複数のライ
ンを「起点ブロック」として選択すれば、処理速度を改
善することができる。
Also in these cases, the divided blocks B (1,1) to B (1, N) in one row at the left end of the original image can be determined as the “starting block”. However, in order to output the rotated image in order from the upper end, in FIG.
It is necessary to restore the divided blocks in the order of “1”, “2”, “3”,..., And it takes a long time to process since it is far from the “starting block”. Therefore, as in the case described above with reference to FIG. 10, if a plurality of lines are selected as “starting blocks”, the processing speed can be improved.

【0146】以上説明したように、任意の回転角度に対
応するためには、「起点ブロック」や復元の順序、出力
バッファ18への展開位置などを回転角度に応じて決定
する機能を設ければ良い。これらの機能は、例えば、復
元処理部12に設けることができる。
As described above, in order to cope with an arbitrary rotation angle, a function for determining the “starting block”, the order of restoration, the development position on the output buffer 18, etc. according to the rotation angle is provided. good. These functions can be provided in the restoration processing unit 12, for example.

【0147】図15は、本発明による画像処理装置の具
体例を表すブロック図である。
FIG. 15 is a block diagram showing a specific example of the image processing apparatus according to the present invention.

【0148】すなわち、同図に表した画像処理装置にお
いては、復元処理部12が、復元部12A、起点ブロッ
ク決定部12B、復元順序決定部12C、展開位置決定
部12D及び制御部12Eによって構成されている。
That is, in the image processing apparatus shown in the figure, the restoration processing section 12 is constituted by a restoration section 12A, a starting block decision section 12B, a restoration order decision section 12C, a development position decision section 12D, and a control section 12E. ing.

【0149】復元部12Aは、画像ファイル200から
読み出した圧縮データの復元処理を実行する。
The decompression unit 12A executes a decompression process of the compressed data read from the image file 200.

【0150】起点ブロック決定部12Bは、画像の回転
角度に応じて、最適な「起点ブロック」を決定する。例
えば、図11、図12のような場合は、左端の一列の分
割ブロックを「起点ブロック」とし、図13、図14の
ような場合には、複数ラインの分割ブロックを「起点ブ
ロック」と決定する。
The starting block determining unit 12B determines an optimum “starting block” according to the rotation angle of the image. For example, in the case of FIGS. 11 and 12, the divided block in the leftmost column is determined as the “origin block”, and in the case of FIGS. 13 and 14, the divided block of a plurality of lines is determined as the “origin block”. I do.

【0151】復元順序決定部12Cは、画像の回転角度
と起点ブロック決定部12Bによって決定された「起点
ブロック」の位置とに基づき、出力バッファ18の上に
展開するための分割ブロックの復元の順番を決定する。
これは、例えば、図11〜図14において、「1」、
「2」、「3」、・・・と付したように決定され、回転
後の画像においてブロック間の上下関係を演算すること
により、簡単に求めることができる。
The restoration order determining unit 12C determines the order of restoration of the divided blocks to be developed on the output buffer 18 based on the rotation angle of the image and the position of the “starting block” determined by the starting block determining unit 12B. To determine.
This corresponds to, for example, “1” in FIGS.
Are determined as “2”, “3”,..., And can be easily obtained by calculating the vertical relationship between blocks in the rotated image.

【0152】展開位置決定部12Dは、順次復元される
分割ブロックの出力バッファ18上での展開位置を決定
する。これは、分割ブロック同士の相対的な位置関係を
考慮することにより決定することができる。
The development position determination unit 12D determines the development position of the sequentially restored divided blocks on the output buffer 18. This can be determined by considering the relative positional relationship between the divided blocks.

【0153】制御部12Eは、各部の動作の制御とデー
タ入出力の制御を実行する。
The control unit 12E controls the operation of each unit and controls data input / output.

【0154】以上説明したように、本発明に係る画像処
理装置は、任意の角度で回転させた状態の復元画像を極
めて少ないメモリで高速に得ることができる。
As described above, the image processing apparatus according to the present invention can obtain a restored image rotated at an arbitrary angle at a high speed with an extremely small memory.

【0155】本発明に係る画像処理装置は、例えば、専
用の集積回路半導体チップあるいは半導体チップアレイ
などのハードウエアとして実現することが可能である。
The image processing apparatus according to the present invention can be realized as hardware such as a dedicated integrated circuit semiconductor chip or a semiconductor chip array.

【0156】また、本発明に係る画像処理装置は、CP
U(central proccessing unit)及びメモリを有する機
器において、所定のソフトウエアによりCPUを動作さ
せることによっても実現可能である。
Also, the image processing apparatus according to the present invention has a CP
In a device having a U (central proccessing unit) and a memory, it can also be realized by operating a CPU with predetermined software.

【0157】そして、これらのハードウエアやソフトウ
エアは、例えば、パーソナルコンピュータを初めとする
各種のコンピュータ、プリンタ、デジタルカメラ、各種
のPDA(personal data assistance)、あるいはその
他の各種のデジタル画像データを扱う機器の一部として
設けることにより、所定の効果を奏するものである。
These hardware and software handle various types of computers such as personal computers, printers, digital cameras, various types of PDA (personal data assistance), and other types of digital image data. By providing it as a part of the device, a predetermined effect is achieved.

【0158】特に、各種のディスプレイ装置や印刷用紙
などの画像形成媒体上に画像を形成する画像形成装置に
本発明を適用すると、圧縮画像ファイルを元にして所定
の角度だけ回転させた状態の画像を低コストで迅速に形
成できる点で顕著な効果がえられる。このような画像形
成装置としては、プリンタの他に、ディスプレイ付きの
PDAあるいはカーナビゲーションシステム、各種のゲ
ーム機などを挙げるこどができる。
In particular, when the present invention is applied to an image forming apparatus for forming an image on an image forming medium such as various display devices or printing paper, the image is rotated by a predetermined angle based on the compressed image file. Is remarkable in that it can be formed quickly at low cost. Examples of such an image forming apparatus include a PDA with a display, a car navigation system, and various game machines, in addition to a printer.

【0159】以下、本発明の画像形成装置の具体例とし
て実現したプリンタについて説明する。
Hereinafter, a printer realized as a specific example of the image forming apparatus of the present invention will be described.

【0160】図16は、本発明に係るプリンタの概略構
成を表すブロック図である。
FIG. 16 is a block diagram showing a schematic configuration of a printer according to the present invention.

【0161】すなわち、同図に例示したプリンタ50
は、「インクジェットプリンタ」であり、インターフェ
イス部52、受信部54、解釈部56、回転復元部1
0、印刷データ生成部62、イメージ生成部64、及び
プリンタエンジン68を有する。
That is, the printer 50 illustrated in FIG.
Is an “inkjet printer”, and includes an interface unit 52, a receiving unit 54, an interpreting unit 56, a rotation restoring unit 1
0, a print data generation unit 62, an image generation unit 64, and a printer engine 68.

【0162】インターフェイス部52は、ホスト機器3
00からJPEG形式の画像ファイル200や、その他
の「画像データ」または「印刷データ」を受信すると共
に、データ要求信号などの各種のステータス情報をホス
ト機器300に送信する。
The interface unit 52 is connected to the host device 3
From 00, the image file 200 in JPEG format and other “image data” or “print data” are received, and various status information such as a data request signal is transmitted to the host device 300.

【0163】受信部54は、ホスト機器300から送信
されたデータを必要に応じて一時的に格納する。なお、
本発明においては、この受信部54は必ずしも必要でな
く、インターフェイス部52において受信した「画像デ
ータ」などを直ちに解釈部56に送るようにしても良
い。
The receiving section 54 temporarily stores the data transmitted from the host device 300 as necessary. In addition,
In the present invention, the receiving unit 54 is not always necessary, and “image data” or the like received by the interface unit 52 may be immediately sent to the interpreting unit 56.

【0164】解釈部56は、ホスト機器300から送ら
れた信号の種類を調べて適宜必要なデータ処理を施す。
すなわち、ホスト機器300が「プリンタドライバ」を
有しており、「印刷データ」をプリンタに送信した場合
には、解釈部56は、その信号に含まれるヘッダ情報や
フッタ情報を取り除き、経路Cを選択して、その「印刷
データ」をイメージ生成部64に送る。一方、ホスト機
器300から「画像データ」が送られてきた場合には、
解釈部56は、その「画像データ」の形式に応じて経路
Aまたは経路Bを選択し、その「画像データ」を次段に
送る。
The interpreting unit 56 checks the type of the signal sent from the host device 300 and performs necessary data processing as needed.
That is, when the host device 300 has a “printer driver” and transmits “print data” to the printer, the interpretation unit 56 removes the header information and the footer information included in the signal, and sets the path C to Select and send the “print data” to the image generator 64. On the other hand, when “image data” is sent from the host device 300,
The interpretation unit 56 selects the path A or the path B according to the format of the “image data”, and sends the “image data” to the next stage.

【0165】回転復元部10は、図1〜図15に関して
前述した「画像処理装置」に相当する構成を有する。つ
まり、ホスト機器300が圧縮された形式の画像ファイ
ル200を有する場合に、これを所定の角度だけ回転し
た状態で復元する役割を有する。なお、このモードでプ
リンタが動作する場合には、解釈部16は、図17にお
いて符号Aで表した経路を介して、圧縮された画像ファ
イルのデータを回転復元部10に送る。回転復元部10
は、図1〜図15に関して前述したように、この圧縮デ
ータを所定の角度だけ回転した状態で順次復元して出力
する。
The rotation restoring section 10 has a configuration corresponding to the "image processing apparatus" described above with reference to FIGS. That is, when the host device 300 has the image file 200 in the compressed format, the host device 300 has a role of restoring the image file 200 while rotating it by a predetermined angle. When the printer operates in this mode, the interpretation unit 16 sends the data of the compressed image file to the rotation / restoration unit 10 via the path indicated by the symbol A in FIG. Rotation restoration unit 10
As described above with reference to FIGS. 1 to 15, the compressed data is sequentially decompressed and output while being rotated by a predetermined angle.

【0166】印刷データ生成部62は、「画像データ」
を「印刷データ」に変換する。すなわち、RGB(red,
green,blue)の3要素などにより表される「画像デー
タ」を、プリンタが用いる各色のインク(例えば、シア
ン:C、マゼンタ:M、黄色:Y、及び黒:Kの4色)
によるドットの配列情報に対応する「印刷データ」に変
換する。
The print data generation unit 62 outputs “image data”
To “print data”. That is, RGB (red,
“Image data” represented by three elements of “green” and “blue” are used for each color ink used by the printer (for example, four colors of cyan: C, magenta: M, yellow: Y, and black: K).
Is converted into “print data” corresponding to the dot arrangement information.

【0167】図17は、印刷データ生成部62の構成の
具体例を表すブロック図である。すなわち、印刷データ
生成部62は、サイズ変換部62A、色変換部62B、
ハーフトーン処理部62C、及びインターレース処理部
62Dからなるものとすることができる。サイズ変換部
62Aは、ホスト機器300から送られてきたレイアウ
ト情報に基づいて、「画像データ」を所望の印刷サイズ
に変換する役割を有する。例えば、RGB24ビットか
らなる「画像データ」を所望のサイズに変換する。
FIG. 17 is a block diagram showing a specific example of the configuration of the print data generation unit 62. That is, the print data generation unit 62 includes a size conversion unit 62A, a color conversion unit 62B,
It may be composed of a halftone processing section 62C and an interlace processing section 62D. The size conversion unit 62A has a role of converting “image data” into a desired print size based on the layout information sent from the host device 300. For example, “image data” consisting of RGB 24 bits is converted into a desired size.

【0168】色変換部62Bは、「画像データ」をプリ
ンタの色要素からなるデータに変換する。すなわち、プ
リンタが使用するインク色及び発色の特性に応じた色補
正を施し、インク色のデータに変換する。例えば、RG
B24ビットからなる「画像データ」をCMYK32ビ
ットデータに変換する。
The color conversion section 62B converts the "image data" into data composed of printer color elements. That is, color correction is performed in accordance with the ink color and the color development characteristics used by the printer, and the data is converted into ink color data. For example, RG
"Image data" composed of B24 bits is converted into CMYK 32-bit data.

【0169】ハーフトーン処理部62Cは、色変換され
た後のCMYKデータからドット単位でのインクの有無
によってある面積での濃度を表現する2値化処理を実行
する。このハーフトーン処理によってCMYKからなる
印刷データが生成される。例えば、色変換により得られ
たCMYK32ビットデータを、CMYK4ビットから
なるデータに変換する。
The halftone processing section 62C executes binarization processing for expressing the density in a certain area based on the presence or absence of ink in dot units from the CMYK data after the color conversion. This halftone processing generates print data of CMYK. For example, CMYK 32-bit data obtained by color conversion is converted into CMYK 4-bit data.

【0170】インターレース処理部62Dは、ハーフト
ーン処理によって得られたCMYK4ビットデータをイ
ンターレース印刷するために変換する。ここで、「イン
ターレース」とは、プリンタの印刷ヘッドのインクジェ
ットノズルの配列ピッチよりも小さいピッチで印刷ヘッ
ドを主走査方向及び/または副走査方向にずらしながら
印刷することより、きめが細かく、且つ印刷ヘッドのノ
ズル径などのばらつきによる「ムラ」を解消することが
できる印刷手法である。
The interlace processing section 62D converts the CMYK 4-bit data obtained by the halftone processing for interlace printing. Here, "interlace" means that printing is performed finely and at a pitch smaller than the arrangement pitch of the inkjet nozzles of the print head of the printer while shifting the print head in the main scanning direction and / or the sub-scanning direction. This is a printing method that can eliminate “unevenness” due to variations in the nozzle diameter of the head.

【0171】以上の処理によって、「画像データ」が
「印刷データ」に変換される。
By the above processing, "image data" is converted into "print data".

【0172】再び図16に戻って説明すると、イメージ
生成部64は、解釈部56から直接送られてくる「印刷
データ」または、印刷データ生成部62から送られてく
る「印刷データ」に基づいて、印刷イメージを生成し、
プリンタエンジン68を駆動させる役割を有する。
Referring back to FIG. 16, the image generation unit 64 determines whether the image data is to be transmitted directly from the interpretation unit 56 or to the print data transmitted from the print data generation unit 62. , Generate print images,
It has a role to drive the printer engine 68.

【0173】プリンタエンジン68は、図示しない印刷
ヘッドやその駆動系及び紙送り機構などを有し、イメー
ジ生成部64において生成された印刷イメージに基づい
て印刷を実行する。
The printer engine 68 has a print head (not shown), a drive system thereof, a paper feed mechanism, and the like, and executes printing based on the print image generated by the image generation unit 64.

【0174】図16に例示したプリンタ50は、ホスト
機器300から送られたきたデータの形式に応じて、3
通りの経路のいずれかを選択して処理することができ
る。すなわち、圧縮された画像ファイルは、経路Aを介
して、回転復元部10→印刷データ生成部62→イメー
ジ生成部64→プリンタエンジン68と送られる。
[0174] The printer 50 illustrated in FIG.
Any one of the routes can be selected and processed. That is, the compressed image file is sent via the path A to the rotation restoration unit 10 → the print data generation unit 62 → the image generation unit 64 → the printer engine 68.

【0175】一方、非圧縮の「画像データ」は、経路B
が選択され、印刷データ生成部62に送り、「印刷デー
タ」に変換する。この際に、図示しない回転処理部を別
途設けて、「画像データ」または「印刷データ」を所定
の角度だけ回転した状態で印刷可能としても良い。
On the other hand, the uncompressed “image data”
Is selected and sent to the print data generation unit 62 to be converted into “print data”. At this time, a rotation processing unit (not shown) may be separately provided so that “image data” or “print data” can be printed while being rotated by a predetermined angle.

【0176】また、「印刷データ」を受信した場合に
は、経路Cを介して印刷を実行する。これらの経路の切
り替えは、解釈部56により決定される。つまり、解釈
部56は、ホスト機器300から送られたデータを解析
し、その種類に応じて適宜データ処理経路を選択してデ
ータを供給する。
When the "print data" is received, the printing is executed via the path C. Switching of these paths is determined by the interpretation unit 56. That is, the interpretation unit 56 analyzes the data sent from the host device 300, selects a data processing path as appropriate according to the type, and supplies the data.

【0177】本実施形態のプリンタ50は、上述の複数
の経路のうちで、特に経路Aを介した処理を実行するこ
とができる点にひとつの特徴を有する。
The printer 50 of the present embodiment has one feature in that it can execute a process through the route A among the plurality of routes described above.

【0178】図18〜図20は、それぞれ画像ファイル
を入力し、90°、180°、270°回転させた状態
で印刷する際の動作を表すフローチャートである。すな
わち、これらのフローチャートは、図5、図7、図9に
それぞれ対応するものであり、同一のステップには、同
一の符合を付して詳細な説明は省略する。
FIGS. 18 to 20 are flow charts showing the operation when inputting an image file and printing it while rotating it by 90 °, 180 ° and 270 °. That is, these flowcharts correspond to FIGS. 5, 7, and 9, respectively, and the same steps are denoted by the same reference characters and will not be described in detail.

【0179】本発明のプリンタ50においては、回転復
元部10が有する出力バッファ18(図1参照)が「イ
メージバンドバッファ」としての役割を果たす。ここ
で、イメージバンド」とは「イメージバンド」や「ライ
ン」とも称され、インクジェットプリンタやインパクト
ドットプリンタなどの「シリアルプリンタ」において、
印刷ヘッドの一回の走査で印刷される領域のことをい
う。
In the printer 50 according to the present invention, the output buffer 18 (see FIG. 1) of the rotation restoring unit 10 functions as an "image band buffer". Here, the "image band" is also called "image band" or "line", and in "serial printers" such as an ink jet printer and an impact dot printer,
This refers to the area printed by one scan of the print head.

【0180】図21は、シリアルプリンタによってひと
つの「イメージバンド」が印刷された状態を表す概念図
である。すなわち、「イメージバンド」は、印刷ヘッド
の幅すなわち、ヘッドの一回の走査により印刷される画
像の幅に対応する。なお、印刷ヘッドの走査方向は「主
走査方向」、画像形成媒体としての紙の送り方向は「副
走査方向」と称する場合が多い。つまり、印刷ヘッドが
「主走査方向」に走査することによりひとつの「イメー
ジバンド」が形成される。そして、紙が「副走査方向」
に送られことにより次の「イメージバンド」の形成位置
が決定される。
FIG. 21 is a conceptual diagram showing a state where one "image band" is printed by a serial printer. That is, the “image band” corresponds to the width of the print head, that is, the width of an image printed by one scan of the head. The scanning direction of the print head is often referred to as a “main scanning direction”, and the feeding direction of paper as an image forming medium is often referred to as a “sub-scanning direction”. That is, one "image band" is formed by the print head scanning in the "main scanning direction". And the paper is in the “sub-scanning direction”
To determine the next "image band" formation position.

【0181】図18〜図20において、ステップS78
Aで表した分岐ステップは、ひとつの「イメージバン
ド」の印刷に必要なデータが出力バッファ18に展開さ
れたか、あるいは印刷すべきページが終了したか否かを
判断するステップである。データが揃ってない時など
(ステップS 78A:No)は、ステップS54また
はS54Aに戻り、圧縮データの読み込み、復元、回
転、展開の処理が繰り返される。
18 to 20, in step S78
The branching step represented by A is a step for determining whether data necessary for printing one “image band” has been expanded in the output buffer 18 or whether the page to be printed has ended. For example, when the data is not available (Step S78A: No), the process returns to Step S54 or S54A, and the processing of reading, restoring, rotating, and expanding compressed data is repeated.

【0182】一方、データが揃った時(ステップS78
A:Yes)は、ステップS90において、色変換、ハ
ーフトーン処理などを行い、「画像データ」を「印刷デ
ータ」に変換する。これらの処理は、印刷データ生成部
62において実行される。
On the other hand, when the data is completed (step S78)
A: Yes) in step S90, color conversion, halftone processing, and the like are performed to convert “image data” into “print data”. These processes are executed by the print data generation unit 62.

【0183】そして、ステップS92において、印刷デ
ータがプリンタエンジン68に送られ、ひとつの「イメ
ージバンド」の印刷が実行される。
Then, in step S92, the print data is sent to the printer engine 68, and one "image band" is printed.

【0184】この段階で、まだページが終了していない
時(ステップS94:No)は、ステップS52に戻
り、次のイメージバンドのために、圧縮画像データの読
み込み、復元、回転、展開の処理が繰り返される。
At this stage, if the page has not been completed yet (step S94: No), the flow returns to step S52, and the processing of reading, restoring, rotating, and expanding the compressed image data is performed for the next image band. Repeated.

【0185】ページが終了した場合(ステップS94:
Yes)は、ステップS96に進み、プリンタエンジン
68が用紙を排紙して印刷処理を終了する。
When the page ends (step S94:
(Yes), the process proceeds to step S96, the printer engine 68 discharges the sheet, and ends the printing process.

【0186】以上説明したように、本発明によれば、プ
リンタに回転復元部10を設けることにより、ホスト機
器300に格納されているJPEGなどの形式の画像フ
ァイル200を直接読み出し、復元して所定の角度だけ
回転した状態で印刷することができる。従って、ホスト
機器300は、圧縮された画像ファイルを復元するため
の復元手段も、回転処理を実行するための画像回転処理
手段も有する必要がない。従って、プリンタ50を接続
することができるホスト機器の範囲を大幅に広げること
ができる。例えば、デジタルカメラや各種の各種のPD
A(personal data assistance)、あるいはインターネ
ットなどのデータ源に接続して圧縮された画像データを
ダウンロードできる各種のデジタル機器などをホスト機
器300とすることができる。そして、これらのホスト
機器にプリンタを直接接続し、例えば、インターネット
などを介して圧縮画像データをダウンロードし、プリン
タに読みとらせることにより、所定の角度だけ回転させ
た状態で直ちに印刷することが可能となる。つまり、従
来と異なり、ホストコンピュータを介することなくこれ
らの機器から画像ファイルを取り出して所定のレイアウ
トで印刷することができ、プリンタの応用範囲を大幅に
拡げることができる。
As described above, according to the present invention, by providing the rotation restoration unit 10 in the printer, the image file 200 in the JPEG format or the like stored in the host device 300 is directly read, restored, and restored to a predetermined format. Can be printed in a state rotated by an angle of. Therefore, the host device 300 does not need to have a decompression unit for decompressing the compressed image file and an image rotation processing unit for executing the rotation process. Therefore, the range of host devices to which the printer 50 can be connected can be greatly expanded. For example, digital cameras and various PDs
A (personal data assistance) or various digital devices that can download compressed image data by connecting to a data source such as the Internet can be the host device 300. By directly connecting a printer to these host devices, for example, by downloading compressed image data via the Internet or the like and reading the data by the printer, it is possible to immediately print while rotating by a predetermined angle. Becomes That is, unlike the related art, an image file can be extracted from these devices without using a host computer and printed with a predetermined layout, so that the application range of the printer can be greatly expanded.

【0187】また、本発明によれば、画像復元手段や画
像回転処理手段を有する機器をホスト機器300として
用いる場合にも、ホスト機器300の負担を大幅に減ら
すことができる。つまり、プリンタ側で画像ファイルの
復元処理や回転処理を行うので、ホストコンピュータ
は、圧縮された画像ファイルをプリンタに送出するだけ
で、他のタスクの処理に直ちにとりかかることができ、
システム全体の処理能力を大幅に改善することが可能と
なる。
Further, according to the present invention, even when a device having an image restoring unit and an image rotation processing unit is used as the host device 300, the load on the host device 300 can be greatly reduced. That is, since the image file is restored or rotated on the printer side, the host computer can immediately start processing other tasks simply by sending the compressed image file to the printer.
It is possible to greatly improve the processing capacity of the entire system.

【0188】さらに、本発明によれば、極めて小さいメ
モリ容量で圧縮画像の回転処理が実現できる。つまり、
画像全体を一旦格納する必要がないため、大容量のメモ
リを増設する必要がなく、極めて低コストで高性能のプ
リンタを実現することができる。この効果は、特に「シ
リアルプリンタ」の場合に顕著となる。何故ならば、従
来のシリアルプリンタは、数イメージバンド程度の容量
の「イメージバンドバッファ」しか有していないが、本
発明によれば、このメモリをそのまま流用して、圧縮画
像の回転復元処理を高速に実行することができるからで
ある。
Further, according to the present invention, it is possible to realize a rotation process of a compressed image with an extremely small memory capacity. That is,
Since it is not necessary to temporarily store the entire image, it is not necessary to add a large-capacity memory, and a high-performance printer can be realized at extremely low cost. This effect is particularly remarkable in the case of a “serial printer”. The reason is that the conventional serial printer has only an "image band buffer" having a capacity of about several image bands, but according to the present invention, this memory is used as it is to perform the rotation restoration processing of the compressed image. This is because it can be executed at high speed.

【0189】以上具体例を参照しつつ本発明の実施の形
態について説明した。しかし、本発明は、これらの具体
例に限定されるものではない。
The embodiment of the invention has been described with reference to the examples. However, the present invention is not limited to these specific examples.

【0190】例えば、本発明のプリンタの具体例として
は、インクジェットプリンタの例を挙げつつ説明した
が、本発明は、これ以外にもあらゆるシリアルプリンタ
に適用して同様の効果を得ることができる。
For example, as a specific example of the printer of the present invention, an example of an ink jet printer has been described. However, the present invention can be applied to all other serial printers to obtain the same effect.

【0191】また、本発明は、レーザプリンタやLED
プリンタなどの「ページプリンタ」についても同様に適
用して、同様の各種の効果を得ることができる。
Also, the present invention relates to a laser printer and an LED.
The same applies to a “page printer” such as a printer, and similar various effects can be obtained.

【0192】また、入力される画像ファイルのフォーマ
ットも、JPEGに限定されず、ブロックに分割され、
且つ変換成分に隣接ブロックとの差分を用いるようなす
べてのフォーマットの画像ファイルについて同様に適用
することができる。この点に関しては、例えば、JPE
Gの他にも、異なる方式のデータフォーマットに対応し
た復元部を設けて、入力される圧縮画像データのフォー
マットに応じて適宜復元方式を選択できるようにしても
良い。
The format of the input image file is not limited to JPEG, but is divided into blocks.
In addition, the present invention can be similarly applied to image files of all formats in which a difference from an adjacent block is used as a conversion component. In this regard, for example, JPE
In addition to G, a restoration unit corresponding to a data format of a different system may be provided so that the restoration system can be appropriately selected according to the format of the input compressed image data.

【0193】また、プリンタが用いるインクの色も、具
体例として挙げたCMYK4色に限定されるものではな
く、これらにライトシアン、ライトマゼンタなどの淡色
を加えたものや、その他のあらゆるインクの組み合わせ
を同様に用いることができる。
The colors of the inks used by the printer are not limited to the four CMYK colors mentioned above as specific examples, but may be obtained by adding light colors such as light cyan and light magenta to these colors, or any other combinations of inks. It can be used similarly.

【0194】さらに、プリンタ機構を有するものであれ
ば、プリンタ専用機には限定されず、複写機、ファクシ
ミリ装置などの他の機能を備えた複合機であっても良
い。
Further, as long as it has a printer mechanism, it is not limited to a printer-dedicated machine, but may be a multifunction machine having other functions such as a copying machine and a facsimile machine.

【0195】その他、当業者であれば、本明細書に開示
した本発明の要旨の範囲内で種々の追加、変更等が可能
である。
In addition, those skilled in the art can make various additions and changes within the scope of the present invention disclosed in this specification.

【0196】[0196]

【発明の効果】本発明は、以上説明した形態で実施さ
れ、以下に説明する効果を奏する。
The present invention is embodied in the form described above, and has the following effects.

【0197】まず、本発明によれば、圧縮された画像フ
ァイルを途中から復元するために便利な「起点ブロッ
ク」を予め定めておき、一度連続的に復元することによ
って、これら「起点ブロック」の「ファイルポインタ」
と「DC成分」とを格納し、これらのデータを利用する
ことによって、圧縮データを途中から迅速に復元し、適
宜回転させて出力バッファ上に展開することによって、
回転させた状態の画像を上端から順次出力することがで
きる。従って、本発明によれば、復元した画像の全体を
一旦格納するための大容量のメモリは必要としない。
First, according to the present invention, a convenient “origin block” for restoring a compressed image file from the middle is determined in advance, and the “origin block” is restored once. "File Pointer"
By storing these and the “DC component” and using these data, the compressed data can be quickly restored from the middle, rotated appropriately and expanded on the output buffer,
The rotated images can be sequentially output from the upper end. Therefore, according to the present invention, a large-capacity memory for temporarily storing the entire restored image is not required.

【0198】また、本発明によれば、出力バッファは、
復元された画像全体を格納するだけのメモリ容量は要し
ない。つまり、各種の入力機器は、出力バッファの上に
展開された画像データを随時読み出すことによって、回
転された画像データを上端から順に受け取ることがで
き、出力バッファは、出力画像を部分的にバッファリン
グできれば十分である。例えば、そのメモリ容量は、1
列の分割ブロックに対応する高さ8ピクセルの領域を格
納できれば良い。従って、極めて少ないメモリ容量で圧
縮画像データを回転した状態で復元し出力することがで
きる。
Further, according to the present invention, the output buffer
It is not necessary to have enough memory capacity to store the entire restored image. In other words, various input devices can sequentially receive rotated image data from the upper end by reading the image data expanded on the output buffer as needed, and the output buffer buffers the output image partially. It is enough if possible. For example, the memory capacity is 1
It suffices if an 8-pixel high area corresponding to the divided block of the column can be stored. Therefore, the compressed image data can be restored and output in a rotated state with an extremely small memory capacity.

【0199】また、本発明によれば、復元情報格納部に
要所ブロックの「ファイルポインタ」と「DC成分」と
をキャッシュしておくことにより、画像ファイルから所
定の分割ブロックに対応する圧縮データを迅速に読み出
し、迅速に復元することができる。さらに、ブロックの
回転処理は、8ピクセル×8ピクセルという極めて小さ
なブロック単位で行えば良いので、回転処理も極めて迅
速に実行することができる。
Further, according to the present invention, the "file pointer" and "DC component" of the key block are cached in the restoration information storage unit, so that the compressed data corresponding to the predetermined divided block can be obtained from the image file. Can be quickly read and quickly restored. Further, since the rotation processing of the block may be performed in a very small block unit of 8 pixels × 8 pixels, the rotation processing can be executed very quickly.

【0200】また、本発明によれば、プリンタに回転復
元部を設けることにより、ホスト機器に格納されている
JPEGなどの形式の画像ファイルを直接読み出し、復
元して所定の角度だけ回転した状態で印刷することがで
き、ホスト機器は、圧縮された画像ファイルを復元する
ための復元手段も、回転処理を実行するための画像回転
処理手段も有する必要がない。従って、プリンタを接続
することができるホスト機器の範囲を大幅に広げること
ができ、例えば、デジタルカメラや各種の各種のPDA
(personal data assistance)、あるいはインターネッ
トなどのデータ源に接続して圧縮された画像データをダ
ウンロードできる各種のデジタル機器などをホスト機器
とすることができる。そして、これらのホスト機器にプ
リンタを直接接続し、例えば、インターネットなどを介
して圧縮画像データをダウンロードし、プリンタに読み
とらせることにより、所定の角度だけ回転させた状態で
直ちに印刷することが可能となる。つまり、従来と異な
り、ホストコンピュータを介することなくこれらの機器
から画像ファイルを取り出して所定のレイアウトで印刷
することができ、プリンタの応用範囲を大幅に拡げるこ
とができる。
Further, according to the present invention, by providing a rotation restoration unit in a printer, an image file of a format such as JPEG stored in a host device is directly read, restored and rotated by a predetermined angle. Printing can be performed, and the host device does not need to have a decompression unit for decompressing the compressed image file and an image rotation processing unit for performing the rotation process. Therefore, the range of host devices to which a printer can be connected can be greatly expanded. For example, digital cameras and various types of PDAs can be used.
(Personal data assistance), or various digital devices capable of downloading compressed image data by connecting to a data source such as the Internet can be used as the host device. By directly connecting a printer to these host devices, for example, by downloading compressed image data via the Internet or the like and reading the data by the printer, it is possible to immediately print while rotating by a predetermined angle. Becomes That is, unlike the related art, an image file can be extracted from these devices without using a host computer and printed with a predetermined layout, so that the application range of the printer can be greatly expanded.

【0201】また、本発明によれば、画像復元手段や画
像回転処理手段を有する機器をホスト機器として用いる
場合にも、ホスト機器の負担を大幅に減らすことができ
る。つまり、プリンタ側で画像ファイルの復元処理や回
転処理を行うので、ホストコンピュータは、圧縮された
画像ファイルをプリンタに送出するだけで、他のタスク
の処理に直ちにとりかかることができ、システム全体の
処理能力を大幅に改善することが可能となる。
Further, according to the present invention, even when a device having an image restoring means and an image rotation processing means is used as a host device, the load on the host device can be greatly reduced. In other words, since the image file is decompressed and rotated on the printer side, the host computer can immediately start processing other tasks simply by sending the compressed image file to the printer. The ability can be greatly improved.

【0202】さらに、本発明によれば、極めて小さいメ
モリ容量で圧縮画像の回転処理が実現できる。つまり、
画像全体を一旦格納する必要がないため、大容量のメモ
リを増設する必要がなく、極めて低コストで高性能のプ
リンタを実現することができる。この効果は、特に「シ
リアルプリンタ」の場合に顕著となる。何故ならば、従
来のシリアルプリンタは、数イメージバンド程度の容量
の「イメージバンドバッファ」しか有していないが、本
発明によれば、このメモリをそのまま流用して、圧縮画
像の回転復元処理を高速に実行することができるからで
ある。
Further, according to the present invention, a rotation process of a compressed image can be realized with an extremely small memory capacity. That is,
Since it is not necessary to temporarily store the entire image, it is not necessary to add a large-capacity memory, and a high-performance printer can be realized at extremely low cost. This effect is particularly remarkable in the case of a “serial printer”. The reason is that the conventional serial printer has only an "image band buffer" having a capacity of about several image bands, but according to the present invention, this memory is used as it is to perform the rotation restoration processing of the compressed image. This is because it can be executed at high speed.

【0203】また、本発明によれば、圧縮された画像フ
ァイルとしてJPEGフォーマットを適用して好適であ
り、最も汎用性の広い画像処理装置及び画像形成装置を
提供することができる。
Further, according to the present invention, a JPEG format is preferably applied as a compressed image file, and an image processing apparatus and an image forming apparatus having the most versatility can be provided.

【0204】以上詳述したように、本発明によれば、極
めて低コストで画像ファイルの復元回転処理が可能で、
応用範囲を従来よりも大幅に拡げ、ホスト負担も軽減す
ることができる画像処理装置や画像形成装置などを提供
することが可能となり産業上のメリットは多大である。
As described in detail above, according to the present invention, the restoration rotation processing of an image file can be performed at extremely low cost.
It is possible to provide an image processing apparatus, an image forming apparatus, and the like capable of greatly expanding the application range and reducing the load on the host as compared with the related art, and the industrial advantage is great.

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

【図1】本発明の画像処理装置の概略構成を表すブロッ
ク図である。
FIG. 1 is a block diagram illustrating a schematic configuration of an image processing apparatus according to the present invention.

【図2】本発明により画像を回転して復元する様子を例
示した概念図である。
FIG. 2 is a conceptual diagram illustrating a state in which an image is rotated and restored according to the present invention.

【図3】本発明による画像処理装置の動作を概念的に表
すフローチャートである。
FIG. 3 is a flowchart conceptually showing the operation of the image processing apparatus according to the present invention.

【図4】図4(a)は、変換前の実空間における分割ブ
ロックの画素配列を表し、図4(b)は、DCT変化さ
れた後の周波数空間におけるDCT係数の配列を概念的
に表す説明図である。
FIG. 4A shows a pixel array of a divided block in a real space before transform, and FIG. 4B conceptually shows an array of DCT coefficients in a frequency space after DCT change; FIG.

【図5】右回りに90°回転させる具体例に係る画像処
理方法を表すフローチャートである。
FIG. 5 is a flowchart illustrating an image processing method according to a specific example of rotating clockwise by 90 °.

【図6】右回りに180°回転させる具体例に係る画像
処理方法を概念的に表す説明図である。
FIG. 6 is an explanatory diagram conceptually illustrating an image processing method according to a specific example of rotating clockwise by 180 °.

【図7】右回りに180°回転させる具体例に係る画像
処理方法を表すフローチャートである。
FIG. 7 is a flowchart illustrating an image processing method according to a specific example of rotating clockwise by 180 °.

【図8】右回りに270°回転させる具体例に係る画像
処理方法を概念的に表す説明図である。
FIG. 8 is an explanatory diagram conceptually illustrating an image processing method according to a specific example of rotating 270 ° clockwise.

【図9】右回りに270°回転させる具体例に係る画像
処理方法を表すフローチャートである。
FIG. 9 is a flowchart illustrating an image processing method according to a specific example of rotating 270 ° clockwise.

【図10】「起点ブロック」を複数ライン設けた場合を
例示する概念図である。
FIG. 10 is a conceptual diagram exemplifying a case where a plurality of “starting point blocks” are provided.

【図11】原画像を右回りに90°未満の任意の角度だ
け回転させる場合を表している。
FIG. 11 illustrates a case where an original image is rotated clockwise by an arbitrary angle less than 90 °.

【図12】原画像を右回りに90°よりも大きく180
°よりも小さい任意の角度だけ回転させる場合を表して
いる。
FIG. 12 shows an original image rotated clockwise by more than 90 ° 180
It shows a case where the rotation is made by an arbitrary angle smaller than °.

【図13】原画像を右回りに180°よりも大きく27
0°よりも小さい任意の角度だけ回転させる場合を表し
ている。
FIG. 13 shows that the original image is rotated clockwise by more than 180 ° 27
It shows a case where the rotation is made by an arbitrary angle smaller than 0 °.

【図14】原画像を右回りに270°よりも大きく36
0°よりも小さい任意の角度だけ回転させる場合を表し
ている。
FIG. 14 shows that the original image is rotated clockwise by more than 270 °.
It shows a case where the rotation is made by an arbitrary angle smaller than 0 °.

【図15】本発明による画像処理装置の具体例を表すブ
ロック図である。
FIG. 15 is a block diagram illustrating a specific example of an image processing device according to the present invention.

【図16】本発明に係るプリンタの概略構成を表すブロ
ック図である。
FIG. 16 is a block diagram illustrating a schematic configuration of a printer according to the invention.

【図17】印刷データ生成部62の構成の具体例を表す
ブロック図である。
FIG. 17 is a block diagram illustrating a specific example of a configuration of a print data generation unit 62.

【図18】画像ファイルを入力し、90°回転させた状
態で印刷する際の動作を表すフローチャートである。
FIG. 18 is a flowchart illustrating an operation when an image file is input and printed while being rotated by 90 °.

【図19】画像ファイルを入力し、180°回転させた
状態で印刷する際の動作を表すフローチャートである。
FIG. 19 is a flowchart illustrating an operation when an image file is input and printed while being rotated by 180 °.

【図20】画像ファイルを入力し、270°回転させた
状態で印刷する際の動作を表すフローチャートである。
FIG. 20 is a flowchart illustrating an operation when an image file is input and printed while being rotated by 270 °.

【図21】シリアルプリンタによってひとつの「イメー
ジバンド」が印刷された状態を表す概念図である。
FIG. 21 is a conceptual diagram illustrating a state in which one “image band” is printed by a serial printer.

【図22】JPEGによる圧縮、復元処理の典型例を表
す概念図である。
FIG. 22 is a conceptual diagram illustrating a typical example of compression and decompression processing by JPEG.

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

10 画像処理装置 12 復元処理部 12A 復元部 12B 起点ブロック決定部 12C 復元順序決定部 12D 展開位置決定部 12E 制御部 14 データバッファ 15 復元情報格納部 16 ブロック回転部 17 展開制御部 18 出力バッファ 50 インクジェットプリンタ 52 インターフェイス部 54 受信部 56 解釈部 62 印刷データ生成部 62A サイズ変換部 62B 色変換部 62C ハーフトーン処理部 62D インターレース処理部 64 イメージ生成部 66 データ読込み制御部 68 プリンタエンジン 200 画像ファイル 300 ホスト機器 DESCRIPTION OF SYMBOLS 10 Image processing apparatus 12 Restoration processing part 12A Restoration part 12B Starting block decision part 12C Restoration order decision part 12D Development position decision part 12E Control part 14 Data buffer 15 Restoration information storage part 16 Block rotation part 17 Development control part 18 Output buffer 50 Inkjet Printer 52 Interface unit 54 Receiving unit 56 Interpretation unit 62 Print data generation unit 62A Size conversion unit 62B Color conversion unit 62C Halftone processing unit 62D Interlace processing unit 64 Image generation unit 66 Data read control unit 68 Printer engine 200 Image file 300 Host device

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B057 AA11 CA16 CB16 CD04 CG02 5C023 AA03 AA31 CA05 DA01 5C073 BB02 CE01 CE04 5C076 AA24 BA02 BA03 BA04 BA05 BA06 BA09 5C078 BA12 BA32 BA42 BA57 CA14 CA34 DA01 DA02  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5B057 AA11 CA16 CB16 CD04 CG02 5C023 AA03 AA31 CA05 DA01 5C073 BB02 CE01 CE04 5C076 AA24 BA02 BA03 BA04 BA05 BA06 BA09 5C078 BA12 BA32 BA42 BA57 CA14 CA34 DA01 DA02

Claims (16)

【特許請求の範囲】[Claims] 【請求項1】原画像をブロック毎に符号化した符号化成
分を有し且つ前記符号化成分に他のブロックとの差分に
関する情報を含む符号化画像データを復号化し所定の角
度だけ回転させた状態で出力する画像処理装置であっ
て、 復号化を実行する復元処理部と、 復号化に関する情報を格納する復元情報格納部と、 復号化されたブロックの回転処理を実行するブロック回
転部と、 を備え、 前記復元処理部は、まず、前記符号化画像データを最初
から順番に復号化し、前記原画像中に予め定めた起点ブ
ロックを復号化するために必要とされる復元情報が得ら
れたら前記復元情報格納部に格納し、 しかる後に、前記復元処理部は、前記復元情報格納部に
格納した前記復元情報を利用して前記符号化画像データ
を前記起点ブロックから復号化し、 前記ブロック回転部は、前記復元処理部により復号化さ
れたブロックが出力すべきブロックの場合は前記所定の
角度だけ回転させて出力することにより、 前記原画像を前記所定の角度だけ回転させた状態とした
時に上方に位置するブロックから順に復号化データを出
力可能としたことを特徴とする画像処理装置。
1. An image processing apparatus comprising: decoding encoded image data having an encoded component obtained by encoding an original image for each block and including information on a difference from another block in the encoded component, and rotating the decoded image data by a predetermined angle; An image processing device that outputs in a state, a restoration processing unit that executes decoding, a restoration information storage unit that stores information related to decoding, a block rotation unit that executes rotation processing of the decoded block, The restoration processing unit first decodes the encoded image data in order from the beginning, and obtains restoration information required to decode a predetermined starting block in the original image. Stored in the restoration information storage unit, and thereafter, the restoration processing unit decodes the encoded image data from the origin block using the restoration information stored in the restoration information storage unit; The block rotation unit rotates the original image by the predetermined angle by outputting the block decoded by the restoration processing unit if the block to be output is the block to be output, by rotating the original image by the predetermined angle. An image processing apparatus capable of outputting decoded data in order from a block located at an upper position.
【請求項2】出力バッファをさらに備え、 前記ブロック回転部により前記所定の角度だけ回転させ
て出力される前記ブロックは、前記出力バッファ上に展
開されることを特徴とする請求項1記載の画像処理装
置。
2. The image according to claim 1, further comprising an output buffer, wherein the block output by being rotated by the predetermined angle by the block rotation unit is developed on the output buffer. Processing equipment.
【請求項3】前記符号化画像データは、JPEGフォー
マットに基づき、 前記復元情報は、前記起点ブロックの離散コサイン変換
係数のDC成分に関する情報であることを特徴とする請
求項1または2に記載画像処理装置。
3. The image according to claim 1, wherein the encoded image data is based on a JPEG format, and the restoration information is information on a DC component of a discrete cosine transform coefficient of the starting block. Processing equipment.
【請求項4】前記角度は、0°以上180°以下であ
り、 前記起点ブロックは、前記原画像における左端の一列の
ブロックを含むことを特徴とする請求項1〜3のいずか
1つに記載の画像処理装置。
4. The image processing apparatus according to claim 1, wherein the angle is equal to or greater than 0 ° and equal to or less than 180 °, and the starting point block includes a block in a left end row of the original image. An image processing apparatus according to claim 1.
【請求項5】前記角度は、180°よりも大きく且つ3
60°よりも小さく、 前記起点ブロックは、前記原画像における左端の一列の
ブロックと、それ以外の一列のブロックと、を含むこと
を特徴とする請求項1〜3のいずれか1つに記載の画像
処理装置。
5. The angle is greater than 180 ° and 3 °.
The angle is smaller than 60 [deg.], And the starting block includes a block in one row at the left end in the original image and a block in another row in the original image. Image processing device.
【請求項6】前記復元情報格納部は、キャッシュメモリ
を有することを特徴とする請求項1〜5のいずれか1つ
に記載の画像処理装置。
6. The image processing apparatus according to claim 1, wherein the restoration information storage unit has a cache memory.
【請求項7】原画像をブロック毎に符号化した符号化成
分を有し且つ前記符号化成分に他のブロックとの差分に
関する情報を含む符号化画像データを復号化し所定の角
度だけ回転させた状態で出力する画像処理方法であっ
て、 前記符号化画像データを最初から順番に復号化し、原画
像中に定めた起点ブロックを復号化するために必要とさ
れる復元情報が得られたら保持し、 しかる後に、前記保持した前記復元情報を利用して前記
符号化画像データを前記起点ブロックから復号化し、 前記復号化されたブロックが出力すべきブロックの場合
は前記所定の角度だけ回転させて出力することにより、 前記原画像を前記所定の角度だけ回転させた状態とした
時に上方に位置するブロックから順に復号化データを出
力可能としたことを特徴とする画像処理方法。
7. Decoding coded image data having a coded component obtained by coding an original image for each block and including the coded component including information on a difference from another block, and rotating the coded image data by a predetermined angle. An image processing method for outputting in a state, wherein the encoded image data is decoded in order from the beginning, and when restoration information necessary for decoding a starting block defined in an original image is obtained and held. Thereafter, the encoded image data is decoded from the starting block by using the held restoration information. The decoded image can be output in order from the block located above when the original image is rotated by the predetermined angle. Processing method.
【請求項8】前記出力すべきブロックを前記所定の角度
だけ回転させて出力バッファ上に展開することを特徴と
する請求項7記載の画像処理方法。
8. The image processing method according to claim 7, wherein the block to be output is rotated by the predetermined angle and developed on an output buffer.
【請求項9】前記符号化画像データは、JPEGフォー
マットに基づき、 前記復元情報は、前記起点ブロックの離散コサイン変換
係数のDC成分に関する情報であることを特徴とする請
求項7または8に記載の画像処理方法。
9. The coded image data is based on a JPEG format, and the restoration information is information on a DC component of a discrete cosine transform coefficient of the starting block. Image processing method.
【請求項10】前記角度は、0°以上180°以下であ
り、 前記起点ブロックは、前記原画像における左端の一列の
ブロックを含むことを特徴とする請求項7〜9のいずか
1つに記載の画像処理方法。
10. The image forming apparatus according to claim 7, wherein the angle is not less than 0 ° and not more than 180 °, and the starting block includes a block in a left end row of the original image. The image processing method according to 1.
【請求項11】前記角度は、180°よりも大きく且つ
360°よりも小さく、 前記起点ブロックは、前記原画像における左端の一列の
ブロックと、それ以外の一列のブロックと、を含むこと
を特徴とする請求項7〜9のいずれか1つに記載の画像
処理方法。
11. The method according to claim 11, wherein the angle is greater than 180 ° and smaller than 360 °, and the starting block includes a block in one row at the left end of the original image and a block in another row. The image processing method according to any one of claims 7 to 9, wherein
【請求項12】原画像をブロック毎に符号化した符号化
成分を有し且つ前記符号化成分に他のブロックとの差分
に関する情報を含む符号化画像データを入力し、前記原
画像を所定の角度だけ回転させた状態で画像形成媒体上
に出力する画像形成装置であって、 復号化を実行する復元処理部と、 復号化に関する情報を格納する復元情報格納部と、 復号化されたブロックの回転処理を実行するブロック回
転部と、 復号化データに基づいて画像形成媒体上に画像を形成す
る画像形成手段と、 を備え、 前記復元処理部は、まず、前記符号化画像データを最初
から順番に復号化し、原画像中に予め定めた起点ブロッ
クを復号化するために必要とされる復元情報が得られた
ら前記復元情報格納部に格納し、 しかる後に、前記復元処理部は、前記復元情報格納部に
格納した前記復元情報を利用して前記符号化画像データ
を前記起点ブロックから復号化し、 前記ブロック回転部は、前記復元処理部により復号化さ
れたブロックが出力すべきブロックの場合は前記所定の
角度だけ回転させて前記復号化データを出力し、 前記画像形成手段は、前記出力された復号化データに基
づいて画像を形成することにより、 前記所定の角度だけ回転させた状態の画像を上方のブロ
ックから順次画像形成媒体上に形成可能としたことを特
徴とする画像形成装置。
12. Encoded image data having an encoded component obtained by encoding an original image for each block and including information relating to a difference from another block as the encoded component, and An image forming apparatus that outputs an image on an image forming medium in a state rotated by an angle, comprising: a restoration processing unit that executes decoding; a restoration information storage unit that stores information related to decoding; A block rotating unit that performs a rotation process; and an image forming unit that forms an image on an image forming medium based on the decoded data.The restoration processing unit first performs the encoding image data in order from the beginning. When the restoration information necessary for decoding the predetermined starting block in the original image is obtained, the restoration information is stored in the restoration information storage unit. Thereafter, the restoration processing unit Using the restoration information stored in the report storage unit, the encoded image data is decoded from the starting block, and the block rotation unit is configured to output the block decoded by the restoration processing unit if the block is to be output. Rotating the predetermined angle to output the decoded data, the image forming unit forms an image based on the output decoded data, and the image in the state rotated by the predetermined angle An image forming apparatus capable of sequentially forming images on an image forming medium from an upper block.
【請求項13】符号化画像データの復号化を実行する復
元処理部と、前記復号化に関する情報を格納する復元情
報格納部と、前記復号化されたブロックの回転処理を実
行するブロック回転部と、を有し、原画像をブロック毎
に符号化した符号化成分を有し且つ前記符号化成分に他
のブロックとの差分に関する情報を含む符号化画像デー
タを復号化し所定の角度だけ回転させた状態で出力する
画像処理装置を制御するプログラムを格納した記録媒体
であって、 前記プログラムは、 まず、前記復元処理部に、前記符号化画像データを最初
から順番に復号化させ、原画像中に定めた所定の起点ブ
ロックを復号化するために必要とされる復元情報が得ら
れたら前記復元情報格納部に格納させ、 しかる後に、前記復元処理部に、前記復元情報格納部に
格納した前記復元情報を利用させて前記符号化画像デー
タを前記起点ブロックから復号化させ、 前記ブロック回転部に、前記復元処理部により復号化さ
れたブロックが出力すべきブロックの場合は前記所定の
角度だけ回転させて出力させることにより、 前記原画像を前記所定の角度だけ回転させた状態とした
時に上方に位置するブロックから順に復号化データを出
力可能としたことを特徴とする記録媒体。
13. A restoration processing unit for executing decoding of coded image data, a restoration information storage unit for storing information related to the decoding, and a block rotation unit for executing a rotation process of the decoded block. The encoded image data having an encoded component obtained by encoding the original image for each block and including the information regarding the difference from other blocks in the encoded component is decoded and rotated by a predetermined angle. A storage medium storing a program for controlling an image processing device that outputs in a state, wherein the program first causes the restoration processing unit to decode the encoded image data in order from the beginning, and When the restoration information required for decoding the determined predetermined starting block is obtained, the restoration information is stored in the restoration information storage unit, and thereafter, the restoration processing unit, the restoration information storage unit The encoded image data is decoded from the starting block by using the stored restoration information. If the block decoded by the restoration processing unit is a block to be output to the block rotation unit, the predetermined A recording medium characterized by being able to output decoded data in order from a block located above when the original image is rotated by the predetermined angle by rotating and outputting the original image by an angle.
【請求項14】前記画像処理装置は、出力バッファをさ
らに有し、 前記プログラムは、前記ブロック回転部により前記所定
の角度だけ回転させて出力される前記ブロックを前記出
力バッファ上に展開させることを特徴とする請求項13
記載の記録媒体。
14. The image processing apparatus further includes an output buffer, wherein the program causes the block rotation unit to rotate the block by the predetermined angle and output the block on the output buffer. Claim 13
Recording medium according to the above.
【請求項15】原画像をブロック毎に符号化した符号化
成分を有し且つ前記符号化成分に他のブロックとの差分
に関する情報を含む符号化画像データを復号化し所定の
角度だけ回転させた状態で出力するプログラムが格納さ
れた記録媒体であって、 前記プログラムは、 前記符号化画像データを最初から順番に復号化し、原画
像中に定めた所定の起点ブロックを復号化するために必
要とされる復元情報が得られたら保持し、しかる後に、
前記保持した前記復元情報を利用して前記符号化画像デ
ータを前記起点ブロックから復号化し、 前記復号化されたブロックが出力すべきブロックの場合
は前記所定の角度だけ回転させて出力することにより、 前記原画像を前記所定の角度だけ回転させた状態とした
時に上方に位置するブロックから復号化データを順に出
力可能としたことを特徴とする記録媒体。
15. Decoding coded image data having a coding component obtained by coding an original image for each block and including the coding component including information relating to a difference from another block, and rotating by a predetermined angle. A recording medium storing a program to be output in a state, wherein the program is necessary for decoding the encoded image data in order from the beginning and decoding a predetermined starting block defined in an original image. Once the restoration information to be obtained is obtained,
The encoded image data is decoded from the origin block using the held restoration information, and when the decoded block is a block to be output, the encoded block is rotated by the predetermined angle and output. A recording medium, wherein when the original image is rotated by the predetermined angle, decoded data can be output in order from a block located above.
【請求項16】前記符号化画像データは、JPEGフォ
ーマットに基づき、 前記復元情報は、前記起点ブロックの離散コサイン変換
係数のDC成分に関する情報であることを特徴とする請
求項13〜15のいずれか1つに記載の記録媒体。
16. The coded image data is based on a JPEG format, and the restoration information is information on a DC component of a discrete cosine transform coefficient of the starting block. The recording medium according to one of the above.
JP25791499A 1999-09-10 1999-09-10 Image processing apparatus, image processing method, image forming apparatus, and recording medium recording program Expired - Fee Related JP3661520B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25791499A JP3661520B2 (en) 1999-09-10 1999-09-10 Image processing apparatus, image processing method, image forming apparatus, and recording medium recording program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25791499A JP3661520B2 (en) 1999-09-10 1999-09-10 Image processing apparatus, image processing method, image forming apparatus, and recording medium recording program

Publications (2)

Publication Number Publication Date
JP2001086318A true JP2001086318A (en) 2001-03-30
JP3661520B2 JP3661520B2 (en) 2005-06-15

Family

ID=17312956

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25791499A Expired - Fee Related JP3661520B2 (en) 1999-09-10 1999-09-10 Image processing apparatus, image processing method, image forming apparatus, and recording medium recording program

Country Status (1)

Country Link
JP (1) JP3661520B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005029863A1 (en) * 2003-09-16 2005-03-31 Fujitsu Limited Image processing display device and image processing display method
JP2006011776A (en) * 2004-06-25 2006-01-12 Nokia Corp Device and method for synthesizing data
JP2006099280A (en) * 2004-09-28 2006-04-13 Seiko Epson Corp Image processor, printer equipped with the same, and image processing method
JP2006306045A (en) * 2005-03-29 2006-11-09 Seiko Epson Corp Printing device, method of printing image and image printing program
JP2006325186A (en) * 2005-04-20 2006-11-30 Seiko Epson Corp Image processing apparatus
JP2007074412A (en) * 2005-09-07 2007-03-22 Ricoh Co Ltd Image processor for processing packing data of fixed length compressed image and attribute information
JP2009524361A (en) * 2006-01-18 2009-06-25 クゥアルコム・インコーポレイテッド Image processing in imaging systems.
US7570822B2 (en) 2004-09-28 2009-08-04 Seiko Epson Corporation Image processing apparatus, printer and control method of the image processing
JP2009260572A (en) * 2008-04-15 2009-11-05 Canon Inc Image decoder and control method thereof
JP2009303232A (en) * 2005-03-23 2009-12-24 Seiko Epson Corp Image processor, printer and image processing method
US8175401B2 (en) 2007-05-30 2012-05-08 Fuji Xerox Co., Ltd. Image processing apparatus and computer readable medium storing program therefor
US8369877B2 (en) 2009-12-25 2013-02-05 Fujifilm Corporation Image communication system, image server, method of controlling operation thereof and medium storing computer program for controlling operation thereof

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4214532B2 (en) 2006-04-25 2009-01-28 セイコーエプソン株式会社 Image processing apparatus and image processing method
JP2010114576A (en) 2008-11-05 2010-05-20 Seiko Epson Corp Image processing apparatus

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7965776B2 (en) 2003-09-16 2011-06-21 Fujitsu Semiconductor Limited Apparatus and method for processing and displaying pictures
WO2005029863A1 (en) * 2003-09-16 2005-03-31 Fujitsu Limited Image processing display device and image processing display method
JP4601340B2 (en) * 2004-06-25 2010-12-22 ノキア コーポレイション Data synthesizing apparatus and data synthesizing method
JP2006011776A (en) * 2004-06-25 2006-01-12 Nokia Corp Device and method for synthesizing data
JP2006099280A (en) * 2004-09-28 2006-04-13 Seiko Epson Corp Image processor, printer equipped with the same, and image processing method
JP4617808B2 (en) * 2004-09-28 2011-01-26 セイコーエプソン株式会社 Image processing apparatus, printer including the same, and image processing method
US7570822B2 (en) 2004-09-28 2009-08-04 Seiko Epson Corporation Image processing apparatus, printer and control method of the image processing
JP2009303232A (en) * 2005-03-23 2009-12-24 Seiko Epson Corp Image processor, printer and image processing method
JP2006306045A (en) * 2005-03-29 2006-11-09 Seiko Epson Corp Printing device, method of printing image and image printing program
JP2006325186A (en) * 2005-04-20 2006-11-30 Seiko Epson Corp Image processing apparatus
US7720293B2 (en) 2005-04-20 2010-05-18 Seiko Epson Corporation Image processing apparatus, printing apparatus and image processing method
JP4610450B2 (en) * 2005-09-07 2011-01-12 株式会社リコー Image processing apparatus for processing fixed length compressed image and packing data of attribute information
JP2007074412A (en) * 2005-09-07 2007-03-22 Ricoh Co Ltd Image processor for processing packing data of fixed length compressed image and attribute information
JP2009524361A (en) * 2006-01-18 2009-06-25 クゥアルコム・インコーポレイテッド Image processing in imaging systems.
US8175401B2 (en) 2007-05-30 2012-05-08 Fuji Xerox Co., Ltd. Image processing apparatus and computer readable medium storing program therefor
JP2009260572A (en) * 2008-04-15 2009-11-05 Canon Inc Image decoder and control method thereof
US8208743B2 (en) 2008-04-15 2012-06-26 Canon Kabushiki Kaisha Image decoding apparatus and control method
US8369877B2 (en) 2009-12-25 2013-02-05 Fujifilm Corporation Image communication system, image server, method of controlling operation thereof and medium storing computer program for controlling operation thereof

Also Published As

Publication number Publication date
JP3661520B2 (en) 2005-06-15

Similar Documents

Publication Publication Date Title
JP5558767B2 (en) Image processing apparatus and processing method thereof
JP5432450B2 (en) Lossless color image data compression using entropy coding
US8553301B2 (en) Image processing apparatus, method, and program product to perform color-reduction processing for a block
US20060072164A1 (en) Image processing apparatus, image processing method, program, and storage medium
JP3661520B2 (en) Image processing apparatus, image processing method, image forming apparatus, and recording medium recording program
US20110305385A1 (en) Image processing apparatus, image processing method, and computer-readable medium
US7734103B2 (en) Image processing apparatus and image processing method
JP2001143066A (en) Image processor, image-processing system and storage medium, image-processing method and recording medium
JP2006129471A (en) Image processing method and image processing apparatus
US7483578B2 (en) Image data decoding apparatus and method
JP2006262436A (en) Image processing apparatus
JP4329311B2 (en) Image forming apparatus and method, and image forming system
US8335387B2 (en) Streak compensation in compressed image paths
US20060215205A1 (en) Image processing apparatus, image processing method and image processing program
JP2004112695A (en) Image processing apparatus and processing method thereof
US8284450B2 (en) Streak compensation in compressed image paths
JP3815214B2 (en) Image processing apparatus and storage medium storing screen processing program
JP5441676B2 (en) Image processing apparatus and processing method thereof
JP4324892B2 (en) Serial printer and recording medium recording program
JP3997851B2 (en) Image coding apparatus and image coding program
JP4120947B2 (en) Serial printer and serial printer printing control method
JP2005332154A (en) Image processor and image processing method
JPH09200540A (en) Picture compression device
JP4692589B2 (en) Serial printer
JP2001080139A (en) Serial printer and recording medium having recorder program recording

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050201

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050301

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050314

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

R154 Certificate of patent or utility model (reissue)

Free format text: JAPANESE INTERMEDIATE CODE: R154

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080401

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090401

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090401

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100401

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110401

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110401

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120401

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130401

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130401

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140401

Year of fee payment: 9

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees