JP4077548B2 - Image processing device - Google Patents
Image processing device Download PDFInfo
- Publication number
- JP4077548B2 JP4077548B2 JP05042898A JP5042898A JP4077548B2 JP 4077548 B2 JP4077548 B2 JP 4077548B2 JP 05042898 A JP05042898 A JP 05042898A JP 5042898 A JP5042898 A JP 5042898A JP 4077548 B2 JP4077548 B2 JP 4077548B2
- Authority
- JP
- Japan
- Prior art keywords
- attribute
- data
- memory
- compression
- unit
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、画像データを圧縮する画像処理装置に関する。
【0002】
【従来の技術】
デジタル画像処理システムでは、画像データをページ単位でメモリにいったん格納する。そして、メモリからデータを読み出して、必要なら種々の処理をした後で、印字などのために出力する。複数枚の画像データを符号化し圧縮メモリ上に格納するシステムにおいて、限られたメモリサイズの中になるべく多くの枚数の画像データを格納するためには、データの圧縮率を高める必要がある。
圧縮方法として、画像データを複数の画素ブロックに分割して符号化するブロックトランケーション符号化などの固定長符号化が用いられるが、この方法ではデータの圧縮率は大きくない。そこで、各ブロックに対応した属性判別結果に基づいて、さらに各画像ブロックのデータを可変長符号化して、データを2次圧縮することが提案されている。
【0003】
【発明が解決しようとする課題】
ここで、データをブロックごとの属性判別結果に基づいて各ブロックのデータの2次圧縮をする場合、伸長に際して属性判別結果が用いられるので、属性データを記憶しておく必要がある。属性データの量は、原稿の内容によらず一定である。カラー画像などでは2次圧縮データの量に対する属性データの量の比率は十分小さい。しかし、モノクロ画像や白下地の多い原稿では、属性データの量の比率が高く、圧縮率を低下させるのが難しかった。
【0004】
本発明の目的は、ブロックごとの属性判別結果に基づいて各画像ブロックの可変長符号化方式を切り換える画像処理装置において、効率よく画像圧縮をおこなう画像処理装置を提供することである。
【0005】
本発明に係る画像処理装置は、入力された画像データを複数の領域に分割し、領域ごとに属性を判別する属性判別手段と、前記属性判別手段により判別された前記領域ごとの属性を表す属性データを記憶する属性メモリと、前記属性メモリに記憶された属性データに基づいて、前記画像データの可変長符号化を行う符号化手段と、前記符号化手段により符号化された前記画像データを記憶する圧縮メモリと、前記属性データに基づいて、前記入力された画像データを構成する前記複数の領域のうちカラー属性を有する領域の比率が所定値以上であると判断される場合は、前記属性データを前記圧縮メモリに書き込まず、一方、前記所定値未満であると判断される場合は、前記属性データを前記圧縮メモリに書き込む属性データ書き込み手段とを備え、前記符号化手段は、前記入力された画像データを構成する前記複数の領域のうちカラー属性を有する領域の比率が所定値以上であると判断される場合は、可変長符号化を行わずに圧縮メモリに前記画像データを書き込む。
前記属性データ書き込み手段は、属性判別手段による判別結果によりカラー画像であると判断する条件である場合、属性データを圧縮メモリに書き込まない。カラー画像である場合、可変長符号化を行わないので、復号の際に属性データは必要でなく、カラー画像であるとの情報をページ単位で記憶すればよいので、属性データは保存しない。これにより圧縮率を向上させる。
また、前記の属性データ書き込み手段は、判別対象の原稿画像がモノクロであると判定する条件である場合、モノクロか否の属性データのみを圧縮メモリに書き込む。これにより、文字画像や白下地の多い原稿(モノクロ原稿)に対しては、属性データの数を減らすことにより、圧縮データ量に対する属性データの量の比率を低くできる。ここで、例えば、白下地属性のカウント値が所定値を越える場合に、モノクロ原稿と判断する。
【0006】
【発明の実施の形態】
以下、添付の図面を参照して本発明の実施の形態を説明する。
図1は、カラー複写機100の全体構成を示す。カラー複写機100は、カラー複写機全体を制御する第1CPU101と、カラー画像を読み取り、カラー画像データを生成するスキャナ102と、カラー画像データを基にカラー画像を形成するプリンタ103により構成される。またスキャナ102とプリンタ103は第1CPU101からの指示に基づいて、インターフェース(I/F)220を介在してメモリユニット200などの外部機器との間で画像データの授受を行う。
【0007】
次に、メモリユニツト200について説明する。メモリユニット200において、色変換部201は、以下の数式(1)に基づいてインターフェース220を介在して入力されたRGBデータの線形変換をして、RGBデータを明度、色度データであるYCrCbデータに変換する。
【数1】
逆にインターフェース220を介在してカラー複写機100に出力する場合には、色変換部201は、以下の数式(2)に基づいてYCrCbデータの線形変換をし、YCrCbデータを明度、色度データであるRGBデータに変換する。
【数2】
【0008】
下地除去部202は、色変換部201により色変換されたYCrCbデータについて、下地除去テーブル(図2参照)を用いて、Yデータのハイライト部分の階調補正をし、ハイライト部分を白データに変換する。
属性判別部203は、下地除去部202により下地除去処理が行われたY'CrCbデータに対して原稿画像の8画素×8画素のブロックの単位で属性を判別する。属性メモリ205は、属性判別部203による8画素×8画素のブロックに対する属性判別結果を、2ビットの属性データとして格納する。属性メモリ205は、それぞれ独立してアクセスが可能な2バンクから構成されており、どちらのバンクに書き込むかは第2CPU209から出力されるバンク信号1によって決定される。また属性判別部203の内部には各属性に対応した属性カウンタが備えられ、1ページあたりの各属性の数をカウントし、その結果は、第2CPU209により読み出せる。
【0009】
判別される属性は、白下地属性、黒文字属性、べた属性、モノクロ属性およびカラー属性である。ただし、モノクロ属性とカラー属性とは、その他属性として記憶する。また、属性判別の誤判別を補うために、周辺属性により注目属性を修正するマクロ判別処理を行う。また、属性判別結果より1ページの原稿画像のほとんどがカラー画像であると判断される場合に、2次圧縮ONOFF信号はOFFと設定され、カラーモノクロ信号は「カラー」と設定される。また、属性判別結果より原稿画像のほとんどがカラー属性でないと判断される場合に、2次圧縮ONOFF信号はONと設定され、カラーモノクロ信号は「モノクロ」と設定される(図15参照)。
【0010】
GBTC符号化部204は、下地除去部202により下地除去処理が行われたY'CrCbデータに対して8画素×8画素単位でGBTC符号化方式で固定長符号化を行う。GBTC符号化方式は基本的には4×4画素の画像データ16バイトを6バイトに符号化する。従つて圧縮率は原稿画像の種類にかかわらず3/8である。GBTC符号化部204では、Y'データはそのままの解像度で符号化を行い、CrCbデータはサブサンプリングした解像度で符号化を行うため、原画像(8×8×3=192バイト)データが(6×4+6+6=36バイト)となり、圧縮率は原稿画像の種類に関わらず1/5.33である。符号化データは、GBTC圧縮メモリ206に書き込まれる。逆にGBTC復号動作を行う時にはGBTC圧縮メモリ206から符号データを読みだし、復号処理を行い元のY'CrCbデータを生成する。またどちらのバンクから読み出すかは第2CPU209から出力されるバンク信号3によって決定する。GBTC復号動作を行う時にGBTC圧縮メモリ206から符号データの読みだしアドレスを変更することにより、90°単位の画像回転が可能となる。
【0011】
GBTC圧縮メモリ206は、GBTC符号化部204により圧縮された符号データを格納するメモリである。GBTC圧縮メモリ部206は、それぞれ独立してアクセスが可能な2バンクから構成されており、どちらのバンクにアクセスするかは第2CPU209から出力されるバンク信号1、バンク信号2、バンク信号3に基づいて行われる。
2次圧縮部207は、属性メモリ205から属性データを、GBTC圧縮メモリ206からGBTC符号データを読みだし、属性データと第2CPU209から設定されるカラーモノクロ信号に基づいて符号化方法を切り換え、GBTC符号データをさらに圧縮し、2次圧縮メモリ208に書き込む。2次圧縮メモリ208は、複数の半導体チップで構成されるメモリの集合体である。2次圧縮部207により符号化されたデータは2次圧縮メモリ208に格納され、ページ単位でランダムに書き込みや読み出しが可能である。データの格納位置は第2CPU209の指示に基づいて行われ、2次圧縮メモリ208上のどのページのデータを読み出すかは第2CPU209または第1CPU101の指示に基づいて行われる。
【0012】
第2CPU209は、メモリユニット200の全体制御を行う。具体的にはそれぞれの処理ブロックに対して以下の処理を行う。下地除去部202に対して、下地除去テーブルを設定する。属性判別部203に対して、属性カウント部2038の中の各属性カウンタ(図3参照)をリセットし、各属性カウンタを読み込み、書き込み対象となる属性メモリ205のバンク指定(バンク信号1)をする。GBTC符号処理部204に対して、GBTC圧縮伸長を指示し、画像回転を指示し、書き込み、読み出しの対象となるGBTC圧縮メモリ206のバンク指定(バンク信号1、3)をする。2次圧縮部207に対して、2次圧縮伸長を指示し、画像データの読み出し及び書き込みをし、読み出し対象となる属性メモリ205のバンク指定(バンク信号2)をし、書き込み、読み出しの対象となるGBTC圧縮メモリ206のバンク指定(バンク信号2)をし、2次圧縮メモリ208へのデータ書き込み位置を指示し、2次圧縮メモリ208からのデータ読み出し位置を指示し、動作モードを指示し、各メモリ部の(2次圧縮部207を介在する)リードライト、すなわち、属性メモリ205のリードライト、GBTC圧縮メモリ206のリードライトおよび2次圧縮メモリ208のリードライトをする。2次圧縮部207への動作モードの指示において、2次圧縮ONOFF信号は、2次圧縮メモリ208へデータを格納する際、2次圧縮を行うか否かを切り換え、また、属性データを2次圧縮メモリ208に格納するかを切り換える。また、カラーモノクロ信号は、2次圧縮メモリ208へデータを格納する際の2次圧縮方法を切り換え、また、属性データをコンパクトにするか否かを切り換える。
【0013】
作業RAM210は、第2CPU209が演算を行う際の作業用RAMである。この作業用RAMには2次圧縮メモリ208を有効に管理するために、2種類の情報を保存する。(1)2次圧縮メモリ208に保存されている原稿画像データに関する情報(この情報を用いてGBTC符号化部204、2次圧縮部207、の動作モードを決定する)。すなわち、画像サイズ、属性データ書き込みアドレス、2次圧縮データ書き込みアドレス、カラー/モノクロ情報、2次圧縮したか否かの情報、および、下地除去テーブル情報。(2)2次圧縮メモリ208の書き込み可能領域情報(この情報を用いて2次圧縮部207が2次圧縮メモリ208ヘデータを書き込む際のアドレスを決定する)。すなわち、画像メモリを数KB単位に分割したときの各領域に対する1ビットの書き込み可能/禁止フラグ。(書き込み可能領域情報を用いて検索対象メモリサイズ容量を小さくできるため、空き領域を高速にサーチできる)。
なお、インターフェース220は、カラー複写機100とメモリユニット200の間で、画像バスを経由して画像デ―タの受け渡しを行い、シリアル通信バスを経由して画像データの入出力に関するコマンドをやりとりする。
【0014】
図2は、下地除去部202で用いられるルックアップテーブル形式の下地除去テーブルの3つの例を示す。テーブルの内容は第2CPU209により書き換え可能である。テーブルの内容が書き換え可能であるため、下地除去を行わない設定も可能である。下地除去処理が行われたY'CrCbデータは属性判別部203とGBTC符号化部204に送られる。
ルックアップテーブルの中味は、入出力の関係が全く等しい「階調保持領域」と、入力デ―タと出力データの関係が一次式で表現可能な「階調補正領域」と、入力データが所定値を超えたら全て白下地データとなる「下地除去領域」の3つの領域により構成される。(a)は下地除去を行わない場合の、(b)は下地除去を行つた場合の、(c)は下地除去量を増加させた場合の下地除去テーブルを示す。下地除去テーブルは(a)を用いた場合が最も画質がよく圧縮率は低い。(c)を用いた場合が最も白下地と認識される面積が大きくなり、圧縮率が最も高く画質は悪くなる。すなわち下地除去テーブルにおいてハイライト部分における除去量を制御することによって、圧縮率と画質を選択的に変更することが可能となる。
【0015】
図3は、属性判別部203と属性メモリ205の詳細を示す。属性判別部203において、ブロック切り出し部2031は、入力されたY'CrCbデータを8画素×8画素単位のブロックデータに切り出して出力する。階調幅抽出部2032は、ブロック切り出し部2031によりブロック化されたY'データ64画素の画像データ内の最小値と最大値を求め、その差分データを出力する。抽出された階調幅データにより、そのブロック内にエッジ画像またはべた画像があるかないかを判定できる。平均値抽出部2033は、ブロック切り出し部2031によりブロック化されたY'データ64画素の画像データ内の最小値と最大値を求め、その平均値データを出力する。抽出された平均値データにより、そのブロック内の平均濃度が高濃度か低濃度かを判定できる。色度値抽出部2034は、ブロック切り出し部2031によりブロック化されたCrデータ64画素とCbデータ64画素の画像データから色度データの最大値を求め、出力する。抽出された色度値データにより、そのブロック内のカラー画像の有無を判定することができる。
【0016】
属性判定部2035は、階調幅抽出部2032から抽出された階調幅データ、平均値抽出部2033から抽出された平均値データ、色度値抽出部2034から抽出された色度値データに基づいて、注目ブロックの属性が何であるかを決定する。本実施形態では1例として以下のような判定条件を用いる。「白下地属性」と判定されるのは、階調幅データが所定値以下(べた画像)、かつ、平均値データが所定値以上(低濃度)、かつ、色度値データは所定値以下(無彩色)であるものである。「黒文字属性」と判定されるのは、階調幅データが所定値以上(エッジ画像)、かつ、色度値データが所定値以下(無彩色)であるものである。「べた属性」と判定されるのは、白下地属性でなく、かつ、階調幅データが所定値以下(べた画像)であるものである。「モノクロ属性」と判定されるのは、色度値データは所定値以下(無彩色)であり、かつ、上記の3属性のどれにも該当しないものである。「カラー属性」と判定されるのは、上記4つの属性のどれにも該当しないものである。
ただし、モノクロ属性とカラー属性とは、属性カウンタで数えるために区別しているが、属性メモリ205に書き込む際にはいずれも「その他属性」として書き込む。これにより属性の数が4になるので、属性データは2ビットで表現できる。属性の数が5であれば、3ビットの属性コードが必要であり、また、複雑なデータの並び変え処理が必要になる。カラー/モノクロの判別はページ単位で行っているので、属性の数を4にしても不具合は生じない。ページ単位でのカラー/モノクロの判別結果がカラーであれば、「その他」属性は「カラー」属性として取り扱い、モノクロであれば、「モノクロ」属性として取り扱う。
【0017】
マクロ処理部2036は、属性判定部2035による判定結果による注目ブロックの属性が周辺の属性に対して不自然である場合、注目属性の属性を周辺の属性に合わせて修正を行う。
属性カウント部2038は、マクロ処理部2036により修正された最終的な各属性の数をカウントする。対象となる属性は、白下地属性、黒文字属性、べた属性、モノクロ属性、カラー属性の5種類であり、それぞれに対するカウンタが備えられる。各属性カウント値は第2CPU209から読み出し可能である。原稿読み取りを開始する前に第2CPU209が属性カウンタをリセットし、原稿読み取り終了後、各属性カウント値を読み出すことにより、読み取つた原稿における各属性の比率を知ることができる。また、第2CPU209は、属性カウント値から演算をすることにより、2次圧縮部207による圧縮の効果を予め知ることができる。さらに、2次圧縮部207による2次圧縮後の符号サイズを知ることができるため、第2CPU209は、2次圧縮メモリ208における最適な書き込み開始アドレスを2次圧縮部207による圧縮を行う前に算出することが可能となる。
【0018】
属性メモリ制御部2037は、第2CPU209から送られるバンク信号1に基づいて属性メモリの書き込み対象バンクを指示する。また各ブロックにおける属性2ビット属性メモリ205に書き込むのに有利なデータ単位8ビットに変換する。
【0019】
次に、属性メモリ部205について説明すると、属性メモリセレクタ2052は、属性メモリ制御部2037を経由して送られてくるバンク信号1に基づいて、属性メモリ部205のバンクA(2051A)を選ぶか、バンクB(2051B)のどちらを選ぶかを選択する。バンクA(2051A)とバンクB(2051B)は、それぞれ、lMbitのSRAMで構成され、原稿画像1ページ分の属性データを格納することが可能であり、それぞれ独立して属性データの読み出し、書き込みが可能である。
【0020】
次に、属性判別結果に基づく可変長圧縮方式の切り換えについて説明する。属性判別結果に応じて可変長符号化方式を切り換えて圧縮率を高めるが、必要により、1ページの画像全体の属性を判断して可変長圧縮方式を切り換える。
たとえば、文字画像や白下地の多い原稿に対しては、白下地に対するそれ以外の属性の比率はきわめて低い。そこで、属性判別結果をページ単位で判断して、全体に対して白下地の多い原稿であると判断される場合は、カラーモノクロ信号をモノクロに設定し、2次圧縮ONOFF信号をONに設定する。この場合、属性は、白下地とその他の2つとし、1ビットの属性データで表して、属性データの数を半減する。通常のカラー画像の属性判別は、「白下地」、「黒文字」、「べた画像」、「その他」という4属性に判別している。ブロック単位について4属性を表現するためには、2ビットの属性データが必要となる。1枚の原稿画像に対して、各属性がどの程度の比率をもっているかどうかは各属性についての属性カウンタにより知ることができる。文字画像や白下地の多い原稿であるかどうかは属性カウンタにより知ることができる。文字画像や白下地の多い原稿では、白下地に対するその他の属性の比率は極めて低い。そこで、文字画像や白下地の多い原稿での属性判別は、「白下地」と「その他」のみとすると1ビットで表現できるため、属性メモリの容量を半減できる。このとき、本来「黒文字」、「べた画像」として分類されるべき領域も「その他」と判定されるため、2次圧縮後のデータサイズは若干ながら増加する。しかし、そもそも、「黒文字」と「べた画像」の領域は、原稿画像全体に対して十分低い比率であるので、データサイズの増加はわずかとなる。かりにデータサイズの増加量が半減した属性データ量よりも多い場合は、あらかじめ属性カウンタの値より知ることができるため、このようなときには属性データ半減処理をする必要はない。属性メモリの容量を半減することにより2次圧縮データに対する属性メモリの比率を低くすることができ、結果的に高圧縮率が達成できる。
【0021】
同様に、カラー画像データの局所領域を他の属性と誤判別する可能性がある場合には、可変長符号化を行わない。すなわち、属性判別結果をページ単位で判断して、各画素ブロックに対応した属性判別結果の属性カウント値が所定の条件を満たした場合、1ページの画像の全ブロックに対して第2符号化手段の動作モードを切り換える。これにより、カラー画像データの局所領域を他の属性と誤判別した場合においても画像ノイズが発生しない。具体的には、属性判別部203により判別された各属性の数をカウントする属性数カウンタ2038により、1ページの原稿画像における各属性の個数がわかる。そこで、各属性の個数が所定の条件を満たす場合、たとえば、全体に対してカラー属性が占める割合が50%以上である、全体に対して白下地属性が占める割合が30%以下である、などのときには、原稿の大半がカラー画像で占められていると判断する。このような場合、カラーモノクロ信号をカラーに設定し、2次圧縮ONOFF信号をOFFに設定する。これにより、わずかな圧縮率の向上よりも画質劣化の防止を優先して、2次圧縮部207の動作モードを第1の圧縮メモリ206から第2の圧縮メモリ208への符号データ転送モードに切り換え、可変長符号化による圧縮をしない。
【0022】
図4は、GBTC符号化部204とGBTC圧縮メモリ206の詳細を示す。GBTC符号化部204において、ラスタブロック変換部Y/Cr/Cb(2041Y/2041Cr/2041Cb)は、圧縮時には下地除去を行われたシリアルデータを4画素ラインのブロックデータに変換する。伸長時には4画素ラインのブロックデータをシリアルデータに変換する。
GBTC圧縮チップY/Cr/Cb(2042Y/2042Cr/2042Cb)は、圧縮時には4画素ラインのブロックデータを読み出し、GBTC圧縮方式にて符号化を行い、GBTC圧縮メモリ206に書き込む。GBTC圧縮メモリのどちらのバンクにアクセスするかは圧縮時はバンク信号1によって制御される。伸長時には、GBTC圧縮メモリ206のGBTC符号データを読み出し、GBTC圧縮方式にて復号化し、4画素ラインのブロックデータに変換する。GBTC圧縮メモリのどちらのバンクにアクセスするかは伸長時はバンク信号3によって制御される。
【0023】
解像度変換部Cr/Cb(2043Cr/2043Cb)は、それぞれ、圧縮時には下地が除去されたCr/Cbデータのサブサンプリングを行い、画像データ量を1/4に削減してラスタブロック変換部2041Cr/2041Cbにデータを供給する。伸長時にはラスタデータに変換されたCrCbデータをそれぞれ2倍の補間処理を行い、画像データ量を4倍にして色変換部201にデータを供給する。
GBTC圧縮メモリ206(2061YA/2061YB/2061CrA/2061CrB/2061CbA/2061CbB)は、GBTC符号化部204により圧縮された符号データを格納する。GBTC圧縮メモリ部206は、それぞれ独立してアクセスが可能な2バンクから構成され、どちらのバンクに符号データを格納するかは第2CPU209から出力されるバンク信号1に基づいて決定される。また、それぞれのバンクはさらにYデータを記憶するメモリと、Crデータを記憶するメモリと、Cbデータを記憶するメモリの3つにより構成され、合計6つのメモリバンク(すなわちGBTC圧縮メモリ2061YA/2061YB/2061CrA/2061CrB/2061CbA/2061CbB)として構成される。
【0024】
GBTC圧縮メモリセレクタ2062は、2次圧縮部207が、6つのメモリバンクで構成されるGBTC圧縮メモリ2061にアクセスを行う時に、どのメモリバンクにアクセスを行うかを切り換える。GBTC圧縮メモリ2061のAバンクにアクセスするかBバンクにアクセスするかは第2CPU209から送られるバンク信号2またはバンク信号3により決定し、Y/Cr/Cbのどのメモリバンクにアクセスするかは2次圧縮部207において予め決めらた順番(Y、Cr、Cbの順)にて行われる。
【0025】
図5は2次圧縮部207の詳細を示す。符号処理部2071は、GBTC圧縮データを2次圧縮データに圧縮し、また、逆に2次圧縮データをGBTC圧縮データに伸長する。符号処理部2071の内部はさらに6つのブロックにより構成される。
第1符号セレクタ20716は、属性メモリ制御部2075から供給される属性データと、第2CPU209から送られてくるカラーモノクロ信号および2次圧縮ONOFF信号とに基づいて、画像バスの切り換えを行う。圧縮時においては、GBTC圧縮メモリ制御部2072を介在して送られてくるGBTC圧縮データをどの符号処理部20711/20712/20713/20714/20715に与えるかの切り換えを行う。伸長時においては各符号処理部20711/20712/20713/20714/20715によって伸長されたGBTC圧縮データのどれを選択するかを切り換える。
【0026】
第2CPU209から送られてくるカラーモノクロ信号と2次圧縮ONOFF信号に対する各属性と処理部との対応は次のとおりである。(a)2次圧縮ONOFF信号=ON、カラーモノクロ信号=カラーであるとき、白下地属性は、白下地処理部20711に送られ、黒文字属性は、黒文字処理部20712に送られ、べた属性は、べた画像処理部20713に送られ、その他属性は、カラー画像処理部20715に送られる。(b)2次圧縮ONOFF信号=ON、カラーモノクロ信号=カラーであるとき、白下地属性は、白下地処理部20711に送られ、黒文字属性は、黒文字処理部20712に送られ、べた属性は、べた画像処理部20713に送られ、その他属性は、モノクロ画像処理部20715に送られる。(c)2次圧縮ONOFF信号=OFFであるとき、白下地属性、黒文字属性、べた属性、その他属性のいずれもカラー画像処理部20715に送られる。
【0027】
第2符号セレクタ20717は、属性メモリ制御部2075から供給される属性データと、第2CPU209から送られて来るカラーモノクロ信号、2次圧縮ONOFF信号とに基づいて、画像バスの切り換えを行う。圧縮時においては各符号処理部20711/20712/20713/20714/20715によって2次圧縮された2次圧縮データのどれを選択するかを切り換える。伸長時においては2次圧縮メモリ制御部2073を介在して送られてくる2次圧縮データをどの符号処理部20711/20712/20713/20714/20715に与えるかを切り換える。第2CPU209から送られてくるカラーモノクロ信号、2次圧縮ONOFF信号に対する各属性と処理部との対応は上述の第1符号セレクタ20716の場合と同じ設定である。
【0028】
8画素×8画素のブロックの原画像データのGBTC圧縮により次の36バイトのデータが得られる。Yデータの平均値データ(4バイト)、Yデータの階調幅データ(4バイト)、Yデータの符号データ(16バイト(2ビット/画素))、CrCbデータの平均値データ(2バイト)、CrCbデータの階調幅データ(2バイト)、CrCbデータの符号データ(8バイト(2ビット/4画素))。各符号処理部20711/20712/20713/20714/20715は、以下に説明するように、圧縮データについて異なった取り扱いをする。
白下地処理部20711は、GBTC圧縮データを全く保存しない(0/36バイト)。したがって、原画像に対する圧縮比は0/(8×8×3)=0/192=0である。
黒文字処理部20712は、GBTC圧縮データの内、下記データを保存する(16/36バイト)。Yデータの平均値データ(4バイト)、Yデータの階調幅データ(4バイト)、Yデータの符号データ(8バイト(1ビット/画素))。符号データは上位1ビットのみ保存する。したがって、原画像に対する圧縮比は、16/(8×8×3)=1/12=0.0833である。
【0029】
べた画像処理部20713は、GBTC圧縮データの内、下記データを保存する(6/36バイト)。Yデータの平均値データ(lバイト)、CrCbデータの平均値データ(2バイト)。Yデータの平均値データのさらに平均値を保存する。したがって、原画像に対する圧縮比は、6/(8×8×3)=1/32=0.03125である。
モノクロ画像処理部20714は、GBTC圧縮データの内、下記のYデータのみを保存する(24/36バイト)。Yデータの平均値データ(4バイト)、Yデータの階調幅データ(4バイト)、Yデータの符号データ(16バイト(2ビット/画素))。したがって、原画像に対する圧縮比は、24/(8×8×3)=1/8=0.125である。
【0030】
カラー画像処理部20715は、GBTC圧縮データの内、全データを保存する(36/36バイト)。したがって、原画像に対する圧縮比は、36/(8×8×3)=3/16=0.1875である。
GBTC圧縮メモリ制御部2072は、GBTC圧縮メモリ206のアドレス制御などを行い、符号処理部2071とGBTC圧縮メモリ206の間のデータの受け渡しを行う。
2次圧縮メモリ制御部2073は、2次圧縮メモリ208のアドレス制御などを行い、符号処理部2071と2次圧縮メモリ208の間のデータの受け渡しを行う。
レジスタ制御部2074は、第2CPU209からの指示に基づいて2次圧縮部207全体の制御を行う。
属性メモリ制御部2075は、属性メモリ205のアドレス制御などを行い、符号処理部2071と属性メモリ205の間のデータの受け渡しを行う。
【0031】
符号処理部2071の切り換えに用いた属性メモリデータは2次圧縮データからGBTC圧縮データに伸長を行う際に必要となるため、属性データ変換部2076は、属性メモリ制御部2075を介在して得られた属性データを所定の条件に基づいて変換し、2次圧縮メモリ制御部2073を介在して、2次圧縮メモリ208へ保存しておく。
この所定の条件は次のとおりである。(a)第2CPU209から送られてくるカラーモノクロ信号がモノクロを意味している場合、属性データを半減させる処理をおこなう。具体的には、白下地属性を0とし、それ以外を1とすることにより、4属性を2属性に単純化する。これにより、本来2ビット必要であった属性データを1ビットで表すので、属性データを半減できる。また、(b)第2CPU209から送られてくるカラーモノクロ信号がカラーを意味している場合、属性データがカラー属性である場合、そのまま属性データを書き込む。また、(c)第2CPU209から送られてくる2次圧縮ONOFF信号がOFFである場合、すなわち、2次圧縮を行わない場合には、伸長の際に属性データが不必要であるので、属性データは書き込まない。
【0032】
次に、図6〜図8を参照して、第2CPU209とその作業RAM210による2次圧縮メモリ208の制御について説明する。図6に示すように、2次圧縮メモリ208は、120MBのDRAMで構成されているものとする。120MBのメモリ空間は、64KB単位で1920個の制御単位(以下ではルームという)として制御される。1ページの原稿に対する2次圧縮データおよび属性データは、データサイズに応じてアドレス上で連続して配置された複数のルームに分割して保存される。1ルーム内に複数ページの2次圧縮データを混在させないように制御する。
【0033】
図7は、作業RAM210における書き込み可能領域情報を示す。ルーム管理テーブルは、1920個のルームにデータが書き込まれているか否かを1ビットの情報(合わせて1920ビットすなわち240バイトの情報)で示す。このルーム管理テーブルを用いて2次圧縮メモリ208内の空き領域を高速に検索する。そして1920個のルームに現在何ページ目の原稿が格納されているかを2バイトのルーム情報として示す。このルーム情報を用いて任意のページデータの格納位置を知ることができる。
図8は、作業RAM210における原稿画像データ情報を示す。最大1024ページの画像データを管理できるものとする。各ページ単位で、画像サイズ、属性データ書き込みアドレス、2次圧縮データ書き込みアドレス、カラーモノクロ情報、2次圧縮ONOFF情報、下地除去テーブル情報などを記憶している。
【0034】
図9は、メモリユニット200を制御する第2CPU209によるメモリユニット200のメインフローを示す。メモリユニット電源投入後、まず、メモリユニット200の初期設定を行う(ステップSl、以下「ステップ」を省略する)。具体的には色変換部201の色変換係数の設定や、下地除去部202の下地除去テ―ブルの設定、属性判別部203の属性判定条件の設定、GBTC符号化部204の初期設定、および2次圧縮部207の初期設定を行う。
次に、メモリユニット内部処理を行う(S2)。すなわち、メモリのリフレッシュやアドレス管理などメモリユニット内の制御を行う。
【0035】
次に、カラー複写機100本体を制御する第1CPU101との間の通信制御を行う(S3)。これにより、第1CPU101から発行される制御コマンドを受信し、制御コマンドに対応してメモリユニット全体を制御できる。
第1CPU101から制御コマンドが受信されたか否かを判定する(S4)。制御コマンドが発行されていない場合には、ステップS2〜S3の処理を繰り返す。また、第1CPU101から制御コマンドが発行された場合には、次に、必要に応じて下地除去部202の下地除去テーブルを書き換える(S5)。変更の必要がない場合には初期設定で設定された値を用いる。
【0036】
次に、必要に応じて属性判別部203の属性判別条件やバンク信号1の設定を行う(S6)。変更の必要がない場合には初期設定で設定された値を用いる。バンク1信号は1ページの原稿画像に対して1回出力される。
次に、GBTC符号処理部204の設定を行う(S7)。具体的には、必要に応じて、GBTC符号処理部204の圧縮伸長条件や画像回転、バンク信号1、バンク信号3の設定を行う。圧縮伸長条件や画像回転、バンク信号1、バンク信号3は1ページの原稿画像に対して1回出力される。
【0037】
次に、2次圧縮処理部207の設定を行う(S8)。すなわち、必要に応じて2次圧縮処理部207の圧縮伸長条件や画像データ格納位置制御やバンク信号2の設定を行う。圧縮伸長条件や画像データ格納位置制御やバンク信号2は、1ページの原稿画像に対して1回出力される。
そして、制御コマンドにより決定されるページ分の処理が終了するまで、ステップS5〜S9の処理を繰り返す。
【0038】
図10は、下地除去テーブル設定処理(図9、S5)のフローを示す。まず、下地除去テーブルの設定に関するコマンドを受信したか否かをチェックする(S51)。受信したコマンドがテーブル(a)の設定コマンドであった場合には、下地除去部202に下地除去テーブル(a)(図2参照)を設定する(S52)。受信したコマンドがテーブル(b)の設定コマンドであった場合には下地除去部202に下地除去テーブル(b)(図2参照)を設定する(S53)。受信したコマンドがテーブル(c)の設定コマンドであった場合には下地除去部202に下地除去テーブル(c)(図2参照)を設定する(S54)。
なお、本実施形態では下地除去テーブルは3種類しか用意していないが、用途に合わせて、多数の下地除去テーブルを切り換えてもよい。また、下地除去テーブルの切り換えを複写機本体の第1CPU101により行っているが、必要に応じてメモリユニットを制御する第2CPU209が行つてもよい。
【0039】
図11は属性判別部設定処理(図9、S6)のフローを示す。まず、属性判別部203の設定に関するコマンドを受信したか否かをチェックする(S6l)。
受信したコマンドがミクロ判別条件の設定であった場合には、属性判別部203に対して白下地属性判別条件設定(S62)、黒文字属性判別条件設定(S63)、べた属性判別条件設定(S64)を行う。
受信したコマンドがマクロ判別条件の設定であった場合には、属性判別部203に対してマクロ判別条件設定を行う(S65)。
受信したコマンドが属性判別制御コマンドであった場合に、ページ単位でバンク信号1を制御し(S66)、属性カウンタ2038をリセットし(S67)、属性判別を開始する(S68)。この処理は1連の原稿枚数分行われる。バンク信号1の制御は奇数ページ目の処理を行う時にはAバンクを選択し、偶数ページ目の処理を行う時にはBバンクを選択する。なお本実施形態ではバンク信号1の設定をメモリユニットの第2CPU209により行っているが、必要に応じて複写機本体の第1CPU101が行ってもよい。
【0040】
図12と図13は、GBTC符号処理部設定処理(図9、S7)のフローを示す。まずGBTC符号処理部204に関するコマンドを受信したか否かをチェックする(S7l)。そして受信したコマンドと現在処理を行っているページに対応したコマンド解析を行い、第0から第6のGBTC動作モードのいずれかを選択する(S72)。第0のGBTC動作モードでは、GBTC符号処理部204は何も処理を行わない。第1のGBTC動作モードでは、GBTC符号処理部204において、GBTC圧縮メモリ206のバンクAを選択するためにバンク信号1をバンクAに設定し(S73)、GBTC圧縮を行い、GBTC圧縮メモリ206のバンクAにGBTC圧縮データを書き込む(S74)。第2のGBTC動作モードでは、GBTC符号処理部204において、GBTC圧縮メモリ206のバンクBを選択するためにバンク信号1をバンクBに設定し(S75)、GBTC圧縮を行い、GBTC圧縮メモリ206のバンクBにGBTC圧縮データを書き込む(S76)。第3のGBTC動作モードでは、GBTC符号処理部204において、GBTC圧縮メモリ206のバンクAを選択するためにバンク信号3をバンクAに設定し(S77)、必要に応じて出力画像の回転角を設定し(S78)、GBTC圧縮メモリ206のバンクAからGBTC符号データを読み出し、GBTC伸長を行う(S79)。第4のGBTC動作モードでは、GBTC符号処理部204において、GBTC圧縮メモリ206のバンクBを選択するためにバンク信号3をバンクBに設定し(S710)、必要に応じて出力画像の回転角を設定し(S711)、GBTC圧縮メモリ206のバンクBからGBTC符号データを読み出し、GBTC伸長を行う(S712)。第5のGBTC動作モードでは、第1の動作モード(S713〜S714)と第4の動作モード(S715〜S717)の処理を連続して行うことにより、同時圧縮伸長を行う。第6のGBTC動作モードでは、第2の動作モード(S718〜S719)と第3の動作モード(S720〜S722)の処理を連続して行うことにより、同時圧縮伸長を行う。
【0041】
図14は、2次圧縮部設定処理フロー(図9、S8)を示す。まず2次圧縮部207に関するコマンドを受信したか否かをチェックする(S8l)。そして受信したコマンドと現在処理を行っているページに対応したコマンド解析を行い、第0から第4の2次圧縮動作モードのいずれかを選択する(S82)。
第0の2次圧縮動作モードでは、2次圧縮部207は何も処理を行わない。
第1の2次圧縮動作モードでは、まず属性判別部203の属性カウント部2038から各属性(白下地/黒文字/モノクロ/カラー)のカウント値を読み込む(S83)。属性メモリ205とGBTC圧縮メモリ206のバンクAにアクセスするためにバンク信号2をバンクAに設定する(S84)。そして属性メモリ205に書き込まれている属性データを2次圧縮部207を介在して所定の条件に基づいて2次圧縮メモリ208へ書き込む(S85)。そしてGBTC圧縮メモリ206に書き込まれているGBTC圧縮データを2次圧縮部207で所定の条件に基づいて2次圧縮を行い、2次圧縮メモリ208へ書き込む(S86)。
【0042】
第2の2次圧縮動作モードでは、まず属性判別部203の属性カウント部2038から各属性(白下地/黒文字/モノクロ/カラー)のカウント値を読み込む(S87)。属性メモリ205とGBTC圧縮メモリ206のバンクBにアクセスするためにバンク信号2をバンクBに設定する(S88)。そして属性メモリ205に書き込まれている属性データを2次圧縮部207を介在して所定の条件に基づいて2次圧縮メモリ208へ書き込む(S89)。そしてGBTC圧縮メモリ206に書き込まれているGBTC圧縮データを2次圧縮部207で所定の条件に基づいて2次圧縮を行い、2次圧縮メモリ208へ書き込む(S810)。
【0043】
第3の2次圧縮動作モードでは、属性メモリ205とGBTC圧縮メモリ(206)のバンクAにアクセスするためにバンク信号2をバンクAに設定する(S8ll)。そして2次圧縮メモリ208に書き込まれている属性データを2次圧縮部207を介在して所定の条件に基づいて属性メモリ205へ書き込む(S812)。そして2次圧縮メモリ208に書き込まれている2次圧縮データを2次圧縮部207で所定の条件に基づいて2次伸張を行い、GBTC圧縮メモリ206ヘ書き込む(S813)。
【0044】
第4の2次圧縮動作モードでは、属性メモリ205とGBTC圧縮メモリ206のバンクBにアクセスするためにバンク信号2をバンクBに設定する(S814)。そして2次圧縮メモリ208に書き込まれている属性データを2次圧縮部207を介在して所定の条件に基づいて属性メモリ205へ書き込む(S815)。そして2次圧縮メモリ208に書き込まれている2次圧縮データを2次圧縮部207で所定の条件に基づいて2次伸長を行い、GBTC圧縮メモリ206ヘ書き込む(S816)。
【0045】
図15は、属性データ書き込み処理フロー(図14、S85、S89、S812、S815)を示す。まず属性判別部203の属性カウンタ2038から読み出した各属性のカウント値から全体に対するカラー属性の比率を計算する。そして、以下の3つの場合に分けて処理する。なお、属性情報半減処理を行ったか否かは、対象のページがカラーかモノクロであるかというページ単位の情報として作業RAM210上に記憶されている。また、2次圧縮部207において2次圧縮を行ったか否かも2次圧縮ONOFF信号としてページ単位で作業RAM210上に記憶されている。
(a)計算されたカラー属性比率の結果が所定値(例えば50%)以上であった場合(S841でYES)、原稿画像のほとんどがグラビアなどのカラー画像であると判断し、いたずらに2次圧縮を行い画質を落とすよりは、画質を優先する。このため、2次圧縮部207において2次圧縮を行わずに2次圧縮メモリ208に書き込むようにする。属性情報は不必要となり、属性データの書き込みを行わずに処理を終了する。このときには、カラーモノクロ信号をカラーとし、2次圧縮ONOFF信号をOFFとする。
【0046】
(b)属性カウント部2038から読み出した各属性のカウント値から、カラー属性がないか、または、たとえば0.1%より小さくカラーがほとんどないに等しい程度であった場合(S842でYES)、原稿画像のほとんどがモノクロ画像であると判断し、2次圧縮のデータをコンパクトにするだけではなく、属性データそのものを半減させ(S843)、2次圧縮メモリ208へ書き込む(S844)。具体的には通常は1つの属性領域に対し、(白下地/黒文字/モノクロ/カラー)の4属性を表現するために2ビットの属性情報を必要としたが、これを(白下地/それ以外)とし、属性情報をlビット化する。この処理を行うことにより属性データそのものを半分に削減することができ、本方式においてさらなる圧縮率の向上が期待できる。このときには、カラーモノクロ信号をモノクロとし、2次圧縮ONOFF信号をONとする。
【0047】
(c)カラー属性比率が所定の条件を満たさない通常のビジネスカラー文書の場合(S842でNO)、通常通りに1つの属性領域に対し、(白下地/黒文字/モノクロ/カラー)の4属性を表現するために2ビットの属性情報を2次圧縮メモリ208に書き込む(S845)。ここで、カラーモノクロ信号をカラーとし、2次圧縮ONOFF信号をONとする。
なお、属性カウント部2038のカウント値に基づいてページ単位でカラー/モノクロの判別を行う場合を説明したが、たとえば操作パネル(図示しない)によりモノクロモードが設定されている場合には、カラー属性は存在し得ないため、属性データ半減処理(S843)と属性データ書き込み処理(S844)を行うように制御する。
【0048】
図16は、2次圧縮メモリ書き込み処理(図14、S86,S810,S813,S816)のフローを示す。図15の3つの場合に対応した以下の処理が行われる。
(a)計算されたカラー属性比率の結果が所定値(例えば50%)以上であった場合、まず属性判別部203の属性カウント部2036から読み出した各属性のカウント値から全体に対するカラー属性の比率を計算する。
計算されたカラー属性比率の結果が所定値(例えば50%)以上であった場合(S851)、原稿画像のほとんどがグラビアなどのカラー画像であると判断し、いたずらに2次圧縮を行い画質を落とすよりは、画質を優先する。また、下地除去が行われている場合にも同様のことが言えるため、現在の下地除去テーブルが(a)であるかすなわち下地除去を行っていないか否かをチェックする(S852)。そして下地除去テーブルが(a)でない、すなわち下地除去を行つている場合には下地除去テーブルを(a)にセットしなおし、画像再スキャンの指示を行う(S856)。画像再スキャンの指示は、カラー複写機本体の第1CPU101に画像再送コマンドを発行することにより行う。下地除去テーブルが(a)の場合には、すなわち下地除去を行っていない場合には、2次圧縮後のデータサイズを計算し(S853)(この場合はGBTC圧縮データサイズに等しい)、画像データサイズが連続して書き込み可能な2次圧縮メモリ208のアドレスを作業RAM210内のデータを元に計算し(S854)、その書き込みアドレスから2次圧縮メモリ208への書き込みを開始する(S855)。
【0049】
(b)属性判別部203の属性カウント部2038から読み出した各属性のカウント値から、カラー属性がない、またはほとんどないに等しい程度(0.1%以下)であつた場合(S857でYES)、カラー属性においてもモノクロ符号処理を行うため、2次圧縮部207の動作モードをモノクロモードに設定する(S858)。そして各属性カウンタの値からモノクロモードにおける2次圧縮後のデータサイズを計算し(S859)、画像データサイズが連続して書き込み可能な2次圧縮メモリ208のアドレスをCPU作業RAM210内のデータを元に計算し(S860)、その書き込みアドレスから2次圧縮メモリ208への書き込みを開始する(S861)。
(c)カラー属性比率が所定の条件を満たさない通常のビジネスカラー文書の場合(S857でNO)、カラー属性においてもカラー符号処理を行うため、2次圧縮部207の動作モードをカラーモードに設定する(S862)。そして各属性カウンタの値からカラーモードにおける2次圧縮後のデータサイズを計算し(S863)、画像データサイズが連続して書き込み可能な2次圧縮メモリ208のアドレスをCPU作業RAM210内のデータを元に計算し(S864)、その書き込みアドレスから2次圧縮メモリ208への書き込みを開始する(S865)。
【0050】
画像処理装置において、画像の複数の領域について属性を判別した結果に基いて圧縮メモリに対する属性データの書き込みを制御して属性データの量を低減するので、画像データの圧縮率をさらに高めることができる。
たとえば、カラー画像であると判断される場合、属性データを保存しないので、これにより、圧縮率を向上できる。
また、文字画像や白下地の多い原稿(モノクロ原稿)に対しては、属性データの数を減らすことにより、圧縮データ量に対する属性データの量の比率を低くできる。
【図面の簡単な説明】
【図1】 複写機とメモリユニットのブロック図
【図2】 下地除去テーブルの図
【図3】 属性判別部と属性メモリ部のブロック図
【図4】 GBTC符号化部とGBTC圧縮メモリ部のブロック図
【図5】 2次圧縮部のブロック図
【図6】 2次圧縮メモリの図
【図7】 作業RAMに格納される書き込み可能情報の図
【図8】 作業RAMに格納される原稿画像データ情報の図
【図9】 メインフローチャート
【図10】 下地除去テーブル設定のフローチャート
【図11】 属性判別部設定のフローチャート
【図12】 GBTC符号処理部設定の一部のフローチャート
【図13】 GBTC符号処理部設定の一部のフローチャート
【図14】 2次圧縮処理部設定のフローチャート
【図15】 属性データ書き込み処理のフローチャート
【図16】 2次圧縮メモリ書き込み処理のフローチャート
【符号の説明】
203 属性判別部、 205 属性メモリ、 206 GBTC圧縮メモリ、 207 2次圧縮部、 208 2次圧縮メモリ、 209 CPU、 2071 符号処理部、 2076 属性データ変換部。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus that compresses image data.
[0002]
[Prior art]
In the digital image processing system, image data is temporarily stored in a memory in units of pages. Then, the data is read from the memory, and after various processing if necessary, it is output for printing. In a system in which a plurality of image data is encoded and stored on a compression memory, in order to store as many image data as possible within a limited memory size, it is necessary to increase the data compression rate.
As a compression method, fixed-length encoding such as block truncation encoding that divides and encodes image data into a plurality of pixel blocks is used. However, in this method, the data compression rate is not large. In view of this, it has been proposed that the data of each image block is further subjected to variable length coding based on the attribute discrimination result corresponding to each block, and the data is secondarily compressed.
[0003]
[Problems to be solved by the invention]
Here, when the data is subjected to the secondary compression of the data of each block based on the attribute determination result for each block, the attribute determination result is used for decompression, and therefore it is necessary to store the attribute data. The amount of attribute data is constant regardless of the content of the document. In a color image or the like, the ratio of the amount of attribute data to the amount of secondary compressed data is sufficiently small. However, in a manuscript with many monochrome images and white backgrounds, the ratio of the amount of attribute data is high, and it is difficult to reduce the compression rate.
[0004]
An object of the present invention is to provide an image processing apparatus that efficiently performs image compression in an image processing apparatus that switches a variable-length encoding method for each image block based on an attribute discrimination result for each block.
[0005]
An image processing apparatus according to the present invention divides input image data into a plurality of areas, and determines an attribute for each area, and an attribute representing the attribute for each area determined by the attribute determination means An attribute memory for storing data; an encoding means for performing variable-length encoding of the image data based on the attribute data stored in the attribute memory; and storing the image data encoded by the encoding means If the ratio of the areas having color attributes among the plurality of areas constituting the input image data is determined to be greater than or equal to a predetermined value based on the compression data and the attribute data, the attribute data On the other hand, if it is determined that the attribute data is less than the predetermined value, attribute data writing means for writing the attribute data to the compressed memory; Wherein the Coding When it is determined that a ratio of areas having color attributes among the plurality of areas constituting the input image data is equal to or greater than a predetermined value, the means stores the length in the compression memory without performing variable-length coding. Write image data.
The attribute data writing means does not write the attribute data to the compression memory when the condition is determined to be a color image based on the determination result by the attribute determination means. In the case of a color image, variable-length encoding is not performed, so attribute data is not required at the time of decoding, and information indicating that it is a color image may be stored in units of pages, so that attribute data is not saved. This improves the compression rate.
Further, the attribute data writing means writes only the attribute data indicating whether the document image to be determined is monochrome or not in the compression memory when it is a condition for determining that the document image to be determined is monochrome. As a result, the ratio of the amount of attribute data to the amount of compressed data can be reduced by reducing the number of attribute data for a character image or a document with many white backgrounds (monochrome document). Here, for example, when the count value of the white background attribute exceeds a predetermined value, it is determined as a monochrome document.
[0006]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
FIG. 1 shows the overall configuration of the
[0007]
Next, the
[Expression 1]
Conversely, when outputting to the
[Expression 2]
[0008]
The
The
[0009]
The discriminated attributes are a white background attribute, a black character attribute, a solid attribute, a monochrome attribute, and a color attribute. However, the monochrome attribute and the color attribute are stored as other attributes. In addition, in order to compensate for misjudgment of attribute discrimination, macro discrimination processing for correcting the attention attribute with the peripheral attribute is performed. When it is determined from the attribute determination result that most of the original image of one page is a color image, the secondary compression ON / OFF signal is set to OFF, and the color monochrome signal is set to “color”. If it is determined from the attribute determination result that most of the original image has no color attribute, the secondary compression ON / OFF signal is set to ON and the color monochrome signal is set to “monochrome” (see FIG. 15).
[0010]
The GBTC
[0011]
The
The
[0012]
The
[0013]
The
The
[0014]
FIG. 2 shows three examples of the background removal table in the lookup table format used in the
The contents of the lookup table consist of a “gradation holding area” with exactly the same input / output relationship, a “gradation correction area” in which the relationship between input data and output data can be expressed by a linear expression, and the input data is predetermined. If it exceeds the value, it is composed of three areas of “background removal area” which becomes all white background data. (A) shows the background removal table when the background removal is not performed, (b) shows the case where the background removal is performed, and (c) shows the background removal table when the background removal amount is increased. When the background removal table (a) is used, the image quality is the best and the compression rate is low. When (c) is used, the area recognized as the white background is the largest, the compression ratio is the highest, and the image quality is poor. That is, it is possible to selectively change the compression rate and the image quality by controlling the removal amount in the highlight portion in the background removal table.
[0015]
FIG. 3 shows details of the
[0016]
The
However, the monochrome attribute and the color attribute are distinguished for counting by the attribute counter, but when they are written in the attribute memory 205, both are written as “other attributes”. As a result, the number of attributes becomes 4, so that the attribute data can be expressed by 2 bits. If the number of attributes is 5, a 3-bit attribute code is required, and complicated data rearrangement processing is required. Since the color / monochrome determination is performed in units of pages, no problem occurs even if the number of attributes is four. If the color / monochrome discrimination result in page units is color, the “other” attribute is handled as the “color” attribute, and if it is monochrome, it is handled as the “monochrome” attribute.
[0017]
When the attribute of the target block based on the determination result by the
The
[0018]
The attribute
[0019]
Next, the attribute memory unit 205 will be described. The
[0020]
Next, switching of the variable length compression method based on the attribute discrimination result will be described. Although the compression rate is increased by switching the variable length encoding method according to the attribute discrimination result, the variable length compression method is switched by determining the attribute of the entire image of one page if necessary.
For example, the ratio of the other attributes to the white background is very low for a text image or a document with many white backgrounds. Therefore, if the attribute determination result is determined in units of pages and it is determined that the document has a large amount of white background, the color monochrome signal is set to monochrome and the secondary compression ON / OFF signal is set to ON. . In this case, the white background and the other two attributes are represented by 1-bit attribute data, and the number of attribute data is halved. Ordinary color image attributes are discriminated into four attributes of “white background”, “black character”, “solid image”, and “other”. In order to express 4 attributes for each block, 2-bit attribute data is required. It can be known from the attribute counter for each attribute whether or not each attribute has a ratio with respect to one document image. Whether the document is a character image or a document with many white backgrounds can be known from the attribute counter. In a manuscript with many character images and white backgrounds, the ratio of other attributes to the white background is extremely low. Therefore, the attribute discrimination for a text image or a document with many white backgrounds can be expressed by 1 bit if only “white background” and “others” are used, and the capacity of the attribute memory can be halved. At this time, since the area that should be classified as “black character” or “solid image” is also determined as “other”, the data size after the secondary compression slightly increases. However, in the first place, the area of “black characters” and “solid image” has a sufficiently low ratio with respect to the entire document image, so the increase in data size is small. If the amount of increase in the data size is larger than the attribute data amount that is halved, it can be known in advance from the value of the attribute counter, and in such a case, the attribute data halving process is not necessary. By halving the capacity of the attribute memory, the ratio of the attribute memory to the secondary compressed data can be lowered, and as a result, a high compression ratio can be achieved.
[0021]
Similarly, when there is a possibility that the local area of the color image data is misidentified as another attribute, variable length coding is not performed. That is, when the attribute determination result is determined in units of pages and the attribute count value of the attribute determination result corresponding to each pixel block satisfies a predetermined condition, the second encoding unit is applied to all blocks of the image of one page. Switch the operation mode. As a result, no image noise occurs even when the local region of the color image data is misidentified as another attribute. Specifically, the
[0022]
FIG. 4 shows details of the
The GBTC compression chip Y / Cr / Cb (2042Y / 2042Cr / 2042Cb) reads block data of 4 pixel lines at the time of compression, performs encoding by the GBTC compression method, and writes it to the
[0023]
Each of the resolution conversion units Cr / Cb (2043Cr / 2043Cb) performs sub-sampling of the Cr / Cb data from which the background is removed at the time of compression, reduces the image data amount to ¼, and the raster block conversion unit 2041Cr / 2041Cb To supply data. At the time of decompression, the CrCb data converted into raster data is subjected to interpolation processing twice, and the image data amount is quadrupled to supply data to the
The GBTC compression memory 206 (2061YA / 2061YB / 2061CrA / 2061CrB / 2061CbA / 2061CbB) stores the code data compressed by the
[0024]
The GBTC
[0025]
FIG. 5 shows details of the
The
[0026]
The correspondence between each attribute and the processing unit for the color monochrome signal and the secondary compression ON / OFF signal sent from the
[0027]
The
[0028]
The next 36-byte data is obtained by GBTC compression of the original image data of the block of 8 pixels × 8 pixels. Average value data of Y data (4 bytes), gradation data of Y data (4 bytes), code data of Y data (16 bytes (2 bits / pixel)), average value data of CrCb data (2 bytes), CrCb Data gradation width data (2 bytes), CrCb data code data (8 bytes (2 bits / 4 pixels)). Each
The white
The black character processing unit 20712 stores the following data among the GBTC compressed data (16/36 bytes). Average value data of Y data (4 bytes), gradation width data of Y data (4 bytes), code data of Y data (8 bytes (1 bit / pixel)). Only the upper 1 bit is stored in the code data. Therefore, the compression ratio with respect to the original image is 16 / (8 × 8 × 3) = 1/12 = 0.0833.
[0029]
The solid image processing unit 20713 stores the following data (6/36 bytes) in the GBTC compressed data. Average value data of Y data (1 byte), average value data of CrCb data (2 bytes). The average value of the average value data of Y data is stored. Therefore, the compression ratio with respect to the original image is 6 / (8 × 8 × 3) = 1/32 = 0.03125.
The monochrome
[0030]
The color
The GBTC compression
The secondary compression
The
The attribute
[0031]
Since the attribute memory data used for switching the
This predetermined condition is as follows. (A) When the color monochrome signal sent from the
[0032]
Next, control of the
[0033]
FIG. 7 shows writable area information in the
FIG. 8 shows document image data information in the
[0034]
FIG. 9 shows a main flow of the
Next, internal processing of the memory unit is performed (S2). That is, control within the memory unit such as memory refresh and address management is performed.
[0035]
Next, communication control with the
It is determined whether a control command is received from the first CPU 101 (S4). If a control command has not been issued, the processes in steps S2 to S3 are repeated. If a control command is issued from the
[0036]
Next, the attribute determination condition of the
Next, the GBTC
[0037]
Next, the secondary
Then, the processing in steps S5 to S9 is repeated until the processing for the page determined by the control command is completed.
[0038]
FIG. 10 shows a flow of the background removal table setting process (FIG. 9, S5). First, it is checked whether or not a command related to setting of the background removal table has been received (S51). If the received command is a setting command for the table (a), the background removal table (a) (see FIG. 2) is set in the background removal unit 202 (S52). If the received command is a setting command for the table (b), the background removal table (b) (see FIG. 2) is set in the background removal unit 202 (S53). If the received command is a setting command for the table (c), the background removal table (c) (see FIG. 2) is set in the background removal unit 202 (S54).
In this embodiment, only three types of background removal tables are prepared. However, a large number of background removal tables may be switched according to the application. Further, although the background removal table is switched by the
[0039]
FIG. 11 shows the flow of the attribute determination unit setting process (FIG. 9, S6). First, it is checked whether a command related to the setting of the
If the received command is the micro discrimination condition setting, the white background attribute discrimination condition setting (S62), the black character attribute discrimination condition setting (S63), and the solid attribute discrimination condition setting (S64) for the
If the received command is a macro discrimination condition setting, the macro discrimination condition is set to the attribute discrimination unit 203 (S65).
If the received command is an attribute discrimination control command, the
[0040]
12 and 13 show a flow of GBTC code processing unit setting processing (FIG. 9, S7). First, it is checked whether or not a command related to the GBTC
[0041]
FIG. 14 shows a secondary compression unit setting process flow (FIG. 9, S8). First, it is checked whether or not a command related to the
In the 0th secondary compression operation mode, the
In the first secondary compression operation mode, first, the count value of each attribute (white background / black character / monochrome / color) is read from the
[0042]
In the second secondary compression operation mode, first, the count value of each attribute (white background / black character / monochrome / color) is read from the
[0043]
In the third secondary compression operation mode,
[0044]
In the fourth secondary compression operation mode,
[0045]
FIG. 15 shows an attribute data write processing flow (FIG. 14, S85, S89, S812, S815). First, the ratio of the color attribute to the whole is calculated from the count value of each attribute read from the
(A) If the result of the calculated color attribute ratio is equal to or greater than a predetermined value (for example, 50%) (YES in S841), it is determined that most of the document image is a color image such as a gravure, and the secondary is unnecessarily. Prioritize image quality over compressing and reducing image quality. For this reason, the
[0046]
(B) From the count value of each attribute read from the
[0047]
(C) In the case of a normal business color document in which the color attribute ratio does not satisfy a predetermined condition (NO in S842), four attributes (white background / black character / monochrome / color) are assigned to one attribute area as usual. In order to express, 2-bit attribute information is written in the secondary compression memory 208 (S845). Here, the color monochrome signal is set to color, and the secondary compression ON / OFF signal is set to ON.
Although the case where color / monochrome determination is performed in units of pages based on the count value of the
[0048]
FIG. 16 shows the flow of the secondary compressed memory writing process (FIG. 14, S86, S810, S813, S816). The following processing corresponding to the three cases of FIG. 15 is performed.
(A) When the result of the calculated color attribute ratio is equal to or greater than a predetermined value (for example, 50%), first, the ratio of the color attribute to the whole from the count value of each attribute read from the
When the result of the calculated color attribute ratio is a predetermined value (for example, 50%) or more (S851), it is determined that most of the original image is a color image such as a gravure, and second-order compression is performed to improve the image quality. Prioritize image quality over dropping. Since the same can be said when the background removal is performed, it is checked whether the current background removal table is (a), that is, whether the background removal is not performed (S852). If the background removal table is not (a), that is, if background removal has been performed, the background removal table is reset to (a) and an image rescan instruction is issued (S856). An instruction for image rescanning is issued by issuing an image retransmission command to the
[0049]
(B) When the count value of each attribute read from the
(C) In the case of a normal business color document in which the color attribute ratio does not satisfy the predetermined condition (NO in S857), the operation mode of the
[0050]
In the image processing apparatus, based on the result of determining the attributes of a plurality of regions of the image Control the writing of attribute data to the compressed memory Since the amount of attribute data is reduced, the compression rate of image data can be further increased.
For example, when it is determined that the image is a color image, the attribute data is not stored, and thus the compression rate can be improved.
In addition, for a text image or a document with many white backgrounds (monochrome document), the ratio of the amount of attribute data to the amount of compressed data can be reduced by reducing the number of attribute data.
[Brief description of the drawings]
FIG. 1 is a block diagram of a copying machine and a memory unit.
FIG. 2 shows a background removal table.
FIG. 3 is a block diagram of an attribute determination unit and an attribute memory unit.
FIG. 4 is a block diagram of a GBTC encoding unit and a GBTC compression memory unit.
FIG. 5 is a block diagram of a secondary compression unit.
FIG. 6 is a diagram of a secondary compression memory.
FIG. 7 is a diagram of writable information stored in the work RAM.
FIG. 8 is a diagram of document image data information stored in the work RAM.
FIG. 9 Main flowchart
FIG. 10 is a flowchart for setting a background removal table.
FIG. 11 is a flowchart of setting an attribute determination unit.
FIG. 12 is a partial flowchart of GBTC code processing unit setting.
FIG. 13 is a partial flowchart of GBTC code processing unit setting.
FIG. 14 is a flowchart of setting a secondary compression processing unit.
FIG. 15 is a flowchart of attribute data write processing;
FIG. 16 is a flowchart of secondary compression memory writing processing;
[Explanation of symbols]
203 attribute discrimination unit, 205 attribute memory, 206 GBTC compression memory, 207 secondary compression unit, 208 secondary compression memory, 209 CPU, 2071 encoding processing unit, 2076 attribute data conversion unit.
Claims (2)
前記属性判別手段により判別された前記領域ごとの属性を表す属性データを記憶する属性メモリと、
前記属性メモリに記憶された属性データに基づいて、前記画像データの可変長符号化を行う符号化手段と、
前記符号化手段により符号化された前記画像データを記憶する圧縮メモリと、
前記属性データに基づいて、前記入力された画像データを構成する前記複数の領域のうちカラー属性を有する領域の比率が所定値以上であると判断される場合は、前記属性データを前記圧縮メモリに書き込まず、一方、前記所定値未満であると判断される場合は、前記属性データを前記圧縮メモリに書き込む属性データ書き込み手段とを備え、
前記符号化手段は、前記入力された画像データを構成する前記複数の領域のうちカラー属性を有する領域の比率が所定値以上であると判断される場合は、可変長符号化を行わずに圧縮メモリに前記画像データを書き込むことを特徴とする画像処理装置。Attribute determination means for dividing the input image data into a plurality of areas and determining attributes for each area;
An attribute memory for storing attribute data representing attributes for each of the areas determined by the attribute determination means;
Encoding means for performing variable-length encoding of the image data based on attribute data stored in the attribute memory;
A compression memory for storing the image data encoded by the encoding means;
If it is determined based on the attribute data that the ratio of areas having color attributes among the plurality of areas constituting the input image data is greater than or equal to a predetermined value, the attribute data is stored in the compression memory. On the other hand, if it is determined that the attribute data is less than the predetermined value, the attribute data writing means for writing the attribute data to the compressed memory,
The encoding means performs compression without performing variable-length encoding when it is determined that the ratio of the areas having color attributes among the plurality of areas constituting the input image data is equal to or greater than a predetermined value. An image processing apparatus, wherein the image data is written in a memory.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP05042898A JP4077548B2 (en) | 1998-03-03 | 1998-03-03 | Image processing device |
US09/260,807 US6816618B1 (en) | 1998-03-03 | 1999-03-02 | Adaptive variable length image coding apparatus |
US10/973,909 US7095898B2 (en) | 1998-03-03 | 2004-10-27 | Image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP05042898A JP4077548B2 (en) | 1998-03-03 | 1998-03-03 | Image processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH11252381A JPH11252381A (en) | 1999-09-17 |
JP4077548B2 true JP4077548B2 (en) | 2008-04-16 |
Family
ID=12858606
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP05042898A Expired - Fee Related JP4077548B2 (en) | 1998-03-03 | 1998-03-03 | Image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4077548B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5515825B2 (en) * | 2010-02-16 | 2014-06-11 | コニカミノルタ株式会社 | Image processing circuit and image forming apparatus |
JP6145983B2 (en) * | 2012-09-28 | 2017-06-14 | ブラザー工業株式会社 | Image processing apparatus and computer program |
-
1998
- 1998-03-03 JP JP05042898A patent/JP4077548B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH11252381A (en) | 1999-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4992887A (en) | Method of storing and transmitting image data as an image file suitable for an image search | |
JP5558767B2 (en) | Image processing apparatus and processing method thereof | |
US6483609B1 (en) | Image processing system, image processing method, image transmitting system, and image transmitting method | |
US7715637B2 (en) | Image processing apparatus and control method therefor | |
US5917947A (en) | Image processing method and apparatus permitting use of PDL in compression memory | |
JPS625779A (en) | Encoding system for gradation facsimile picture signal | |
JP2011223276A (en) | Image processing apparatus, image processing method, and program | |
JP3817897B2 (en) | Image processing device | |
US6816618B1 (en) | Adaptive variable length image coding apparatus | |
JP2004336453A (en) | Copying machine, image processing system, program and storage medium | |
JPH06320802A (en) | Image processor | |
JP4077548B2 (en) | Image processing device | |
US5659635A (en) | Image processing apparatus for compressing and decompressing image data | |
JPH11252378A (en) | Image processor | |
JP2004336487A (en) | Facsimile machine, program and storage medium | |
JPH11252380A (en) | Image processor | |
US8494261B2 (en) | Image processing apparatus, image processing method, and computer-readable medium | |
JPH11252377A (en) | Image processor | |
JP3736107B2 (en) | Image processing device | |
JP3926030B2 (en) | Image forming apparatus | |
JP3190118B2 (en) | Image processing device | |
JP2001078049A (en) | Method and device for picture processing | |
JP3712030B2 (en) | Image receiving apparatus and image receiving method | |
JP2002084425A (en) | Multi-level image data compression device | |
JPH08181867A (en) | Picture data compression device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050317 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050329 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20050513 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20050526 Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050526 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20050526 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20051018 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051214 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20051228 |
|
A912 | Removal of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20060203 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071218 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080201 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110208 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110208 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120208 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120208 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130208 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140208 Year of fee payment: 6 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |