JP2006313985A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

Publication number
JP2006313985A
JP2006313985A JP2005135319A JP2005135319A JP2006313985A JP 2006313985 A JP2006313985 A JP 2006313985A JP 2005135319 A JP2005135319 A JP 2005135319A JP 2005135319 A JP2005135319 A JP 2005135319A JP 2006313985 A JP2006313985 A JP 2006313985A
Authority
JP
Japan
Prior art keywords
block
data
image
column
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005135319A
Other languages
Japanese (ja)
Inventor
Koichi Kitano
浩一 北野
Yoshiki Takeoka
良樹 竹岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP2005135319A priority Critical patent/JP2006313985A/en
Publication of JP2006313985A publication Critical patent/JP2006313985A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of minimizing an information amount required for reading of each block and decoding in reading compressed data in the unit of blocks of columnar orders each comprising M-rows and N-columns for rotating an image by 90 degrees and outputting the rotated image. <P>SOLUTION: The image processing apparatus creates compressed data with a data structure wherein a restart interval marker is inserted to just after a block of a final column of each row of blocks each comprising M-rows and N-columns and records the data to a flash ROM 30, and creates an information table wherein address information (at first, address information of restart interval marker) denoting a write address of compressed data of a concerned block associated with a block number of the block by one optional column and a cumulative value (0 at first) for calculating an absolute value of the compressed data of the concerned block are stored. When reading and decoding of the block by each column, the address information and the cumulative value are updated to attain reading and decoding of the block of a succeeding column. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は画像処理装置に係り、特に任意サイズの圧縮データを少ないメモリ容量で所望の画像サイズの出力画像にリサイズし、該出力画像を回転させて出力させることが可能な画像処理装置に関する。   The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that can resize compressed data of an arbitrary size into an output image having a desired image size with a small memory capacity, and rotate the output image to output the image.

一般に、画像の画素並び主走査方向と、出力主走査方向が90度異なる場合、画像データを90度回転する必要がある。画像データがJPEG(Joint Photographic Experts Group)画像に代表される可変長符号化圧縮されている場合は、伸張してから90度回転させる必要があり、展開画像を保存する大容量のメモリが必要となる。   In general, when the pixel arrangement main scanning direction of an image is different from the output main scanning direction by 90 degrees, it is necessary to rotate the image data by 90 degrees. When the image data is compressed by variable length coding represented by JPEG (Joint Photographic Experts Group) images, it is necessary to rotate the image 90 degrees after decompression, and a large-capacity memory for storing the developed image is required. Become.

これに対し、画像の一領域の抽出出力や回転出力が高速に行える画像データ圧縮伸張装置が提案されている(特許文献1)。   On the other hand, an image data compression / decompression apparatus that can extract and rotate a region of an image at high speed has been proposed (Patent Document 1).

この画像データ圧縮伸張装置は、n画素×n画素分の画像データが1単位とした複数個の矩形ブロックに分割され、各矩形ブロック単位で圧縮コードが生成され、各矩形ブロックに対する圧縮コードについての圧縮コードバッファにおけるアドレスを、各矩形ブロックに対して与えられているブロック番号に対応づけて記憶する圧縮コードテーブルと、圧縮コードテーブルに記憶された特定のブロック番号に基づいてアドレスを読み出して、読み出したアドレスに基づいて圧縮コードバッファに記憶された圧縮コードを読み出して伸張する回路と、伸張データを出力する回路とを持ち、必要な圧縮コードだけを読み出して伸張する処理が可能となり、回転などの処理が簡単にできるようになっている。
特開平8−317225号公報
In this image data compression / decompression apparatus, image data for n pixels × n pixels is divided into a plurality of rectangular blocks, each of which is a unit, and a compression code is generated for each rectangular block. The address in the compression code buffer is stored in association with the block number given to each rectangular block, and the address is read and read based on the specific block number stored in the compression code table. It has a circuit that reads and expands the compressed code stored in the compressed code buffer based on the specified address, and a circuit that outputs the decompressed data, so that only the necessary compressed code can be read and expanded. Processing is easy.
JP-A-8-317225

しかしながら、特許文献1に記載の画像データ圧縮伸張装置は、ラスタ形式で入力a×b画素の画像データをn×n画素の画像データを1単位とした複数の矩形ブロックに分割するとともに、その矩形ブロックに対して入力画像a×bの画像データ内での位置を示すブロック位置情報を割り当てる分割・割り当て手段によって割りつけるため、入力画像が圧縮データの場合、a×b画素の画像データに一旦伸張する必要があり、大きなメモリ容量が必要であるという問題がある。   However, the image data compression / decompression apparatus described in Patent Document 1 divides image data of input a × b pixels in a raster format into a plurality of rectangular blocks each having image data of n × n pixels as one unit, and the rectangle. Since the block position information indicating the position in the image data of the input image a × b is assigned to the block by the division / assignment means, if the input image is compressed data, it is temporarily expanded to image data of a × b pixels There is a problem that a large memory capacity is required.

また、特許文献1に記載のものは、各矩形ブロックに対して与えられているブロック番号に対応づけて全てのアドレスを記憶する必要がある。   Further, the device described in Patent Document 1 needs to store all addresses in association with the block numbers given to the respective rectangular blocks.

更に、JPEG画像データは、前の符号化単位(ブロック)情報に対する差分を符号化した情報(周波数成分のDC値)を含んでいるため、各ブロックのDC値を保存し、抽出する必要がある。   Furthermore, since the JPEG image data includes information (DC value of the frequency component) obtained by encoding the difference from the previous encoding unit (block) information, the DC value of each block needs to be stored and extracted. .

本発明はこのような事情に鑑みてなされたもので、画像を90度回転させて出力するためにM行N列のブロック単位の圧縮データを列順に読み出す際に、各ブロックの読み出し及び復号に必要な情報量を最小限にすることができ、また、伸張圧縮、画像回転等の画像処理を小さい容量のメモリを使用して実現することができる画像処理装置を提供することを目的とする。   The present invention has been made in view of such circumstances, and when reading compressed data in block order of M rows and N columns in order to rotate and output an image by 90 degrees, it is possible to read and decode each block. An object of the present invention is to provide an image processing apparatus capable of minimizing a necessary amount of information and capable of realizing image processing such as expansion / compression and image rotation using a small capacity memory.

前記目的を達成するために請求項1に係る画像処理装置は、M行N列のブロックに分割された1コマ分の画像データを、1行1列のブロックからM行N列のブロックまでn×n画素からなるブロック単位で順次圧縮するとともに、各行の最終列のブロックの直後にリスタートインターバルマーカを挿入したデータ構造の圧縮データを作成する圧縮手段と、前記圧縮手段によって圧縮された1コマ分の圧縮データを記憶するメモリと、任意の1列分のブロックのブロック番号に関連づけて該ブロックの圧縮データの書込位置を示す位置情報と、そのブロックの圧縮データの先頭値から絶対値を算出するための累算値とを記憶する情報テーブルと、第1列のブロックのブロック番号に関連づけて各行の最終列のブロックの直後に挿入されたリスタートインターバルマーカの書込位置を示す位置情報及び0の累算値を前記情報テーブルに書き込むとともに、前記位置情報及び累算値を更新させる情報テーブル作成手段と、前記情報テーブルに記録された位置情報に基づいて各列のブロックの圧縮データを読み出す読出手段と、前記読み出したブロックの圧縮データを前記情報テーブルに記憶された累算値を利用して復号する復号手段と、所望の画像サイズの出力画像のデータ量よりも小さい容量のバッファ手段と、前記復号手段によって復号されたn×n画素のブロック内の画像データの出力順を入れ替えて前記バッファ手段に書き込む書込手段と、を備え、前記情報テーブル作成手段は、前記読出手段によって各行の第i列(1≦i≦N)のブロックの圧縮データが読み出され、前記復号手段による復号が完了すると、前記情報テーブルの各行の第i列のブロックの圧縮データの読み出しに使用した位置情報を各行の第i+1列のブロックの圧縮データの書込位置を示す位置情報に更新するとともに、前記情報テーブルに記録された累算値を各行の第1列から第i列までのブロックの圧縮データの先頭値の累算値に更新し、前記バッファ手段から90度回転させた画像データを出力可能にすることを特徴としている。   In order to achieve the above object, an image processing apparatus according to claim 1 divides image data for one frame divided into blocks of M rows and N columns from a block of 1 row and 1 column to a block of M rows and N columns. A compression means for creating compressed data having a data structure in which a restart interval marker is inserted immediately after a block in the last column of each row, and one frame compressed by the compression means; A memory for storing the compressed data of the block, position information indicating the writing position of the compressed data of the block in association with the block number of the block for an arbitrary column, and an absolute value from the first value of the compressed data of the block An information table for storing an accumulated value for calculation, and a lister inserted immediately after the last column block of each row in association with the block number of the first column block Information table creation means for writing position information indicating the write position of the interval marker and an accumulated value of 0 to the information table and updating the position information and accumulated value; and position information recorded in the information table Reading means for reading the compressed data of the blocks in each column based on the above, decoding means for decoding the compressed data of the read blocks using the accumulated value stored in the information table, and output of a desired image size Buffer means having a capacity smaller than the data amount of the image, and writing means for changing the output order of the image data in the block of n × n pixels decoded by the decoding means and writing to the buffer means, The information table creation means reads the compressed data of the i-th column (1 ≦ i ≦ N) block of each row by the reading means, and the decoding When the decoding by the stage is completed, the position information used for reading the compressed data of the block in the i-th column in each row of the information table is updated to the position information indicating the writing position of the compressed data in the block in the i + 1-th column in each row. At the same time, the accumulated value recorded in the information table is updated to the accumulated value of the first value of the compressed data of the blocks from the first column to the i-th column of each row and rotated by 90 degrees from the buffer means. It is characterized by enabling output.

まず、M行N列のブロックの各行の最終列のブロックの直後にリスタートインターバルマーカを挿入したデータ構造の圧縮データを作成するようにしたため、リスタートインターバルマーカの個数を最小限(M行分の個数)にすることができ、メモリに記憶させる1コマ分の圧縮データのデータ量が大きくならないようにすることができる。尚、通常のJPEG圧縮データでは、数MCU(最小符号化単位)ごとにリスタートインターバルマーカが挿入されている。   First, compressed data having a data structure in which a restart interval marker is inserted immediately after the last column block of each row of M rows and N columns is created, so the number of restart interval markers is minimized (M rows). The amount of compressed data for one frame stored in the memory can be prevented from becoming large. In normal JPEG compressed data, a restart interval marker is inserted every several MCUs (minimum encoding unit).

出力画像を90度回転させるために第1列目のブロックの圧縮データをメモリから読み出す場合には、前記情報テーブルに最初に書き込んだリスタートインターバルマーカの書込位置を示す位置情報に基づいて第1列目のブロックの圧縮データを読み出す。尚、第1列目のブロックは、それぞれリスタートインターバルマーカ直後のブロックであるため、その圧縮データの先頭の直流値は絶対値である。   When the compressed data of the block in the first column is read from the memory in order to rotate the output image by 90 degrees, the first data is written based on the position information indicating the writing position of the restart interval marker written in the information table first. Read the compressed data of the block in the first column. Since the blocks in the first column are blocks immediately after the restart interval marker, the DC value at the head of the compressed data is an absolute value.

従って、第1列目のブロックは、他のブロックの先頭の直流値を必要とせずに復号することができる。また、第1列目のブロックの圧縮データの読み出しが行われると、第2列目のブロックの先頭の書込位置を示す位置情報(アドレス、ビット位置)を検知することができるため、前記リスタートインターバルマーカの位置情報を前記検知した位置情報で更新する。   Therefore, the block in the first column can be decoded without requiring the first DC value of other blocks. When the compressed data of the block in the first column is read, position information (address, bit position) indicating the first writing position of the block in the second column can be detected. The position information of the start interval marker is updated with the detected position information.

また、第2列目のブロックの直前のブロックまでの直流値の累算値として第1列目のブロックの直流値を前記情報テーブルに記録(0の値が記録されている累算値を第1列目のブロックの直流値に更新)する。これにより、前記更新された情報テーブルに基づいて第2列目のブロックの読み出しができるとともに、第2列目のブロックの直流値(直前のブロックの直流値との差分値)と前記情報テーブル上の更新された累算値とを加算することで、第2列目のブロックの直流値の絶対値を求めることができ、第2列目のブロックを復号することができる。また、第2列目のブロックの読み出し・復号後に前記情報テーブルの位置情報及び累算値は、第3列目のブロック用に更新される。これをM列まで繰り返すことにより、1列目からM列まで列順にブロックを読み出して復号することができ、90度回転させた画像データを出力することができる。   Further, the DC value of the block in the first column is recorded in the information table as the accumulated value of the DC value up to the block immediately before the block in the second column (the accumulated value in which the value of 0 is recorded is the first value). Update to the DC value of the block in the first column). Thereby, the block of the second column can be read based on the updated information table, and the DC value of the block of the second column (difference value from the DC value of the immediately preceding block) and the information table Is added to the updated accumulated value, the absolute value of the DC value of the block in the second column can be obtained, and the block in the second column can be decoded. Further, after reading / decoding the block in the second column, the position information and the accumulated value in the information table are updated for the block in the third column. By repeating this up to M columns, blocks can be read and decoded in order from the first column to M columns, and image data rotated by 90 degrees can be output.

請求項2に示すように請求項1に記載の画像処理装置において、任意サイズの画像データの圧縮データを1コマ分連続的に受信するインターフェース手段と、n×n画素のブロック単位で圧縮データを伸張する伸張手段と、前記伸張手段によって伸張されたn×n画素の画像データを一時記憶する伸張データバッファ手段と、前記伸張データバッファ手段に記憶されたn×n画素の画像データを任意サイズに変換処理し、前記バッファ手段に出力する解像度変換手段と、を更に備え、前記圧縮手段は、前記バッファ手段に処理可能な単位の画像データが保持されると、n×n画素のブロック単位で順次圧縮したデータ構造の圧縮データを作成することを特徴としている。   According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the interface means for continuously receiving the compressed data of the image data of an arbitrary size for one frame, and the compressed data in units of blocks of n × n pixels. Decompression means for decompressing, decompression data buffer means for temporarily storing image data of n × n pixels decompressed by the decompression means, and image data of n × n pixels stored in the decompression data buffer means to an arbitrary size Resolution conversion means for performing conversion processing and outputting to the buffer means, and the compression means sequentially holds image data in units that can be processed in the buffer means in units of blocks of n × n pixels. It is characterized by creating compressed data having a compressed data structure.

即ち、前記インターフェース手段から任意サイズの画像データの圧縮データを1コマ分連続的に受信し、この圧縮データを受信しながらその圧縮データを伸張、解像度変換、及び解像度変換後の画像データの圧縮処理を行ってメモリに保存する。ここで、解像度変換する際に、前記受信した圧縮データをn×n画素のブロック単位で伸張し、この伸張したn×n画素の画像データを伸張データバッファ手段に一時保持する。この伸張データバッファ手段に保持されたブロック単位のn×n画素の画像データは、解像度変換手段にて任意の倍率の解像度に変換されて解像度変換出力バッファ手段に一時保持される。n×n画素のブロック単位で伸張、及び解像度変換の処理を行うため、バッファ手段として大きなメモリ容量を必要としない。そして、前記解像度変換された画像データが前記バッファ手段に処理可能な単位の画像データとして保持されると、n×n画素のブロック単位で圧縮される。   That is, compressed data of image data of an arbitrary size is continuously received from the interface means for one frame, and the compressed data is decompressed while receiving the compressed data, resolution conversion, and compression processing of the image data after resolution conversion. To save to memory. Here, at the time of resolution conversion, the received compressed data is expanded in units of n × n pixels, and the expanded image data of n × n pixels is temporarily stored in the expanded data buffer means. The n × n pixel image data in units of blocks held in the decompressed data buffer means is converted into a resolution of an arbitrary magnification by the resolution conversion means and temporarily held in the resolution conversion output buffer means. Since expansion and resolution conversion are performed in units of n × n pixel blocks, a large memory capacity is not required as a buffer unit. When the resolution-converted image data is stored in the buffer means as image data in a unit that can be processed, it is compressed in block units of n × n pixels.

請求項3に示すように請求項2に記載の画像処理装置において、前記解像度変換手段は、画像サイズを縮小又は拡大する倍率a/b(a,b:自然数)に応じて補間演算に使用する補間係数が記憶された補間テーブルであって、倍率a/bの分母bの画素数を1周期として分子aの数だけ補間係数の組み合わせを有する補間テーブルと、前記1コマ分の画像データの画像サイズと所望の出力画像の画像サイズとに基づいて画像サイズを縮小又は拡大する倍率a/bを算出し、この算出した倍率a/bに基づいて前記補間テーブルに補間係数を記憶させ、又は複数の補間テーブルから前記算出した倍率a/bに対応する補間テーブルを補間演算に使用する補間テーブルとして設定するテーブル設定手段とを含み、前記伸張データバッファ手段に記憶されたn×n画素の画像データを前記補間テーブルの補間係数に基づいて補間演算して解像度変換することを特徴としている。これにより、n×n画素のブロック単位で解像度変換を行うことができ、解像度変換時に1コマ分の全画像データを保持しておくメモリを必要としない。   According to a third aspect of the present invention, in the image processing apparatus according to the second aspect, the resolution conversion means is used for the interpolation calculation in accordance with a magnification a / b (a, b: natural number) for reducing or enlarging the image size. An interpolation table in which interpolation coefficients are stored, the interpolation table having a combination of interpolation coefficients corresponding to the number of numerators, where the number of pixels of the denominator b of the magnification a / b is one cycle, and an image of the image data for one frame A magnification a / b for reducing or enlarging the image size is calculated based on the size and the image size of the desired output image, and an interpolation coefficient is stored in the interpolation table based on the calculated magnification a / b, or plural A table setting means for setting an interpolation table corresponding to the calculated magnification a / b from the interpolation table as an interpolation table to be used for the interpolation calculation, and the decompressed data buffer means The image data of 憶 been n × n pixels by interpolation operation on the basis of the interpolation coefficient of the interpolation table is characterized in that the resolution conversion. Thereby, resolution conversion can be performed in units of blocks of n × n pixels, and a memory for holding all image data for one frame at the time of resolution conversion is not required.

請求項4に示すように請求項3に記載の画像処理装置において、前記解像度変換手段は、前記任意サイズの画像データをM行N列のブロックに分割してなる複数のブロックのi行j列(1≦i≦M,1≦j≦N)のブロックのn×n画素の画像データの水平方向の解像度変換時に、i行j列のブロックのn列の画像データと該n列の画像データに対応する前記補間テーブルの1周期上の位置とをi行j+1列のブロックの画像データの解像度変換まで保持して前記i行j+1列のブロックの画像データの解像度変換に使用し、垂直方向の解像度変換時にi行j列のブロックのn行の画像データと該n行の画像データに対応する前記補間テーブルの1周期上の位置とをi+1行j列のブロックの画像データの解像度変換まで保持して前記i+1行j列のブロックの画像データの解像度変換に使用することを特徴としている。これにより、n×n画素のブロック単位で解像度変換を行っても1コマ分の画像の水平方向及び垂直方向に連続性をもった解像度変換を行うことができる。   4. The image processing apparatus according to claim 3, wherein the resolution conversion means includes a plurality of blocks of i rows and j columns obtained by dividing the image data of an arbitrary size into blocks of M rows and N columns. At the time of horizontal resolution conversion of the image data of n × n pixels of the block of (1 ≦ i ≦ M, 1 ≦ j ≦ N), the image data of the n columns of the block of i rows and j columns and the image data of the n columns Is used for the resolution conversion of the image data of the block of i row j + 1 column by holding the position of one cycle of the interpolation table corresponding to 1 to the resolution conversion of the image data of the block of i row j + 1 column. At the time of resolution conversion, the image data of n rows of the block of i rows and j columns and the position in one cycle of the interpolation table corresponding to the image data of n rows are held until the resolution conversion of the image data of the blocks of i + 1 rows and j columns. I + 1 It is characterized by using the resolution conversion of the image data blocks of the j-th column. Thereby, even if resolution conversion is performed in units of n × n pixel blocks, it is possible to perform resolution conversion with continuity in the horizontal and vertical directions of an image for one frame.

本発明によれば、画像を90度回転させて出力するためにM行N列のブロック単位の圧縮データを列順に読み出す際に、各ブロックの読み出し及び復号に必要な情報量を最小限にすることができる。また、連続的に受信する任意サイズの画像データの圧縮データの伸張、解像度変換(リサイズ)、圧縮、90度回転等の画像処理を行う際に最小限のメモリ容量(ASIC(特定用途向け集積回路)に搭載可能な少ないメモリ容量)で実現することができる。   According to the present invention, when the compressed data in units of blocks of M rows and N columns is read in the column order in order to output the image after being rotated by 90 degrees, the amount of information necessary for reading and decoding each block is minimized. be able to. In addition, a minimum memory capacity (ASIC (application-specific integrated circuit) is required for performing image processing such as decompression, resolution conversion (resizing), compression, and 90-degree rotation of compressed data of arbitrary size image data received continuously. ) With a small memory capacity).

以下添付図面に従って本発明に係る画像処理装置の好ましい実施の形態について詳説する。
[画像処理装置の全体構成]
図1は本発明に係る画像処理装置の実施の形態を示すブロック図である。
Hereinafter, preferred embodiments of an image processing apparatus according to the present invention will be described in detail with reference to the accompanying drawings.
[Overall configuration of image processing apparatus]
FIG. 1 is a block diagram showing an embodiment of an image processing apparatus according to the present invention.

この画像処理装置は、外部から入力する画像データを画像処理してプリンタの印画ヘッドに出力するもので、ASIC10と、フラッシュROM30とから構成され、ASIC10にて画像処理されたプリントデータが印画ヘッド32に出力される。   This image processing apparatus performs image processing on image data input from the outside and outputs it to a printing head of a printer. The image processing apparatus includes an ASIC 10 and a flash ROM 30, and print data image-processed by the ASIC 10 is printed on the printing head 32. Is output.

ASIC10は、主としてインターフェース部12と、中央処理装置(CPU)14と、ワークメモリ16と、JPEG伸張ブロック18と、伸張データバッファ20と、Hリサイズバッファ22と、Vリサイズバッファ24と、リサイズブロック26と、プリント制御部28とから構成されている。   The ASIC 10 mainly includes an interface unit 12, a central processing unit (CPU) 14, a work memory 16, a JPEG expansion block 18, an expansion data buffer 20, an H resize buffer 22, a V resize buffer 24, and a resize block 26. And a print control unit 28.

インターフェース部12は、IrDA、ブルートゥース、無線LAN、UWB(Ultra Wide Band)、USB(Universal Serial Bus)、ワイヤレスUSB、IEEE1394、SCSI、RS232Cなどの無線及び有線のインターフェースが考えられる。   The interface unit 12 may be a wireless or wired interface such as IrDA, Bluetooth, wireless LAN, UWB (Ultra Wide Band), USB (Universal Serial Bus), wireless USB, IEEE 1394, SCSI, and RS232C.

CPU14は、各回路を統括制御するもので、データや画像の解析、解析結果に基づく必要な情報の各回路への設定、ソフトウエアによるJPEG圧縮処理、及びデータの読み書き制御等を行う。   The CPU 14 performs overall control of each circuit, and performs analysis of data and images, setting of necessary information based on the analysis result to each circuit, JPEG compression processing by software, data read / write control, and the like.

ワークメモリ16は、所望の画像サイズ(この実施の形態では、VGA(640×480画素の画像サイズ))の出力画像の非圧縮のデータ量よりもメモリ容量の小さいメモリから構成されており、CPU14の作業領域、及び後述する縮小画像を一時記憶する記憶領域として機能する。   The work memory 16 includes a memory having a memory capacity smaller than the uncompressed data amount of an output image having a desired image size (in this embodiment, VGA (image size of 640 × 480 pixels)). And a storage area for temporarily storing a reduced image described later.

JPEG伸張ブロック18は、ハフマン復号部、逆量子化部(IQ部)、及び逆離散コサイン変換部(IDCT部)から構成され、CPU14から送られてくる主走査・副走査方向解像度、色成分数、各色サンプリングファクタ(SF)、各色量子化テーブル(IQNT)、各色ハフマン符号定義テーブル(DHT)に基づいてJPEG圧縮された圧縮データを最小符号化単位(MCU)で伸張する。即ち、入力する圧縮データをハフマン復号して量子化されたDCT係数を生成し、この生成した量子化されたDCT係数を逆量子化部にて逆量子化してDCT係数を生成し、更にこの生成したDCT係数をIDCT部にてIDCT処理して画像データを生成する。   The JPEG decompression block 18 includes a Huffman decoding unit, an inverse quantization unit (IQ unit), and an inverse discrete cosine transform unit (IDCT unit), and the main scanning / sub-scanning direction resolution and the number of color components sent from the CPU 14. Based on each color sampling factor (SF), each color quantization table (IQNT), and each color Huffman code definition table (DHT), JPEG-compressed compressed data is expanded in a minimum coding unit (MCU). That is, the input compressed data is Huffman decoded to generate a quantized DCT coefficient, and the generated quantized DCT coefficient is inversely quantized by an inverse quantization unit to generate a DCT coefficient. The DCT coefficient thus obtained is subjected to IDCT processing in an IDCT unit to generate image data.

伸張データバッファ20は、n×n画素(この実施の形態では、8×8画素)の1ブロック分の画像データのデータ容量を有する各色別のダブルバッファで構成され、前記JPEG伸張ブロック18にて伸張されたデータが格納される。この伸張データバッファ20に格納された8×8画素は、リサイズブロック26に転送される。   The decompression data buffer 20 is composed of a double buffer for each color having a data capacity of image data for one block of n × n pixels (8 × 8 pixels in this embodiment). Stores the decompressed data. The 8 × 8 pixels stored in the decompressed data buffer 20 are transferred to the resize block 26.

Hリサイズバッファ22は、8×8画素の画像データが水平方向(H方向)に解像度変換(リサイズ)された画像データを一時保持するバッファであり、Vリサイズバッファ24は、H方向及び垂直方向(V方向)にリサイズされた画像データを一時保持するとともに、プリント出力用の出力画像(複数ライン分の画像データ)を一時保持するもので、出力画像の非圧縮のデータ量よりもメモリ容量の小さいメモリから構成されている。この実施の形態では、Vリサイズバッファ24は、色ごとに640W×32ライン分の画像データを保持することができるようになっている。   The H resize buffer 22 is a buffer that temporarily holds image data obtained by converting the resolution of 8 × 8 pixel image data in the horizontal direction (H direction), and the V resize buffer 24 is provided in the H direction and the vertical direction ( The image data resized in the V direction) is temporarily stored, and the output image for printing (image data for a plurality of lines) is temporarily stored. The memory capacity is smaller than the uncompressed data amount of the output image. It consists of memory. In this embodiment, the V resize buffer 24 can hold image data for 640 W × 32 lines for each color.

リサイズブロック26は、伸張データバッファ20から転送される8×8画素の1ブロック単位でH方向及びV方向のリサイズを実施する。即ち、伸張データバッファ20に保持されたデータは、リサイズブロック26に転送され、ここで、まずH方向のリサイズが実施される。H方向にリサイズされたデータは、Hリサイズバッファ22に一時保持される。このHリサイズバッファ22にH方向に8ドット以上のデータが蓄積されると、H方向8ドット単位で再度リサイズブロック26に転送される。転送されたデータは、H方向と同じリサイズ回路を利用してV方向のリサイズが実施されたのち、Vリサイズバッファ24に転送される。尚、H方向とV方向のリサイズを別々のリサイズ回路で実施し、逐次処理を実施してもよい。   The resizing block 26 performs resizing in the H direction and the V direction in units of 8 × 8 pixel blocks transferred from the decompressed data buffer 20. That is, the data held in the decompressed data buffer 20 is transferred to the resize block 26, where the resize in the H direction is first performed. The data resized in the H direction is temporarily held in the H resize buffer 22. When data of 8 dots or more is accumulated in the H resize buffer 22 in the H direction, it is transferred again to the resize block 26 in units of 8 dots in the H direction. The transferred data is resized in the V direction using the same resize circuit as in the H direction, and then transferred to the V resize buffer 24. Note that the resizing in the H direction and the V direction may be performed by separate resizing circuits, and the sequential processing may be performed.

プリント制御部28は、3D−LUT(3次元ルックアップテーブル)を有し、Vリサイズバッファ24からプリンタの副走査方向1列ごとのYCbCr表色系の輝度データY、色差データCb、Crを入力すると、この輝度データY、色差データCb、Crを、3D−LUTによってRGB表色系のR,G,Bデータに変換するとともに、CPU14によって作成された画像処理パラメータによる画像処理を実施したのち、処理済みのR,G,Bデータを印画ヘッド32に送る。   The print control unit 28 has a 3D-LUT (three-dimensional lookup table) and inputs YCbCr color system luminance data Y and color difference data Cb and Cr for each column in the sub-scanning direction of the printer from the V resize buffer 24. Then, the luminance data Y and the color difference data Cb and Cr are converted into RGB color system R, G and B data by a 3D-LUT, and image processing is performed using image processing parameters created by the CPU 14. The processed R, G, B data is sent to the print head 32.

一方、フラッシュROM30は、マイコンプログラムを記憶するとともに、所望の画像サイズ(VGA)の出力画像の圧縮データを1コマ分だけ記憶することができる空き容量を有している。
[プリント部]
図2は印画ヘッド32によって画像が印画されるプリント媒体(インスタントフイルム)50を示す斜視図である。
On the other hand, the flash ROM 30 has a free capacity capable of storing a microcomputer program and storing compressed data of an output image having a desired image size (VGA) for one frame.
[Print section]
FIG. 2 is a perspective view showing a print medium (instant film) 50 on which an image is printed by the print head 32.

このインスタントフイルム50は、図2に示すように感光シート51と、この感光シート51の反対側の受像シート52と、これらの感光シート51と受像シート52との上方に位置し、現像液を封入した現像液ポッド53と、感光シート51と受像シート52との下方に位置し、余った現像液を吸収するトラップ部54とから構成されている。そして、感光シート51を露光することによって光化学的に潜像が形成された後、この感光シート51と受像シート52とを重ね合わせ、その両者間に現像処理液を展開しながら両シートを加圧することによって受像シート52にポジ画像が転写される。   As shown in FIG. 2, the instant film 50 is located above the photosensitive sheet 51, the image receiving sheet 52 opposite to the photosensitive sheet 51, and the photosensitive sheet 51 and the image receiving sheet 52, and encloses the developer. The developer pod 53 and a trap portion 54 that is located below the photosensitive sheet 51 and the image receiving sheet 52 and absorbs the excess developer. Then, after a latent image is formed photochemically by exposing the photosensitive sheet 51, the photosensitive sheet 51 and the image receiving sheet 52 are superposed, and both sheets are pressurized while developing a developing solution therebetween. As a result, the positive image is transferred to the image receiving sheet 52.

図3はプリント部を示す要部斜視図である。   FIG. 3 is a perspective view showing a main part of the printing unit.

同図において、プリント部には、印画ヘッド32が配置されるとともに、印画ヘッド32の上流側に一対の展開ローラ60が配置されている。また、前記インスタントフイルム50が複数枚収容可能なフイルムパック56は、プリント部の所定の位置にセットされる。尚、印画ヘッド32は、図3に示すように、その長手方向(主走査方向)がインスタントフイルム50の搬送方向(矢印Aで示す副走査方向)に対して直交するように、フイルムパック56の露光開口の上端近くに固定配置されている。   In the drawing, a print head 32 is disposed in the print unit, and a pair of developing rollers 60 are disposed on the upstream side of the print head 32. Further, the film pack 56 capable of accommodating a plurality of the instant films 50 is set at a predetermined position of the print unit. As shown in FIG. 3, the print head 32 has a longitudinal direction (main scanning direction) perpendicular to the transport direction of the instant film 50 (sub-scanning direction indicated by the arrow A). It is fixedly arranged near the upper end of the exposure aperture.

インスタントフイルム50への印画時には、フイルムパック56内の最上位置のインスタントフイルム50が、図示しない送り出し機構により副走査方向(矢印Aの方向)に一定の速度で送り出されるとともに、印画ヘッド32によって1列ごとにR,G,B光の露光が行われる。   At the time of printing on the instant film 50, the uppermost instant film 50 in the film pack 56 is fed at a constant speed in the sub-scanning direction (direction of arrow A) by a feeding mechanism (not shown), and one row is printed by the printing head 32. R, G, B light exposure is performed every time.

インスタントフイルム50が一定量送り出されると、インスタントフイルム50の先端
(像液ポッド53側の先端)が一対の展開ローラ60に挟持される。そして、インスタントフイルム50は、展開ローラ60によって適正な押圧力が加えられるとともに、一定の速度で引き出される。これにより、像液ポッド53内の現像液が均一に展延される。
When the instant film 50 is fed out by a certain amount, the tip of the instant film 50 (tip on the image liquid pod 53 side) is sandwiched between the pair of developing rollers 60. The instant film 50 is pulled out at a constant speed while an appropriate pressing force is applied by the developing roller 60. As a result, the developer in the image liquid pod 53 is spread uniformly.

図4は印画ヘッド32の断面図である。同図に示すように、この印画ヘッド32は、主としてR、G、Bの発光ダイオード33R、33G、33Bと、ライトガイド34と、反射体35と、液晶シャッタ36と、微小レンズアレイ37とから構成されている。   FIG. 4 is a sectional view of the printing head 32. As shown in the figure, the printing head 32 is mainly composed of R, G, and B light emitting diodes 33R, 33G, and 33B, a light guide 34, a reflector 35, a liquid crystal shutter 36, and a minute lens array 37. It is configured.

R、G、Bの発光ダイオード33R、33G、33Bは、1ライン分の画像光をインスタントフイルム50に露光する際に順番に点灯制御される。各発光ダイオードから出射されたR、G、又はB光は、主走査方向に延出したライトガイド34に導かれ、更に反射体35によって液晶シャッタ36に入射する。   The R, G, and B light emitting diodes 33R, 33G, and 33B are controlled to be turned on in order when the instant film 50 is exposed to one line of image light. The R, G, or B light emitted from each light emitting diode is guided to the light guide 34 extending in the main scanning direction, and is incident on the liquid crystal shutter 36 by the reflector 35.

液晶シャッタ36は、画素に対応する微小な液晶セグメントが配列されて構成されており、各液晶セグメントは、1ラインのR、G、Bの画像データに応じて透過率が制御される。即ち、液晶シャッタ36の各液晶セグメントは、R、G、Bの順次光に応じて線順次で透過率を制御し、1ラインにつき3回、各画素ごとの透過率を制御する。そして、上記液晶シャッタ36から出射された光は、微小レンズアレイ37を介してインスタントフイルム37の露光面に結像される。   The liquid crystal shutter 36 is configured by arranging minute liquid crystal segments corresponding to pixels, and the transmittance of each liquid crystal segment is controlled in accordance with one line of R, G, and B image data. In other words, the liquid crystal segments of the liquid crystal shutter 36 control the transmittance in a line-sequential manner according to the sequential light of R, G, and B, and control the transmittance for each pixel three times per line. The light emitted from the liquid crystal shutter 36 is imaged on the exposure surface of the instant film 37 via the micro lens array 37.

前記プリント制御部28から印画ヘッド32に出力されるR,G,Bデータは、R,G,Bごとに印画ヘッド32の液晶シャッタ36の透過率を制御するために使用される。
[画像処理]
上記構成の画像処理装置は、インターフェース部10から任意サイズの画像データの圧縮データ(JPEGデータ)を受信するデータ受信時と、受信した画像を解析して画像処理パラメータを生成するデータ処理時と、画像処理パラメータに基づいて出力画像を処理して印画ヘッド32に出力する印画時とに対応する画像処理を順次実施する。
《A.データ受信時》
(1)ヘッダ情報解析
図5は画像処理装置によるヘッダ情報解析時のCPU動作を示すフローチャートである。
The R, G, B data output from the print control unit 28 to the print head 32 is used to control the transmittance of the liquid crystal shutter 36 of the print head 32 for each of R, G, B.
[Image processing]
The image processing apparatus having the above configuration includes data reception for receiving compressed data (JPEG data) of arbitrary size image data from the interface unit 10, data processing for analyzing the received image and generating image processing parameters, Based on the image processing parameters, the image processing corresponding to the time of printing that processes the output image and outputs it to the print head 32 is sequentially performed.
<< A. When receiving data
(1) Header Information Analysis FIG. 5 is a flowchart showing the CPU operation at the time of header information analysis by the image processing apparatus.

図5において、任意サイズの画像データの圧縮データ(JPEGデータ)は、インターフェース部10(図1参照)を介して1コマ分連続的に受信される(ステップS10)。
<JPEGデータのデータ構造>
ここで、JPEGデータのデータ構造について説明する。図9に示すように、JPEGデータの冒頭のヘッダ部には、主走査・副走査方向解像度(画像サイズ)、色成分数、各色サンプリングファクタ(SF)、各色量子化テーブル(IQNT)、各色ハフマン符号定義テーブル(DHT)が記録され、続いて、JPEGデータの本体の画像データが最小符号化単位(MCU)ごとに圧縮されて順次記録されている。
即ち、図10(A)に示すように1フレーム分の画像データは、1フレームの左上から右下まで1MCUごとにスキャンされ、1MCUごとに圧縮されて順次記録されている。
In FIG. 5, compressed data (JPEG data) of image data of an arbitrary size is continuously received for one frame via the interface unit 10 (see FIG. 1) (step S10).
<Data structure of JPEG data>
Here, the data structure of JPEG data will be described. As shown in FIG. 9, the header portion at the beginning of JPEG data includes main scanning / sub-scanning direction resolution (image size), number of color components, each color sampling factor (SF), each color quantization table (IQNT), and each color Huffman. A code definition table (DHT) is recorded, and then the image data of the main body of JPEG data is compressed and sequentially recorded for each minimum coding unit (MCU).
That is, as shown in FIG. 10A, image data for one frame is scanned every MCU from the upper left to the lower right of one frame, and is compressed and recorded sequentially for each MCU.

MCUは、図10(B)に示すように16×16画素を符号化の最小単位としており、更に離散コサイン変換(DCT)のサイズは8×8であるため、図10(C)に示すように輝度データYは、4つのブロックY1,Y2,Y3,Y4に、色差データCr,Cbは、それぞれ2つのブロックCr1,Cr2,及びCb1,Cb2に区分されている。   As shown in FIG. 10 (B), the MCU uses 16 × 16 pixels as the minimum unit for encoding and the size of the discrete cosine transform (DCT) is 8 × 8. The luminance data Y is divided into four blocks Y1, Y2, Y3, and Y4, and the color difference data Cr and Cb are divided into two blocks Cr1, Cr2, and Cb1 and Cb2, respectively.

8×8画素のブロックは、2次元DCTが行われ、このDCT係数が量子化テーブルの各要素でそれぞれ除算され、余りが丸められる。このようにして量子化されたDCT係数は、ハフマン符号定義テーブルで符号化される(符号の出現確率に応じて符号の割り当てを行なう)。   A block of 8 × 8 pixels is subjected to two-dimensional DCT, and the DCT coefficient is divided by each element of the quantization table, and the remainder is rounded. The DCT coefficients quantized in this way are encoded by the Huffman code definition table (codes are assigned according to the appearance probability of the codes).

そして、図9に示すように各ブロックの先頭値(そのブロック全体の明暗レベルを示す直流値(DC値))に続いて交流値(AC値)が記録されている。尚、隣接するブロックのDC値は、近い値を持つため、通常、直前ブロックのDC成分との差分値が記録されている。   Then, as shown in FIG. 9, an AC value (AC value) is recorded following the head value of each block (DC value (DC value) indicating the lightness level of the entire block). Since the DC values of adjacent blocks have close values, a difference value from the DC component of the immediately preceding block is usually recorded.

また、図9に示すように複数のMCUごとにリスタートインターバルマーカ(RIT)が記録されている。このリスタートインターバルマーカの直後のブロックのDC値は、絶対値が記録されている。   Further, as shown in FIG. 9, a restart interval marker (RIT) is recorded for each of a plurality of MCUs. The absolute value of the DC value of the block immediately after the restart interval marker is recorded.

尚、図10(C)に示した画像フォーマットは、画素を構成する色差データCr,Cbのデータ量をそれぞれ水平方向に2分の1に半減させ、Y=4,Cr=2,Cb=2の4:2:2の比率になっている。これは、人間の目は色に対して鈍感なため、色情報が半減されても画質の低下が感じられないことを利用している。また、図10(C)に示した4:2:2フォーマットの他に、4:2:0(4:1:1)、4:4:4(1:1:1)フォーマットがあり、本発明はいずれのフォーマットであっても適用できる。   In the image format shown in FIG. 10C, the data amounts of the color difference data Cr and Cb constituting the pixel are each halved in the horizontal direction, and Y = 4, Cr = 2, and Cb = 2. The ratio is 4: 2: 2. This utilizes the fact that the human eye is insensitive to color, so that even if the color information is halved, no deterioration in image quality is perceived. In addition to the 4: 2: 2 format shown in FIG. 10C, there are 4: 2: 0 (4: 1: 1) and 4: 4: 4 (1: 1: 1) formats. The invention can be applied to any format.

図5に戻って、インターフェース部12から受信されたJPEGデータの一部がワークメモリ16に一時保持される。CPU14は、ヘッダ部がワークメモリ16に保持されると、ヘッダ情報の解析を行い(ステップS12)、少なくとも主走査・副走査方向解像度、色成分数、各色サンプリングファクタ(SF)、各色量子化テーブル(IQNT)、各色ハフマン符号定義テーブル(DHT)をJPEG伸張ブロック18に設定し、少なくとも各色サンプリングファクタ(SF)、リサイズ率をリサイズブロック26に設定する(ステップS14)。尚、リサイズ率は、インターフェース部12を介して入力するJPEGデータの画像サイズと、プリント部に出力する出力画像の画像サイズとの比から求めることができる。
CPU14は、ワークメモリ16に一時保存されたデータの解析が終了すると、そのデータを順次ワークメモリ16から消去し、次にデータをワークメモリ16に保存する。そして、ヘッダ情報に対する処理が終了すると(ステップS16)、次のステップに移行する。
(2)JPEG伸張処理とリサイズ処理
図6及び7はそれぞれ本発明に係る画像処理装置によるJPEG伸張処理とリサイズ処理におけるCPU動作を示すフローチャートである。また、図8は主としてCPU14とJPEG伸張ブロック18、リサイズブロック26との信号の授受を示す概略図である。
<JPEG伸張処理>
インターフェース部12からヘッダ部の情報に続いてスキャンデータが転送される(図9参照)。スキャンデータも同様にワークメモリ16に一時保存され、CPU14がワークメモリ16からデータをJPEG伸張ブロック18に転送する。このとき、CPU14の負荷を軽減するためにDMA1(Direct Memory Access)を設置し(図1参照)、DMA1がデータを転送するようにしてもよい。
Returning to FIG. 5, a part of the JPEG data received from the interface unit 12 is temporarily stored in the work memory 16. When the header part is held in the work memory 16, the CPU 14 analyzes the header information (step S12), and at least the main scanning / sub-scanning direction resolution, the number of color components, each color sampling factor (SF), and each color quantization table. (IQNT), each color Huffman code definition table (DHT) is set in the JPEG decompression block 18, and at least each color sampling factor (SF) and resizing rate are set in the resizing block 26 (step S14). The resizing rate can be obtained from the ratio between the image size of the JPEG data input via the interface unit 12 and the image size of the output image output to the print unit.
When the analysis of the data temporarily stored in the work memory 16 is completed, the CPU 14 sequentially deletes the data from the work memory 16 and then stores the data in the work memory 16. When the processing for the header information is completed (step S16), the process proceeds to the next step.
(2) JPEG Decompression Processing and Resizing Processing FIGS. 6 and 7 are flowcharts showing CPU operations in JPEG decompression processing and resizing processing by the image processing apparatus according to the present invention, respectively. FIG. 8 is a schematic diagram mainly showing the exchange of signals between the CPU 14, the JPEG decompression block 18, and the resize block 26.
<JPEG expansion processing>
Scan data is transferred from the interface section 12 following the information in the header section (see FIG. 9). Similarly, the scan data is temporarily stored in the work memory 16, and the CPU 14 transfers the data from the work memory 16 to the JPEG decompression block 18. At this time, DMA1 (Direct Memory Access) may be installed to reduce the load on the CPU 14 (see FIG. 1), and the DMA1 may transfer data.

図6に示すようにJPEG伸張ブロック18は、CPU14からJPEG伸張スタート信号aを受けて伸張を開始する(ステップS20)。CPU14は、JPEG伸張ブロック18からJPEG伸張アック信号bを受けてワークメモリ16に一時保持されたデータをワークメモリロード信号iにより転送する(ステップS22)。尚、CPU14は、後述するデータ処理時及び印画時には、フラッシュROM30に保存されたデータをフラッシュロード信号kにより転送する。   As shown in FIG. 6, the JPEG decompression block 18 receives the JPEG decompression start signal a from the CPU 14 and starts decompressing (step S20). The CPU 14 receives the JPEG expansion acknowledgment signal b from the JPEG expansion block 18 and transfers the data temporarily stored in the work memory 16 by the work memory load signal i (step S22). The CPU 14 transfers data stored in the flash ROM 30 by a flash load signal k during data processing and printing described later.

JPEG伸張ブロック18では、CPU14から送られた主走査・副走査方向解像度、色成分数、各色サンプリングファクタ(SF)、各色量子化テーブル(IQNT)、各色ハフマン符号定義テーブル(DHT)に基づいてJPEG圧縮された圧縮データを伸張する(ステップS24)。
JPEG伸張ブロック18は、MCU単位の伸張が完了するまで伸張を続行し、MCU単位の伸張が完了したことを判別すると、MCU伸張完了信号cをCPU14に送る(ステップ26S)。CPU14は、MCU伸張完了信号cを受け取ると、伸張待機信号dをJPEG伸張ブロック18に出力してJPEG伸張ブロック18の動作を停止させる(ステップS28)。
CPU14は、1コマ分の画像の伸張が完了したか否かを判別し、完了していない場合には、ステップS20に戻り、次のMCUの伸張を開始させる(ステップS30)。
The JPEG decompression block 18 performs JPEG based on the main scanning / sub-scanning direction resolution, the number of color components, each color sampling factor (SF), each color quantization table (IQNT), and each color Huffman code definition table (DHT) sent from the CPU 14. The compressed data that has been compressed is expanded (step S24).
The JPEG decompression block 18 continues the decompression until the decompression of the MCU unit is completed, and when determining that the decompression of the MCU unit is completed, the JPEG decompression block 18 sends an MCU decompression completion signal c to the CPU 14 (step 26S). When receiving the MCU expansion completion signal c, the CPU 14 outputs the expansion standby signal d to the JPEG expansion block 18 and stops the operation of the JPEG expansion block 18 (step S28).
The CPU 14 determines whether or not the decompression of the image for one frame has been completed. If not, the CPU 14 returns to step S20 and starts decompressing the next MCU (step S30).

後述するようにフラッシュROM30には、M行N列のMCU(ブロック)に分割された1コマ分の圧縮データが格納されるが、印画時には各ブロックの圧縮データを任意の順番で読み出すことができるようになっている。   As will be described later, the flash ROM 30 stores compressed data for one frame divided into MCUs (blocks) of M rows and N columns, but at the time of printing, the compressed data of each block can be read in an arbitrary order. It is like that.

したがって、印画時にフラッシュROM30に格納された圧縮データを伸張する場合には、次に伸張するブロックの圧縮データが格納されているメモリ領域を示すアドレス情報に基づいてその圧縮データをフラッシュロード信号kで読み出して転送する(ステップS32)。
<リサイズ処理>
前記JPEG伸張ブロック18にて伸張された8×8画素のデータは、色成分別に伸張データバッファ20に格納される。図7において、CPU14は、伸張データバッファ20からリサイズ準備信号e(ON信号)を受入すると(ステップS40)、リサイズブロック26にリサイズスタート信号fを出力してリサイズ処理を開始させる(ステップS42)。
Therefore, when decompressing the compressed data stored in the flash ROM 30 at the time of printing, the compressed data is transferred by the flash load signal k based on the address information indicating the memory area where the compressed data of the next decompressed block is stored. Read and transfer (step S32).
<Resize processing>
The 8 × 8 pixel data expanded by the JPEG expansion block 18 is stored in the expanded data buffer 20 for each color component. In FIG. 7, when receiving the resize preparation signal e (ON signal) from the decompressed data buffer 20 (step S40), the CPU 14 outputs a resize start signal f to the resize block 26 to start the resizing process (step S42).

リサイズブロック26は、伸張データバッファ20から転送される8×8画素の1ブロック単位でH方向及びV方向のリサイズを、CPU14によって設定されたリサイズ率にしたがって実施する(ステップS44)。   The resizing block 26 performs resizing in the H direction and the V direction in units of 8 × 8 pixels transferred from the decompressed data buffer 20 in accordance with the resizing rate set by the CPU 14 (step S44).

図11(A)に示すように受信した圧縮データ(ビット列)は、JPEG伸張ブロック18にて伸張され、伸張データバッファ20に格納される。この伸張データバッファ20に8×8画素の1ブロックが格納されるごとに、リサイズブロック26に転送されて、まずH方向のリサイズが実施される(図11(B))。   As shown in FIG. 11A, the received compressed data (bit string) is decompressed by the JPEG decompression block 18 and stored in the decompressed data buffer 20. Each time one block of 8 × 8 pixels is stored in the decompressed data buffer 20, it is transferred to the resize block 26, and first, resizing in the H direction is performed (FIG. 11B).

リサイズブロック26でH方向にリサイズされたデータは、Hリサイズバッファ22に書き込まれる(図11(C))。尚、図11では、4分の3にリサイズする場合に関して示しており、8×8画素のブロックは、8×6画素にH方向にリサイズされる。また、この実施の形態では、1/12倍〜3倍のリサイズが可能になっており、8×8画素の1ブロックがH方向に3倍にリサイズされる場合を考慮してHリサイズバッファ22のサイズが決定されている。   The data resized in the H direction by the resize block 26 is written into the H resize buffer 22 (FIG. 11C). Note that FIG. 11 shows the case of resizing to 3/4, and an 8 × 8 pixel block is resized to 8 × 6 pixels in the H direction. In this embodiment, resizing of 1/12 times to 3 times is possible, and the H resizing buffer 22 is considered in consideration of a case where one block of 8 × 8 pixels is resized 3 times in the H direction. The size of the has been determined.

このHリサイズバッファ22にH方向に8ドット以上のデータが蓄積されると、Hリサイズバッファ22から8×8画素の1ブロックが読み出されて再度リサイズブロック26に転送される(図11(C))。   When data of 8 dots or more is accumulated in the H resize buffer 22 in the H direction, one block of 8 × 8 pixels is read from the H resize buffer 22 and transferred again to the resize block 26 (FIG. 11C )).

Hリサイズバッファ22から転送されたデータは、リサイズブロック26にてV方向のリサイズが実施されたのち、Vリサイズバッファ24に書き込まれる(図11(D))。
図7に戻って、CPU14は、Vリサイズバッファ24に圧縮に必要な規定量のデータ(H方向に8ドット以上、V方向に8ドット以上の各色成分のデータ)が蓄積されたか否かをVリサイズバッファ24からの信号gにて判別する(ステップS46)。そして、規定量蓄積を示す信号g(ON信号)を受入すると、CPU14は、Vリサイズバッファ24から8×8画素の各色成分のデータをワークメモリ書込信号hでワークメモリ16に書き込む(ステップS48)。尚、CPU14の負荷を軽減するために、DMA2が転送を実施してもよい(図1参照)。
CPU14は、ワークメモリ16に書き込まれた各色成分別の8×8画素のデータを、ソフトウエアによりJPEG圧縮し(ステップS50)、その圧縮データをフラッシュ書込信号jにてフラッシュROM30に書き込む(ステップS52)。
The data transferred from the H resize buffer 22 is resized in the V direction by the resize block 26 and then written to the V resize buffer 24 (FIG. 11D).
Returning to FIG. 7, the CPU 14 determines whether or not a predetermined amount of data necessary for compression (data of each color component of 8 dots or more in the H direction and 8 dots or more in the V direction) is stored in the V resize buffer 24. The determination is made based on the signal g from the resize buffer 24 (step S46). When the signal g (ON signal) indicating the specified amount accumulation is received, the CPU 14 writes the data of each color component of 8 × 8 pixels from the V resize buffer 24 to the work memory 16 with the work memory write signal h (step S48). ). In order to reduce the load on the CPU 14, the DMA 2 may perform transfer (see FIG. 1).
The CPU 14 JPEG-compresses the 8 × 8 pixel data for each color component written in the work memory 16 by software (step S50), and writes the compressed data in the flash ROM 30 using the flash write signal j (step S50). S52).

このJPEG圧縮処理及び圧縮データのフラッシュROM30への書込み処理に並行して、1コマ分の画像のリサイズ処理が終了するまでリサイズ処理を実施する(ステップS56)。   In parallel with the JPEG compression process and the compressed data writing process to the flash ROM 30, the resize process is performed until the image resize process for one frame is completed (step S56).

このようにして受信した任意サイズの画像データはVGAサイズにリサイズされ、リサイズされた画像データは、各色成分別(YCbCr)の8×8画素のブロックごとに順次JPEG圧縮され、フラッシュROM30に格納される(図11(E),(F)参照)。
<ブロック単位のリサイズ処理>
次に、n×n画素(この実施の形態では、8×8画素)のブロック単位でリサイズ(解像度変換)処理を行っても1コマ分の画像のH方向及びV方向に連続性をもったリサイズ処理を行うことができる画像処理について説明する。
リサイズブロック26は、リサイズ率m(=a/b)に応じて補間演算に使用する補間係数が設定される補間テーブルを有している。
一方、CPU14は、JPEGデータのヘッダ部に記録されている画像サイズと所望の出力画像の画像サイズとの比からリサイズ率を求め、このリサイズ率に基づいて前記補間テーブルに所要の補間係数を記憶させる。
ここで、リサイズブロック26でリサイズ可能なリサイズ率mは、1/12≦m≦3の範囲に設定されており、リサイズ率mを決めるa、bの値は、それぞれ1≦a≦64,1≦b≦64の整数である。
The image data of any size received in this way is resized to VGA size, and the resized image data is sequentially JPEG-compressed for each 8 × 8 pixel block for each color component (YCbCr) and stored in the flash ROM 30. (See FIGS. 11E and 11F).
<Resize processing in block units>
Next, even if resizing (resolution conversion) processing is performed in units of blocks of n × n pixels (8 × 8 pixels in this embodiment), there is continuity in the H and V directions of the image for one frame. An image process that can be resized will be described.
The resizing block 26 has an interpolation table in which an interpolation coefficient used for the interpolation calculation is set according to the resizing rate m (= a / b).
On the other hand, the CPU 14 obtains a resizing rate from the ratio between the image size recorded in the header portion of the JPEG data and the image size of the desired output image, and stores the required interpolation coefficient in the interpolation table based on this resizing rate. Let
Here, the resizing rate m that can be resized by the resizing block 26 is set in a range of 1/12 ≦ m ≦ 3, and the values of a and b that determine the resizing rate m are 1 ≦ a ≦ 64, 1 respectively. It is an integer of ≦ b ≦ 64.

次に、上記補間テーブルについて詳述する。   Next, the interpolation table will be described in detail.

補間テーブルは、リサイズ率mを決めるa/bの分母bの数(画素数)を1周期として分子aの数だけ補間係数の組み合わせを有するテーブルである。即ち、リサイズ率m(=a/b)の場合、分母bの画素数を基にして分子aの数の画素が補間演算によって作成されるが、これが分母bの画素数を周期として繰り返される。   The interpolation table is a table having combinations of interpolation coefficients corresponding to the number of numerators a with the number of denominators b (number of pixels) of a / b determining the resizing rate m as one period. That is, in the case of the resizing rate m (= a / b), the number of pixels of the numerator a is created by interpolation based on the number of pixels of the denominator b, and this is repeated with the number of pixels of the denominator b as a cycle.

例えば、リサイズ率m=2/3の場合、3つの画素から2つの画素が補間演算によって作成される。この場合の周期は3であり、3画素ごとに2つの画素を補間演算するための補間係数が繰り返し使用される。   For example, when the resizing ratio m = 2/3, two pixels are created from three pixels by interpolation calculation. The period in this case is 3, and an interpolation coefficient for performing interpolation calculation of two pixels is repeatedly used for every three pixels.

図12(A)はリサイズ率m=2/3の場合の補間テーブルを示しており、この補間テーブルは、分母3(番号0、1、2)を1周期として、分子2の数だけ補間係数の組み合わせ((0.75,0.25)、(0.25,0.75))を有している。   FIG. 12A shows an interpolation table in the case of the resizing rate m = 2/3. This interpolation table has the same denominator 3 (numbers 0, 1, 2) as one period, and the number of interpolation coefficients corresponding to the number of numerators 2. ((0.75, 0.25), (0.25, 0.75)).

図12(B)はブロック単位のデータをH方向に2/3にリサイズした場合に関して示している。同図に示すように、3つの画素{(A1〜A3),(A4〜A6),(A7,A8,B1),…}ごとに2つの画素{(a1,a2),(a3,a4),(a5,b1),…}を、図12(A)に示した補間テーブルの補間係数を用いて補間演算により求める。   FIG. 12B shows a case where data in block units is resized to 2/3 in the H direction. As shown in the figure, two pixels {(a1, a2), (a3, a4) for every three pixels {(A1 to A3), (A4 to A6), (A7, A8, B1),. , (A5, b1),...} Are obtained by interpolation using the interpolation coefficients of the interpolation table shown in FIG.

ところで、画素a5は、同一ブロック内の画素A7,A8に基づいて算出することができるが、画素b1は、隣接する2つのブロックの画素A8,B1に基づいて算出する必要がある。そこで、H方向のリサイズを行う場合には、各ブロックの最終列(8×8画素のブロックでは8列目)の画素のデータを、次のブロックのリサイズ時まで保持しておく。また、各ブロックのH方向の1周期上の最後の位置(この例では、012、012、…の周期の番号1)を保持しておく。これにより、次のブロックのH方向のリサイズ時に前記保持した最終列の画素のデータと1周期上の位置とに基づいて、左右に隣接するブロックの画素間に補間位置がある画素のデータを算出することができる。   Incidentally, the pixel a5 can be calculated based on the pixels A7 and A8 in the same block, but the pixel b1 needs to be calculated based on the pixels A8 and B1 of two adjacent blocks. Therefore, when resizing in the H direction, the pixel data of the last column of each block (the eighth column in the case of an 8 × 8 pixel block) is held until the next block is resized. Further, the last position on one cycle in the H direction of each block (in this example, the number 1 of the cycle of 012, 012,...) Is held. Thus, the pixel data having the interpolation position between the pixels of the adjacent blocks on the left and right is calculated based on the pixel data of the last column held and the position in one cycle when the next block is resized in the H direction. can do.

各ブロックのV方向のリサイズ時にもH方向のリサイズ時と同じ補間テーブルの補間係数を使用してリサイズすることができる。また、V方向のリサイズを行う場合には、H方向のリサイズ時と同様にして、各ブロックの最終行(8×8画素のブロックでは8行目)の画素のデータを、上下に隣接する下側のブロックのリサイズ時まで保持するとともに、各ブロックのV方向の1周期上の最後の位置を保持しておく。これにより、上下に隣接する下側のブロックのV方向のリサイズ時に前記保持した最終行の画素のデータと1周期上の位置とに基づいて、上下隣接するブロックの画素間に補間位置がある画素のデータを算出することができる。   Even when resizing each block in the V direction, the resizing can be performed using the same interpolation coefficient of the interpolation table as when resizing in the H direction. When resizing in the V direction, the pixel data of the last row of each block (the 8th row in the case of an 8 × 8 pixel block) is moved to the bottom adjacent to each other in the same manner as in the resizing in the H direction. The block is held until the side block is resized, and the last position in one cycle in the V direction of each block is held. As a result, a pixel having an interpolation position between the pixels of the upper and lower adjacent blocks based on the pixel data of the last row held at the time of resizing in the V direction of the lower blocks adjacent to the upper and lower sides and the position on one cycle. Can be calculated.

尚、この実施の形態では、リサイズ率を算出するCPU14が、そのリサイズ率に対応する補間係数を補間テーブルに記憶させて補間演算に使用する補間テーブルを作成するようにしているが、これに限らず、予めリサイズ率に対応する補間係数を記憶する複数の補間テーブルを準備しておき、リサイズ率を算出するCPU14が、そのリサイズ率に対応する補間係数が記憶された補間テーブルを、補間演算に使用する補間テーブルとして設定するようにしてもよい。
(3)JPEG圧縮処理とポインタ保存
前述したようにCPU14は、ワークメモリ16に書き込まれた各色成分別の8×8画素のデータをソフトウエアによりJPEG圧縮し、その圧縮データを順次フラッシュROM30に書き込む。
即ち、8×8画素の輝度データY,8×8画素の色差データCb,8×8画素の色差データCrを1MCUとしてJPEG圧縮する。このときの画像フォーマットは、1:1:1フォーマットである。尚、このときのMCUを、以下ブロックとも称す。
In this embodiment, the CPU 14 for calculating the resizing rate stores the interpolation coefficient corresponding to the resizing rate in the interpolation table and creates the interpolation table used for the interpolation calculation. However, the present invention is not limited to this. First, a plurality of interpolation tables that store interpolation coefficients corresponding to the resizing ratio are prepared in advance, and the CPU 14 that calculates the resizing ratio uses the interpolation table that stores the interpolation coefficients corresponding to the resizing ratio as an interpolation calculation. You may make it set as an interpolation table to be used.
(3) JPEG compression processing and pointer storage As described above, the CPU 14 JPEG-compresses 8 × 8 pixel data for each color component written in the work memory 16 by software, and sequentially writes the compressed data in the flash ROM 30. .
That is, 8 × 8 pixel luminance data Y, 8 × 8 pixel color difference data Cb, and 8 × 8 pixel color difference data Cr are JPEG compressed as 1 MCU. The image format at this time is a 1: 1: 1 format. The MCU at this time is also referred to as a block hereinafter.

CPU14は、1MCU(1ブロック)単位の圧縮データのフラッシュROM30への書き込みに際し(圧縮データの作成時を含む)、図13(A)に示すように各ブロックのフラッシュROM30への書込順に対応するブロック番号(0,1,2,…X)に関連づけて各ブロックのアドレスポインタ、ビット情報、及び圧縮データの先頭値(DC値)を保存した情報テーブルを作成する。尚、DC値としては、輝度データY,色差データCb,Cr別の3つのDC値を記憶させる。
このようにして作成した情報テーブル上のアドレスポインタに基づいてフラッシュROM30から可変長データのブロックに対して任意の箇所のブロックを読み出すことができるとともに、情報テーブル上のDC値に基づいて読み出した圧縮ブロックをJPEG伸張することができるようになっている。
When writing compressed data in units of 1 MCU (1 block) to the flash ROM 30 (including the time of creating compressed data), the CPU 14 corresponds to the order of writing each block to the flash ROM 30 as shown in FIG. An information table is created in which the address pointer of each block, bit information, and the first value (DC value) of the compressed data are stored in association with the block number (0, 1, 2,... X). As the DC value, three DC values for each of luminance data Y, color difference data Cb, and Cr are stored.
Based on the address pointer on the information table created in this manner, a block at an arbitrary position can be read from the flash ROM 30 with respect to the block of variable length data, and the compression read based on the DC value on the information table The block can be JPEG decompressed.

尚、この実施の形態では、CPU14がソフトウエアによって1ブロック単位でJPEG圧縮するようにしたが、これに限らず、図1の点線で示すようにJPEG圧縮ブロック29を設置し、ハードウエアでJPEG圧縮するようにしてもよい。ハードウエアでJPEG圧縮を実施する場合には、圧縮データをフラッシュROM30に書き込むのは、CPU14の代わりにDMA3が実施してもよい。
《B.データ処理時》
(1)データのロードとJPEG伸張処理・リサイズ処理
フラッシュROM30に保存した出力画像を解析して画像処理パラメータを生成するデータ処理時には、CPU14がフラッシュROM30からポインタにしたがったアドレス順序でスキャンデータをロードし、JPEG伸張ブロック18に順次転送する。JPEG伸張処理
及びリサイズ処理は、前述した《A.データ受信時》の場合と同様に行われるが(図6及び図7参照)、リサイズ処理時のリサイズ率mは、Y/X(X,Yは整数かつ定数)で固定する。
In this embodiment, the CPU 14 performs JPEG compression on a block basis by software. However, the present invention is not limited to this, and a JPEG compression block 29 is installed as shown by the dotted line in FIG. You may make it compress. When JPEG compression is performed by hardware, the compressed data may be written to the flash ROM 30 by the DMA 3 instead of the CPU 14.
<< B. During data processing
(1) Data loading and JPEG decompression processing / resizing processing At the time of data processing in which an output image stored in the flash ROM 30 is analyzed to generate image processing parameters, the CPU 14 loads scan data from the flash ROM 30 in the address order according to the pointer. The data is sequentially transferred to the JPEG decompression block 18. The JPEG decompression process and the resizing process are described in << A. This is performed in the same manner as in the case of data reception (see FIGS. 6 and 7), but the resizing rate m during the resizing process is fixed at Y / X (X and Y are integers and constants).

X,Yは、ワークメモリ16のサイズ(保存可能な非圧縮画像の画像サイズ)に依存する値であり、この実施の形態では、Y/X=1/4としている。尚、フラッシュROM30に保存される出力画像の画像サイズは、640×480画素であるため、画像解析用にワークメモリ16に保存される解析用画像の画像サイズは、160×120画素である。   X and Y are values depending on the size of the work memory 16 (image size of a storable uncompressed image). In this embodiment, Y / X = 1/4. Note that since the image size of the output image stored in the flash ROM 30 is 640 × 480 pixels, the image size of the analysis image stored in the work memory 16 for image analysis is 160 × 120 pixels.

リサイズ処理された画像データは、CPU14によってワークメモリ16に転送される。
(2)画像処理パラメータの決定
CPU14は、ワークメモリ16に格納された出力画像の縮小画像を基に画像解析し、画像処理パラメータを決定する。
The resized image data is transferred to the work memory 16 by the CPU 14.
(2) Determination of Image Processing Parameter The CPU 14 performs image analysis based on a reduced image of the output image stored in the work memory 16 and determines an image processing parameter.

例えば、解析対象画像の輝度データY、色差データCb,CrをR,G,Bデータに変換し、図14に示すようにR,G,Bごとの輝度分布を示すヒストグラムを作成する。このヒストグラムを解析し、例えばBの輝度が低いためにホワイトバランスが悪いと判断した場合には、Bの輝度を一律に上げるためのホワイトバランス補正値を求め、これを画像処理パラメータとする。また、上記ヒストグラムから画像全体の明るさやコントラストの大きさを判断して明るさ補正やガンマ補正、トーンカーブの設定等を行うための画像処理パラメータを決定することができる。更に、CPU14は、顔を認識して顔の上下方向から出力画像の天地方向を判断することができる。
《C.印画時》
(1)データのロードとJPEG伸張処理・リサイズ処理
フラッシュROM30に保存した出力画像を前記画像処理パラメータに基づいて処理して印画ヘッド32に出力する印画時には、《B.データ処理時》の場合と同様にCPU14がフラッシュROM30からポインタにしたがったアドレス順序でスキャンデータをロードし、JPEG伸張ブロック18に順次転送する。
ここで、フラッシュROM30からの各ブロックの読出順に応じて出力画像を90度、180度、又は270度回転させて出力できる。
<出力画像を回転出力させる第1の実施の形態>
(90度回転)
P×Q画素の出力画像をn×n画素のブロックで分割すると、(P/n)×(Q/n)のブロックに分割される。尚、この実施の形態では、出力画像は640×480画素、1ブロックは8×8画素であるため、80×60のブロックに分割される。
いま、出力画像がM行N列のブロックに分割されている場合、フラッシュROM30には、1行1列のブロック、1行2列のブロック、…、1行N列のブロック、…、M行N列のブロックの順でスキャンデータが記録される。そして、出力画像を90度回転させて出力する場合には、フラッシュROM30からM行N列のブロックを1列目から順に列方向に読み出す。
図13は出力画像を90度回転させて出力する場合(主走査方向と副走査方向とを変換する場合)のフラッシュROM30からの各ブロックの読出順等を示す。図13(B)に示すように列方向のブロックに対応するブロック番号は、1列目は0,N,2N,…、2列目は1,N+1,2N+1,…、である。従って、図13(A)に示した情報テーブルに記憶された各列方向のブロック番号に対応するアドレス及びビット情報に基づいてフラッシュROM30からM行N列のブロックを1列目から順に列方向に読み出すことができる。図13(C)は1列目のブロックが割り当てられている様子を示すフラッシュROM30のメモリマップを示している。
このようにして列方向の順で読み出された各ブロックは、JPEG伸張ブロック18に順次転送される。
For example, the luminance data Y and the color difference data Cb, Cr of the analysis target image are converted into R, G, B data, and a histogram indicating the luminance distribution for each of R, G, B is created as shown in FIG. When this histogram is analyzed and, for example, it is determined that the white balance is bad because the luminance of B is low, a white balance correction value for uniformly increasing the luminance of B is obtained and used as an image processing parameter. Also, it is possible to determine image processing parameters for performing brightness correction, gamma correction, tone curve setting, and the like by judging the brightness and contrast level of the entire image from the histogram. Furthermore, the CPU 14 can recognize the face and determine the vertical direction of the output image from the vertical direction of the face.
<< C. During printing
(1) Data loading and JPEG decompression / resizing processing When printing an output image stored in the flash ROM 30 based on the image processing parameters and outputting it to the print head 32, << B. As in the case of data processing, the CPU 14 loads the scan data from the flash ROM 30 in the address order according to the pointer, and sequentially transfers it to the JPEG decompression block 18.
Here, the output image can be output by being rotated 90 degrees, 180 degrees, or 270 degrees in accordance with the reading order of each block from the flash ROM 30.
<First Embodiment for Rotating Output Image>
(90 degree rotation)
When an output image of P × Q pixels is divided into blocks of n × n pixels, it is divided into blocks of (P / n) × (Q / n). In this embodiment, since the output image is 640 × 480 pixels and one block is 8 × 8 pixels, it is divided into 80 × 60 blocks.
If the output image is divided into blocks of M rows and N columns, the flash ROM 30 has 1 row and 1 column block, 1 row and 2 column block,..., 1 row and N column block,. Scan data is recorded in the order of N columns of blocks. When the output image is rotated 90 degrees and output, blocks of M rows and N columns are sequentially read from the flash ROM 30 in the column direction from the first column.
FIG. 13 shows the reading order of each block from the flash ROM 30 when the output image is rotated 90 degrees and output (when the main scanning direction and the sub-scanning direction are converted). As shown in FIG. 13B, the block numbers corresponding to the blocks in the column direction are 0, N, 2N,... In the first column, 1, N + 1, 2N + 1,. Accordingly, the blocks in the M rows and N columns from the flash ROM 30 in the column direction sequentially from the first column based on the address and bit information corresponding to the block numbers in the column direction stored in the information table shown in FIG. Can be read. FIG. 13C shows a memory map of the flash ROM 30 showing a state in which a block in the first column is allocated.
The blocks read in the column direction in this way are sequentially transferred to the JPEG decompression block 18.

JPEG伸張ブロック18によるJPEG伸張処理は、前述した《A.データ受信時》の場合と同様に行われるが、伸張対象のブロック(i行j列(1≦i≦M,1≦j≦N)のブロック)の圧縮データを復号する際に、i行j列のブロックの圧縮データのDC値が差分値の場合には、圧縮データのDC値として絶対値を有するi行j列のブロックの直近のブロックからi行j列のブロックまでの各ブロックの圧縮データのDC値を、図13(A)に示した情報テーブルから読み出して累算し、その累算した値を利用して復号する。
また、リサイズブロック26によるリサイズ処理時のリサイズ率mは、1倍(等倍)に固定する。尚、リサイズしない印画時にもリサイズ率を1倍にして必ずリサイズブロック26を経由させることにより、リサイズブロック26を迂回させるための特別な切換手段を省略することができる。
The JPEG decompression process by the JPEG decompression block 18 is the above-described << A. This is performed in the same manner as in the case of data reception, but when decoding the compressed data of the decompression target block (block of i rows and j columns (1 ≦ i ≦ M, 1 ≦ j ≦ N)), i rows j When the DC value of the compressed data of the column block is a differential value, the compression of each block from the block nearest to the i row j column block having the absolute value as the DC value of the compressed data to the i row j column block The DC value of the data is read from the information table shown in FIG. 13A, accumulated, and decoded using the accumulated value.
Further, the resizing rate m at the time of resizing processing by the resizing block 26 is fixed to 1 time (equal size). Even when printing without resizing, a special switching means for bypassing the resizing block 26 can be omitted by making the resizing ratio 1 and always passing through the resizing block 26.

上記のようにしてJPEG伸張処理、及び1倍にリサイズされた各色成分のブロックの8×8画素のデータは、Vリサイズバッファ24に一時保存され、その後、1ラインずつプリント制御部28に送られる。そして、プリント制御部28で適宜の画像処理が実施されたR,G,Bデータが順次印画ヘッド32に出力される。   The 8 × 8 pixel data of each color component block that has been JPEG decompressed as described above and resized to 1 × is temporarily stored in the V resize buffer 24 and then sent to the print controller 28 line by line. . Then, R, G, and B data subjected to appropriate image processing by the print control unit 28 are sequentially output to the print head 32.

図15はフラッシュROMから印画ヘッドまでの印画時のデータの流れを示す概念図である。図15(A)に示すようにブロック列の先頭ポインタによってフラッシュROM30からの各ブロックが読み出され、JPEG伸張処理、及び等倍のリサイズ処理されたデータは、図15(B)に示すように8×8画素のブロック単位で順次Vリサイズバッファ24に書き込まれる。尚、Vリサイズバッファ24への書き込み時に、画像の回転(90度、180度、270度)に応じて8×8画素のブロック内の画像データの出力順を入れ替えて書き込む。   FIG. 15 is a conceptual diagram showing a data flow during printing from the flash ROM to the printing head. As shown in FIG. 15 (A), each block is read from the flash ROM 30 by the head pointer of the block row, and the JPEG decompression process and the data subjected to the resizing process at the same magnification are as shown in FIG. 15 (B). The data is sequentially written to the V resize buffer 24 in units of 8 × 8 pixel blocks. At the time of writing to the V resizing buffer 24, the output order of the image data in the 8 × 8 pixel block is changed according to the rotation of the image (90 degrees, 180 degrees, 270 degrees).

そして、Vリサイズバッファ24に1列分のブロックのデータが書き込まれると、Vリサイズバッファ24に保持されたデータが1ラインずつプリント制御部28及びプリントバッファを介して印画ヘッドに送られる(図15(C))。
(180度回転)
図16は出力画像を180度回転させて出力する場合のフラッシュROM30からの各ブロックの読出順等を示す。この場合、図16(A)に示した情報テーブル上で、最も大きいブロック番号Xから順次小さいブロック番号X−1,X−2,…2,1,0の順に対応するブロックを読み出す(図16(B)及び(C))。
Then, when block data for one column is written in the V resize buffer 24, the data held in the V resize buffer 24 is sent line by line to the print head via the print controller 28 and the print buffer (FIG. 15). (C)).
(180 degree rotation)
FIG. 16 shows the reading order of each block from the flash ROM 30 when the output image is rotated 180 degrees and output. In this case, on the information table shown in FIG. 16A, the blocks corresponding to the order of the smallest block number X-1, X-2,..., 2, 1, 0 are read from the largest block number X (FIG. 16). (B) and (C)).

