JPWO2003034709A1 - Decompression method and data processing apparatus - Google Patents

Decompression method and data processing apparatus Download PDF

Info

Publication number
JPWO2003034709A1
JPWO2003034709A1 JP2003537299A JP2003537299A JPWO2003034709A1 JP WO2003034709 A1 JPWO2003034709 A1 JP WO2003034709A1 JP 2003537299 A JP2003537299 A JP 2003537299A JP 2003537299 A JP2003537299 A JP 2003537299A JP WO2003034709 A1 JPWO2003034709 A1 JP WO2003034709A1
Authority
JP
Japan
Prior art keywords
compressed data
block
data
image
block compressed
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
JP2003537299A
Other languages
Japanese (ja)
Inventor
徳康 森
徳康 森
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.)
Naltec Inc
Original Assignee
Naltec Inc
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 Naltec Inc filed Critical Naltec Inc
Publication of JPWO2003034709A1 publication Critical patent/JPWO2003034709A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Abstract

画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとして、その画素ブロック内に含まれる画素データが少なくともエントロピー符号化を用いて圧縮されたブロック圧縮データを複数含む圧縮データを伸長する際に、圧縮データに含まれるブロック圧縮データを順番に部分的に伸長し、そのブロック圧縮データにアクセスするための位置情報を少なくとも含む途中情報を取得し、少なくとも幾つかのブロック圧縮データの途中情報を記憶する準備工程と、画像の任意の領域を伸長する際に、記憶された途中情報を用いて任意の領域に対応するブロック圧縮データを伸長する伸長工程とを有する伸長方法を提供する。ブロック圧縮データを全てではなく部分的に復号して途中情報を記憶しておくことにより、この途中情報を元に画像データを任意の位置から伸長することが可能であり、記憶容量の少ない印刷装置でも画像データを出力できる。When an image is divided into a plurality of matrices, and the matrix is used as one pixel block, and decompressed compressed data that includes a plurality of block compressed data in which the pixel data included in the pixel block is compressed using at least entropy coding In addition, block compressed data included in the compressed data is partially decompressed in order, intermediate information including at least position information for accessing the block compressed data is obtained, and intermediate information of at least some block compressed data is obtained. There is provided a decompression method including a preparation step for storing, and a decompression step for decompressing block compressed data corresponding to an arbitrary region using the stored intermediate information when an arbitrary region of an image is decompressed. A printing apparatus with a small storage capacity that can partially decode block compressed data, not all, and store intermediate information so that image data can be expanded from an arbitrary position based on the intermediate information. But it can output image data.

Description

技術分野
本発明は、圧縮データを伸長する方法および装置に関するものである。
背景技術
近年、デジタルカメラの登場により、撮影した画像をデジタル化された画像データとしてパーソナルコンピュータに取り込み、プリンタでその画像データを手軽に印刷できる。撮影した画像は適当な方式で圧縮されたデータ(圧縮データ)としてパーソナルコンピュータに取り込まれる。このため、パーソナルコンピュータで、圧縮データを伸長し、縦横回転、色調整、ディザ化などの画像処理を行なうことにより補正された2次元画像をプリンタで印刷できる。
圧縮方式の一つであるJPEG(Joint Photographic Cording Experts Group)方式は、1つの画像を形成するドットマトリクスの情報が、その左側から右側に、そして上から下、すなわち、左上から右下に向って8ドット×8ドットの画素ブロック単位で圧縮格納されている。すなわち、JPEGでは、画像を形成するドットマトリクスが、8ドット×8ドットの小さなドットマトリクスに分割され、その小マトリクスを1つの画素ブロックとして圧縮して1つのブロック圧縮データとし、複数のブロック圧縮データの集合で1つの画像を圧縮したデータを形成している。なお、画素ブロックの単位は8ドット×8ドットに限定されずに、16ドット×16ドットなどのデータを単位として圧縮することも可能である。
JPEG方式による圧縮では、まず、画像を形成するドットマトリクスの画像データを原色系(RGB)の色空間から色差系(YCbCr)の色空間の画素データに変換する。次に、8ドット×8ドットの画素ブロックに分割し、このブロック単位で変換された画素データを離散コサイン変換(DCT:Discrete Cosine Transform)する。さらに、離散コサイン変換時に得られたDCT係数を量子化テーブルを用いて量子化する。量子化されたDCT係数は、さらに、エントロピー符号化(ハフマン符号化)により圧縮される。符号化の際、量子化されたDCT係数のDC成分およびAC成分のうち、DC係数(成分)は直前の画素ブロックのDC係数に対する差分値が符号化される。
図17に、JPEG方式により圧縮された画像データ100のデータフォーマットを示してある。圧縮データ100は、最上位のイメージまたはルート階層101と、このイメージ階層101の下位のフレーム階層102と、このフレーム階層102の下位のスキャン階層103とに階層化されている。イメージ階層101は、イメージの先頭マーカー(SOI:Start of Image)から始まりイメージの終了マーカー(EOI:End of Image)によって終端され、これらのマーカー間に複数のフレーム階層102のデータF1、F2〜Fn、ハフマンテーブル、量子化テーブルなどを含んでいる。
フレーム階層102は、フレームの先頭マーカー(SOF:Start of Flame)から始まり、フレームヘッダやテーブルなどに続いて少なくとも一つのスキャン階層103のデータSm(mはゼロを除く整数)を含んでいる。
スキャン階層103は、スキャンの先頭マーカー(SOS:Start of Scan)から始まり、スキャンヘッダ、複数のエントロピー符号化セグメント(ECS:Entropy Coded Segment)が入り、さらに、各々のECSi(iは0を含む整数)の後にリスタート間隔終端マーカー(RST:Restart Interval Termination)が入っている。そして、ECSiに圧縮された画素ブロック、すなわち、ブロック圧縮データが最小符号化単位(MCU:Minimum Coded Unit)という形で少なくとも1つが含まれている。
したがって、JPEG圧縮データ100を復号する際は、これらの階層構造を解析し、各階層のヘッダなどに含まれたデータを利用し、MCUで圧縮されたデータを、ハフマン復号化、逆量子化、逆DCT、RGB変換と圧縮したときの逆の手順を経ることで伸長することが可能である。
デジタルカメラで撮影した画像はJPEG方式で圧縮されたデータとして提供される。この圧縮データ100を直にプリンタへ送って印刷することが考えられている。デジタルカメラとプリンタをUSBなどの適当なインターフェイスケーブルで接続したり、メモリスティック、コンパクトフラッシュメモリ、リムーバブルディスクなどのデジタルカメラの記録メディア用のインターフェイスをプリンタに搭載することにより、圧縮されたデータをプリンタに供給できる。したがって、プリンタが圧縮されたデータを伸長して印刷する能力を備えていれば良い。プリンタのハードウェア資源を考慮すると、直にプリンタに圧縮データを送って印刷する方式では、画像の縦横回転やディザ化などの画像補正を行なえないが、デジタルカメラとプリンタさえあれば手軽に印刷することができるので、有用な印刷方法である。
しかしながら、この方法で印刷を行おうとすると、図18に示すように、JPEG方式のデータフォーマットは階層化されているので、JPEG圧縮されたデータ100をシーケンシャルに復号し、いったん、全体の画像データを示すドットマトリクス109をメモリに収納する必要がある。そして、復号されたドットマトリクス109から印刷するデータをプリンタの印刷ヘッドなどに送って印刷する。圧縮データ100を復号するスピードと印刷速度とが同期できたとしても、圧縮データ100に含まれたMCUの並びと、プリントアウト7を作成する際の印刷ヘッドの動きの方向が必ずしも一致しないので、事前に全ての画像データを復号しておく必要がある。
このため、JPEG圧縮されたデータをプリンタで直に印刷しようとすると、圧縮されたデータを伸長した後の数Mb〜数十Mbに及ぶ画像データ(ドットマトリクス)を記録できる容量のRAMをプリンタに搭載する必要があり、プリンタのコストが高くなる。特に、近年のデジタルカメラは数百万画素などの高解像度の画像を撮影できるようになってきており、伸長後の画像データのサイズは非常に大きい。したがって、プリンタに直にJPEG圧縮データを送ってプリンタで印刷しようとすると、プリンタに膨大な容量のメモリを搭載する必要がある。JPEG画像を印刷するために開発されたプリンタであれば良いが、家庭やオフィスで使用されるプリンタでJPEG画像を印刷する機会はそれほど多くないので、大容量のメモリをプリンタに搭載しても常にそれが有効利用されるとも限らず、過剰投資となる可能性が高い。
また、携帯電話やPDAなどの携帯端末を介してJPEG画像を印刷するケースも増加すると考えられるが、これらの携帯端末はサイズの都合からそれほど大容量のメモリを搭載することができない。したがって、今後、デジタルカメラの解像度が高くなれば、携帯端末を介して印刷することも困難になると考えられる。
特開2001−111841号公報には、JPEGで圧縮された画像を分割印刷する際に、既に取得されたキャッシュデータに基づいて、印刷しようとする領域のデータだけを部分的に復元することが記載されている。しかしながら、特開2001−111841号公報に開示された技術では、部分的に復元するためには、事前に画像復元部において、所定のアルゴリズムにしたがってJPEG形式の圧縮画像データを全て復元する必要があり、結局、JPEG形式の圧縮画像全体を復元するリソースを有することが要求される。したがって、上記の問題に対する解決手段を提供するものではない。
一方、JPEG画像を表示する場合について考える。カーナビゲーションシステムのように、JPEGデータ(地図データ)の一部をモニタに表示させ、車両の移動に追従して表示されるデータをスクロールさせる場合、圧縮された地図データを伸長して全体画像をメモリに展開し、表示させる領域に対応した部分画像のみを表示する。メモリに予め全体画像が展開されるので、モニタに表示する部分の位置を変えるだけで車両の移動に追従してスムーズに表示画面をスクロールさせることができる。しかしながら、スクロールさせる点では良いかもしれないが、全体画像を展開できるだけの容量のメモリが必要になってしまう。また、現時点または直ぐには表示する必要のない範囲の画像がメモリに展開されていることになるので、メモリの利用効率の点でも好ましくない。また、全体画像を地域毎に細分化された複数の地図データに分割しておき、メモリに展開する地図データを頻繁に切り替えるようにすることも考えられる。これにより、全体画像のサイズを小さくでき、表示のためにデータを展開しておくためのメモリ容量も少なくできると考えられる。しかしながら、この場合、メモリに展開する地図データの切り替えが車両の移動に追従して高速に行われないと、表示画面をスムーズにスクロールさせることが難しくなる。したがって、少ないメモリ容量でJPEGデータを部分的またはフレーム単位でスムーズに移動させながら表示または描画することは非常に難しい。
そこで、本発明においては、少ないメモリでJPEG圧縮されたデータを印刷することができる伸長方法を提供することを目的としている。そして、この伸長方法を実現するプログラムあるいは機能を搭載したプリンタを提供することにより、低コストのプリンタであってもJPEG圧縮されたデータをパーソナルコンピュータなどのホスト装置を介さずに、直に印刷することができるプリンタを提供することを目的としている。また、印刷に限定されずに、JPEG圧縮されたデータを再生または表示するための伸長方法、すなわち、少ないメモリ容量またはメモリでJPEG圧縮されたデータをフレーム単位で再生または表示することが可能な伸長方法を提供することも本発明の目的である。
発明の開示
本発明においては、画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとして、その画素ブロック内に含まれる画素データがブロック圧縮データとして圧縮され、複数のブロック圧縮データを含む圧縮されたデータを伸長する際に、シーケンシャルに全ての画像データを復号するのではなく、ブロック圧縮データを、部分的に(全てではなく)、しかしながら画像全体にわたりシーケンシャルに復号する準備工程を設け、その準備工程で得られた途中情報を元に画像データを任意の位置から伸長できるようにしている。これにより、印刷に必要な領域の画像データを全て復号することにより印刷に必要なメモリを大幅に削減するようにしている。また、画像をフレーム単位で再生または表示する場合にも、表示に必要な領域のみの画像データを全て復号することにより表示に必要なメモリまたはメモリ容量を削減するようにしている。
すなわち、本発明の伸長方法は、画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとして、その画素ブロック内に含まれる画素データが少なくともハフマン符号化などのエントロピー符号化により圧縮されたブロック圧縮データを含む圧縮データを伸長方法であって、圧縮データに含まれるブロック圧縮データを順番に部分的に伸長し、そのブロック圧縮データにアクセスするための位置情報を少なくとも含む途中情報を取得し、少なくとも幾つかのブロック圧縮データの途中情報を記憶する準備工程と、2次元画像の任意の領域を伸長する際に、記憶された途中情報を用いて、任意の領域に対応するブロック圧縮データを伸長する伸長工程とを有する。
エントロピー符号化を用いて圧縮している圧縮データは可変長符号化されており、逆ハフマン符号化(ハフマン復号化)などの逆エントロピー符号化を行わないとブロック圧縮データの単位を把握できない。逆に言うと、逆エントロピー符号化を行うことにより、ブロック圧縮データを全て伸長しなくてもブロック圧縮データのデータ単位は把握することができ、そのブロック圧縮データにアクセスするための位置情報を取得できる。したがって、2次元画像の任意の領域を伸長する際にアクセスすべきブロック圧縮データを見つけることができるので、伸長工程においては、その領域を表示あるいは印刷するために必要な最小限のブロック圧縮データを伸長するだけでよい。そして、準備工程においては、ブロック圧縮データを全て伸長する必要がないので、そのためのハードウェアリソースや処理時間は不要であり、大容量の画像データを圧縮した圧縮データから画像データを部分的に伸長すれば良いアプリケーションを少ないリソースで高速に実行することができる。
したがって、本発明の伸長方法では、準備工程において、短時間に任意のブロック圧縮データを伸長するための途中情報を得ることができるので、伸長工程においては、印刷する方向や領域に画像データを生成するために必要なブロック圧縮データを伸長することができる。また、任意のブロック圧縮データを伸長するために必要な途中情報は限定されているので、画像を構成する全てのブロック圧縮データを伸長するための途中情報を準備工程で取得して記憶したとしても、その容量は、画像を構成する全てのブロック圧縮データを全て伸長した画像データを記憶するために必要な容量をかなり下回る。
本発明の伸長方法を採用することにより、JPEG方式などのエントロピー符号化を利用して圧縮された画像データを、少ない記憶容量で印刷出力することが可能となる。このため、本発明の伸長方法の準備工程と伸長工程とをコンピュータあるいはプロセッサなどで実行可能な命令を有するプログラム(プログラム製品)を提供し、プリンタにインストールすることによりJPEG方式などで圧縮されたデータを直に印刷できる低コストのプリンタを提供できる。プログラムまたはプログラム製品は適当な記録媒体に記録して、または、コンピュータネットワークを介して供給することができる。また、本発明の伸長方法の準備工程と伸長工程の処理をハードウェアロジックなどで実行可能な準備手段および伸長手段を備えたデータ処理装置を提供し、そのデータ処理装置をプリンタに搭載することによっても低コストでJPEG圧縮されたデータを直に印刷できるプリンタを提供できる。
また、伸長すべき、あるいは表示・印刷に必要な圧縮ブロックデータのみを最後まで伸長すれば良いので、画像データ全体を最後まで伸長するのに比べれば、処理に必要なメモリ装置または記憶装置の容量は少なくて良い。このため、小容量のメモリ装置が搭載されたマイクロプロセッサを用いて処理を行うことが可能である。したがって、プリンタやデータ処理装置に伸長処理を見越した容量のメモリは不要であり、メモリ装置が搭載されたマイクロプロセッサを用いるとしても、プリンタやデータ処理装置のトータルのコストを低減できると考えられる。また、プロセッサ内のメモリ装置を用いることにより、プロセッサ内の高速な幅の広いバスでメモリ装置にアクセスすることが可能であり、キャッシュメモリなどを積まない安価なプロセッサを用いても伸長処理または印刷処理を高速に動作させることが可能である。
上述したように、準備工程で取得する途中情報は、印刷するときに伸長するブロック圧縮データへアクセスするために、そのブロック圧縮データにアクセスするための位置情報を少なくとも含んでいる必要がある。さらに、ブロック圧縮データに、2次元画像の画素ブロック内に含まれる画素データが少なくとも離散コサイン変換、量子化およびハフマン符号化により圧縮されている場合は、ブロック圧縮データは、量子化された離散コサイン係数の値を差分情報として含むことによりデータ量を減らしている。このため、準備工程では、先行するブロック圧縮データを部分的に伸長した際に離散コサイン係数を含む途中情報を取得することが望ましい。また、圧縮データには、2次元画像のブロック圧縮データが、スキャン方向に、スキャン単位および/またはフレーム単位で階層化されている場合は、準備工程では、ブロック圧縮データをスムーズに伸長するためには、ブロック圧縮データが含まれるスキャン単位および/またはフレーム単位の階層化情報を含む途中情報を取得することが望ましい。
さらに、通常のプリンタでは印刷方向が事前に定まっているので、全てのブロック圧縮データに対応した途中情報を記憶する必要はなく、最初に印刷される領域の画素ブロックを含むブロック圧縮データの途中情報だけを記憶すれば印刷を開始できる。このように準備工程で記憶する途中情報を限定することにより、さらにプリンタで用意する記憶容量を削減することができる。このため、準備工程では、2次元画像を印刷する場合は、印刷方向にあたるスキャン方向またはスキャン方向に直交するサブスキャン方向に並んだブロック圧縮データの途中情報を記憶する。そして、印刷工程では、印刷方向にあたるスキャン方向またはサブスキャン方向に並んだ画素ブロックを途中情報に基づき伸長すると共に、サブスキャン方向またはスキャン方向にそれぞれ連続する、次に伸長すべきブロック圧縮データの途中情報を取得することが望ましい。
また、本発明の伸長方法は、印刷に限らず、画像を表示する処理にも利用することが可能であり、大きな静止画像の任意の領域を表示する場合は、任意の領域またはフレームに対応した途中情報を記憶しておき、この途中情報を活用することにより任意の領域のブロック圧縮データだけを伸長して表示すべき領域の画像のみをフレーム単位で表示できる。このため、伸長後の画像を展開できるだけのメモリ容量は不要である。
したがって、本発明の伸長方法を採用することにより、JPEG方式などにより圧縮された画像データの一部、または指定されたフレームに対応する部分を表示する場合であっても、少ない記憶容量で再生出力することが可能となる。このため、準備工程と伸長工程とをコンピュータで実行可能な命令を有するプログラムをROMやディスクなどの適当な記録媒体に記録して、あるいはネットワークを介して提供し、パーソナルコンピュータなどのホスト装置にインストールすることにより、JPEG圧縮されたデータを部分的に表示する処理を少ない記憶容量で実行できるホスト装置を提供できる。もちろん、ハードウェアロジックなどで実行可能な準備手段および伸長手段を備えたデータ処理装置を提供することも可能であり、そのデータ処理装置をカーナビゲーションシステムなどの表示装置に搭載することにより、JPEG圧縮された地図データの一部の画像を少ない記憶容量でスムーズに表示できる表示装置を提供できる。
また、カーナビゲーションシステムのように、画像をスクロールさせながら表示する場合は、表示あるいは印刷するために伸長する工程においては、画像の異なる領域を伸長して表示あるいは印刷する際には、事前に表示あるいは印刷などのために伸長された領域と重複した部分については伸長を行わず、残りの部分を伸長すれば良い。これにより、伸長済みの部分を活用して効率の良い表示を行うことが可能であり、表示画像をスムーズにスクロールすることが可能になる。表示または伸長すべき領域は、円、楕円、矩形など様々な形状の領域を含む。
発明を実施するための最良の形態
以下に図面を参照して本発明をさらに詳しく説明する。図1に本発明のデータ処理装置を備えたプリンタとデジタルカメラが接続されたデータ処理システムの一例を示してある。本例では、インクジェットプリンタ2と、デジタルカメラ3がUSBなどの適当なインターフェイスケーブル4によりパーソナルコンピュータを経由させずに直に接続されている。本例のデジタルカメラ3は、Exif2.0規格に対応したものであり、撮影された2次元画像を、図17で説明したJPEGのデータフォーマットで保存する。そして、デジタルカメラ3からJPEG圧縮されたデータ100がプリンタ2に供給されて印刷される。
図2にプリンタ2の概略を示してある。本例のプリンタ2は、リムーバブルディスク、メモリスティック、コンパクトフラッシュメモリなどのストレージ5に対応するインターフェイス11が搭載されたインクジェットプリンタである。このため、ケーブル4の代わりに、ストレージ5にJPEG方式で圧縮されたデータ(以降ではJPEGデータ)を格納してプリンタ2に供給することも可能である。プリンタ2は、印刷用紙7にインク滴を吐出する複数のノズル12を備えた印刷ヘッド13と、この印刷ヘッド13をシャフト14に沿って紙幅方向を印刷時のスキャン方向として往復動するためのモータ15と、印刷時のスキャン方向と垂直な紙送り方向に印刷用紙7をフィードするためにローラ16を駆動するためのモータ17を有している。さらに、プリンタ2は、CPU、RAM、ROMなどによって構成される制御部20を有しており、この制御部20によりモータ15および17やノズル12からインク滴を吐出するタイミングが制御されるようになっている。また、プリンタ2は、JPEGデータ100を展開したり、途中情報を記憶するためのRAM25を備えている。
制御部20は、ストレージ5またはRAM25に保存されたJPEGデータ100を取り込んで伸長(伸張)することが可能なデータ処理装置21と、このデータ処理装置21から供給された印刷データ39に基づいてノズル12を制御して印刷物7を形成するヘッド制御部29を備えている。データ処理装置21は、JPEGデータ100をシーケンシャルに部分的に伸長して途中情報30を取得し、その途中情報30をRAM25に記憶する準備機能22と、RAM25に記憶された途中情報30を用いて印刷する領域に対応するブロック圧縮データ(以降ではMCU)を伸長して印刷データ39を生成する伸長機能23とを備えている。伸長機能23は、次に印刷する領域のMCUを伸長するために途中情報30も作成しRAM25の途中情報30を更新する。
図3に途中情報30の詳細を示してある。最初の2つの情報31aおよび31bは、任意のMCUにアクセスするための位置情報31である。JPEGデータ100においては、図17に示したようにデータフォーマットが決まっているので、フレームヘッダを参照することによりフレームFnのデータ長を把握でき、さらに、スキャンヘッダを参照することによりスキャンSnのデータ長を把握できる。このため、各々のスキャンSmの位置を確定できるので、ECS内の先頭のMCUの位置は把握できる。しかしながら、ハフマン符号化されているので各々のMCUのビット数はハフマン復号しないと把握できない。
このため、本例の準備機能22は、ハフマン復号化、逆量子化、逆DCTおよび色空間の変換の全ての伸長処理を行なうのではなく、位置情報31を得るために最小限必要な伸長処理であるハフマン復号化のみを順番に行う。すなわち、各々のMCUを完全に伸長するのではなく、部分的に伸長する。そして、本例では、途中情報30を記憶するMCUが含まれるECSまでのバイト数31aと、ECSから記憶すべきMCUまでのビット数31bを位置情報31として取得し途中情報30として保存する。
たとえば、図17に示すMCU1については、ルート階層101のヘッダSOIからフレームF1の先頭までのバイト数a1と、フレームF1の先頭からスキャンS1の先頭までのバイト数b1と、スキャンF1の先頭からESC0の先頭までのバイト数c1とを足し合わせたバイト数31a、すなわち、(a1+b1+c1)の値を位置情報31とすることができる。また、MCU2については、MCU1の先頭からMCU2の先頭までのビット数d2を取得し、MCU1までのバイト数(a1+b1+c1)をバイト数31aとして、また、ビット数d2をビット数31bとすることにより位置情報31とすることができる。後続のMCUにおいても同様にアクセス位置31を取得して記憶することができる。そして、MCU・3については、MCU・1までのバイト数(a1+b1+c1)と、MCU・1の先頭からMCU・3までのビット数d3を位置情報31として取得して記憶する。また、スキャンS1に含まれる任意のESC(i−1)の中の任意のMCUの位置情報31は、バイト数31aが、先頭のMCUまでのバイト数(a1+b1+ci1)となり、ビット数31bは、先頭のMCUから任意のMCUまでのビット数となる。さらに、任意のフレームFnに含まれるMCUであれば、ヘッダSOIからそのフレームFnまでのバイト数が加算され、任意のスキャンSmに含まれるMCUであれば、ヘッダSOFからそのスキャンSmまでのバイト数が加算される。このように任意のMCUにアクセスするための位置情報31を取得することが可能であり、アクセスしたいMCUの位置情報31を途中情報30に含めて記憶しておくことにより、JPEGデータ100を先頭から順次アクセスしなくても所望のMCUにダイレクトにアクセスすることができる。
図3に示した途中情報30の3〜5番目のデータ32a、32bおよび32cは、直前のMCUのDC係数32、すなわち、輝度Yと各色CrおよびCbのDC係数である。JPEGデータ100では、DCT係数のうち、DC係数は符号付の16ビットの値であり、直前のMCUとの差分情報として記憶されている。DC係数は16ビットに限定されないが、ある程度の分解能を維持しつつ、高速に処理するには16ビット程度が好ましい値である。位置情報31で所定のMCUにアクセスできたとしても、色空間を構成する各成分毎のDC係数が差分情報であれば、アクセスしたMCUを伸長することはできない。そこで、本例の準備機能22は、位置情報31を得るためにハフマン復号するので、その際に、各々のMCUの差分情報として表されたDC係数が得られることに着目し、それらを累積演算することにより、直前のMCUの輝度Yや各色CrおよびCbのDC係数の値32を求め、途中情報30として記憶できるようにしている。したがって、本例の途中情報30があれば、位置情報31に基づいてアクセスしたMCUを独自に伸長することができる。
さらに、本例では、途中情報30として、スキャン単位および/またはフレーム単位の階層化情報33として、途中情報30が記憶されるMCUが属しているスキャンおよび/またはフレームの階層を示す処理ステート33aと、MCUがスキャン内の何番目のECSに含まれているかを示す情報としてリスタート間隔カウンタ33bとを取得し、記憶する。処理ステート33aは、フレーム外の処理中、フレーム内でスキャン外の処理中、スキャン内でMCU外の処理中、またはMCUの処理中などの階層の深さを示す情報であり、ECSの先頭のMCUの途中情報30であれば、スキャン階層の処理でMCU階層の処理ではなくなり、ECSの2番目以降のMCUの途中情報30であれば、MCU階層の処理となる。一方、リスタート間隔カウンタ33bは、スキャンヘッダSOSの後の処理済みのMCUの数を示す。スキャンヘッダSOSにはRSTまでのMCU数が保存されており、このMCU数とリスタート間隔カウンタ33bとを照らし合わせることによりRSTの位置を特定できる。この階層化情報33を途中情報30に含めることにより、次に伸長するMCUが同一のスキャンやフレームに含まれていないときには、処理状態を上位の階層に即座に移すことが可能になる。
このような途中情報30は一箇所あたり、10数バイト程度の比較的小さなデータ量で表現でき、複数箇所の途中情報30を記憶しておいたとしても、JPEGデータ100を伸長した後のデータを記憶しておく場合に比べれば、遥かに少ないメモリ容量で済む。
図4に、伸長機能23の処理を模式的に示してある。この例では、JPEGデータ100は、画像7のX方向に順番に並んだ画素ブロックを圧縮したMCUを含んでおり、プリンタ2では、Y方向に印刷ヘッドを動かして印刷する。すなわち、JPEGデータ100ではX方向がスキャン方向となり、そのサブスキャン方向が印刷するときのスキャン方向となっている。以降では、JPEGデータ100のスキャン方向を基準として説明する。
準備機能22では、まず、JPEGデータ100に含まれるMCUを順番に部分的に伸長し、画像7のスキャン方向Xの左端のサブスキャン方向Yを構成するMCUの途中情報30をRAM25に記憶する。伸長機能23は、その途中情報30に基づき、JPEGデータ100のサブスキャン方向Yに並んだMCUにアクセスし、それらを途中情報30に基づき伸長し、印刷データ39を生成する。たとえば、図5に示すように、伸長機能23は、途中情報30に基づき、JPEGデータ100の中からMCU1、MCU7、MCU33・・・MCU144だけを抽出して伸長し、印刷データ39を生成する。印刷ヘッドはサブスキャン方向Yにその印刷データ39を出力することにより印刷を行う。伸長機能23は、この際、サブスキャン方向Yに並んだMCUの各々をハフマン復号化、逆量子化、逆DCTおよび色変換を行うので、それらに続くMCUの途中情報30を得ることができる。したがって、RAM25の途中情報30を更新することにより、次のサブスキャン方向Yに並んだMCUを伸長することが可能となる。したがって、RAM25には、常時、サブスキャン方向Yに並ぶ1列、もしくは複数列のMCUの途中情報30が存在するだけで画像7を印刷することが可能となる。
図6に印刷時の処理をフローチャートを用いて示してある。まず、ステップ41において、JPEGデータ100が供給されると、ステップ42で準備機能23によりJPEGデータ100をサーチして所定のMCUについて途中情報30を取得して記憶する。次に、ステップ43で、再生機能24によりRAM25に記憶された途中情報30に基づいて、JPEGデータ100の所望のMCUにアクセスし、それらを完全に伸長する。そして、完全に伸長した画素データを印刷データ39として印刷する。同時に、次のMCUを伸長するための途中情報30を生成して更新する。
図7に、準備工程であるステップ42の処理をさらに詳しく示してある。まず、ステップ51において、途中情報30を取得するまでのMCUの数を算出する。たとえば、本例であれば、サブスキャン方向Yに並んだMCUの途中情報30を取得する必要があるので、スキャン方向Xに並ぶMCUの数を、フレーム階層のヘッダ情報などから得られる1ライン当りの画素数などを元に算出する。そして、ステップ52で、途中情報30を取得するMCUになるまで、ステップ53で順番にMCUをハフマン復号する。途中情報30を取得するMCUであると、ステップ55において、位置情報、各成分のDC係数および階層化情報を含む途中情報30を取得し、RAM25に記憶する。ステップ54において、途中情報30を取得すべき全てのMCU、すなわち、サブスキャン方向Yに並ぶ一列のMCUの各々の途中情報30を保存できると準備工程を終了する。
図8に伸長および印刷工程であるステップ43の処理をさらに詳しく示してある。ステップ61において、記憶した途中情報30を読み込み、ステップ62において、途中情報30に基づき所望のMCUにアクセスして、それを伸長して印刷データ39を生成する。この処理をステップ63でサブスキャン方向Yに並ぶ一列の印刷データ39が生成されるまで繰り返し、必要なMCUの全てを伸長したら、ステップ64で印刷データ39を印刷ヘッド13に送って印刷する。この画像データを出力するのに前後して、ステップ66で、図4に示したように、スキャン方向Xに連続するMCUの途中情報30を取得して記憶する処理を行う。そして、ステップ65で画像7の全領域が印刷されるまで、ステップ62に戻って処理を繰り返す。
JPEGデータ100は、上述したように階層構造をなしているので、ステップ42あるいはステップ43でMCUを部分的に、あるいは全面的に伸長する際に、各階層のヘッダ情報を取得しておく必要がある。すなわち、図9に示すように、同一のスキャン階層73に含まれるMCUから異なるスキャン階層73に含まれるMCUの途中情報30を生成する場合は、フレーム内状態に以降してスキャンヘッダSOSを解析する必要がある。同様に、同一のフレーム階層72に含まれるMCUから異なるフレーム階層72に含まれるMCUの途中情報30を生成するときは、ROOT状態71に戻ってフレームヘッダSOFを解析する必要がある。このため、1つのMCUを部分的および全面的に伸長する際に、図10に示すように、ルート状態処理71と、フレーム内状態処理72と、スキャン内状態処理73とを用意している。
図11は、スキャン内状態処理73を示している。準備工程42において連続してMCUを伸長したり、伸長工程43において連続した複数のMCUを伸長する場合に対応している。まず、ステップ81でMCUを伸長し次のMCUの位置を更新した際に、ステップ82でリスタートマーカでなければ、ステップ83でスキャンカウンタをカウントアップし、ステップ84でデータ数分だけのMCUを伸長するまでステップ81に戻って処理を繰り返す。一方、ステップ82でリスタートマーカの場合は、ステップ88でリスタートカウンタおよびMCU状態をクリアし、ステップ89でフレーム内状態72へ移行する。また、ステップ84でデータ数分だけMCUを伸長した後は、ステップ85でリスタートカウンタをカウントアップし、ステップ86でリスタートインターバルに到達していればリスタートカウンタおよびMCU状態をクリアし、リスタートインターバルに到達していなければ、それらの状態を保存する。
図12は、フレーム内状態処理72を示している。まず、ステップ91で1ワード単位で読み出して位置を更新し、ステップ92でスキャンヘッダSOSであれば、ステップ93でスキャンヘッダSOSを読み込み、ステップ94でスキャン内状態処理73に移行する。一方、スキャンヘッダSOSでないときは、ステップ95で読み込んだ内容を確認し、テーブル等であれば、ステップ96でその情報を読み込み、ステップ97でフレーム階層の終端に到達するまで処理を繰り返す。ステップ97でフレームの終端に到達すると、ステップ98でルート内状態処理71へ移行する。
図13は、ルート内状態処理71を示している。まず、ステップ111で1ワード単位で読み出して位置を更新し、ステップ112でフレームヘッダSOFであれば、ステップ113でフレームヘッダSOFを読み込み、ステップ114でフレーム内状態処理72に移行する。一方、フレームヘッダSOFでないときは、ステップ115で読み込んだ内容を確認し、テーブル等であれば、ステップ116でその情報を読み込み、ステップ117でルート階層の終端に到達するまで処理を繰り返す。ステップ117でフレームの終端に到達すると、JPEGデータ100の終端であるので、ステップ118で画像を印刷するジョブから抜ける。
これらの処理は、上記の各ステップを実行する命令を有するプログラムまたはプログラム製品として提供し、汎用のCPUなどのデータ処理装置あるいはプロセッサにより実行させることができる。プログラムは、プリンタ2のファームウェアとしてCD−ROMなどの適当な記録媒体に記録して提供したり、インターネットなどのコンピュータネットワークを介して提供することができる。また、上記の各ステップを実行するハードウェアロジックを備えたデータ処理装置として提供することも可能である。
このように、本例のプリンタ2は、JPEGデータ100を全て伸長してから印刷するのではなく、準備工程42で途中情報30を取得して記憶しておくことにより、伸長工程43では途中情報30を用いて印刷に必要な位置のMCUにダイレクトにアクセスして、そのMCUだけを全面的に伸長するだけで印刷することができる。そして、伸長工程43の処理を繰り返すことにより、JPEGデータ100で圧縮された画像データを全て伸長し、印刷することができる。このため、圧縮データ100の全体を事前に完全に伸長する印刷方法に比べて、印刷処理に必要なメモリの容量を格段に少なくできる。すなわち、本例のプリンタ2であれば、たとえば、サブスキャン方向Yに並ぶ一列分のMCUの途中情報30を格納できる程度のRAM25があればJPEGデータ100を伸長した画像をプリントアウト7として出力できる。したがって、小容量のメモリしかもたない家庭用のプリンタであっても、JPEGデータを直に取得して印刷することが可能となり、プリンタ2とデジタルカメラ3という極めてシンプルで安価なシステムによりデジタルカメラ3で取った画像を印刷し楽しむことができる。
さらに、マイクロプロセッサに搭載されているキャッシュなどの小容量のメモリで圧縮データ100を印刷することも可能であり、プロセッサ外部にメモリのない極めてシンプルなハードウェア構成のプリンタを実現できる。そして、このようなプリンタであれば、プロセッサ内のメモリで圧縮データ100を部分的に伸長して印刷できるので、プロセッサ外部のメモリを用いる構成に比べて印刷スピードも向上する。
また、本発明の伸長方法では、圧縮データ全体を事前に伸長処理する方式に比べて、途中情報30を得るためのハフマン復号化する処理が一見、オーバーヘッドになる。しかしながら、逆DCTや逆量子化の処理が積和演算で比較的時間のかかる処理であるのに対し、逆エントロピー変換であるハフマン復号化は処理時間のかからないビット演算が主な処理である。このため、途中情報30を取得して記憶する処理時間は短く、圧縮データ全体を伸長処理してから印刷を開始するのに比べて、印刷ヘッド13で印刷を開始するタイムラグも短い。また、上述したように、プロセッサ内部のメモリを用いて伸長処理を行える可能性も高いので、このタイムラグもいっそう短くできる。
さらに、事前に途中情報30が得られるので、CPUの能力が許されるのであれば、複数のMCUの復号化処理を並列に行うことも可能である。たとえば、スキャン方向Xに印刷する場合であっても、スキャン方向Xに並んだMCUの途中情報30が事前に得られていることにより、それらのMCUを復号する処理を並列演算で処理することが可能となる。したがって、本発明によりJPEGデータ100の復号処理を高速化できる可能性がある。
なお、DHP(Define Hierarchical Progression)を含む階層符号化型の圧縮データ(JPEG方式で圧縮されたデータ)を説明したが、このDHPマーカが挿入されない形式のJPEG方式で圧縮されたデータにも本発明は適用可能である。この形式のデータは、非階層符号化型と呼ばれてはいるが、単一のフレームになっているだけで、このフレームの下位にスキャンおよびデータの階層があり、データそのものとしてみれば階層化されたデータである。また、データフォーマットは一例であり、たとえば、SOSの位置が画像のスキャンライン毎であることが保証されなかったり、RSTが入っていない場合なども有りえる。そのようなJPEGデータに対しても本発明は有効である。さらに、JPEG方式で圧縮されたデータに限らず、請求の範囲に記載したように、2次元画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとして、その画素ブロック内に含まれる画素データが少なくとも離散コサイン変換、量子化およびハフマン符号化により圧縮されたブロック圧縮データが、スキャン方向に、スキャン単位および/またはフレーム単位で階層化された圧縮データであれば、本発明を適用できる。
また、サブスキャン方向Yに並ぶ一列分のMCUの途中情報を取得し記憶する代わりに、スキャン方向Xに並ぶ1ライン分のMCUの途中情報を形成するようにしても良く、印刷ヘッド13の動きや用紙の向きに応じて途中情報を取得するMCUの位置は自由に設定できる。さらに、インクジェットタイプのプリンタ2を例に説明したが、サーマルタイプやレーザタイプのプリンタであっても良いし、印刷ヘッド13を移動または走査させながら印刷するタイプに限定されずに、ラインタイプのプリンタでも良い。
さらに、本発明の伸長方法は、使用するメモリ容量を大幅に低減できるので、用途はプリンタに限定されず、携帯端末のようにメモリ容量を大きくできない端末を用いて印刷する場合にも好適である。
また、本発明の伸長方法は、印刷に限定されずに、JPEGデータ100を表示、再生または描画出力する場合にも適用可能である。特に、大きな静止画像の任意の領域または任意のフレームを表示する場合に好適である。図14にJPEGデータ100の任意の領域をディスプレイまたはモニタに表示する装置の例としてカーナビゲーションシステム120を示してある。カーナビゲーションシステム120は、モニタ121と、モニタ121に地図(画像)125を表示するなどの制御を行うカーナビ本体122とを有しており、DVDなどの記録媒体またはストレージ123に記録された地図データ(JPEGデータ)100を伸長してモニタ121に表示することができる。カーナビ本体122は、DVD123に対応するインターフェイス11aと、CPU、RAM、ROMなどによって構成される制御部20aと、地図データ100を展開したり、途中情報30を記憶するためのRAM25とを有しており、制御部20aによりモニタ121に地図125が表示される。
制御部20aは、地図データ100を伸長(伸張)することが可能なデータ処理装置21aと、このデータ処理装置21aから供給された表示データ125aに基づいてモニタ121を制御して地図125を表示する表示制御部126を備えている。データ処理装置21aは、準備機能22と、途中情報30を用いて表示する領域に対応するブロック圧縮データを伸長して表示データ125aを生成する伸長機能23とを備えている。また、GPSなどの機能を利用して車の現在位置、モニタ121に表示する地図の縮尺、ユーザにより指定された地域などに応じてモニタ121に表示すべきエリアを認識して伸長機能23で伸長するブロック圧縮データを決定するエリア判定機能127とを備えている。伸長機能23は、エリア判定機能127により決定されたMCUを伸長することにより、モニタ121に表示すべき地図データ125aを生成する。したがって、エリア判定機能127からの指示により、地図データ100の全体画像や、この全体画像の所定のエリアを拡大した部分画像を表示でき、さらに、部分画像については車の現在位置やユーザのマニュアル操作などに応じてモニタ121に表示される部分画像をスクロールさせることができる。これは、全体画像の一部を領域単位またはフレーム単位でスクロールさせながら表示できることを意味する。
伸長機能23は、エリア判定機能127からの指示に応じて、必要なMCUのみを途中情報30に基づいて伸長する。すなわち、指定された領域を1つの単位として伸長するサブ伸長ユニット23aを備えている。サブ伸長ユニット23aは、エリア判定機能127により指定されたMCUであっても、既にモニタ121に表示されているエリアに対応するMCUについては、再度伸長を行わずに新しく表示すべきエリアに対応するMCUのみを伸長する。したがって、サブ伸長ユニット23aは、エリア判定機能127により異なる領域の画像を表示する際には、その異なる領域に含まれるMCUであっても、前回に指定された表示済みの領域と重複した部分については伸長を行わず、残りの部分だけを伸長する。
図15に示すように、モニタ121に表示されている地図(部分画像)125が地図データ100を全て伸長したときの地図(全体画像)のうち、実線で示したフレーム130aで囲われた領域であるとしたときに、車両の移動やユーザからの指示に追従して破線で示したフレーム130b、130c、130dまたは130eで囲われた領域の部分画像をモニタ121に表示する例を説明すると以下の通りである。サブ伸長部23aは、モニタ121に表示する部分がフレーム130aからフレーム130bにスクロールさせるとき、これらのフレームが重複した領域131aについては、伸長を行わずに、フレーム130bの残りの領域(差分領域)132aに対応するMCUのみを伸長する。また、フレーム130aとフレーム130cとの関係では、重複した領域131bについては伸長を行わずに、フレーム130cの残りの領域(差分領域)132bに対応するMCUのみを伸長し、フレーム130aとフレーム130dとの関係では、重複した領域131cについては伸長を行わずに、フレーム130dの残りの領域(差分領域)132cに対応するMCUのみを伸長する。さらに、フレーム130aとフレーム130eとの関係では、重複した領域131dについては伸長を行わずに、フレーム130eの残りの領域132dに対応するMCUのみを伸長する。このように前回と今回のフレームの差分領域のみを伸長することにより、車両の移動に追従した部分画像125のスクロールが実現される。
データ処理装置21aでは、まず、準備機能22により、地図データ100に含まれるMCUを順番に部分的に伸長し、モニタ121に表示すべき部分画像125のスキャン方向Xの左端のサブスキャン方向Yを構成するMCUの途中情報30をメモリ25に記憶する。モニタ121に表示すべき部分画像125のために伸長すべきMCUはエリア判定機能127により決定される。次に、伸長機能23により、これらの途中情報30に基づき、地図画像125のサブスキャン方向Yに並んだMCUにアクセスし、それらを途中情報30に基づき伸長し、地図画像125を表示するための地図データ125aを生成する。そして、それらに続くMCUの途中情報30を更新することにより、次のサブスキャン方向Yに並んだMCUを伸長する処理を繰り返し、地図データ125aを生成する。この地図データ125aをモニタ121に出力することにより地図データで供給された全画像の部分画像に相当する地図画像125が表示される。この地図画像125はスクロールでき、その際に、事前に形成された部分画像125を表示するためのデータが利用される。
図16に、モニタ121に部分画像125をスクロールさせながら表示する処理のフローチャートを示してある。以下では、図15に示したように、モニタ121に表示される部分画像がフレーム130aで囲われた領域からフレーム130bで囲われた領域にスクロールされるとして説明するが、スクロールされる方向はこの例に限定されるものではない。まず、ステップ141において、エリア判定機能127により伸長すべき領域130bに対応するMCUが指定される。次に、ステップ62において、途中情報30が読み込まれる。ステップ142において、モニタ121に表示される画像が変化なければその後の処理は行われなわれず、ステップ151でそのまま部分画像125が表示される。モニタ121に表示すべき領域が異なれば、ステップ143において、サブ伸長ユニット23aにより共通領域または重複領域のMCUが算出される。ステップ144、145、148および149で指定された繰り返し処理により、座標に対応するMCUが、ステップ146で共通領域外であるか判断され、ステップ62において、共通領域外と判断されたMCUのみが伸長される。そして、ステップ151で部分画像125が表示される。
プリンタ2で説明したように、表示開始位置に対応したMCUの途中情報30を記憶し、それに基づいて伸長および途中情報30の更新を繰り返すことにより部分画像125を形成しても良い。また、目的のMCUの途中情報がない場合には、目的位置以前のMCUの途中情報からデータ構造を解析していくことにより目的のMCUの途中情報を得ることが可能である。カーナビゲーションシステム120のように任意の領域を表示するアプリケーションの場合、表示の開始位置は任意なので、フレーム130aとフレーム130bの共通領域131aの差分画像のみを伸長し地図データ125aを生成する処理の方が処理時間が短縮される可能性がある。したがって、カーナビゲーションシステム120のように、部分画像を動かしながら表示するようなアプリケーションにおいても、本発明を適用することにより全体画像にメモリに展開した状態で保持する必要がなく、少ないハードウェアリソースにより部分画像を高速に表示することができる。
なお、矩形状の部分画像を表示する例を説明したが、円形、楕円など様々な領域を1つの単位として表示することも可能である。また、矩形画像をスクロールする例として、カーナビゲーションシステム120を説明したが、パーソナルコンピュータ上で部分画像をディスプレイ上にスクロールさせながら表示させるアプリケーションソフトなど本発明を適用できる範囲は広い。
産業上の利用可能性
本発明の伸長方法およびデータ処理装置は、JPEG形式などにより圧縮されたデータを印刷あるいは表示するのに有効である。したがって、本発明により、少ないハードウェアリソースにより高速で、大容量の画像あるいはその一部を出力可能なプリンタなどの印刷装置、カーナビゲーションシステムなどの表示システムを提供できる。
【図面の簡単な説明】
図1は、本発明に係るデータ処理装置を備えたプリンタとデジタルカメラが接続された様子を示す図である。
図2は、図1に示すプリンタの概略構成を示す図である。
図3は、途中情報の詳細を示す図である。
図4は、伸長機能の処理を模式的に示す図である。
図5は、MCUが伸長されて印刷データが生成され、その印刷データが印刷される様子を示す図である。
図6は、プリンタにおける印刷時の処理を示すフローチャートである。
図7は、準備工程における処理を示すフローチャートである。
図8は、伸長または印刷工程における処理を示すフローチャートである。
図9は、JPEGデータを伸長する際に階層が移り変わる様子を模式的に示す図である。
図10は、1つのMCUを伸長するさいに行なわれる処理を示すフローチャートである。
図11は、図10に示すスキャン内状態処理の詳細を示すフローチャートである。
図12は、図10に示すフレーム内状態処理の詳細を示すフローチャートである。
図13は、図10に示すルート内状態処理の詳細を示すフローチャートである。
図14は、本発明に係るカーナビゲーションシステムの概略を示す図である。
図15は、モニタに表示されている画像をスクロールさせるときの伸長処理を説明するための図である。
図16は、モニタに表示されている画像をスクロールさせる処理を示すフローチャートである。
図17は、JPEGデータのデータフォーマットを示す図である。
図18は、JPEGデータの印刷方法を説明するための図である。
Technical field
The present invention relates to a method and apparatus for decompressing compressed data.
Background art
In recent years, with the advent of digital cameras, captured images can be taken into a personal computer as digitized image data, and the image data can be easily printed by a printer. The photographed image is taken into a personal computer as data (compressed data) compressed by an appropriate method. Therefore, a two-dimensional image corrected by decompressing the compressed data and performing image processing such as vertical / horizontal rotation, color adjustment, dithering, etc., can be printed by a personal computer.
JPEG (Joint Photographic Experts Group), which is one of the compression methods, has the information of dot matrix that forms one image from the left side to the right side, and from top to bottom, that is, from top left to bottom right. It is compressed and stored in pixel block units of 8 dots × 8 dots. That is, in JPEG, a dot matrix forming an image is divided into small dot matrices of 8 dots × 8 dots, and the small matrix is compressed as one pixel block to form one block compressed data, and a plurality of block compressed data The data obtained by compressing one image with the set of The unit of the pixel block is not limited to 8 dots × 8 dots, and it is also possible to compress the data in units of 16 dots × 16 dots.
In compression using the JPEG method, first, image data of a dot matrix forming an image is converted from pixel color data of a primary color system (RGB) to pixel data of a color difference system (YCbCr). Next, the pixel data is divided into 8-dot × 8-dot pixel blocks, and the pixel data converted in units of blocks is subjected to discrete cosine transform (DCT: Discrete Cosine Transform). Furthermore, the DCT coefficient obtained at the time of discrete cosine transform is quantized using a quantization table. The quantized DCT coefficient is further compressed by entropy coding (Huffman coding). At the time of encoding, the DC coefficient (component) among the DC component and AC component of the quantized DCT coefficient is encoded as a difference value with respect to the DC coefficient of the immediately preceding pixel block.
FIG. 17 shows a data format of the image data 100 compressed by the JPEG method. The compressed data 100 is hierarchized into an uppermost image or root hierarchy 101, a frame hierarchy 102 lower than the image hierarchy 101, and a scan hierarchy 103 lower than the frame hierarchy 102. The image layer 101 starts with an image start marker (SOI: Start of Image) and ends with an image end marker (EOI: End of Image), and data F1, F2 to Fn of the plurality of frame layers 102 between these markers. , Huffman table, quantization table, etc.
The frame layer 102 starts with a start marker (SOF: Start of Frame) of the frame, and includes at least one data Sm (m is an integer excluding zero) of the scan layer 103 subsequent to the frame header and the table.
The scan hierarchy 103 starts with a start marker (SOS: Start of Scan), and includes a scan header, a plurality of entropy coded segments (ECS), and each ECSi (i is an integer including 0) ) Is followed by a restart interval termination marker (RST: Restart Interval Termination). In addition, at least one pixel block compressed into ECSi, that is, block compressed data is included in the form of a minimum coding unit (MCU).
Therefore, when decoding the JPEG compressed data 100, these hierarchical structures are analyzed, the data included in the header of each layer is used, and the data compressed by the MCU is subjected to Huffman decoding, inverse quantization, Decompression can be performed through reverse DCT and RGB conversion and the reverse procedure when compressed.
An image taken with a digital camera is provided as data compressed by the JPEG method. It is considered to send the compressed data 100 directly to a printer for printing. Connect the digital camera and the printer with an appropriate interface cable such as USB, or install the interface for the recording media of the digital camera such as memory stick, compact flash memory, removable disk, etc. on the printer. Can supply. Therefore, it is sufficient that the printer has the ability to decompress and print the compressed data. Considering the hardware resources of the printer, the method of sending compressed data directly to the printer and printing cannot perform image correction such as vertical / horizontal rotation or dithering of the image, but it is easy to print if you have a digital camera and printer This is a useful printing method.
However, if printing is performed by this method, as shown in FIG. 18, since the JPEG data format is hierarchized, the JPEG-compressed data 100 is sequentially decoded, and once the entire image data is converted. It is necessary to store the dot matrix 109 shown in the memory. Then, the data to be printed from the decoded dot matrix 109 is sent to a printer print head or the like for printing. Even if the speed at which the compressed data 100 is decoded and the printing speed can be synchronized, the arrangement of MCUs included in the compressed data 100 and the direction of movement of the print head when creating the printout 7 do not necessarily match. It is necessary to decode all the image data in advance.
Therefore, when printing JPEG compressed data directly on a printer, the printer has a RAM having a capacity capable of recording image data (dot matrix) ranging from several Mb to several tens of Mb after decompressing the compressed data. It is necessary to mount it, and the cost of the printer becomes high. In particular, recent digital cameras are capable of taking high-resolution images such as millions of pixels, and the size of the decompressed image data is very large. Therefore, if JPEG compressed data is sent directly to the printer and printing is to be performed by the printer, it is necessary to mount a huge amount of memory in the printer. Any printer developed to print JPEG images can be used, but there are not many opportunities to print JPEG images with printers used in homes and offices. It is not necessarily used effectively, and there is a high possibility of overinvestment.
In addition, it is considered that the number of cases where JPEG images are printed via mobile terminals such as mobile phones and PDAs will increase, but these mobile terminals cannot be equipped with such a large amount of memory due to the size. Therefore, if the resolution of the digital camera becomes higher in the future, it will be difficult to print via the portable terminal.
Japanese Patent Laid-Open No. 2001-111181 describes that when an image compressed with JPEG is divided and printed, only data in an area to be printed is partially restored based on already acquired cache data. Has been. However, in the technique disclosed in Japanese Patent Application Laid-Open No. 2001-111842, in order to partially restore, it is necessary to restore all the compressed image data in JPEG format in advance according to a predetermined algorithm in the image restoration unit. Eventually, it is required to have a resource for restoring the entire compressed image in JPEG format. Therefore, it does not provide a solution to the above problem.
On the other hand, consider the case of displaying a JPEG image. When a part of JPEG data (map data) is displayed on a monitor and the data displayed following the movement of the vehicle is scrolled like a car navigation system, the compressed map data is expanded to display the entire image. Only the partial image corresponding to the area to be displayed is displayed in the memory. Since the entire image is preliminarily developed in the memory, the display screen can be smoothly scrolled following the movement of the vehicle simply by changing the position of the portion displayed on the monitor. However, although it may be good in terms of scrolling, a memory having a capacity sufficient to expand the entire image is required. In addition, since an image in a range that does not need to be displayed at the present time or immediately is developed in the memory, it is not preferable in terms of memory utilization efficiency. It is also conceivable to divide the entire image into a plurality of map data subdivided for each region, and to frequently switch the map data developed in the memory. Thereby, it is considered that the size of the entire image can be reduced and the memory capacity for expanding the data for display can be reduced. However, in this case, it is difficult to smoothly scroll the display screen unless the map data developed in the memory is switched at high speed following the movement of the vehicle. Therefore, it is very difficult to display or draw JPEG data while moving it partially or in units of frames with a small memory capacity.
Accordingly, an object of the present invention is to provide a decompression method capable of printing JPEG-compressed data with a small amount of memory. By providing a printer equipped with a program or function for realizing this decompression method, even a low-cost printer can directly print JPEG-compressed data without using a host device such as a personal computer. An object is to provide a printer that can. Further, the present invention is not limited to printing, but a decompression method for reproducing or displaying JPEG-compressed data, that is, decompression capable of reproducing or displaying JPEG-compressed data in a frame unit with a small memory capacity or memory. It is also an object of the present invention to provide a method.
Disclosure of the invention
In the present invention, an image is divided into a plurality of matrices, the matrix is used as one pixel block, pixel data included in the pixel block is compressed as block compressed data, and compressed including a plurality of block compressed data. When decompressing data, instead of sequentially decoding all image data, a preparatory step is provided for decoding block compressed data partially (not all) but sequentially over the entire image. The image data can be expanded from an arbitrary position based on the intermediate information obtained in step (1). This greatly reduces the memory required for printing by decoding all the image data in the area required for printing. Even when an image is reproduced or displayed in units of frames, the memory or memory capacity required for display is reduced by decoding all the image data of only the area necessary for display.
That is, according to the decompression method of the present invention, an image is divided into a plurality of matrices, and the pixel data included in the pixel block is compressed at least by entropy coding such as Huffman coding. A method for decompressing compressed data including block compressed data, in which the block compressed data included in the compressed data is partially decompressed in order, and intermediate information including at least position information for accessing the block compressed data is obtained. A preparatory process for storing intermediate information of at least some block compressed data, and when decompressing an arbitrary area of a two-dimensional image, using the stored intermediate information, block compressed data corresponding to the arbitrary area is A stretching step for stretching.
The compressed data compressed using entropy coding is variable length coded, and the unit of block compressed data cannot be grasped unless inverse entropy coding such as inverse Huffman coding (Huffman decoding) is performed. In other words, by performing inverse entropy coding, the data unit of block compressed data can be grasped without decompressing all the block compressed data, and position information for accessing the block compressed data is acquired. it can. Therefore, since it is possible to find block compressed data to be accessed when decompressing an arbitrary area of a two-dimensional image, the minimum block compressed data necessary for displaying or printing the area is included in the decompression process. It only needs to stretch. In the preparation process, it is not necessary to decompress all the block compressed data, so hardware resources and processing time are not required, and the image data is partially decompressed from the compressed data obtained by compressing a large amount of image data. It is possible to execute a good application at a high speed with few resources.
Therefore, in the decompression method of the present invention, in the preparation step, it is possible to obtain intermediate information for decompressing arbitrary block compressed data in a short time. Therefore, in the decompression step, image data is generated in the printing direction and area. Therefore, it is possible to decompress the block compressed data necessary for this. Moreover, since the intermediate information necessary for decompressing arbitrary block compressed data is limited, even if intermediate information for decompressing all the block compressed data constituting the image is acquired and stored in the preparation step The capacity is considerably lower than the capacity required to store the image data obtained by decompressing all the block compressed data constituting the image.
By employing the decompression method of the present invention, it is possible to print out image data compressed using entropy coding such as the JPEG method with a small storage capacity. For this reason, a program (program product) having instructions that can be executed by a computer or a processor in the decompression method preparation step and decompression step of the present invention is provided, and the data compressed by the JPEG method or the like by being installed in a printer Can be provided at low cost. The program or program product can be recorded on an appropriate recording medium or supplied via a computer network. In addition, by providing a data processing device including a preparation unit and a decompression unit capable of executing the preparation process of the decompression method of the present invention and the processing of the decompression step with hardware logic, etc., and mounting the data processing device on a printer In addition, it is possible to provide a printer that can directly print JPEG-compressed data at low cost.
In addition, since only the compressed block data to be decompressed or displayed / printed needs to be decompressed to the end, the capacity of the memory device or storage device required for the processing is required as compared to decompressing the entire image data to the end. Is good. Therefore, it is possible to perform processing using a microprocessor equipped with a small-capacity memory device. Therefore, it is considered that a memory having a capacity in anticipation of the decompression process is not required in the printer or data processing apparatus, and the total cost of the printer or data processing apparatus can be reduced even if a microprocessor equipped with the memory apparatus is used. Also, by using a memory device in the processor, it is possible to access the memory device by a high-speed wide bus in the processor, and decompression processing or printing can be performed even by using an inexpensive processor without a cache memory or the like. Processing can be performed at high speed.
As described above, the intermediate information acquired in the preparation step needs to include at least position information for accessing the block compressed data to be expanded when printing. Furthermore, when the pixel data included in the pixel block of the two-dimensional image is compressed at least by discrete cosine transform, quantization, and Huffman coding, the block compressed data is the quantized discrete cosine. The amount of data is reduced by including the coefficient value as difference information. For this reason, in the preparation step, it is desirable to acquire intermediate information including discrete cosine coefficients when the preceding block compressed data is partially expanded. In addition, in the compressed data, when the block compressed data of the two-dimensional image is hierarchized in the scan direction in units of scans and / or frames, in the preparation process, in order to smoothly decompress the block compressed data It is desirable to acquire intermediate information including hierarchized information in scan units and / or frame units in which block compressed data is included.
Furthermore, since the printing direction is determined in advance in a normal printer, there is no need to store intermediate information corresponding to all the block compressed data, and intermediate information of the block compressed data including the pixel block of the area to be printed first. If you only remember, you can start printing. By limiting the intermediate information stored in the preparation step in this way, the storage capacity prepared by the printer can be further reduced. Therefore, in the preparation step, when printing a two-dimensional image, the intermediate information of the block compressed data arranged in the scan direction corresponding to the print direction or the sub-scan direction orthogonal to the scan direction is stored. In the printing process, the pixel blocks arranged in the scan direction or the sub-scan direction corresponding to the print direction are expanded based on the intermediate information, and the block compressed data to be expanded next in the sub-scan direction or the scan direction, respectively. It is desirable to obtain information.
In addition, the decompression method of the present invention can be used not only for printing but also for processing to display an image. When displaying an arbitrary area of a large still image, it corresponds to an arbitrary area or frame. By storing halfway information and using this halfway information, only the image of the region to be displayed can be displayed in units of frames by decompressing only the block compressed data of an arbitrary region. For this reason, it is not necessary to have a memory capacity enough to expand the decompressed image.
Therefore, by adopting the decompression method of the present invention, even when displaying a part of image data compressed by the JPEG method or the like, or a part corresponding to a specified frame, it can be reproduced and output with a small storage capacity. It becomes possible to do. For this reason, a program having instructions that can be executed by a computer for the preparation process and the expansion process is recorded on an appropriate recording medium such as a ROM or a disk, or provided via a network, and installed in a host device such as a personal computer. By doing so, it is possible to provide a host device that can execute a process of partially displaying JPEG-compressed data with a small storage capacity. Of course, it is also possible to provide a data processing device provided with preparation means and decompression means that can be executed by hardware logic, etc., and by mounting the data processing device on a display device such as a car navigation system, JPEG compression is possible. It is possible to provide a display device capable of smoothly displaying a part of the image of the map data that has been recorded with a small storage capacity.
In addition, when displaying an image while scrolling, as in a car navigation system, in the process of expanding for display or printing, a different area of the image is displayed in advance when displayed or printed. Alternatively, a portion overlapping with a region expanded for printing or the like may not be expanded, and the remaining portion may be expanded. As a result, it is possible to perform efficient display by utilizing the expanded part, and it is possible to smoothly scroll the display image. The area to be displayed or expanded includes areas having various shapes such as a circle, an ellipse, and a rectangle.
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described in more detail with reference to the drawings. FIG. 1 shows an example of a data processing system in which a printer equipped with a data processing apparatus of the present invention and a digital camera are connected. In this example, the ink jet printer 2 and the digital camera 3 are directly connected via an appropriate interface cable 4 such as a USB without going through a personal computer. The digital camera 3 of this example is compatible with the Exif 2.0 standard, and stores a captured two-dimensional image in the JPEG data format described with reference to FIG. Then, the JPEG compressed data 100 is supplied from the digital camera 3 to the printer 2 and printed.
FIG. 2 shows an outline of the printer 2. The printer 2 of this example is an inkjet printer equipped with an interface 11 corresponding to the storage 5 such as a removable disk, a memory stick, and a compact flash memory. Therefore, instead of the cable 4, data compressed in the JPEG format (hereinafter referred to as JPEG data) can be stored in the storage 5 and supplied to the printer 2. The printer 2 includes a print head 13 having a plurality of nozzles 12 for ejecting ink droplets onto the print paper 7, and a motor for reciprocating the print head 13 along the shaft 14 with the paper width direction as the scan direction during printing. 15 and a motor 17 for driving the roller 16 to feed the printing paper 7 in the paper feeding direction perpendicular to the scanning direction at the time of printing. Further, the printer 2 has a control unit 20 configured by a CPU, a RAM, a ROM, and the like. The control unit 20 controls the timing of ejecting ink droplets from the motors 15 and 17 and the nozzles 12. It has become. The printer 2 also includes a RAM 25 for expanding the JPEG data 100 and storing intermediate information.
The control unit 20 includes a data processing device 21 capable of taking in and expanding (expanding) the JPEG data 100 stored in the storage 5 or the RAM 25, and nozzles based on the print data 39 supplied from the data processing device 21. 12 is provided with a head control unit 29 that forms the printed matter 7 by controlling the number 12. The data processing device 21 partially decompresses the JPEG data 100 to acquire the intermediate information 30 and uses the preparation function 22 for storing the intermediate information 30 in the RAM 25 and the intermediate information 30 stored in the RAM 25. And a decompression function 23 that decompresses block compressed data (hereinafter referred to as MCU) corresponding to the area to be printed to generate print data 39. The decompression function 23 also creates intermediate information 30 and updates the intermediate information 30 in the RAM 25 in order to expand the MCU of the area to be printed next.
FIG. 3 shows the details of the midway information 30. The first two pieces of information 31a and 31b are position information 31 for accessing an arbitrary MCU. In the JPEG data 100, since the data format is determined as shown in FIG. 17, the data length of the frame Fn can be grasped by referring to the frame header, and further, the data of the scan Sn can be determined by referring to the scan header. I can grasp the length. For this reason, since the position of each scan Sm can be determined, the position of the leading MCU in the ECS can be grasped. However, since the Huffman coding is performed, the number of bits of each MCU cannot be grasped unless Huffman decoding is performed.
For this reason, the preparation function 22 of this example does not perform all the expansion processes of Huffman decoding, inverse quantization, inverse DCT, and color space conversion, but the minimum expansion process necessary to obtain the position information 31. Only Huffman decoding is performed in order. That is, each MCU is not fully extended but partially extended. In this example, the number of bytes 31 a up to the ECS including the MCU storing the halfway information 30 and the number of bits 31 b from the ECS to the MCU to be stored are acquired as the position information 31 and stored as the halfway information 30.
For example, for MCU1 shown in FIG. 17, the number of bytes a1 from the header SOI of the root layer 101 to the beginning of the frame F1, the number of bytes b1 from the beginning of the frame F1 to the beginning of the scan S1, and the ESC0 from the beginning of the scan F1. The position information 31 can be the number of bytes 31a obtained by adding the number of bytes c1 up to the head of the number, ie, the value of (a1 + b1 + c1). For MCU2, the number of bits d2 from the beginning of MCU1 to the beginning of MCU2 is obtained, the number of bytes up to MCU1 (a1 + b1 + c1) is set to the number of bytes 31a, and the number of bits d2 is set to the number of bits 31b. Information 31 can be used. Similarly, the subsequent MCU can acquire and store the access position 31. For MCU · 3, the number of bytes up to MCU · 1 (a1 + b1 + c1) and the number of bits d3 from the beginning of MCU · 1 to MCU · 3 are acquired and stored as position information 31. In addition, in the position information 31 of any MCU in any ESC (i-1) included in the scan S1, the number of bytes 31a is the number of bytes up to the top MCU (a1 + b1 + ci1), and the number of bits 31b is the top The number of bits from an MCU to an arbitrary MCU. Further, if the MCU is included in an arbitrary frame Fn, the number of bytes from the header SOI to the frame Fn is added. If the MCU is included in an arbitrary scan Sm, the number of bytes from the header SOF to the scan Sm. Is added. As described above, it is possible to acquire the position information 31 for accessing an arbitrary MCU. By storing the position information 31 of the MCU to be accessed by including it in the midway information 30, the JPEG data 100 is stored from the top. A desired MCU can be accessed directly without sequential access.
The third to fifth data 32a, 32b, and 32c of the intermediate information 30 shown in FIG. 3 are the DC coefficient 32 of the immediately preceding MCU, that is, the DC coefficient of the luminance Y and the colors Cr and Cb. In the JPEG data 100, the DC coefficient among the DCT coefficients is a signed 16-bit value, and is stored as difference information from the previous MCU. The DC coefficient is not limited to 16 bits, but about 16 bits is a preferable value for high-speed processing while maintaining a certain degree of resolution. Even if a predetermined MCU can be accessed with the position information 31, if the DC coefficient for each component constituting the color space is difference information, the accessed MCU cannot be expanded. Therefore, the preparation function 22 of this example performs Huffman decoding in order to obtain the position information 31. At this time, paying attention to the fact that DC coefficients expressed as difference information of each MCU are obtained, they are cumulatively calculated. As a result, the luminance Y of the previous MCU and the DC coefficient value 32 of each color Cr and Cb are obtained and stored as intermediate information 30. Therefore, if there is halfway information 30 in this example, the MCU accessed based on the position information 31 can be uniquely expanded.
Further, in this example, as the intermediate information 30, as the hierarchized information 33 in units of scans and / or frames, the processing state 33a indicating the hierarchy of the scan and / or frame to which the MCU in which the intermediate information 30 is stored belongs. The restart interval counter 33b is acquired and stored as information indicating the number of ECSs included in the scan. The processing state 33a is information indicating the depth of the hierarchy such as processing outside the frame, processing outside the scan within the frame, processing outside the MCU within the scan, or processing of the MCU, and the like. If it is the intermediate information 30 of the MCU, it is not the processing of the MCU layer in the processing of the scan layer, and if it is the intermediate information 30 of the second and subsequent MCUs of the ECS, it is the processing of the MCU layer. On the other hand, the restart interval counter 33b indicates the number of processed MCUs after the scan header SOS. The scan header SOS stores the number of MCUs up to the RST, and the position of the RST can be specified by comparing the number of MCUs with the restart interval counter 33b. By including the hierarchized information 33 in the midway information 30, when the next decompressed MCU is not included in the same scan or frame, it becomes possible to immediately move the processing state to a higher hierarchy.
Such intermediate information 30 can be expressed with a relatively small amount of data of about 10 or more bytes per location, and even after storing the intermediate information 30 at a plurality of locations, the data after decompressing the JPEG data 100 is stored. A much smaller memory capacity is required compared with the case of storing.
FIG. 4 schematically shows the processing of the decompression function 23. In this example, the JPEG data 100 includes an MCU in which pixel blocks arranged in order in the X direction of the image 7 are compressed, and the printer 2 performs printing by moving the print head in the Y direction. That is, in the JPEG data 100, the X direction is the scan direction, and the sub-scan direction is the scan direction when printing. In the following description, the scanning direction of the JPEG data 100 is used as a reference.
In the preparation function 22, first, the MCU included in the JPEG data 100 is partially expanded in order, and the intermediate information 30 of the MCU constituting the leftmost sub-scan direction Y of the scan direction X of the image 7 is stored in the RAM 25. The decompression function 23 accesses the MCUs arranged in the sub-scan direction Y of the JPEG data 100 based on the halfway information 30, decompresses them based on the halfway information 30, and generates print data 39. For example, as illustrated in FIG. 5, the decompression function 23 extracts and decompresses only MCU1, MCU7, MCU33... MCU144 from the JPEG data 100 based on the intermediate information 30, and generates print data 39. The print head performs printing by outputting the print data 39 in the sub-scan direction Y. At this time, the decompression function 23 performs Huffman decoding, inverse quantization, inverse DCT, and color conversion on each of the MCUs arranged in the sub-scan direction Y, so that intermediate information 30 of the subsequent MCU can be obtained. Therefore, by updating the intermediate information 30 in the RAM 25, it is possible to expand the MCUs arranged in the next sub-scan direction Y. Therefore, it is possible to print the image 7 in the RAM 25 only when the intermediate information 30 of one column or a plurality of columns arranged in the sub-scanning direction Y is always present.
FIG. 6 shows a process during printing using a flowchart. First, when the JPEG data 100 is supplied at step 41, the JPEG data 100 is searched by the preparation function 23 at step 42, and intermediate information 30 is acquired and stored for a predetermined MCU. Next, in step 43, the desired MCU of the JPEG data 100 is accessed based on the intermediate information 30 stored in the RAM 25 by the playback function 24, and they are completely decompressed. Then, the completely expanded pixel data is printed as print data 39. At the same time, intermediate information 30 for expanding the next MCU is generated and updated.
FIG. 7 shows the process of step 42, which is a preparation process, in more detail. First, in step 51, the number of MCUs until the midway information 30 is acquired is calculated. For example, in this example, it is necessary to acquire the intermediate information 30 of the MCUs arranged in the sub-scanning direction Y. Therefore, the number of MCUs arranged in the scanning direction X can be calculated for each line obtained from the header information of the frame hierarchy. This is calculated based on the number of pixels. In step 52, the MCU is sequentially Huffman-decoded in step 53 until the MCU that acquires the midway information 30 is obtained. If the MCU acquires the midway information 30, the midway information 30 including the position information, the DC coefficient of each component, and the hierarchization information is acquired and stored in the RAM 25 in step 55. In step 54, when the intermediate information 30 of all the MCUs from which the intermediate information 30 is to be acquired, that is, each of the MCUs in a line aligned in the sub-scanning direction Y can be stored, the preparation process ends.
FIG. 8 shows in more detail the process of step 43, which is an expansion and printing process. In step 61, the stored intermediate information 30 is read. In step 62, a desired MCU is accessed based on the intermediate information 30, and is expanded to generate print data 39. This process is repeated until a line of print data 39 arranged in the sub-scan direction Y is generated in step 63, and when all necessary MCUs are expanded, the print data 39 is sent to the print head 13 for printing in step 64. Before and after outputting the image data, in step 66, as shown in FIG. 4, a process of acquiring and storing the intermediate information 30 of the MCUs continuous in the scanning direction X is performed. Then, the process returns to step 62 and is repeated until the entire area of the image 7 is printed in step 65.
Since the JPEG data 100 has a hierarchical structure as described above, it is necessary to acquire header information of each layer when the MCU is partially or fully expanded in step 42 or step 43. is there. That is, as shown in FIG. 9, when the intermediate information 30 of the MCU included in the different scan hierarchy 73 is generated from the MCU included in the same scan hierarchy 73, the scan header SOS is analyzed after the in-frame state. There is a need. Similarly, when generating the intermediate information 30 of the MCU included in the different frame layer 72 from the MCU included in the same frame layer 72, it is necessary to return to the ROOT state 71 and analyze the frame header SOF. For this reason, when extending one MCU partially and entirely, a route state process 71, an in-frame state process 72, and an in-scan state process 73 are prepared as shown in FIG.
FIG. 11 shows the in-scan state process 73. This corresponds to the case where the MCU is continuously extended in the preparation step 42 or a plurality of consecutive MCUs are extended in the extension step 43. First, when the MCU is expanded in step 81 and the position of the next MCU is updated, if it is not a restart marker in step 82, the scan counter is counted up in step 83, and the MCU corresponding to the number of data is added in step 84. The process returns to step 81 and repeats until it is expanded. On the other hand, if it is a restart marker at step 82, the restart counter and MCU state are cleared at step 88, and the process proceeds to the in-frame state 72 at step 89. After the MCU is expanded by the number of data in step 84, the restart counter is counted up in step 85. If the restart interval is reached in step 86, the restart counter and MCU state are cleared, and the restart counter is reset. Save the state if the start interval has not been reached.
FIG. 12 shows the in-frame state process 72. First, at step 91, the position is read out in units of one word and the position is updated. If the scan header SOS is at step 92, the scan header SOS is read at step 93, and the process proceeds to the in-scan state processing 73 at step 94. On the other hand, if it is not the scan header SOS, the content read in step 95 is confirmed. If it is a table or the like, the information is read in step 96, and the processing is repeated until the end of the frame hierarchy is reached in step 97. When the end of the frame is reached at step 97, the process proceeds to the in-route state processing 71 at step 98.
FIG. 13 shows the in-route state processing 71. First, in step 111, the position is read by reading in units of one word. If the frame header is SOF in step 112, the frame header SOF is read in step 113, and the process proceeds to the in-frame state processing 72 in step 114. On the other hand, if it is not the frame header SOF, the content read in step 115 is confirmed. If it is a table or the like, the information is read in step 116, and the processing is repeated until the end of the root hierarchy is reached in step 117. When the end of the frame is reached in step 117, the end of the JPEG data 100 is reached, and therefore, the process exits the job for printing an image in step 118.
These processes can be provided as a program or a program product having instructions for executing the above steps, and can be executed by a data processing apparatus such as a general-purpose CPU or a processor. The program can be provided by being recorded in a suitable recording medium such as a CD-ROM as firmware of the printer 2 or can be provided via a computer network such as the Internet. Moreover, it is also possible to provide as a data processing apparatus provided with the hardware logic which performs each said step.
As described above, the printer 2 of this example does not print after all the JPEG data 100 is expanded, but acquires and stores the intermediate information 30 in the preparation step 42, so that the intermediate information is acquired in the expansion step 43. It is possible to perform printing by directly accessing the MCU at a position necessary for printing using the 30 and expanding only the MCU. Then, by repeating the process of the expansion process 43, all the image data compressed with the JPEG data 100 can be expanded and printed. For this reason, compared with a printing method in which the entire compressed data 100 is completely decompressed in advance, the memory capacity required for the printing process can be remarkably reduced. In other words, in the case of the printer 2 of this example, for example, if there is a RAM 25 that can store halfway information 30 of MCUs arranged in a row in the sub-scan direction Y, an image obtained by decompressing the JPEG data 100 can be output as the printout 7. . Therefore, even a home printer having only a small memory can directly acquire and print JPEG data, and the digital camera 3 can be printed by the extremely simple and inexpensive system of the printer 2 and the digital camera 3. You can print and enjoy images taken with.
Further, the compressed data 100 can be printed with a small-capacity memory such as a cache mounted on the microprocessor, and a printer with a very simple hardware configuration without a memory outside the processor can be realized. In such a printer, the compressed data 100 can be partially expanded and printed in the memory in the processor, so that the printing speed is improved as compared with the configuration using the memory outside the processor.
Further, in the decompression method of the present invention, the Huffman decoding process for obtaining the intermediate information 30 at first glance is overhead compared to the method of decompressing the entire compressed data in advance. However, while inverse DCT and inverse quantization processes are relatively time-consuming processes using product-sum operations, Huffman decoding, which is inverse entropy conversion, is mainly performed by bit operations that do not require processing time. For this reason, the processing time for acquiring and storing the intermediate information 30 is short, and the time lag at which printing is started by the print head 13 is also shorter than when printing is started after decompressing the entire compressed data. In addition, as described above, since there is a high possibility that the decompression process can be performed using the memory inside the processor, this time lag can be further shortened.
Furthermore, since the intermediate information 30 is obtained in advance, it is possible to perform the decoding processing of a plurality of MCUs in parallel if the CPU capability is permitted. For example, even in the case of printing in the scan direction X, the intermediate information 30 of the MCUs arranged in the scan direction X is obtained in advance, so that the process of decoding those MCUs can be processed in parallel operation. It becomes possible. Therefore, there is a possibility that the decoding process of the JPEG data 100 can be speeded up according to the present invention.
Note that hierarchically encoded compressed data (data compressed by the JPEG method) including DHP (Define Hierarchical Progression) has been described. However, the present invention also applies to data compressed by the JPEG method in which this DHP marker is not inserted. Is applicable. Although this type of data is called a non-hierarchical coding type, it is only a single frame, and there is a scan and data hierarchy below this frame. Data. Further, the data format is an example. For example, there is a case where it is not guaranteed that the position of the SOS is for each scan line of the image, or there is no RST. The present invention is also effective for such JPEG data. Furthermore, not only the data compressed by the JPEG method, but as described in the claims, a two-dimensional image is divided into a plurality of matrices, and the pixels included in the pixel block are defined as a single pixel block. The present invention can be applied if block compressed data in which data is compressed by at least discrete cosine transform, quantization, and Huffman coding is compressed data that is hierarchized in units of scans and / or frames in the scan direction.
Further, instead of acquiring and storing the intermediate information of one row of MCUs arranged in the sub-scan direction Y, the intermediate information of one line of MCUs arranged in the scan direction X may be formed. The position of the MCU that acquires the intermediate information can be freely set according to the orientation of the paper. Further, the ink jet type printer 2 has been described as an example. However, a thermal type or laser type printer may be used, and the printer is not limited to a type that performs printing while moving or scanning the print head 13, but a line type printer. But it ’s okay.
Furthermore, since the decompression method of the present invention can greatly reduce the memory capacity to be used, the application is not limited to a printer, and is also suitable for printing using a terminal that cannot increase the memory capacity, such as a portable terminal. .
In addition, the decompression method of the present invention is not limited to printing, but can be applied to the case where the JPEG data 100 is displayed, reproduced, or rendered. In particular, it is suitable for displaying an arbitrary region or an arbitrary frame of a large still image. FIG. 14 shows a car navigation system 120 as an example of an apparatus that displays an arbitrary area of the JPEG data 100 on a display or a monitor. The car navigation system 120 includes a monitor 121 and a car navigation body 122 that performs control such as displaying a map (image) 125 on the monitor 121, and map data recorded on a recording medium such as a DVD or a storage 123. (JPEG data) 100 can be expanded and displayed on the monitor 121. The car navigation main body 122 includes an interface 11 a corresponding to the DVD 123, a control unit 20 a configured by a CPU, a RAM, a ROM, and the like, and a RAM 25 for expanding the map data 100 and storing intermediate information 30. The map 125 is displayed on the monitor 121 by the controller 20a.
The control unit 20a displays the map 125 by controlling the monitor 121 based on the data processing device 21a capable of expanding (expanding) the map data 100 and the display data 125a supplied from the data processing device 21a. A display control unit 126 is provided. The data processing device 21a includes a preparation function 22 and a decompression function 23 that decompresses block compressed data corresponding to an area to be displayed using the intermediate information 30 and generates display data 125a. Also, using the GPS function, the area to be displayed on the monitor 121 is recognized according to the current position of the car, the scale of the map displayed on the monitor 121, the area designated by the user, etc. And an area determination function 127 for determining block compressed data to be performed. The expansion function 23 generates map data 125 a to be displayed on the monitor 121 by expanding the MCU determined by the area determination function 127. Therefore, an entire image of the map data 100 or a partial image obtained by enlarging a predetermined area of the entire image can be displayed by an instruction from the area determination function 127. Further, for the partial image, the current position of the car or the user's manual operation can be displayed. The partial image displayed on the monitor 121 can be scrolled according to the above. This means that a part of the entire image can be displayed while scrolling in units of regions or frames.
The decompression function 23 decompresses only the necessary MCU based on the intermediate information 30 in response to an instruction from the area determination function 127. That is, a sub-extension unit 23a that extends a specified area as one unit is provided. The sub decompression unit 23a corresponds to the area to be newly displayed without performing the decompression again for the MCU corresponding to the area already displayed on the monitor 121, even if the MCU is designated by the area determination function 127. Only expand the MCU. Therefore, when the sub-decompression unit 23a displays an image of a different area using the area determination function 127, even if it is an MCU included in the different area, the sub-extension unit 23a overlaps with the previously displayed area that has been specified. Does not stretch, only the remaining part is stretched.
As shown in FIG. 15, in the map (entire image) when the map (partial image) 125 displayed on the monitor 121 is expanded from the map data 100, the area surrounded by the frame 130a indicated by the solid line. An example in which a partial image of a region surrounded by a frame 130b, 130c, 130d, or 130e indicated by a broken line is displayed on the monitor 121 following the movement of the vehicle or an instruction from the user will be described below. Street. When the portion displayed on the monitor 121 is scrolled from the frame 130a to the frame 130b, the sub decompression unit 23a does not decompress the region 131a where these frames overlap, and the remaining region (difference region) of the frame 130b. Only the MCU corresponding to 132a is expanded. Further, in the relationship between the frame 130a and the frame 130c, without overlapping the overlapping region 131b, only the MCU corresponding to the remaining region (difference region) 132b of the frame 130c is expanded, and the frame 130a and the frame 130d. In this relationship, the overlapping area 131c is not expanded, and only the MCU corresponding to the remaining area (difference area) 132c of the frame 130d is expanded. Further, in the relationship between the frame 130a and the frame 130e, the overlapping area 131d is not expanded, and only the MCU corresponding to the remaining area 132d of the frame 130e is expanded. Thus, by expanding only the difference area between the previous frame and the current frame, scrolling of the partial image 125 following the movement of the vehicle is realized.
In the data processing device 21a, first, the preparation function 22 partially expands the MCU included in the map data 100 in order, and sets the sub-scan direction Y at the left end of the scan direction X of the partial image 125 to be displayed on the monitor 121. The intermediate information 30 of the configuring MCU is stored in the memory 25. The MCU to be expanded for the partial image 125 to be displayed on the monitor 121 is determined by the area determination function 127. Next, the decompression function 23 accesses the MCUs arranged in the sub-scan direction Y of the map image 125 based on the intermediate information 30, decompresses them based on the intermediate information 30, and displays the map image 125. Map data 125a is generated. Then, by updating the intermediate information 30 of the subsequent MCUs, the process of expanding the MCUs arranged in the next sub-scan direction Y is repeated to generate the map data 125a. By outputting the map data 125a to the monitor 121, a map image 125 corresponding to a partial image of all the images supplied as map data is displayed. The map image 125 can be scrolled, and data for displaying the partial image 125 formed in advance is used.
FIG. 16 shows a flowchart of processing for displaying the partial image 125 on the monitor 121 while scrolling. In the following description, as shown in FIG. 15, it is assumed that the partial image displayed on the monitor 121 is scrolled from the area surrounded by the frame 130a to the area surrounded by the frame 130b. It is not limited to examples. First, in step 141, the MCU corresponding to the area 130b to be expanded is designated by the area determination function 127. Next, in step 62, the intermediate information 30 is read. If the image displayed on the monitor 121 does not change in step 142, the subsequent processing is not performed, and the partial image 125 is displayed as it is in step 151. If the areas to be displayed on the monitor 121 are different, in step 143, the sub-extension unit 23a calculates the MCU of the common area or the overlapping area. Through the iterative processing specified in steps 144, 145, 148 and 149, it is determined whether the MCU corresponding to the coordinates is outside the common area in step 146, and only the MCU determined to be outside the common area in step 62 is expanded. Is done. In step 151, the partial image 125 is displayed.
As described in the printer 2, the partial image 125 may be formed by storing the intermediate information 30 of the MCU corresponding to the display start position and repeating the expansion and updating of the intermediate information 30 based on the information. If there is no midway information of the target MCU, it is possible to obtain midway information of the target MCU by analyzing the data structure from the midway information of the MCU before the target position. In the case of an application that displays an arbitrary area such as the car navigation system 120, since the display start position is arbitrary, the process of generating only the differential image of the common area 131a of the frames 130a and 130b and generating the map data 125a May reduce processing time. Therefore, even in an application such as the car navigation system 120 that displays a partial image while moving, it is not necessary to store the entire image in a state of being expanded in a memory by applying the present invention. Partial images can be displayed at high speed.
In addition, although the example which displays a rectangular partial image was demonstrated, it is also possible to display various area | regions, such as circular and an ellipse, as one unit. Further, although the car navigation system 120 has been described as an example of scrolling a rectangular image, the scope of application of the present invention such as application software for displaying a partial image while scrolling on a display on a personal computer is wide.
Industrial applicability
The decompression method and data processing apparatus of the present invention are effective for printing or displaying data compressed in the JPEG format or the like. Therefore, according to the present invention, it is possible to provide a printing apparatus such as a printer and a display system such as a car navigation system that can output a large-capacity image or a part thereof at high speed with few hardware resources.
[Brief description of the drawings]
FIG. 1 is a diagram showing a state in which a printer equipped with a data processing apparatus according to the present invention and a digital camera are connected.
FIG. 2 is a diagram showing a schematic configuration of the printer shown in FIG.
FIG. 3 is a diagram showing details of the intermediate information.
FIG. 4 is a diagram schematically illustrating processing of the decompression function.
FIG. 5 is a diagram illustrating how the MCU is expanded to generate print data, and the print data is printed.
FIG. 6 is a flowchart showing processing during printing in the printer.
FIG. 7 is a flowchart showing processing in the preparation process.
FIG. 8 is a flowchart showing processing in the decompression or printing process.
FIG. 9 is a diagram schematically showing how the hierarchy changes when decompressing JPEG data.
FIG. 10 is a flowchart showing a process performed when one MCU is expanded.
FIG. 11 is a flowchart showing details of the in-scan state process shown in FIG.
FIG. 12 is a flowchart showing details of the intra-frame state processing shown in FIG.
FIG. 13 is a flowchart showing details of the in-route state process shown in FIG.
FIG. 14 is a diagram showing an outline of a car navigation system according to the present invention.
FIG. 15 is a diagram for explaining an expansion process when scrolling an image displayed on the monitor.
FIG. 16 is a flowchart showing a process of scrolling the image displayed on the monitor.
FIG. 17 is a diagram showing the data format of JPEG data.
FIG. 18 is a diagram for explaining a printing method of JPEG data.

Claims (24)

画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとし、その画素ブロック内に含まれる画素データが少なくともエントロピー符号化を用いて圧縮されたブロック圧縮データを複数含む圧縮データを伸長する方法であって、
前記圧縮データに含まれる前記ブロック圧縮データを順番に部分的に伸長し、そのブロック圧縮データにアクセスするための位置情報を少なくとも含む途中情報を取得し、少なくとも幾つかの前記ブロック圧縮データの前記途中情報を記憶する準備工程と、
前記画像の任意の領域を伸長する際に、記憶された前記途中情報を用いて、前記任意の領域に対応する前記ブロック圧縮データを伸長する伸長工程とを有する伸長方法。
A method of decompressing compressed data including a plurality of block compressed data in which an image is divided into a plurality of matrices, the matrix is set as one pixel block, and pixel data included in the pixel block is compressed using at least entropy coding Because
The block compressed data included in the compressed data is partially decompressed in order, and halfway information including at least position information for accessing the block compressed data is obtained, and the middle of at least some of the block compressed data A preparation process for storing information;
A decompression method comprising decompressing the block compressed data corresponding to the arbitrary region using the stored intermediate information when decompressing an arbitrary region of the image.
前記ブロック圧縮データには、2次元画像の前記画素ブロック内に含まれる画素データが少なくとも離散コサイン変換、量子化およびハフマン符号化により圧縮され、さらに、前記ブロック圧縮データは、前記量子化された離散コサイン係数の値を差分情報として含んでおり、
前記準備工程では、先行する前記ブロック圧縮データを部分的に伸長した際に前記離散コサイン係数を含む前記途中情報を取得する、請求項1の伸長方法。
In the block compressed data, pixel data included in the pixel block of a two-dimensional image is compressed by at least discrete cosine transform, quantization, and Huffman coding, and further, the block compressed data is the quantized discrete data The cosine coefficient value is included as difference information,
The decompression method according to claim 1, wherein, in the preparation step, the intermediate information including the discrete cosine coefficient is acquired when the preceding block compressed data is partially decompressed.
前記圧縮データには、2次元画像の前記ブロック圧縮データが、スキャン方向に、スキャン単位および/またはフレーム単位で階層化されており、
前記準備工程では、前記ブロック圧縮データが含まれる前記スキャン単位および/またはフレーム単位の階層化情報を含む前記途中情報を取得する、請求項1の伸長方法。
In the compressed data, the block compressed data of the two-dimensional image is hierarchized in the scanning direction in units of scans and / or frames.
The decompression method according to claim 1, wherein in the preparation step, the intermediate information including hierarchized information in units of scans and / or frames in which the block compressed data is included is acquired.
前記準備工程では、2次元画像のスキャン方向または前記スキャン方向に直交するサブスキャン方向に並んだ前記ブロック圧縮データの前記途中情報を記憶し、
前記伸長工程では、前記スキャン方向またはサブスキャン方向に並んだ前記画素ブロックを伸長すると共に、前記サブスキャン方向またはスキャン方向にそれぞれ連続する前記ブロック圧縮データの前記途中情報を取得し、記憶する、請求項1の伸長方法。
In the preparation step, the halfway information of the block compressed data arranged in a scan direction of a two-dimensional image or a sub-scan direction orthogonal to the scan direction is stored,
In the decompression step, the pixel blocks arranged in the scan direction or the sub-scan direction are decompressed, and the intermediate information of the block compressed data continuous in the sub-scan direction or the scan direction is acquired and stored. 2. The elongation method according to item 1.
前記伸長工程では、前記画像の異なる領域を伸長する際に、事前に伸長した領域と重複する部分については伸長を行わず、残りの部分を伸長する、請求項1の伸長方法。2. The decompression method according to claim 1, wherein in the decompression step, when different regions of the image are decompressed, the remaining portions are decompressed without performing decompression on a portion that overlaps with the previously decompressed region. 前記圧縮データはJPEG方式で圧縮されている、請求項1の伸長方法。The decompression method according to claim 1, wherein the compressed data is compressed by a JPEG method. 画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとし、その画素ブロック内に含まれる画像データが少なくともエントロピー符号化により圧縮されたブロック圧縮データを複数含む圧縮データを印刷する方法であって、
前記圧縮データに含まれる前記ブロック圧縮データを順番に部分的に伸長し、そのブロック圧縮データにアクセスするための位置情報を少なくとも含む途中情報を取得し、少なくとも幾つかの前記ブロック圧縮データの前記途中情報を記憶する準備工程と、
前記画像の任意の領域を伸長する際に、記憶された前記途中情報を用いて、前記任意の領域に対応する前記ブロック圧縮データを伸長して印刷する印刷工程とを有する印刷方法。
In this method, an image is divided into a plurality of matrices, the matrix is set as one pixel block, and compressed data including a plurality of block compressed data in which image data included in the pixel block is compressed by entropy coding is printed. hand,
The block compressed data included in the compressed data is partially decompressed in order, and halfway information including at least position information for accessing the block compressed data is obtained, and the middle of at least some of the block compressed data A preparation process for storing information;
And a printing step of expanding and printing the block compressed data corresponding to the arbitrary area using the stored intermediate information when expanding the arbitrary area of the image.
前記ブロック圧縮データには、2次元画像の前記画素ブロック内に含まれる画素データが少なくとも離散コサイン変換、量子化およびハフマン符号化により圧縮され、さらに、前記ブロック圧縮データは、前記量子化された離散コサイン係数の値を差分情報として含んでおり、
前記準備工程では、前記スキャン方向に先行する前記ブロック圧縮データを部分的に伸長した際の離散コサイン係数を含む前記途中情報を取得する、請求項7の印刷方法。
In the block compressed data, pixel data included in the pixel block of a two-dimensional image is compressed by at least discrete cosine transform, quantization, and Huffman coding, and further, the block compressed data is the quantized discrete data The cosine coefficient value is included as difference information,
The printing method according to claim 7, wherein in the preparation step, the intermediate information including a discrete cosine coefficient when the block compressed data preceding the scan direction is partially expanded is acquired.
前記圧縮データには、2次元画像の前記ブロック圧縮データが、スキャン方向に、スキャン単位および/またはフレーム単位で階層化されており、
前記準備工程では、前記ブロック圧縮データが含まれる前記スキャン単位および/またはフレーム単位の階層化情報を含む前記途中情報を取得する、請求項7の印刷方法。
In the compressed data, the block compressed data of the two-dimensional image is hierarchized in the scanning direction in units of scans and / or frames.
The printing method according to claim 7, wherein in the preparation step, the intermediate information including hierarchized information in the scan unit and / or frame unit in which the block compressed data is included is acquired.
前記準備工程では、2次元画像のスキャン方向または前記スキャン方向に直交するサブスキャン方向に並んだ前記ブロック圧縮データの前記途中情報を記憶し、
前記印刷工程では、前記スキャン方向またはサブスキャン方向に並んだ前記画素ブロックを伸長および印刷すると共に、前記サブスキャン方向またはスキャン方向にそれぞれ連続する前記ブロック圧縮データの前記途中情報を取得し、記憶する、請求項7の印刷方法。
In the preparation step, the halfway information of the block compressed data arranged in a scan direction of a two-dimensional image or a sub-scan direction orthogonal to the scan direction is stored,
In the printing step, the pixel blocks arranged in the scan direction or the sub-scan direction are expanded and printed, and the intermediate information of the block compressed data continuous in the sub-scan direction or the scan direction is acquired and stored. The printing method according to claim 7.
前記印刷工程では、前記画像の異なる領域を印刷する際に、事前に印刷した領域と重複する部分については伸長を行わず、残りの部分を伸長する、請求項7の印刷方法。8. The printing method according to claim 7, wherein, in the printing step, when printing different regions of the image, a portion overlapping with a previously printed region is not stretched and the remaining portion is stretched. 画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとして、その画素ブロック内に含まれる画像データが少なくともエントロピー符号化により圧縮されたブロック圧縮データを含む圧縮データを表示する方法であって、
前記圧縮データに含まれる前記ブロック圧縮データを順番に部分的に伸長し、そのブロック圧縮データにアクセスするための位置情報を少なくとも含む途中情報を取得し、少なくとも幾つかの前記ブロック圧縮データの前記途中情報を記憶する準備工程と、
前記画像の任意の領域を伸長する際に、記憶された前記途中情報を用いて、前記任意の領域に対応する前記ブロック圧縮データを伸長して表示する工程とを有する表示方法。
A method of displaying compressed data including block compressed data in which an image is divided into a plurality of matrices, and the matrix is used as one pixel block, and image data included in the pixel block is compressed by entropy coding. ,
The block compressed data included in the compressed data is partially decompressed in order, and halfway information including at least position information for accessing the block compressed data is obtained, and the middle of at least some of the block compressed data A preparation process for storing information;
And a step of expanding and displaying the block compressed data corresponding to the arbitrary area using the stored intermediate information when expanding the arbitrary area of the image.
前記表示する工程では、前記画像の異なる領域を伸長する際に、事前に表示した領域と重複した部分については伸長を行わず、残りの部分を伸長する、請求項12の表示方法。13. The display method according to claim 12, wherein, in the step of displaying, when different regions of the image are expanded, a portion overlapping with a previously displayed region is not expanded and the remaining portion is expanded. 画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとして、その画素ブロック内に含まれる画素データが少なくともエントロピー符号化により圧縮されたブロック圧縮データを含む圧縮データを伸長するプログラムであって、
前記圧縮データに含まれる前記ブロック圧縮データを順番に伸長し、そのブロック圧縮データにアクセスするための位置情報を少なくとも含む途中情報を取得し、少なくとも幾つかの前記ブロック圧縮データの前記途中情報を記憶する準備工程と、
前記画像の任意の領域を伸長する際に、記憶された前記途中情報を用いて、前記任意の領域に対応する前記ブロック圧縮データを伸長する伸長工程とを実行する命令を有するプログラム。
A program that divides an image into a plurality of matrices, and uses the matrix as one pixel block, and decompresses compressed data including block compressed data in which pixel data included in the pixel block is compressed by at least entropy coding. ,
The block compressed data included in the compressed data is sequentially expanded, intermediate information including at least position information for accessing the block compressed data is acquired, and the intermediate information of at least some of the block compressed data is stored. A preparation process to
A program having an instruction to execute a decompression step of decompressing the block compressed data corresponding to the arbitrary area using the stored intermediate information when the arbitrary area of the image is expanded.
前記ブロック圧縮データには、2次元画像の前記画素ブロック内に含まれる画素データが少なくとも離散コサイン変換、量子化およびハフマン符号化により圧縮され、前記ブロック圧縮データは、前記量子化された離散コサイン係数の値を差分情報として含んでおり、
前記準備工程では、先行する前記ブロック圧縮データを部分的に伸長した際に前記離散コサイン係数を含む前記途中情報を取得する、請求項14のプログラム。
In the block compressed data, pixel data included in the pixel block of a two-dimensional image is compressed by at least discrete cosine transform, quantization, and Huffman coding, and the block compressed data includes the quantized discrete cosine coefficient. Is included as difference information,
The program according to claim 14, wherein in the preparation step, the intermediate information including the discrete cosine coefficient is acquired when the preceding block compressed data is partially expanded.
前記圧縮データには、2次元画像の前記ブロック圧縮データが、スキャン方向に、スキャン単位および/またはフレーム単位で階層化されており、
前記準備工程では、前記ブロック圧縮データを前記スキャン方向に順番に伸長し、前記ブロック圧縮データが含まれる前記スキャン単位および/またはフレーム単位の階層化情報を含む前記途中情報を取得する、請求項14のプログラム。
In the compressed data, the block compressed data of the two-dimensional image is hierarchized in the scanning direction in units of scans and / or frames.
15. In the preparation step, the block compressed data is sequentially expanded in the scan direction, and the intermediate information including the scan unit and / or frame unit layered information including the block compressed data is acquired. Program.
前記準備工程では、2次元画像のスキャン方向または前記スキャン方向に直交するサブスキャン方向に並んだ前記ブロック圧縮データの前記途中情報を記憶し、
前記伸長工程では、前記スキャン方向またはサブスキャン方向に並んだ前記画素ブロックを伸長および印刷すると共に、前記サブスキャン方向またはスキャン方向にそれぞれ連続する前記ブロック圧縮データの前記途中情報を取得し、記憶する、請求項14のプログラム。
In the preparation step, the halfway information of the block compressed data arranged in a scan direction of a two-dimensional image or a sub-scan direction orthogonal to the scan direction is stored,
In the decompression step, the pixel blocks arranged in the scan direction or the sub-scan direction are decompressed and printed, and the intermediate information of the block compressed data continuous in the sub-scan direction or the scan direction is acquired and stored. The program according to claim 14.
前記伸長工程では、前記画像の異なる領域を伸長する際に、事前に伸長された領域と重複した部分については伸長を行わず、残りの部分を伸長する、請求項14のプログラム。15. The program according to claim 14, wherein, in the extension step, when different areas of the image are extended, a portion overlapping with a previously extended region is not extended but the remaining portion is extended. 画像が複数のマトリクスに分割され、そのマトリクスを1つの画素ブロックとして、その画素ブロック内に含まれる画素データが少なくともエントロピー符号化により圧縮されたブロック圧縮データを含む圧縮データを伸長するデータ処理装置であって、
前記圧縮データに含まれる前記ブロック圧縮データを順番に部分的に伸長し、そのブロック圧縮データにアクセスするための位置情報を少なくとも含む途中情報を取得し、少なくとも幾つかの前記ブロック圧縮データの前記途中情報を記憶する準備手段と、
前記画像の任意の領域を伸長する際に、記憶された前記途中情報を用いて、前記任意の領域に対応する前記ブロック圧縮データを伸長する伸長手段とを有するデータ処理装置。
A data processing device that divides an image into a plurality of matrices, expands the compressed data including block compressed data in which the pixel data included in the pixel block is compressed by at least entropy coding, using the matrix as one pixel block. There,
The block compressed data included in the compressed data is partially decompressed in order, and halfway information including at least position information for accessing the block compressed data is obtained, and the middle of at least some of the block compressed data Preparation means for storing information;
A data processing apparatus comprising: decompression means for decompressing the block compressed data corresponding to the arbitrary area using the stored intermediate information when the arbitrary area of the image is expanded.
前記ブロック圧縮データには、2次元画像の前記画素ブロック内に含まれる画素データが少なくとも離散コサイン変換、量子化およびハフマン符号化により圧縮され、さらに、前記ブロック圧縮データは、前記量子化された離散コサイン係数の値を差分情報として含んでおり、
前記準備手段は、先行する前記ブロック圧縮データを部分的に伸長した際に前記離散コサイン係数を含む前記途中情報を取得する、請求項19のデータ処理装置。
In the block compressed data, pixel data included in the pixel block of a two-dimensional image is compressed by at least discrete cosine transform, quantization, and Huffman coding, and further, the block compressed data is the quantized discrete data The cosine coefficient value is included as difference information,
The data processing apparatus according to claim 19, wherein the preparation unit acquires the intermediate information including the discrete cosine coefficient when the preceding block compressed data is partially expanded.
前記準備手段は、2次元画像のスキャン方向または前記スキャン方向に直交するサブスキャン方向に並んだ前記ブロック圧縮データの前記途中情報を記憶し、
前記伸長手段は、前記スキャン方向またはサブスキャン方向に並んだ前記画素ブロックを伸長および印刷すると共に、前記サブスキャン方向またはスキャン方向にそれぞれ連続する前記ブロック圧縮データの前記途中情報を取得し、記憶する、請求項19のデータ処理装置。
The preparation means stores the intermediate information of the block compressed data arranged in the scanning direction of a two-dimensional image or a sub-scanning direction orthogonal to the scanning direction,
The decompression unit decompresses and prints the pixel blocks arranged in the scan direction or the sub-scan direction, and acquires and stores the intermediate information of the block compressed data continuous in the sub-scan direction or the scan direction, respectively. The data processing apparatus according to claim 19.
前記伸長手段は、前記画像の異なる領域を伸長する際には、事前に伸張された領域と重複した部分については伸長を行わず、残りの部分を伸長する、請求項19のデータ処理装置。20. The data processing apparatus according to claim 19, wherein when the different areas of the image are expanded, the expansion means does not expand a portion overlapping with the previously expanded area, and expands the remaining portion. 請求項19に記載のデータ処理装置と、伸長された前記ブロック圧縮データを印刷する手段とを有するプリンタ。20. A printer comprising: the data processing apparatus according to claim 19; and means for printing the decompressed block compressed data. 請求項19に記載のデータ処理装置と、伸張された前記ブロック圧縮データを表示する手段とを有する表示装置。20. A display device comprising: the data processing device according to claim 19; and means for displaying the decompressed block compressed data.
JP2003537299A 2001-10-17 2002-10-17 Decompression method and data processing apparatus Pending JPWO2003034709A1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001318849 2001-10-17
JP2001318849 2001-10-17
PCT/JP2002/010777 WO2003034709A1 (en) 2001-10-17 2002-10-17 Decompressing method and data processor

Publications (1)

Publication Number Publication Date
JPWO2003034709A1 true JPWO2003034709A1 (en) 2005-02-10

Family

ID=19136477

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003537299A Pending JPWO2003034709A1 (en) 2001-10-17 2002-10-17 Decompression method and data processing apparatus

Country Status (2)

Country Link
JP (1) JPWO2003034709A1 (en)
WO (1) WO2003034709A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050182252A1 (en) 2004-02-13 2005-08-18 Reddy K. R. Novel 2'-C-methyl nucleoside derivatives
JP4151684B2 (en) 2005-01-26 2008-09-17 ソニー株式会社 Encoding apparatus, encoding method, encoding program, and imaging apparatus
SE533185C2 (en) * 2007-02-16 2010-07-13 Scalado Ab Method for processing a digital image and image representation format
KR101622680B1 (en) * 2009-11-26 2016-05-19 엘지전자 주식회사 Mobile terminal and method for handling image thereof
EP3623364A1 (en) 2014-02-13 2020-03-18 Ligand Pharmaceuticals, Inc. Prodrug compounds and their uses
JP2017520545A (en) 2014-07-02 2017-07-27 リガンド・ファーマシューティカルズ・インコーポレイテッド Prodrug compounds and their use

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3399743B2 (en) * 1996-05-31 2003-04-21 シャープ株式会社 Image compression data processing device
JP3559419B2 (en) * 1997-03-18 2004-09-02 松下電器産業株式会社 Method and apparatus for decompressing compressed image data
US6381371B1 (en) * 1999-03-17 2002-04-30 Hewlett-Packard Company Method and apparatus for processing image files