同様にして、出力画像を270度回転させて出力させることもでき、更に鏡面反転させて出力させることもできる。   Similarly, the output image can be output after being rotated by 270 degrees, and can also be output after being mirror-inverted.

尚、印画時に上記のようにして画像を90回転させて印画ヘッド32に出力するのは、図3に示したように印画ヘッド32は、長方形のインスタントフイルム50の短辺と平行に配置されているからである。更に、出力画像を180度や270度回転させる理由は、図2に示したインスタントフイルム50には、予め周囲の余白部分にフレーム画像が印画されたものがあり、そのフレーム画像の天地方向と出力画像の天地方向とが一致するように印画するためである。尚、出力画像の天地方向は、CPU14が画像解析を行うことによって検知することができる。
<出力画像を回転出力させる第2の実施の形態>
CPU14は、ワークメモリ16に書き込まれた各色成分別の8×8画素のデータをソフトウエアにより1MCU(1ブロック)単位でJPEG圧縮するが、1MCUごとにリスタートインターバルマーカ(RIT)を挿入する(図9参照)。これにより、ブロックの圧縮データの先頭のDC値は、絶対値として記録されることになる。
また、図17(C)に示すようにリスタートインターバルマーカ(RIT)を挿入する際には、その前のブロックの最後のバイトに空きビットがある場合には、ダミーデータ(”1”)Dによって埋められたのち、2バイトのリスタートインターバルマーカ(RIT)が記録される。各リスタートインターバルマーカ(RIT)は、アドレス情報のみで(ビット情報なしで)フラッシュROM30上の記録位置が特定される。
従って、各ブロックの圧縮データのフラッシュROM30への書き込みに際し(圧縮データの作成時を含む)、各ブロックのフラッシュROM30への書込順に対応するブロック番号に関連づけて各ブロックの直前のリスタートインターバルマーカ(RIT)のアドレスポインタを保存した情報テーブルを作成しておくことにより、第1の実施の形態と同様に任意の順番でブロックをフラッシュROM30から読み出してJPEG伸張ブロック18に転送することができる。これにより、出力画像を90度、180度、270度回転させて出力させることができる。
また、各ブロックの圧縮データの先頭のDC値は、絶対値であるため、他のブロックの先頭のDC値を利用する必要がなく、第1の実施の形態のように情報テーブルにDC値を格納しておく必要がない。
<第2の実施の形態の変形例>
上記第2の実施の形態では、1MCUごとにリスタートインターバルマーカ(RIT)を挿入したが、第2の実施の形態の変形例では、リスタートインターバルマーカ(RIT)を挿入せずに、ブロックの圧縮データの先頭のDC値を絶対値として記録した圧縮データを作成する。
It should be noted that the image is rotated 90 times and output to the print head 32 as described above at the time of printing. The print head 32 is arranged in parallel with the short side of the rectangular instant film 50 as shown in FIG. Because. Further, the reason for rotating the output image by 180 degrees or 270 degrees is that the instant film 50 shown in FIG. 2 has a frame image printed in advance in the surrounding margin, and the top and bottom direction of the frame image is output. This is for printing so that the vertical direction of the image matches. Note that the vertical direction of the output image can be detected by the CPU 14 performing image analysis.
<Second Embodiment for Rotating Output Image>
The CPU 14 JPEG-compresses the 8 × 8 pixel data for each color component written in the work memory 16 in units of 1 MCU (1 block) by software, but inserts a restart interval marker (RIT) for each MCU ( (See FIG. 9). As a result, the first DC value of the compressed data of the block is recorded as an absolute value.
As shown in FIG. 17C, when a restart interval marker (RIT) is inserted, if there is an empty bit in the last byte of the previous block, dummy data (“1”) D After that, a 2-byte restart interval marker (RIT) is recorded. Each restart interval marker (RIT) specifies a recording position on the flash ROM 30 only with address information (without bit information).
Therefore, when writing the compressed data of each block to the flash ROM 30 (including when the compressed data is created), the restart interval marker immediately before each block is associated with the block number corresponding to the order of writing to the flash ROM 30 of each block. By creating an information table storing (RIT) address pointers, blocks can be read out from the flash ROM 30 and transferred to the JPEG decompression block 18 in any order as in the first embodiment. Accordingly, the output image can be output after being rotated by 90 degrees, 180 degrees, and 270 degrees.
Also, since the head DC value of the compressed data of each block is an absolute value, it is not necessary to use the head DC value of another block, and the DC value is added to the information table as in the first embodiment. There is no need to store it.
<Modification of Second Embodiment>
In the second embodiment, a restart interval marker (RIT) is inserted for each MCU. However, in the modification of the second embodiment, a restart interval marker (RIT) is not inserted and Compressed data in which the first DC value of the compressed data is recorded as an absolute value is created.

また、図13(A)に示すように各ブロックのフラッシュROM30への書込順に対応するブロック番号(0,1,2,…X)に関連づけて各ブロックのアドレスポインタ、ビット情報を保存した情報テーブルを作成する。
このようにして作成した情報テーブル上のアドレスポインタに基づいてフラッシュROM30から任意の箇所のブロックを読み出し、JPEG伸張ブロック18に転送することができる。
一方、JPEG伸張ブロック18では、フラッシュROM30からブロックを取り込むときのみ、その直前にダミーのリスタートインターバルマーカ(RIT)を入力するようにする。これにより、JPEG伸張ブロック18は、フラッシュROM30から取り込まれるブロックは、リスタートインターバルマーカ(RIT)直後のブロックとして判断し、そのブロックの圧縮データのDC値を絶対値としてブロックの圧縮データの伸張処理を行う。
第2の実施の形態の変形例は、第2の実施の形態に比べてフラッシュROM30にリスタートインターバルマーカ(RIT)が記録されない分だけフラッシュROM30のメモリ容量を節約することができる。
<出力画像を回転出力させる第3の実施の形態>
CPU14は、ワークメモリ16に書き込まれた各色成分別の8×8画素のデータをソフトウエアにより1MCU(1ブロック)単位でJPEG圧縮するとともに、最終列のブロックの直後のみにリスタートインターバルマーカを挿入する。これにより、1列目のブロックの圧縮データの先頭のDC値は、絶対値として記録され、他の列のブロックの圧縮データの先頭のDC値は、直前のブロックのDC値との差分値として記録されることになる。
また、図17(A)に示すように各ブロックの圧縮データのフラッシュROM30への書き込みに際し、1列目のブロックのブロック番号0,N,2N,…に関連づけて各行の最終列のブロック直後のリスタートインターバルマーカ(RIT)のアドレスポインタを保存した情報テーブルを作成する。この場合、図17(A)及び(C)に示すようにリスタートインターバルマーカ(RIT)のアドレスポインタは、アドレス情報のみでビット位置は0が設定される。
従って、1列目の各ブロックの圧縮データは、図17(A)に示したアドレスポインタにしたがってフラッシュROM30から読み出すことができる。このようにして読み出したブロックは、JPEG伸張ブロック18に転送されて復号される。
一方、1列目の各ブロックの圧縮データの読み出しが行われると、2列目の各ブロックの圧縮データの先頭のビット位置及びアドレス情報を検知することができるため、情報テーブルのビット位置及びアドレス情報を前記検知したビット位置及びアドレス位置に更新する。これにより、ビット位置及びアドレス位置が更新された情報テーブルに基づいて2列目の各ブロックの圧縮データを順次読み出すことができる。同様にして、3列目、4列目、…、の各ブロックの圧縮データを順次読み出すことができる。
一方、2列目の各ブロックの復号に必要なDC値は、1列目の各ブロックの先頭のDC値(絶対値)と、2列目の各ブロックの先頭のDC値(差分値)とを累算することで求めることができるため、2列目の各ブロックの復号時まで1列目の各ブロックの先頭のDC値を保持しておく。同様に、3列目の各ブロックの復号に必要なDC値は、2列目の各ブロックの復号に必要なDC値(1列目のDC値と2列目のDC値の累算値)と、3列目の各ブロックの先頭のDC値(差分値)とを累算することで求めることができるため、3列目の各ブロックの復号時まで前記累算値を保持しておく。
即ち、第i列(1≦i≦N)のブロックの復号に必要なDC値は、第1列から第i列までの各ブロックの圧縮データのDC値の累算値であるため、この累算値を第i+1列のブロックの復号時まで保持しておく。
Further, as shown in FIG. 13A, information that stores the address pointer and bit information of each block in association with the block number (0, 1, 2,... X) corresponding to the writing order of each block to the flash ROM 30. Create a table.
Based on the address pointer on the information table created in this way, a block at an arbitrary location can be read from the flash ROM 30 and transferred to the JPEG decompression block 18.
On the other hand, in the JPEG decompression block 18, a dummy restart interval marker (RIT) is input immediately before fetching a block from the flash ROM 30. Accordingly, the JPEG decompression block 18 determines that the block fetched from the flash ROM 30 is a block immediately after the restart interval marker (RIT), and decompresses the compressed data of the block using the DC value of the compressed data of the block as an absolute value. I do.
The modification of the second embodiment can save the memory capacity of the flash ROM 30 as much as the restart interval marker (RIT) is not recorded in the flash ROM 30 as compared to the second embodiment.
<Third Embodiment for Rotating Output Image>
The CPU 14 JPEG compresses the 8 × 8 pixel data for each color component written in the work memory 16 in units of 1 MCU (1 block) by software, and inserts a restart interval marker only immediately after the block in the last column To do. As a result, the first DC value of the compressed data of the block in the first column is recorded as an absolute value, and the first DC value of the compressed data of the block in the other column is a difference value from the DC value of the immediately preceding block. Will be recorded.
As shown in FIG. 17A, when the compressed data of each block is written to the flash ROM 30, the block immediately after the block in the last column of each row is associated with the block numbers 0, N, 2N,. Create an information table that stores the address pointer of the restart interval marker (RIT). In this case, as shown in FIGS. 17A and 17C, the address pointer of the restart interval marker (RIT) is only address information and the bit position is set to 0.
Therefore, the compressed data of each block in the first column can be read from the flash ROM 30 in accordance with the address pointer shown in FIG. The block read in this way is transferred to the JPEG decompression block 18 and decoded.
On the other hand, when the compressed data of each block of the first column is read, the bit position and address of the information table can be detected because the head bit position and address information of the compressed data of each block of the second column can be detected. Information is updated to the detected bit position and address position. Accordingly, the compressed data of each block in the second column can be sequentially read based on the information table in which the bit position and the address position are updated. Similarly, the compressed data of each block in the third column, fourth column,... Can be sequentially read.
On the other hand, the DC value necessary for decoding each block in the second column is the first DC value (absolute value) of each block in the first column and the first DC value (difference value) of each block in the second column. Therefore, the first DC value of each block in the first column is held until each block in the second column is decoded. Similarly, the DC value necessary for decoding each block in the third column is the DC value necessary for decoding each block in the second column (the accumulated value of the DC value in the first column and the DC value in the second column). And the DC value (difference value) at the beginning of each block in the third column can be obtained by accumulation, and the accumulated value is held until the decoding of each block in the third column.
That is, since the DC value required for decoding the block in the i-th column (1 ≦ i ≦ N) is an accumulated value of the DC value of the compressed data of each block from the first column to the i-th column, The calculated value is held until the block of the (i + 1) -th column is decoded.

尚、この実施の形態では、伸張対象ブロックの伸張時まで、その伸張対象ブロックの行の先頭ブロックのDC値から直前のブロックのDC値までを累算し、その累算値を保持するようにしたが、これに限らず、伸張対象ブロックの伸張時に、その伸張対象ブロックの行の先頭のブロックのDC値から直前のブロックのDC値までの累算値をその都度計算して求めてもよい。
(2)YCbCr/RGB変換及び画像処理
Vリサイズバッファ24に印画ヘッドのドット数(480)×8ドットの各色成分のデータが蓄積されると、その蓄積されたデータは、1ラインずつプリント制御部28に送られる(図15参照)。
In this embodiment, until the decompression target block is decompressed, the DC value of the first block in the row of the decompression target block to the DC value of the immediately preceding block is accumulated, and the accumulated value is held. However, the present invention is not limited to this, and at the time of decompression of the decompression target block, an accumulated value from the DC value of the first block in the row of the decompression target block to the DC value of the immediately preceding block may be calculated each time. .
(2) YCbCr / RGB conversion and image processing When the data of each color component of the number of dots (480) × 8 dots of the print head is accumulated in the V resize buffer 24, the accumulated data is a print control unit line by line. 28 (see FIG. 15).

前述したようにプリント制御部28は、3D−LUTから構成されている。この3D−LUTは、図18(A)に示すようにYCbCrの入力データをRGBの出力データに変換するとともに、色再現性や階調再現性を向上させる階調変換等を行う基本テーブルが準備されている。   As described above, the print control unit 28 includes a 3D-LUT. As shown in FIG. 18A, this 3D-LUT has a basic table for converting YCbCr input data to RGB output data and performing gradation conversion for improving color reproducibility and gradation reproducibility. Has been.

また、プリント制御部28には、CPU14から画像解析結果に応じた画像処理パラメータが加えられており、プリント制御部28は、画像処理パラメータに基づいて基本LUTをカスタマイズする。即ち、図18(A)に示す基本LUT1は、画像解析結果に応じてカスタマイズされ、図18(B)に示すLUT2となる。
例えば、Bの輝度が低いためにホワイトバランスが悪い場合には、CPU14からBの輝度を一律に上げるための画像処理パラメータがプリント制御部28に加えられ、プリント制御部28は、この画像処理パラメータによってBの輝度を一律(×1.3)に増加させたLUT2を再構成する。また、複数の画像処理パラメータを単一のLUTに反映させることもできる。
Further, image processing parameters corresponding to the image analysis result are added from the CPU 14 to the print control unit 28, and the print control unit 28 customizes the basic LUT based on the image processing parameters. That is, the basic LUT1 shown in FIG. 18A is customized according to the image analysis result, and becomes the LUT2 shown in FIG.
For example, when the white balance is bad because the luminance of B is low, the CPU 14 adds an image processing parameter for uniformly increasing the luminance of B to the print control unit 28. The print control unit 28 To reconstruct LUT2 in which the luminance of B is uniformly increased (× 1.3). In addition, a plurality of image processing parameters can be reflected in a single LUT.

そして、Vリサイズバッファ24から1ラインずつプリント制御部28に送られるYCbCrの入力データは、プリント制御部28内の3D−LUTによってRGBの出力データに変換されるとともに、ホワイトバランス補正や階調変換等の画像処理が行われる。   The YCbCr input data sent from the V resizing buffer 24 line by line to the print control unit 28 is converted into RGB output data by the 3D-LUT in the print control unit 28, as well as white balance correction and gradation conversion. Etc., image processing is performed.

このようにしてプリント制御部28から1ラインずつ画像処理されたR,G,Bのデータが印画ヘッド32に出力される。R,G,Bデータは、R,G,Bごとに印画ヘッド32の液晶シャッタ36の透過率を制御してインスタントフイルムを露光する。   In this way, R, G, B data subjected to image processing line by line from the print control unit 28 is output to the print head 32. The R, G, B data exposes the instant film by controlling the transmittance of the liquid crystal shutter 36 of the print head 32 for each of R, G, B.

尚、この実施の形態では、圧縮された出力画像を揮発性メモリ(フラッシュROM30)に保存するようにしたが、これに限らず、揮発性メモリに保存するようにしてもよい。また、圧縮データをブロック単位の圧縮が完了するごとにメモリに順次書き込むようにしたが、これに限らず、全てのデータの圧縮が完了した後に圧縮データを一括してメモリに書き込むようにしてもよい。また、ヘッダ情報の解析等は、CPU内部のキャッシュメモリを利用して行うことができ、この場合にはワークメモリ16を省略することができる。更に、出力画像をプリンタ部に出力する場合について説明したが、画像表示装置に出力する場合にも本発明は適用できる。   In this embodiment, the compressed output image is stored in the volatile memory (flash ROM 30). However, the present invention is not limited to this, and the compressed output image may be stored in the volatile memory. Further, the compressed data is sequentially written in the memory every time the block unit compression is completed. However, the present invention is not limited to this, and the compressed data may be written in the memory collectively after the compression of all the data is completed. Good. Also, analysis of header information and the like can be performed using a cache memory inside the CPU, and in this case, the work memory 16 can be omitted. Furthermore, although the case where the output image is output to the printer unit has been described, the present invention can also be applied to the case where the output image is output to the image display device.

図1は本発明に係る画像処理装置の実施の形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of an image processing apparatus according to the present invention. 図2は印画ヘッドによって画像が印画されるインスタントフイルムを示す斜視図である。FIG. 2 is a perspective view showing an instant film on which an image is printed by the printing head. 図3はプリント部を示す要部斜視図である。FIG. 3 is a perspective view showing a main part of the printing unit. 図4は印画ヘッドの断面図である。FIG. 4 is a sectional view of the printing head. 図5は画像処理装置によるヘッダ情報解析時のCPU動作を示すフローチャートである。FIG. 5 is a flowchart showing the CPU operation at the time of header information analysis by the image processing apparatus. 図6は本発明に係る画像処理装置によるJPEG伸張処理におけるCPU動作を示すフローチャートである。FIG. 6 is a flowchart showing the CPU operation in the JPEG expansion processing by the image processing apparatus according to the present invention. 図7は本発明に係る画像処理装置によるリサイズ処理におけるCPU動作を示すフローチャートである。FIG. 7 is a flowchart showing the CPU operation in the resizing process by the image processing apparatus according to the present invention. 図8は主としてCPUとJPEG伸張ブロック、リサイズブロックとの信号の授受を示す概略図である。FIG. 8 is a schematic diagram mainly showing transmission / reception of signals between the CPU and the JPEG decompression block and resize block. 図9はJPEGデータのデータ構造を説明するために用いた図である。FIG. 9 is a diagram used for explaining the data structure of JPEG data. 図10は受信する圧縮データの最小符号化単位(MCU)を説明するために用いた図である。FIG. 10 is a diagram used for explaining the minimum coding unit (MCU) of the received compressed data. 図11はデータ受信時のJPEG伸張、リサイズ、及びJPEG圧縮時のデータの流れを示す図である。FIG. 11 is a diagram illustrating a data flow during JPEG decompression, resizing, and JPEG compression during data reception. 図12はブロック単位のリサイズ処理の詳細を説明するために用いた図である。FIG. 12 is a diagram used for explaining details of the resizing process in units of blocks. 図13は出力画像を90度回転させて出力する画像処理の第1の実施の形態を示す図である。FIG. 13 is a diagram illustrating a first embodiment of image processing in which an output image is rotated 90 degrees and output. 図14はR,G,Bデータのヒストグラムを作成して画像解析する様子を示す図である。FIG. 14 is a diagram illustrating a state in which a histogram of R, G, and B data is created and image analysis is performed. 図15はフラッシュROMから印画ヘッドまでの印画時のデータの流れを示す概念図である。FIG. 15 is a conceptual diagram showing a data flow during printing from the flash ROM to the printing head. 図16は出力画像を180度回転させて出力する画像処理の第1の実施の形態を示す図である。FIG. 16 is a diagram illustrating a first embodiment of image processing in which an output image is rotated 180 degrees and output. 図17は出力画像を90度回転させて出力する場合の画像処理の他の実施の形態を示す図である。FIG. 17 is a diagram illustrating another embodiment of image processing when an output image is rotated 90 degrees and output. 図18は3D−LUTによるYCbCr/RGB変換及び画像処理方法を示す図である。FIG. 18 is a diagram showing a YCbCr / RGB conversion and image processing method by 3D-LUT.

符号の説明Explanation of symbols

10…ASIC、12…インターフェース部、14…CPU、16…ワークメモリ、18…JPEG伸張ブロック、20…伸張データバッファ、22…Hリサイズバッファ、24…Vリサイズバッファ、26…リサイズブロック、28…プリント制御部、30…フラッシュROM、32…印画ヘッド   DESCRIPTION OF SYMBOLS 10 ... ASIC, 12 ... Interface part, 14 ... CPU, 16 ... Work memory, 18 ... JPEG decompression block, 20 ... Decompression data buffer, 22 ... H resize buffer, 24 ... V resize buffer, 26 ... Resize block, 28 ... Print Control unit, 30 ... flash ROM, 32 ... printing head

Claims (4)

M行N列のブロックに分割された1コマ分の画像データを、1行1列のブロックからM行N列のブロックまでn×n画素からなるブロック単位で順次圧縮するとともに、各行の最終列のブロックの直後にリスタートインターバルマーカを挿入したデータ構造の圧縮データを作成する圧縮手段と、
前記圧縮手段によって圧縮された1コマ分の圧縮データを記憶するメモリと、
任意の1列分のブロックのブロック番号に関連づけて該ブロックの圧縮データの書込位置を示す位置情報と、そのブロックの圧縮データの先頭値から絶対値を算出するための累算値とを記憶する情報テーブルと、
第1列のブロックのブロック番号に関連づけて各行の最終列のブロックの直後に挿入されたリスタートインターバルマーカの書込位置を示す位置情報及び0の累算値を前記情報テーブルに書き込むとともに、前記位置情報及び累算値を更新させる情報テーブル作成手段と、
前記情報テーブルに記録された位置情報に基づいて各列のブロックの圧縮データを読み出す読出手段と、
前記読み出したブロックの圧縮データを前記情報テーブルに記憶された累算値を利用して復号する復号手段と、
所望の画像サイズの出力画像のデータ量よりも小さい容量のバッファ手段と、
前記復号手段によって復号されたn×n画素のブロック内の画像データの出力順を入れ替えて前記バッファ手段に書き込む書込手段と、を備え、
前記情報テーブル作成手段は、前記読出手段によって各行の第i列(1≦i≦N)のブロックの圧縮データが読み出され、前記復号手段による復号が完了すると、前記情報テーブルの各行の第i列のブロックの圧縮データの読み出しに使用した位置情報を各行の第i+1列のブロックの圧縮データの書込位置を示す位置情報に更新するとともに、前記情報テーブルに記録された累算値を各行の第1列から第i列までのブロックの圧縮データの先頭値の累算値に更新し、
前記バッファ手段から90度回転させた画像データを出力可能にすることを特徴とする画像処理装置。
Image data for one frame divided into blocks of M rows and N columns is sequentially compressed in blocks of n × n pixels from blocks of 1 row and 1 column to blocks of M rows and N columns, and the final column of each row Compression means for creating compressed data having a data structure in which a restart interval marker is inserted immediately after the block of
A memory for storing compressed data for one frame compressed by the compression means;
Stores position information indicating the write position of the compressed data of the block in association with the block number of the block for an arbitrary column, and an accumulated value for calculating the absolute value from the first value of the compressed data of the block An information table to
The position information indicating the writing position of the restart interval marker inserted immediately after the last column block of each row in association with the block number of the first column block and the accumulated value of 0 are written to the information table, and Information table creation means for updating the position information and the accumulated value;
Reading means for reading out the compressed data of the blocks in each column based on the position information recorded in the information table;
Decoding means for decoding the compressed data of the read block using an accumulated value stored in the information table;
Buffer means having a capacity smaller than the data amount of the output image of the desired image size;
Writing means for changing the output order of the image data in the block of n × n pixels decoded by the decoding means and writing to the buffer means;
The information table creating means reads the compressed data of the i-th column (1 ≦ i ≦ N) block of each row by the reading means, and when the decoding by the decoding means is completed, the information table creating means completes the i-th row of the information table. The position information used for reading the compressed data of the block in the column is updated to position information indicating the writing position of the compressed data in the block of the (i + 1) th column in each row, and the accumulated value recorded in the information table is updated in each row. Update the accumulated value of the first value of the compressed data of the blocks from the first column to the i-th column,
An image processing apparatus capable of outputting image data rotated by 90 degrees from the buffer means.
任意サイズの画像データの圧縮データを1コマ分連続的に受信するインターフェース手段と、n×n画素のブロック単位で圧縮データを伸張する伸張手段と、前記伸張手段によって伸張されたn×n画素の画像データを一時記憶する伸張データバッファ手段と、前記伸張データバッファ手段に記憶されたn×n画素の画像データを任意サイズに変換処理し、前記バッファ手段に出力する解像度変換手段と、を更に備え、前記圧縮手段は、前記バッファ手段に処理可能な単位の画像データが保持されると、n×n画素のブロック単位で順次圧縮したデータ構造の圧縮データを作成することを特徴とする請求項1に記載の画像処理装置。   Interface means for continuously receiving compressed data of image data of an arbitrary size for one frame, decompression means for decompressing compressed data in block units of n × n pixels, and n × n pixel decompressed by the decompression means A decompression data buffer means for temporarily storing image data; and a resolution conversion means for converting the n × n pixel image data stored in the decompression data buffer means into an arbitrary size and outputting the converted data to the buffer means. 2. The compression unit according to claim 1, wherein when the image data in a unit that can be processed is held in the buffer unit, the compression unit creates compressed data having a data structure that is sequentially compressed in units of blocks of n × n pixels. An image processing apparatus according to 1. 前記解像度変換手段は、画像サイズを縮小又は拡大する倍率a/b(a,b:自然数)に応じて補間演算に使用する補間係数が記憶された補間テーブルであって、倍率a/bの分母bの画素数を1周期として分子aの数だけ補間係数の組み合わせを有する補間テーブルと、前記1コマ分の画像データの画像サイズと所望の出力画像の画像サイズとに基づいて画像サイズを縮小又は拡大する倍率a/bを算出し、この算出した倍率a/bに基づいて前記補間テーブルに補間係数を記憶させ、又は複数の補間テーブルから前記算出した倍率a/bに対応する補間テーブルを補間演算に使用する補間テーブルとして設定するテーブル設定手段とを含み、前記伸張データバッファ手段に記憶されたn×n画素の画像データを前記補間テーブルの補間係数に基づいて補間演算して解像度変換することを特徴とする請求項2に記載の画像処理装置。   The resolution conversion means is an interpolation table storing interpolation coefficients used for interpolation calculation in accordance with a magnification a / b (a, b: natural number) for reducing or enlarging the image size, and a denominator of the magnification a / b The image size is reduced or reduced based on an interpolation table having combinations of interpolation coefficients corresponding to the number of numerators a with the number of pixels b as one cycle, and the image size of the image data for one frame and the image size of a desired output image. Magnification magnification a / b is calculated, and an interpolation coefficient is stored in the interpolation table based on the calculated magnification a / b, or an interpolation table corresponding to the calculated magnification a / b is interpolated from a plurality of interpolation tables. Table setting means for setting as an interpolation table used for calculation, and n × n pixel image data stored in the decompressed data buffer means The image processing apparatus according to claim 2, characterized in that the resolution conversion by interpolation calculation based on. 前記解像度変換手段は、前記任意サイズの画像データをM行N列のブロックに分割してなる複数のブロックのi行j列(1≦i≦M,1≦j≦N)のブロックのn×n画素の画像データの水平方向の解像度変換時に、i行j列のブロックのn列の画像データと該n列の画像データに対応する前記補間テーブルの1周期上の位置とをi行j+1列のブロックの画像データの解像度変換まで保持して前記i行j+1列のブロックの画像データの解像度変換に使用し、垂直方向の解像度変換時にi行j列のブロックのn行の画像データと該n行の画像データに対応する前記補間テーブルの1周期上の位置とをi+1行j列のブロックの画像データの解像度変換まで保持して前記i+1行j列のブロックの画像データの解像度変換に使用することを特徴とする請求項3に記載の画像処理装置。   The resolution converting means is an n × x block of i rows and j columns (1 ≦ i ≦ M, 1 ≦ j ≦ N) of a plurality of blocks obtained by dividing the image data of an arbitrary size into blocks of M rows and N columns. At the time of converting the resolution of the image data of n pixels in the horizontal direction, the image data of n columns of the block of i rows and j columns and the position in one cycle of the interpolation table corresponding to the image data of the n columns are i rows and j + 1 columns. Up to the resolution conversion of the image data of the i-th block, and used for the resolution conversion of the image data of the i-row, j + 1-column block, and the n-row image data of the i-row / j-column block and the n The position of one cycle of the interpolation table corresponding to the image data of the row is held until the resolution conversion of the image data of the block of i + 1 row j column, and used for the resolution conversion of the image data of the block of i + 1 row j column. Specially The image processing apparatus according to claim 3,.
JP2005135319A 2005-05-06 2005-05-06 Image processing apparatus Pending JP2006313985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005135319A JP2006313985A (en) 2005-05-06 2005-05-06 Image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005135319A JP2006313985A (en) 2005-05-06 2005-05-06 Image processing apparatus

Publications (1)

Publication Number Publication Date
JP2006313985A true JP2006313985A (en) 2006-11-16

Family

ID=37535301

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005135319A Pending JP2006313985A (en) 2005-05-06 2005-05-06 Image processing apparatus

Country Status (1)

Country Link
JP (1) JP2006313985A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010079535A (en) * 2008-09-25 2010-04-08 Mitsubishi Electric Corp Data access device
US8587807B2 (en) 2008-11-05 2013-11-19 Seiko Epson Corporation Image processing apparatus with mechanism for rotating image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010079535A (en) * 2008-09-25 2010-04-08 Mitsubishi Electric Corp Data access device
US8587807B2 (en) 2008-11-05 2013-11-19 Seiko Epson Corporation Image processing apparatus with mechanism for rotating image

Similar Documents

Publication Publication Date Title
US8503827B2 (en) Apparatus and method for decoding image data
US6442302B2 (en) Rotated read-out of JPEG compressed images
JPH10112796A (en) Device for rotating image with small memory by using jpeg compression
US8456687B2 (en) Image data processing apparatus, image data processing method, and program
JP5383416B2 (en) Image processing apparatus, control method therefor, and program
US20020122198A1 (en) Method and apparatus for image processing, and storage medium
US6175653B1 (en) Fast decompression and rotation for devices with asymmetric resolution
US7742199B2 (en) System and method for compressing and rotating image data
US7570822B2 (en) Image processing apparatus, printer and control method of the image processing
JP2007251423A (en) Image processing unit and method
US6353682B2 (en) Rotated read-out of JPEG compressed images
JP2006313984A (en) Image processing apparatus
JP2006313985A (en) Image processing apparatus
US6934417B2 (en) Transcoding scheme for assistance in image transformations
JP2006304243A (en) Image processor, printer and image processing method
JP2006340338A (en) Image processor
JP2006313983A (en) Image processing apparatus
JP2006313986A (en) Image processing apparatus and method
JP2006313982A (en) Image processing apparatus and method
JP2004165733A (en) Image converter, image conversion method, and recording medium
JP2020088694A (en) Image processing apparatus and image processing method
US20210303946A1 (en) Image processing apparatus, image processing method, and storage medium
JP2009038740A (en) Image encoding device
JP3593727B2 (en) Image compression device
JP2001085999A (en) Image compression and expansion device

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20070116