Also Published As

Publication number Publication date
WO2003034709A1 (en) 2003-04-24

Similar Documents

Publication Publication Date Title
US8019167B2 (en) Compressing high resolution images in a low resolution video
US6650708B1 (en) Video signal encoding apparatus
JP2000278685A (en) Method for processing variable length encoded binary bit stream
WO2006073830A1 (en) Image rotation via jpeg decompression according to an order different from the encoding block scanning order
JP4902474B2 (en) Image processing apparatus and image processing method
EP0506482B1 (en) Image processing
JP5383416B2 (en) Image processing apparatus, control method therefor, and program
JP3661520B2 (en) Image processing apparatus, image processing method, image forming apparatus, and recording medium recording program
US7542611B2 (en) Image processing apparatus and method for converting first code data sets into second code data for JPEG 2000 and motion JPEG 2000
JPWO2003034709A1 (en) Decompression method and data processing apparatus
US6064772A (en) Image reproducing apparatus and image reproducing method
JP2011040970A (en) Data processing apparatus and data processing method
JP2006303937A (en) Image display, image displaying method and program for executng the same
US7373000B2 (en) Image processing apparatus
JP2006203270A (en) Image compression method and device
JP2002229759A (en) Code converting method for supporting image conversion
JP2003198855A (en) Image compression method, decompression method thereof, and program thereof
JP4680377B2 (en) How to improve the speed and efficiency of electronic data decompression
US7787700B2 (en) Signal processing method, signal processing apparatus, computer-readable medium and a data recording medium
JP4074832B2 (en) Data processing method and data processing apparatus
JP3754903B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
US8582168B2 (en) Image processing apparatus and processing method thereof
JP3559419B2 (en) Method and apparatus for decompressing compressed image data
JP3190118B2 (en) Image processing device
US20090175547A1 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070702

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20071024