JP3639436B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP3639436B2
JP3639436B2 JP19924298A JP19924298A JP3639436B2 JP 3639436 B2 JP3639436 B2 JP 3639436B2 JP 19924298 A JP19924298 A JP 19924298A JP 19924298 A JP19924298 A JP 19924298A JP 3639436 B2 JP3639436 B2 JP 3639436B2
Authority
JP
Japan
Prior art keywords
image data
data
pixel pattern
reference pixel
image
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
Application number
JP19924298A
Other languages
Japanese (ja)
Other versions
JP2000032242A (en
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP19924298A priority Critical patent/JP3639436B2/en
Publication of JP2000032242A publication Critical patent/JP2000032242A/en
Application granted granted Critical
Publication of JP3639436B2 publication Critical patent/JP3639436B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Facsimiles In General (AREA)
  • Storing Facsimile Image Data (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

【0001】
【発明が属する技術分野】
本発明は、画像データを圧縮してメモリに記憶する画像処理装置に関する。
【0002】
【従来の技術】
たとえば複写機またはファクシミリ装置で実現される画像処理装置は、原稿を読取って画像データを生成する入力部と、画像データを記憶する記憶部と、前記記憶部内の画像データを読出し該画像データが示す画像を印刷する出力部とを含む。前記記憶部内の前記画像データは圧縮されていることが多く、また画像データの圧縮率は可変であることがある。
【0003】
前記画像処理装置の従来技術が、特開平8−65474号公報に開示される。前記公報の画像記録装置は、いわゆる循環式自動原稿送り装置(以後、R−ADFと略称する)を備えた電子写真式複写機であり、画像読取り部と画像記憶部と制御部とを含む。前記画像読取り部は、前記R−ADFによって1枚ずつ給送された原稿をそれぞれ読取り、各原稿の画像データを生成する。前記画像記憶部は、前記画像データを圧縮するための複数の圧縮伸長手段と、複数の画像データを記憶可能なメモリとを含む。前記複数の圧縮伸長手段における圧縮率は、相互に異なる。前記画像データは、いずれか1つの圧縮伸長手段によって圧縮された後に、前記メモリに記憶される。
【0004】
前記制御部は、前記メモリの空き容量を監視し、前記空き容量が予め定める設定値になった場合、画像データの圧縮に用いられる前記いずれか1つの圧縮伸長手段を、現在用いられている圧縮伸長手段よりも圧縮率が高い他の圧縮伸長手段に変更する。さらに、前記制御部は、前記画像読取り部が複数の原稿を連続して読取っている場合、前記空き容量が前記設定値になった時点で、前記画像読取り部の原稿の読取り動作を中止させ、前記圧縮伸長手段が変更された後に、前記R−ADFによて、前記複数の原稿を、1枚目の原稿から順に、前記画像読取り部に再び給送させる。
【0005】
【発明が解決しようとする課題】
前記画像記録装置の制御部は、上述したように、前記メモリの空き容量が予め定める設定値に達した時点で、画像データの圧縮率を増加させるために、前記いずれか1つの圧縮伸長手段を自動的に変更するようにしてるので、前記画像記録装置の回路規模は大きくなりやすい。
【0006】
本発明の目的は、従来技術の画像処理装置の回路構成を大きく変更することなく、圧縮率を自動的に変更可能な画像処理装置を提供することである。
【0007】
【課題を解決するための手段】
本発明は、複数の画素から構成される画像を示す画像データを入力する画像データ入力手段と、
前記画像データを予め定める圧縮方法で圧縮する圧縮手段と、
前記圧縮前の画像データおよび圧縮された前記画像データのうちのいずれか一方を選択する画像データ選択手段と、
選択されたいずれか一方の画像データを記憶する画像データ記憶手段とを含む画像処理装置であって、
圧縮前の画像データのデータ部分ごとに、該データ部分と基準画素パターンとを比較して、圧縮前の画像データに含まれる予め定める基準画素パターンを検出する基準画素パターン監視手段と、
前記基準画素パターン監視手段が、予め定める基準画素パターンを検出するたびに、予め定める基準画素パターンの検出回数を計数するパターン計数手段と、
圧縮前の画像データのうち、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量と、予め定める基準データ量とを比較し、前記基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量と、予め定める基準データ量とを比較するデータ量比較手段とをさらに含み、
前記画像データ選択手段は、基準画素パターン監視手段、パターン計数手段およびデータ量比較手段と並行して動作して、パターン計数手段の計数値が予め定める基準数以上になった時点で、圧縮前の画像データを選択し、パターン計数手段の計数値が前記予め定める基準数未満のときには、データ量比較手段の比較結果に基づいて、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量が、予め定める基準データ量以上となり、かつ基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量が、予め定める基準データ量以上となった時点で、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量が、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量未満であれば、圧縮前の画像データを選択し、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量が、基準画素パターン監視手段によって、基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量以上であれば、圧縮された画像データを選択することを特徴とする画像処理装置である。
【0008】
本発明に従えば、上述の構成によって、圧縮前および圧縮後の画像データのうちのデータ量の少ないと予想されるほうの画像データが自動的に選択されて、前記画像データ記憶手段に記憶される。このため、複数の画像データが記憶される場合、前記画像データ記憶手段内の全ての画像データのデータ量の総和は、該全ての画像データをそれぞれ圧縮しないで記憶させた場合、および該全ての画像データをそれぞれ圧縮して記憶させた場合よりも、少なくなる。この結果、前記画像データ記憶手段は、前述の2つの記憶手法のいずれの場合よりも多くの画像データを記憶することができるので、画像データ記憶手段を有効活用することができる。
【0010】
パターン計数手段によって計数された基準画素パターンの検出回数は、圧縮前および圧縮後の画像データの、データ量の大小関係を予測するための指標に相当する。基準画素パターンの数が多いほど、圧縮された画像データのデータ量が圧縮前の画像データのデータ量以上になる可能性が高い。圧縮前の画像データのうちに基準画素パターンが基準数以上含まれている場合、画像データ選択手段は、圧縮前の画像データの全てにおいて基準画素パターンの検出が完了する時点よりも前の時点に、画像データを選ぶ。この結果、画像データの選択に要する時間が短縮される。また基準画素パターン検出手段およびパターン計数手段は、計数された基準画素パターンの数が基準数以上になった時点で、処理を中止してもよい。この結果、基準画素パターン検出手段およびパターン計数手段の処理量を減少させることができる。
【0012】
画像データ選択手段は、パターン検出手段の計数値が予め定める基準数未満のときには、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量が、予め定める基準データ量以上となり、かつ基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量が、予め定める基準データ量以上となった時点で、画像データ記憶手段に記憶させるべき画像データを、圧縮前および圧縮後の画像データのデータ量の実際の比較結果にも基づいて、定める。この結果、圧縮前および圧縮後の画像データのうちのデータ量の少ないほうの画像データを、確実に選ぶことができる。これによって、画像処理装置は、画像データ記憶手段内の全ての画像データのデータ量の総和を、常に確実に抑えることができる。
【0014】
画像データ選択手段は、圧縮前の画像データおよび圧縮された画像データのいずれか一方を、基準画素パターンの検出回数が予め定める基準数以上になったかという判定条件と、基準画素パターンとの比較が終了したデータ部分のデータ量および該データ部分を圧縮したデータのデータ量がともに、予め定める基準データ量に達した時点で、基準画素パターンとの比較が終了したデータ部分のデータ量が、該データ部分を圧縮したデータのデータ量以上であるのか未満であるのかという判定条件との、2つの判定条件によって選択するので、画像データの選択に要する時間が短縮されるとともに、圧縮前および圧縮後の画像データのうちのデータ量の少ない方の画像データを、確実に選ぶことができる。
【0015】
【発明の実施の形態】
図1は、本発明の実施の一形態である画像処理装置1の電気的な構成を示すブロック図である。画像処理装置1は、読取り部3、アナログ/デジタル変換部4、補正部5、2値化画像処理部6、第1および第2バッファ7,10、画素パターン検出部8、画像圧縮伸長部9,画像データ量監視部11、画像データ選択部12、メモリ記憶部13、および出力部14を含む。
【0016】
読取り部3は、原稿を読取って画像信号を生成する。読取り部3は、たとえば、いわゆるイメージスキャナによって実現される。アナログ/デジタル変換部4は、生成された前記画像信号をアナログ/デジタル変換して、前記画像処理装置1の処理対象となる画像データを生成する。画像データは、複数の画素から構成される1枚の画像を示すデータセットである。以後、前記処理対象となる画像データを対象画像データと称し、対象画像データが示す画像を対象画像と称する。
【0017】
補正部5は、アナログ/デジタル変換部4から出力された前記対象画像データに、いわゆる入力歪みを補正するための補正処理を施す。前記入力歪みは、読取り部3において対象画像信号を生成する際に、読取り部3の構成に起因して生じた信号歪みである。前記補正処理は、たとえば、シェーディング処理である。
【0018】
2値化画像処理部6は、補正部5から出力された前記対象画像データに、各種の処理をさらに施す。前記各種の処理は、入力歪みを補正するための前記補正処理以外の1または複数の処理であり、たとえば、MTF(Modulation Transfer Function)補正処理、γ補正処理、および領域分離処理を含む。さらに、2値化画像処理部6は、前記各種の処理が施された前記対象画像データに、2値化処理を施す。この結果、2値化処理後の対象画像データが示す対象画像は、いわゆる2値化画像になる。2値化処理後の対象画像データは、第1バッファ7に記憶され、さらに画素パターン検出部8に与えられる。以後、2値化処理後の対象画像データを、2値化画像データと称する。
【0019】
画素パターン検出部8は、概略的には、前記2値化画像データが示す対象画像に、予め定める基準画素パターンがどの程度含まれているかを検出する。任意の画像は、前記画像内における濃度の異なる複数の画素の分布状態を示す。また、前記任意の画像を示す画像データに2値化処理が施されているならば、該画像は、具体的には、該画像内における白画素および黒画素の分布を示す。前記基準画素パターンは、2値化画像データのデータ量が、予め定める圧縮処理によって圧縮された該2値化画像データのデータ量以下になるように、定められる。画素パターン検出部8の検出結果は、画像データ選択部12に与えられる。
【0020】
画像圧縮伸長部9は、第1バッファ7内の2値化画像データを読出し、該2値化画像データを予め定める圧縮手法で圧縮する。圧縮された2値化画像データを、以後圧縮画像データと称する。圧縮画像データは、第2バッファ10に記憶される。画像圧縮伸長部9は、さらに、第2バッファ10内の圧縮画像データを読出して伸長し、この結果得られる2値化画像データを、第1バッファ7に記憶させる。第1バッファ7内の2値化画像データ、および第2バッファ10内の圧縮画像データは、画像データ量監視部11に与えられ、さらに画像データ選択部12に与えられる。画像データ量監視部11は、前記2値化画像データのデータ量と前記圧縮画像データのデータ量とを比較する。前記2値化画像データのデータ量と前記圧縮画像データのデータ量との比較結果は、画像データ選択部12に与えられる。
【0021】
画像データ選択部12は、画像パターン検出部8の前記検出結果と、画像データ量監視部11の前記比較結果と、第1バッファ7内の2値化画像データのデータ量と、第2バッファ10内の圧縮画像データのデータ量とに基づいて、該2値化画像データおよび該圧縮画像データのうちから、データ量の少ないいずれか一方の画像データを選択する。選択されたいずれか一方の画像データが、メモリ記憶部13に記憶される。また、画像データ選択部12は、メモリ記憶部13に記憶された画像データを読出し、第2バッファ10に記憶させる。
【0022】
第1バッファ7は、2値化画像処理部6から出力された2値化画像データを一時的に記憶するための一時記憶用バッファと、出力部14に出力させるべき2値化画像データを記憶するための出力バッファとを兼ねている。出力部14は、第1バッファ7に記憶された2値化画像データを読出し、該2値化画像データが示す対象画像を出力する。出力部14は、たとえば、印刷装置で実現される。この場合、具体的には、前記2値化画像データが示す対象画像を記録紙に印刷する。
【0023】
読取り部3、アナログ/デジタル変換部4、補正部5、および2値化画像処理部6は、前記対象画像データを入力するための入力部15を構成する。入力部15は、上述の構成のものに代わって、対象画像データを記憶した媒体から該画像信号を読出す装置、または対象画像データを記憶した装置から送信された対象画像データを受信する装置であってもよい。さらに、画像処理装置1は、操作者が画像処理装置へ各種の指示を行うための操作部をさらに含む。前記操作部は、たとえば、複数のキーを含む操作パネルで実現される。
【0024】
画像処理装置1は、対象画像データの入力処理と該対象画像データの出力処理とを連続して行う連続モードと、前記入力処理と前記出力処理とをそれぞれ独立して行う個別モードとを有する。画像処理装置1は、操作者からの指示に応答して2つの前記モードのうちからいずれか一方のモードを選択し、該モードに基づいて動作する。連続モードが選択される場合、2値化画像処理部6が2値化画像データを出力した後に、この時点で第1バッファ7に記憶される前記2値化画像データを出力部14が読出し、該2値化画像データが示す対象画像を印刷する。
【0025】
個別モードが選択され、かつ、前記入力処理が指示される場合、2値化画像処理部6が前記2値化画像データを出力した後、画像データ選択部12が、上述の手順で、該2値化画像データまたは圧縮された該2値化画像データを、メモリ記憶部13に一旦記憶させる。個別モードが選択され、かつ、前記出力処理の開始が指示される場合、以下の手順で処理が行われる。まず、画像データ選択部12はメモリ記憶部13内の画像データを読出す。画像データ選択部12は、前記画像データが圧縮されている場合、該画像データを第2バッファ10に記憶させ、該画像データが圧縮されていない場合、該画像データを第1バッファ7に記憶させる。前者の場合、さらに画像圧縮伸長部9が、第2バッファ10内の画像データ、すなわち圧縮画像データを伸長し、この結果得られる2値化画像データを、第1バッファ7に記憶させる。この結果、出力部14は、第1バッファ7内の2値化画像データが示す画像を印刷する。
【0026】
図2は、画像パターン検出部8の具体的な構成を示すブロック図である。画像パタン検出部8は、基準画素パターン記憶部21、画素パターン監視部22、画素パターン計数部23 および画素パターンカウント数記憶部24を含む。
【0027】
基準画素パターン記憶部21は、画像圧縮伸長部9の圧縮手法に対応する1または複数の基準画素パターンを記憶する。画素パターン監視部22は、前記2値化画像データが示す対象画像の画素の並びから前記基準画素パターンを検出する。画素パターン監視部22は、前記基準画素パターンを検出するたびに、その検出結果を、画素パターン計数部23に与える。
【0028】
画素パターン計数部23は、予め定める基準数になるまで、前記基準画素パターンの検出回数を計数し続ける。前記基準数は、画素パターンカウント数記憶部24に記憶されている。画素パターン計数部23が計数した数が、画素パターン検出部8の検出結果、すなわち前記2値化画像データが示す対象画像に前記基準画素パターンがどの程度含まれているかを示す指標として、画像データ選択部12に与えられる。
【0029】
前記基準画素パターンと前記基準数とは、操作者が任意に設定可能である。このために、たとえば、画像処理装置1の操作手順に、基準画素パターンおよび基準数を設定するためのダイアグモードが割当てられている。ダイアグモードが選択された場合、操作者は前記操作部を操作して前記基準パターンおよび基準数を指定し、前記基準画素パターン記憶部21および画素パターンカウント数記憶部24にそれぞれ記憶させる。この結果、前記基準パターンと前記基準数とは、操作者が所望するように設定される。
【0030】
圧縮後の画像データのデータ量が圧縮前の画像データのデータ量以上になる画像の画素パターンは、圧縮手法に応じて異なる。ゆえに、基準画素パターンは、画像圧縮伸長部9の圧縮手法に応じて定められる。また、画像圧縮伸長部9が複数の圧縮手法のうちからいずれか1つを選択し、選択した圧縮手法で画像データを圧縮する場合、基準画素パターン記憶部21は、各圧縮手法毎に、それぞれ1または複数の基準画素パターンを対応付けて記憶する。また前記基準数も、圧縮手法に応じて異なる。ゆえに前述の場合、画素パターンカウント数記憶部24は、複数の圧縮手法それぞれに、各圧縮手法毎に定められた複数の前記基準数を対応付けて記憶する。
【0031】
具体的には、前記基準パターンは、前記参照画像を示す2値化された画像データの形式で表され、該2値化画像データを構成するビット列における「0」,「1」のビットの出現パターンが、前記基準画素パターンに相当する。たとえば、圧縮手法がMH(Modified Huffman)符号化方式である場合、1バイトのビット列「01010101」が、前記基準画素パターンとして設定される。前記基準数は、統計的処理により符号化方式に応じた値を選ぶ。
【0032】
任意の1つの画像データにおいて、前記基準画素パターンの数は、圧縮前のおよび圧縮後の前記画像データのデータ量の大小関係を予測するための指標に相当する。基本的に、前記基本画素パターンの数が多いほど、前記圧縮された画像データのデータ量が圧縮前の前記画像データのデータ量以上になる可能性が高いと予想される。ゆえに、画像が前記基準画素パターンをどの程度含んでいるかを調べれば、前記画像を示す画像データのデータ量が圧縮された該画像データ量以下であるかどうかを予測することができる。これは、以下の理由からである。
【0033】
たとえば、前記ビット列「01010101」をMH符号化すると、36ビットのビット列「000111010000111010000111010000111010」になる。このように、圧縮後のビット列のビット数は、該ビット列におけるビットの出現パターンによっては、圧縮前のビット数以上になることがある。ゆえに、圧縮対象のデータを構成するビット列内に、前記圧縮後のビット数が圧縮前のビット数以上になるビット列が多数含まれている場合、該ビット列の圧縮前および圧縮後のデータ量の差が、前記圧縮対象のデータを構成するビット列内から前記多数のビット列を除いたの残余のビット列の圧縮前および圧縮後のビット数の差以上であれば、圧縮後の前記データ全体のデータ量が、圧縮前の前記データ全体のデータ以上になる。前記2値化画像データを構成するビット列における出現パターンは、該2値化画像データが示す対象画像の画素パターンによって定まる。このため、ゆえに、画像の画素パターンが前記基準画素パターンをどの程度含んでいるかを調べれば、前記画像を示す画像データのデータ量が圧縮された該画像データ量以下であるかどうかを予測することができる。
【0034】
これらのことから、メモリ記憶部13に複数の画像データを記憶させる場合、前記基準画素パターンを多く含む画像を示す画像データが圧縮されないでそのまま記憶される場合のほうが、全ての画像データが圧縮して記憶される場合よりも、メモリ記憶部13の該画像データの記憶に要する容量を少なくすることができる。したがって、画像データ選択部12は、前記検出回数の数に応じて、前記画像データを圧縮して記憶させるか否かを定めることが好ましいのである。
【0035】
図3は、画素パターン検出部8の検出動作を示すフローチャートである。2値化画像処理部6から、2値化画像データ内の任意の1つの画像部分に相当する部分が与えられると、ステップa1からステップa2に進む。2値化画像データのうちの前記部分を、以後、データ部分と称する。ステップa2で、画素パターン監視部22は、基準画素パターン記憶部21内の全ての基準画素パターンを示すビット列が前記データ部分にあるか監視する。前記データ部分にいずれか1つの基準画素パターンを示すビット列がある場合、ステップa2からステップa3に進み、ない場合、ステップa2からステップa4に進む。ステップa3で、画素パターン計数部23は、現在計数している前記画像部分の数に1を加えて更新する。更新後、ステップa3からステップa4に進み、前記データ部分が第1バッファ7に記憶される。ステップa5で、当該フローチャートの処理は終了する。
【0036】
図3のフローチャートの処理は、画素パターン検出部8に、2値化画像データ内のいずれか1つの画像部分に相当する部分が与えられるたびに、行われる。この結果、前記2値化画像データの全てのデータ部分が画素パターン検出部8に与えられると、該2値化画像データが示す対象画像内の全ての画像部分に存在する前記基準画素パターンの数が、画素パターン計数部23によって計数される。また、画素パターン検出部8は、前記基準数以上になるまで上述の検出処理を繰返し、前記基準数以上になった時点で、画素パターン監視されていない画像部分が残っているか否かに拘わらず、以後、該2値化画像データに関して前記検出処理を行わないようにしてもよい。
【0037】
たとえば、2値化画像処理部6が、図4(A)に示す画像データ31を生成したとする。画素パターン監視部22は、図4(B)に示すように、画像データ31のビット列の中に「01010101」の並びがあるかを監視し、データ部分34に前記基準画素パターンに相当するビット列を検出する。前記複数のデータ部分の中の、図4(B)に示される3つのデータ部分33,34,35のうち、データ部分33,35の8ビットのビット列は前記基準パターンを構成しない。このため、これら3つのデータ部分が処理される間に、画素パターン計数部23は、前記画像部分の数を1だけ増加させる。前記複数のデータ部分は、前記基準パターンと一致するか否かに拘わらず、第1バッファ7に送られる。この結果、第1バッファ7には、図4(C)に示すように、画像データ31がそのまま記憶される。
【0038】
図5は、画像データ選択部12の選択動作を説明するためのフローチャートである。画素パターン検出部8において、前記2値化画像データが示す対象画像内の全ての画像部分のうちの少なくとも1つの画像部分の画素パターンと前記基準画素パターンとの比較が終了した後、ステップb1からステップb2に進む。ステップb2で、画像データ選択部12は、画素パターン計数部23によって現時点で計数されている画像部分の数、すなわち基準画素パターンの検出回数と、前記画素パターンカウント数記憶部24に記憶される基準数とを比較する。現時点の基準画素パターン検出の数が前記基準数未満である場合、ステップb2からステップb3に進み、前記基準数以上である場合、ステップb2からステップb5に進む。
【0039】
ステップb3で、画像データ選択部12は、現時点で第1および第2バッファ7,10に記憶されるデータのデータ量と、予め定める基準データ量とを、それぞれ比較する。前記現時点で第1バッファ7に記憶されるデータは、前記2値化画像データ内の、全ての画像部分のうちの前記基準画素パターンとの比較が終了した画像部分に相当する部分である。前記現時点で第2バッファ10に記憶されるデータは、前記第1バッファ7に現時点で記憶されるデータを圧縮したものである。第1および第2バッファ7,10に現時点で記憶されるデータのデータ量のうちの少なくとも一方が前記基準データ量未満である場合、ステップb3からステップb2に戻り、第1および第2バッファ7,10に現時点で記憶されるデータのデータ量がどちらも前記基準データ量以上である場合、ステップb3からステップb4に進む。
【0040】
ステップb4で、画像データ選択部12は、画像データ量監視部11の比較結果に基づき、第1バッファ7内のデータのデータ量と第2バッファ10内のデータのデータ量とを比較する。すなわち、圧縮前の2値化画像データのデータ量と、圧縮後の2値化画像データのデータ量とを比較する。圧縮後の2値化画像データのデータ量が圧縮前の2値化画像データのデータ量以上である場合、ステップb4からステップb6に進み、圧縮後の2値化画像データのデータ量が圧縮前の2値化画像データのデータ量未満である場合、ステップb4からステップb7に進む。
【0041】
以上のステップb2〜b4の判断結果に基づき、画像データ選択部12は、圧縮前および圧縮後の2値化画像データのうちから、メモリ記憶部13に記憶させるべきいずれか一方の画像データを、以下のように選ぶ。前記現時点の基準画素パターンの検出回数が前記基準数以上である場合、画像パターン検出部8において前記2値化画像データが示す対象画像内の全ての画像部分と前記基準画素パターンとの比較が完了したか否かに拘わらず、ステップb5で、前記圧縮前の対象画像データが選ばれる。現在の前記基準画素パターンの検出回数が前記基準数未満である場合、前記比較が完了した後に、圧縮後の対象画像データのデータ量が圧縮前の対象画像データのデータ量以上であると判断されるならば、ステップb6で圧縮前の対象画像データが選ばれる。現在の前記基準画素パターンの検出回数が前記基準数未満である場合、前記比較が完了した後に、圧縮後の対象画像データのデータ量が圧縮前の対象画像データのデータ量未満であると判断されるならば、ステップb7で圧縮後の対象画像データが選ばれる。ステップb5〜b7のいずれかで画像データが選択された後、ステップb8で当該フローチャートの処理が終了する。このように選択された画像データが、メモリ記憶部13に記憶される。
【0042】
前記基準データ量は、第1および第2バッファそれぞれの容量、または、画像処理装置1のアプリケーションに応じて、たとえば画像がA4サイズかB4サイズかに応じて、決定される。後者の場合、たとえば、1回の画像処理で処理される画像の大きさがA4サイズであるかB4サイズであるかに応じて、前記基準データ量がそれぞれ設定される。
【0043】
前記基準データ量は、操作者が任意に設定可能である。このために、たとえば、画像処理装置1の動作モードに、基準データ量を設定するためのダイアグモードが割当てられている。ダイアグモードが選択された場合、操作者は前記操作部を操作して基準データ量を指定し、画像データ選択部12内のバッファに記憶させる。この結果、前記基準データ量が、操作者が所望するように設定される。
【0044】
また画像データ選択部12は、画素パターン検出部8の前記比較処理と並行して、前記画像データの選択処理を行っている。この際、画素パターン計数部23によって計数された前記画像部分の数が前記基準数以上になった時点で、前記圧縮前の2値化画像データが選ばれる。ゆえに、対象画像内の全ての画像部分において前記基準画素パターンが画像部分に多数ある場合、前記全ての画像部分と前記基準画素パターンとの比較が完了する時点まで待たなくても、該全ての画像部分のうちの一部分が前記基準画素パターンと比較され終わった時点で、メモリ記憶部13に記憶されるべき画像データが選択される。この結果、画像データの選択処理の処理時間を短縮することができる。
【0045】
以上の説明では、画像処理装置1は、画像データ選択部12は、画素パターン検出部8の検出結果と画素パターン監視部11の比較結果とを両方用いて、前記画像データの選択処理を行うが、画像データ選択部12は、画素パターン検出部8の検出結果と画素パターン監視部11の比較結果とのうちのいずれか一方だけを用いて、前記画像データの選択処理を行ってもよい。
【0046】
【発明の効果】
以上のように本発明によれば、上述の構成によって、圧縮前および圧縮後の画像データのうちのデータ量の少ないと予想されるほうの画像データが自動的に選択されて、前記画像データ記憶手段に記憶される。このため、複数の画像データが記憶される場合、前記画像データ記憶手段内の全ての画像データのデータ量の総和は、該全ての画像データをそれぞれ圧縮しないで記憶させた場合、および該全ての画像データをそれぞれ圧縮して記憶させた場合よりも、少なくなる。この結果、前記画像データ記憶手段は、前述の2つの記憶手法のいずれの場合よりも多くの画像データを記憶することができるので、画像データ記憶手段を有効活用することができる。
【0047】
またパターン計数手段によって計数された基準画素パターンの検出回数は、圧縮前および圧縮後の画像データの、データ量の大小関係を予測するための指標に相当する。基準画素パターンの数が多いほど、圧縮された画像データのデータ量が圧縮前の画像データのデータ量以上になる可能性が高い。圧縮前の画像データのうちに基準画素パターンが基準数以上含まれている場合、画像データ選択手段は、圧縮前の画像データの全てにおいて基準画素パターンの検出が完了する時点よりも前の時点に、画像データを選ぶ。この結果、画像データの選択に要する時間が短縮される。また基準画素パターン検出手段およびパターン計数手段は、計数された基準画素パターンの数が基準数以上になった時点で、処理を中止してもよい。この結果、基準画素パターン検出手段およびパターン計数手段の処理量を減少させることができる。
【0048】
また画像データ選択手段は、パターン検出手段の計数値が予め定める基準数未満のときには、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量が、予め定める基準データ量以上となり、かつ基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量が、予め定める基準データ量以上となった時点で、画像データ記憶手段に記憶させるべき画像データを、圧縮前および圧縮後の画像データのデータ量の実際の比較結果にも基づいて、定める。この結果、圧縮前および圧縮後の画像データのうちのデータ量の少ないほうの画像データを、確実に選ぶことができる。これによって、画像処理装置は、画像データ記憶手段内の全ての画像データのデータ量の総和を、常に確実に抑えることができる。
【0049】
画像データ選択手段は、圧縮前の画像データおよび圧縮された画像データのいずれか一方を、基準画素パターンの検出回数が予め定める基準数以上になったかという判定条件と、基準画素パターンとの比較が終了したデータ部分のデータ量および該データ部分を圧縮したデータのデータ量がともに、予め定める基準データ量に達した時点で、基準画素パターンとの比較が終了したデータ部分のデータ量が、該データ部分を圧縮したデータのデータ量以上であるのか未満であるのかという判定条件との、2つの判定条件によって選択するので、画像データの選択に要する時間が短縮されるとともに、圧縮前および圧縮後の画像データのうちのデータ量の少ない方の画像データを、確実に選ぶことができる。
【図面の簡単な説明】
【図1】本発明の実施の一形態である画像処理装置1の電気的構成を示すブロック図である。
【図2】前記画像処理装置1内の画素パターン検出部8の具体的な構成を示すブロック図である。
【図3】前記画像処理装置1内の画素パターン検出部8における検出処理を説明するためのフローチャートである。
【図4】画素パターン検出部8における前記検出処理を説明するために、画像データ31を構成するビット列の一部分を示す図である。
【図5】前記画像処理装置1内の画像データ選択部12における画像データの選択処理を説明するためのフローチャートである。
【符号の説明】
1 画像処理装置
8 画素パターン検出部
9 画像圧縮伸長部
12 画像データ選択部
13 メモリ記憶部
15 入力部
22 画素パターン監視部
23 画素パターン計数部
[0001]
[Technical field to which the invention belongs]
The present invention relates to an image processing apparatus that compresses image data and stores it in a memory.
[0002]
[Prior art]
For example, an image processing apparatus realized by a copying machine or a facsimile machine reads an original and generates image data, a storage unit for storing image data, and reads image data in the storage unit and indicates the image data And an output unit for printing an image. The image data in the storage unit is often compressed, and the compression rate of the image data may be variable.
[0003]
The prior art of the image processing apparatus is disclosed in Japanese Patent Laid-Open No. 8-65474. The image recording apparatus of the publication is an electrophotographic copying machine provided with a so-called circulation type automatic document feeder (hereinafter abbreviated as R-ADF), and includes an image reading unit, an image storage unit, and a control unit. The image reading unit reads each document fed one by one by the R-ADF, and generates image data of each document. The image storage unit includes a plurality of compression / expansion means for compressing the image data, and a memory capable of storing the plurality of image data. The compression rates of the plurality of compression / expansion means are different from each other. The image data is stored in the memory after being compressed by any one of the compression / decompression means.
[0004]
The control unit monitors the free space of the memory, and when the free space reaches a predetermined set value, the one compression / decompression unit used for compressing image data is used as a compression currently used. Change to another compression / expansion unit having a higher compression rate than the expansion unit. Further, when the image reading unit is continuously reading a plurality of documents, the control unit stops the document reading operation of the image reading unit when the free capacity reaches the set value, After the compression / decompression unit is changed, the R-ADF causes the plurality of originals to be fed again to the image reading unit in order from the first original.
[0005]
[Problems to be solved by the invention]
As described above, the control unit of the image recording apparatus includes any one of the compression / decompression means in order to increase the compression rate of the image data when the free space of the memory reaches a predetermined set value. Since the change is made automatically, the circuit scale of the image recording apparatus tends to increase.
[0006]
An object of the present invention is to provide an image processing apparatus capable of automatically changing the compression ratio without greatly changing the circuit configuration of the conventional image processing apparatus.
[0007]
[Means for Solving the Problems]
The present invention provides image data input means for inputting image data indicating an image composed of a plurality of pixels,
Compression means for compressing the image data by a predetermined compression method;
Image data selection means for selecting one of the image data before compression and the compressed image data;
An image processing apparatus including image data storage means for storing any one of the selected image data,
Reference pixel pattern monitoring means for detecting a predetermined reference pixel pattern included in the image data before compression by comparing the data portion with the reference pixel pattern for each data portion of the image data before compression,
Pattern counting means for counting the number of detection times of a predetermined reference pixel pattern each time the reference pixel pattern monitoring means detects a predetermined reference pixel pattern;
Of the image data before compression, the data amount of the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring unit is compared with a predetermined reference data amount, and the reference pixel pattern monitoring unit compares the data amount with the reference pixel pattern. A data amount comparison unit that compares the data amount of the data compressed by the compression unit with a predetermined reference data amount,
The image data selection means operates in parallel with the reference pixel pattern monitoring means, the pattern counting means, and the data amount comparing means, and when the count value of the pattern counting means is equal to or greater than a predetermined reference number, When the image data is selected and the count value of the pattern counting means is less than the predetermined reference number, the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means based on the comparison result of the data amount comparing means Is equal to or greater than a predetermined reference data amount, and the data amount obtained by compressing the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring unit by the compression unit is equal to or greater than the predetermined reference data amount. At that point, the data that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means If the data amount is less than the data amount of the data compressed by the compression means for the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means, the image data before compression is selected and the reference pixel The data amount of the data portion that has been compared with the reference pixel pattern by the pattern monitoring unit is equal to or greater than the data amount of the data that has been compared with the reference pixel pattern by the reference pixel pattern monitoring unit by the compression unit. If so, the image processing apparatus is characterized by selecting compressed image data.
[0008]
According to the present invention, according to the above-described configuration, the image data that is expected to have a smaller amount of data before compression and after compression is automatically selected and stored in the image data storage means. . For this reason, when a plurality of image data is stored, the sum of the data amounts of all the image data in the image data storage means is calculated when all the image data is stored without being compressed, and all the image data is stored. This is less than when image data is compressed and stored. As a result, the image data storage means can store more image data than in the case of either of the two storage methods described above, so that the image data storage means can be used effectively.
[0010]
The number of detections of the reference pixel pattern counted by the pattern counting means corresponds to an index for predicting the magnitude relationship between the data amounts of the image data before and after compression. The greater the number of reference pixel patterns, the higher the possibility that the amount of compressed image data will be greater than or equal to the amount of image data before compression. When the reference pixel pattern is included in the pre-compression image data by a reference number or more, the image data selection means is at a time before the reference pixel pattern detection is completed in all the pre-compression image data. Select image data. As a result, the time required for selecting image data is reduced. Further, the reference pixel pattern detection unit and the pattern counting unit may stop the processing when the counted number of reference pixel patterns is equal to or more than the reference number. As a result, the processing amount of the reference pixel pattern detection unit and the pattern counting unit can be reduced.
[0012]
When the count value of the pattern detection means is less than a predetermined reference number, the image data selection means has a data amount of the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means is equal to or greater than the predetermined reference data amount. In addition, when the data amount of the data compressed by the compression unit becomes equal to or larger than the predetermined reference data amount, the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring unit is stored in the image data storage unit. The image data to be processed is determined based on the actual comparison result of the data amount of the image data before and after compression. As a result, it is possible to reliably select the image data with the smaller amount of the image data before compression and after compression. As a result, the image processing apparatus can always reliably suppress the sum of the data amounts of all the image data in the image data storage means.
[0014]
The image data selection means compares either the pre-compression image data or the compressed image data with a determination condition as to whether the number of detections of the reference pixel pattern is equal to or greater than a predetermined reference number and the reference pixel pattern. When the data amount of the completed data portion and the data amount of the compressed data portion reach the predetermined reference data amount, the data amount of the data portion that has been compared with the reference pixel pattern is the data amount. Since the selection is made according to two determination conditions, that is, whether or not the data amount of the compressed data is greater than or less than the data amount, the time required for selecting the image data is reduced, and before and after the compression. The image data with the smaller amount of image data can be selected with certainty.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing an electrical configuration of an image processing apparatus 1 according to an embodiment of the present invention. The image processing apparatus 1 includes a reading unit 3, an analog / digital conversion unit 4, a correction unit 5, a binary image processing unit 6, first and second buffers 7 and 10, a pixel pattern detection unit 8, and an image compression / decompression unit 9. , An image data amount monitoring unit 11, an image data selection unit 12, a memory storage unit 13, and an output unit 14.
[0016]
The reading unit 3 reads an original and generates an image signal. The reading unit 3 is realized by, for example, a so-called image scanner. The analog / digital conversion unit 4 performs analog / digital conversion on the generated image signal to generate image data to be processed by the image processing apparatus 1. The image data is a data set indicating one image composed of a plurality of pixels. Hereinafter, the image data to be processed is referred to as target image data, and an image indicated by the target image data is referred to as a target image.
[0017]
The correction unit 5 performs correction processing for correcting so-called input distortion on the target image data output from the analog / digital conversion unit 4. The input distortion is signal distortion caused by the configuration of the reading unit 3 when the reading unit 3 generates the target image signal. The correction process is, for example, a shading process.
[0018]
The binarized image processing unit 6 further performs various processes on the target image data output from the correction unit 5. The various processes are one or more processes other than the correction process for correcting the input distortion, and include, for example, an MTF (Modulation Transfer Function) correction process, a γ correction process, and a region separation process. Further, the binarized image processing unit 6 performs binarization processing on the target image data that has been subjected to the various processes. As a result, the target image indicated by the target image data after binarization processing is a so-called binarized image. The target image data after the binarization processing is stored in the first buffer 7 and further supplied to the pixel pattern detection unit 8. Hereinafter, the target image data after the binarization process is referred to as binarized image data.
[0019]
The pixel pattern detection unit 8 generally detects how much a predetermined reference pixel pattern is included in the target image indicated by the binarized image data. An arbitrary image shows a distribution state of a plurality of pixels having different densities in the image. Further, if the binarization process is performed on the image data indicating the arbitrary image, the image specifically indicates the distribution of white pixels and black pixels in the image. The reference pixel pattern is determined so that the data amount of the binarized image data is equal to or less than the data amount of the binarized image data compressed by a predetermined compression process. The detection result of the pixel pattern detection unit 8 is given to the image data selection unit 12.
[0020]
The image compression / decompression unit 9 reads the binarized image data in the first buffer 7 and compresses the binarized image data by a predetermined compression method. The compressed binary image data is hereinafter referred to as compressed image data. The compressed image data is stored in the second buffer 10. The image compression / decompression unit 9 further reads and decompresses the compressed image data in the second buffer 10, and stores the binary image data obtained as a result in the first buffer 7. The binarized image data in the first buffer 7 and the compressed image data in the second buffer 10 are given to the image data amount monitoring unit 11 and further given to the image data selection unit 12. The image data amount monitoring unit 11 compares the data amount of the binarized image data with the data amount of the compressed image data. The comparison result between the data amount of the binarized image data and the data amount of the compressed image data is given to the image data selection unit 12.
[0021]
The image data selection unit 12 includes the detection result of the image pattern detection unit 8, the comparison result of the image data amount monitoring unit 11, the data amount of the binarized image data in the first buffer 7, and the second buffer 10. On the basis of the data amount of the compressed image data, one of the image data with a small data amount is selected from the binarized image data and the compressed image data. One of the selected image data is stored in the memory storage unit 13. Further, the image data selection unit 12 reads out the image data stored in the memory storage unit 13 and stores it in the second buffer 10.
[0022]
The first buffer 7 stores a temporary storage buffer for temporarily storing the binarized image data output from the binarized image processing unit 6 and the binarized image data to be output to the output unit 14. It also serves as an output buffer. The output unit 14 reads the binarized image data stored in the first buffer 7 and outputs the target image indicated by the binarized image data. The output unit 14 is realized by a printing device, for example. In this case, specifically, the target image indicated by the binarized image data is printed on the recording paper.
[0023]
The reading unit 3, the analog / digital conversion unit 4, the correction unit 5, and the binarized image processing unit 6 constitute an input unit 15 for inputting the target image data. The input unit 15 is a device that reads the image signal from the medium storing the target image data or receives the target image data transmitted from the device that stores the target image data, instead of the above-described configuration. There may be. Furthermore, the image processing apparatus 1 further includes an operation unit for an operator to give various instructions to the image processing apparatus. The operation unit is realized by an operation panel including a plurality of keys, for example.
[0024]
The image processing apparatus 1 has a continuous mode in which target image data input processing and target image data output processing are continuously performed, and an individual mode in which the input processing and output processing are performed independently. The image processing apparatus 1 selects one of the two modes in response to an instruction from the operator, and operates based on the mode. When the continuous mode is selected, after the binarized image processing unit 6 outputs the binarized image data, the output unit 14 reads the binarized image data stored in the first buffer 7 at this time, The target image indicated by the binarized image data is printed.
[0025]
When the individual mode is selected and the input process is instructed, after the binarized image processing unit 6 outputs the binarized image data, the image data selection unit 12 performs the 2 steps in the above-described procedure. The binarized image data or the compressed binarized image data is temporarily stored in the memory storage unit 13. When the individual mode is selected and the start of the output process is instructed, the process is performed according to the following procedure. First, the image data selection unit 12 reads the image data in the memory storage unit 13. The image data selection unit 12 stores the image data in the second buffer 10 when the image data is compressed, and stores the image data in the first buffer 7 when the image data is not compressed. . In the former case, the image compression / decompression unit 9 further decompresses the image data in the second buffer 10, that is, the compressed image data, and stores the binarized image data obtained as a result in the first buffer 7. As a result, the output unit 14 prints the image indicated by the binarized image data in the first buffer 7.
[0026]
FIG. 2 is a block diagram showing a specific configuration of the image pattern detection unit 8. The image pattern detection unit 8 includes a reference pixel pattern storage unit 21, a pixel pattern monitoring unit 22, a pixel pattern counting unit 23, and a pixel pattern count number storage unit 24.
[0027]
The reference pixel pattern storage unit 21 stores one or more reference pixel patterns corresponding to the compression method of the image compression / decompression unit 9. The pixel pattern monitoring unit 22 detects the reference pixel pattern from the arrangement of pixels of the target image indicated by the binarized image data. Each time the pixel pattern monitoring unit 22 detects the reference pixel pattern, the pixel pattern monitoring unit 22 gives the detection result to the pixel pattern counting unit 23.
[0028]
The pixel pattern counting unit 23 continues to count the number of detections of the reference pixel pattern until a predetermined reference number is reached. The reference number is stored in the pixel pattern count number storage unit 24. The number counted by the pixel pattern counting unit 23 is image data as an index indicating the detection result of the pixel pattern detecting unit 8, that is, how much the reference pixel pattern is included in the target image indicated by the binarized image data. This is given to the selector 12.
[0029]
The reference pixel pattern and the reference number can be arbitrarily set by an operator. For this purpose, for example, a diagnostic mode for setting a reference pixel pattern and a reference number is assigned to the operation procedure of the image processing apparatus 1. When the diagnosis mode is selected, the operator operates the operation unit to designate the reference pattern and the reference number, and stores them in the reference pixel pattern storage unit 21 and the pixel pattern count number storage unit 24, respectively. As a result, the reference pattern and the reference number are set as desired by the operator.
[0030]
The pixel pattern of an image in which the amount of image data after compression is equal to or greater than the amount of image data before compression varies depending on the compression method. Therefore, the reference pixel pattern is determined according to the compression method of the image compression / decompression unit 9. In addition, when the image compression / decompression unit 9 selects any one of a plurality of compression methods and compresses the image data with the selected compression method, the reference pixel pattern storage unit 21 stores each of the compression methods. One or more reference pixel patterns are stored in association with each other. The reference number also varies depending on the compression method. Therefore, in the above-described case, the pixel pattern count number storage unit 24 stores a plurality of the reference numbers determined for each compression method in association with each of the plurality of compression methods.
[0031]
Specifically, the standard pattern is expressed in the form of binarized image data indicating the reference image, and the appearance of bits “0” and “1” in the bit string constituting the binarized image data. A pattern corresponds to the reference pixel pattern. For example, when the compression method is an MH (Modified Huffman) encoding method, a 1-byte bit string “01010101” is set as the reference pixel pattern. As the reference number, a value corresponding to the encoding method is selected by statistical processing.
[0032]
In any one piece of image data, the number of reference pixel patterns corresponds to an index for predicting the magnitude relationship between the data amounts of the image data before and after compression. Basically, the larger the number of the basic pixel patterns, the higher the possibility that the data amount of the compressed image data is equal to or greater than the data amount of the image data before compression. Therefore, by examining how much the image includes the reference pixel pattern, it is possible to predict whether the data amount of the image data indicating the image is equal to or less than the compressed image data amount. This is for the following reason.
[0033]
For example, when the bit string “01010101” is MH-encoded, a 36-bit bit string “000111010000111010000111010000111010” is obtained. As described above, the number of bits of the bit string after compression may be greater than or equal to the number of bits before compression depending on the appearance pattern of bits in the bit string. Therefore, if the bit string constituting the data to be compressed includes a large number of bit strings in which the number of bits after compression is equal to or greater than the number of bits before compression, the difference in data amount before and after compression of the bit string Is equal to or greater than the difference between the number of bits before compression and the number of bits after compression of the remaining bit string excluding the multiple bit strings from the bit string constituting the data to be compressed, the data amount of the entire data after compression is It becomes more than the data of the whole data before compression. The appearance pattern in the bit string constituting the binarized image data is determined by the pixel pattern of the target image indicated by the binarized image data. For this reason, therefore, by examining how much the pixel pattern of the image includes the reference pixel pattern, it is predicted whether the data amount of the image data indicating the image is equal to or less than the compressed image data amount. Can do.
[0034]
For these reasons, when storing a plurality of image data in the memory storage unit 13, all image data is compressed when image data indicating an image including a large amount of the reference pixel pattern is stored as it is without being compressed. The capacity required for storing the image data in the memory storage unit 13 can be reduced as compared with the case of storing the image data. Therefore, it is preferable that the image data selection unit 12 determines whether or not the image data is compressed and stored in accordance with the number of detection times.
[0035]
FIG. 3 is a flowchart showing the detection operation of the pixel pattern detection unit 8. When the binarized image processing unit 6 gives a portion corresponding to any one image portion in the binarized image data, the process proceeds from step a1 to step a2. Hereinafter, the portion of the binarized image data is referred to as a data portion. In step a <b> 2, the pixel pattern monitoring unit 22 monitors whether a bit string indicating all the reference pixel patterns in the reference pixel pattern storage unit 21 exists in the data portion. If there is a bit string indicating any one reference pixel pattern in the data portion, the process proceeds from step a2 to step a3, and if not, the process proceeds from step a2 to step a4. In step a3, the pixel pattern counting unit 23 adds 1 to the number of the image portions currently counted and updates it. After the update, the process proceeds from step a3 to step a4, and the data portion is stored in the first buffer 7. In step a5, the process of the flowchart ends.
[0036]
The process of the flowchart of FIG. 3 is performed every time a portion corresponding to any one image portion in the binarized image data is given to the pixel pattern detection unit 8. As a result, when all the data portions of the binarized image data are supplied to the pixel pattern detection unit 8, the number of the reference pixel patterns existing in all the image portions in the target image indicated by the binarized image data. Is counted by the pixel pattern counting unit 23. Further, the pixel pattern detection unit 8 repeats the above-described detection process until the number exceeds the reference number, and when the number exceeds the reference number, regardless of whether or not an image portion that is not monitored by the pixel pattern remains. Thereafter, the detection process may not be performed on the binarized image data.
[0037]
For example, it is assumed that the binarized image processing unit 6 has generated the image data 31 shown in FIG. As shown in FIG. 4B, the pixel pattern monitoring unit 22 monitors whether there is an arrangement of “01010101” in the bit string of the image data 31, and stores a bit string corresponding to the reference pixel pattern in the data portion 34. To detect. Of the three data portions, among the three data portions 33, 34, and 35 shown in FIG. 4B, the 8-bit bit string of the data portions 33 and 35 does not constitute the reference pattern. Therefore, the pixel pattern counting unit 23 increases the number of the image portions by 1 while these three data portions are processed. The plurality of data portions are sent to the first buffer 7 regardless of whether or not they match the reference pattern. As a result, the first buffer 7 stores the image data 31 as it is, as shown in FIG.
[0038]
FIG. 5 is a flowchart for explaining the selection operation of the image data selection unit 12. After the comparison between the pixel pattern of at least one image portion of all the image portions in the target image indicated by the binarized image data and the reference pixel pattern is completed in the pixel pattern detection unit 8, from step b1 Proceed to step b2. In step b <b> 2, the image data selection unit 12 counts the number of image parts currently counted by the pixel pattern counting unit 23, that is, the number of detections of the reference pixel pattern, and the reference stored in the pixel pattern count number storage unit 24. Compare the number. If the current number of reference pixel patterns detected is less than the reference number, the process proceeds from step b2 to step b3, and if it is greater than or equal to the reference number, the process proceeds from step b2 to step b5.
[0039]
In step b3, the image data selection unit 12 compares the data amount of data currently stored in the first and second buffers 7 and 10 with a predetermined reference data amount. The data stored in the first buffer 7 at the present time is a portion corresponding to an image portion in which comparison with the reference pixel pattern is completed among all image portions in the binarized image data. The data stored in the second buffer 10 at the present time is obtained by compressing the data stored in the first buffer 7 at the current time. When at least one of the data amounts of data currently stored in the first and second buffers 7 and 10 is less than the reference data amount, the process returns from step b3 to step b2, and the first and second buffers 7, 10 If the data amount of the data stored at the current time is equal to or greater than the reference data amount, the process proceeds from step b3 to step b4.
[0040]
In step b <b> 4, the image data selection unit 12 compares the data amount of the data in the first buffer 7 with the data amount of the data in the second buffer 10 based on the comparison result of the image data amount monitoring unit 11. That is, the data amount of the binary image data before compression is compared with the data amount of the binary image data after compression. When the data amount of the binary image data after compression is equal to or larger than the data amount of the binary image data before compression, the process proceeds from step b4 to step b6, and the data amount of the binary image data after compression is before compression. If it is less than the amount of the binarized image data, the process proceeds from step b4 to step b7.
[0041]
Based on the determination results of the above steps b2 to b4, the image data selection unit 12 selects any one of the image data to be stored in the memory storage unit 13 from the binary image data before and after compression. Choose as follows. When the current number of detections of the reference pixel pattern is equal to or greater than the reference number, the image pattern detection unit 8 completes comparison of all image portions in the target image indicated by the binarized image data with the reference pixel pattern. Regardless of whether or not, the target image data before compression is selected in step b5. If the current number of detections of the reference pixel pattern is less than the reference number, after the comparison is completed, it is determined that the data amount of the target image data after compression is greater than or equal to the data amount of the target image data before compression. If so, the target image data before compression is selected in step b6. If the current number of detections of the reference pixel pattern is less than the reference number, after the comparison is completed, it is determined that the data amount of the target image data after compression is less than the data amount of the target image data before compression. If so, the target image data after compression is selected in step b7. After the image data is selected in any one of steps b5 to b7, the process of the flowchart ends in step b8. The image data selected in this way is stored in the memory storage unit 13.
[0042]
The reference data amount is determined according to the capacities of the first and second buffers or the application of the image processing apparatus 1, for example, according to whether the image is A4 size or B4 size. In the latter case, for example, the reference data amount is set according to whether the size of the image processed in one image processing is A4 size or B4 size.
[0043]
The reference data amount can be arbitrarily set by the operator. For this purpose, for example, a diagnosis mode for setting a reference data amount is assigned to the operation mode of the image processing apparatus 1. When the diagnosis mode is selected, the operator operates the operation unit to specify a reference data amount and stores it in a buffer in the image data selection unit 12. As a result, the reference data amount is set as desired by the operator.
[0044]
The image data selection unit 12 performs the image data selection process in parallel with the comparison process of the pixel pattern detection unit 8. At this time, the binary image data before compression is selected when the number of the image parts counted by the pixel pattern counting unit 23 becomes equal to or larger than the reference number. Therefore, when there are a large number of the reference pixel patterns in all the image portions in the target image, all the images can be obtained without waiting until the comparison between the all image portions and the reference pixel pattern is completed. When a portion of the portion has been compared with the reference pixel pattern, image data to be stored in the memory storage unit 13 is selected. As a result, the processing time of the image data selection process can be shortened.
[0045]
In the above description, in the image processing apparatus 1, the image data selection unit 12 performs the image data selection process using both the detection result of the pixel pattern detection unit 8 and the comparison result of the pixel pattern monitoring unit 11. The image data selection unit 12 may perform the image data selection process using only one of the detection result of the pixel pattern detection unit 8 and the comparison result of the pixel pattern monitoring unit 11.
[0046]
【The invention's effect】
As described above, according to the present invention, according to the above-described configuration, image data that is expected to have a smaller amount of data is automatically selected from the pre-compression and post-compression image data, and the image data storage means is selected. Is remembered. For this reason, when a plurality of image data is stored, the sum of the data amounts of all the image data in the image data storage means is calculated when all the image data is stored without being compressed, and all the image data is stored. This is less than when image data is compressed and stored. As a result, the image data storage means can store more image data than in the case of either of the two storage methods described above, so that the image data storage means can be used effectively.
[0047]
The number of detections of the reference pixel pattern counted by the pattern counting means corresponds to an index for predicting the magnitude relationship between the data amounts of the image data before and after compression. The greater the number of reference pixel patterns, the higher the possibility that the amount of compressed image data will be greater than or equal to the amount of image data before compression. When the reference pixel pattern is included in the pre-compression image data by a reference number or more, the image data selection means is at a time before the reference pixel pattern detection is completed in all the pre-compression image data. Select image data. As a result, the time required for selecting image data is reduced. Further, the reference pixel pattern detection unit and the pattern counting unit may stop the processing when the counted number of reference pixel patterns is equal to or more than the reference number. As a result, the processing amount of the reference pixel pattern detection unit and the pattern counting unit can be reduced.
[0048]
Further, the image data selection means is configured such that when the count value of the pattern detection means is less than a predetermined reference number, the data amount of the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means is equal to or greater than the predetermined reference data amount And when the amount of data compressed by the compression means exceeds the predetermined reference data amount in the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means, the image data storage means The image data to be stored is determined based on the actual comparison result of the data amount of the image data before and after compression. As a result, it is possible to reliably select the image data with the smaller amount of the image data before compression and after compression. As a result, the image processing apparatus can always reliably suppress the sum of the data amounts of all the image data in the image data storage means.
[0049]
The image data selection means compares either the pre-compression image data or the compressed image data with a determination condition as to whether the number of detections of the reference pixel pattern is equal to or greater than a predetermined reference number and the reference pixel pattern. When the data amount of the completed data portion and the data amount of the compressed data portion reach the predetermined reference data amount, the data amount of the data portion that has been compared with the reference pixel pattern is the data amount. Since the selection is made according to two determination conditions, that is, whether or not the data amount of the compressed data is greater than or less than the data amount, the time required for selecting the image data is reduced, and before and after the compression. The image data with the smaller amount of image data can be selected with certainty.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an electrical configuration of an image processing apparatus 1 according to an embodiment of the present invention.
2 is a block diagram illustrating a specific configuration of a pixel pattern detection unit 8 in the image processing apparatus 1. FIG.
FIG. 3 is a flowchart for explaining detection processing in a pixel pattern detection unit 8 in the image processing apparatus 1;
FIG. 4 is a diagram showing a part of a bit string constituting image data 31 in order to explain the detection process in the pixel pattern detection unit 8;
FIG. 5 is a flowchart for explaining image data selection processing in an image data selection unit 12 in the image processing apparatus 1;
[Explanation of symbols]
1 Image processing device
8 Pixel pattern detector
9 Image compression / decompression unit
12 Image data selection part
13 Memory storage
15 Input section
22 Pixel pattern monitoring unit
23 Pixel pattern counting unit

Claims (1)

複数の画素から構成される画像を示す画像データを入力する画像データ入力手段と、
前記画像データを予め定める圧縮方法で圧縮する圧縮手段と、
前記圧縮前の画像データおよび圧縮された前記画像データのうちのいずれか一方を選択する画像データ選択手段と、
選択されたいずれか一方の画像データを記憶する画像データ記憶手段とを含む画像処理装置であって、
圧縮前の画像データのデータ部分ごとに、該データ部分と基準画素パターンとを比較して、圧縮前の画像データに含まれる予め定める基準画素パターンを検出する基準画素パターン監視手段と、
前記基準画素パターン監視手段が、予め定める基準画素パターンを検出するたびに、予め定める基準画素パターンの検出回数を計数するパターン計数手段と、
圧縮前の画像データのうち、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量と、予め定める基準データ量とを比較し、前記基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量と、予め定める基準データ量とを比較するデータ量比較手段とをさらに含み、
前記画像データ選択手段は、基準画素パターン監視手段、パターン計数手段およびデータ量比較手段と並行して動作して、パターン計数手段の計数値が予め定める基準数以上になった時点で、圧縮前の画像データを選択し、パターン計数手段の計数値が前記予め定める基準数未満のときには、データ量比較手段の比較結果に基づいて、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量が、予め定める基準データ量以上となり、かつ基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量が、予め定める基準データ量以上となった時点で、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量が、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量未満であれば、圧縮前の画像データを選択し、基準画素パターン監視手段によって基準画素パターンとの比較が終了したデータ部分のデータ量が、基準画素パターン監視手段によって、基準画素パターンとの比較が終了したデータ部分を、圧縮手段によって圧縮したデータのデータ量以上であれば、圧縮された画像データを選択することを特徴とする画像処理装置。
Image data input means for inputting image data indicating an image composed of a plurality of pixels;
Compression means for compressing the image data by a predetermined compression method;
Image data selection means for selecting one of the image data before compression and the compressed image data;
An image processing apparatus including image data storage means for storing any one of the selected image data,
Reference pixel pattern monitoring means for detecting a predetermined reference pixel pattern included in the image data before compression by comparing the data portion with the reference pixel pattern for each data portion of the image data before compression,
Pattern counting means for counting the number of detection times of a predetermined reference pixel pattern each time the reference pixel pattern monitoring means detects a predetermined reference pixel pattern;
Of the image data before compression, the data amount of the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring unit is compared with a predetermined reference data amount, and the reference pixel pattern monitoring unit compares the data amount with the reference pixel pattern. A data amount comparison unit that compares the data amount of the data compressed by the compression unit with a predetermined reference data amount,
The image data selection means operates in parallel with the reference pixel pattern monitoring means, the pattern counting means, and the data amount comparing means, and when the count value of the pattern counting means is equal to or greater than a predetermined reference number, When the image data is selected and the count value of the pattern counting means is less than the predetermined reference number, the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means based on the comparison result of the data amount comparing means Is equal to or greater than a predetermined reference data amount, and the data amount obtained by compressing the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring unit by the compression unit is equal to or greater than the predetermined reference data amount. At that point, the data that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means If the data amount is less than the data amount of the data compressed by the compression means for the data portion that has been compared with the reference pixel pattern by the reference pixel pattern monitoring means, the image data before compression is selected and the reference pixel The data amount of the data portion that has been compared with the reference pixel pattern by the pattern monitoring unit is equal to or greater than the data amount of the data that has been compared with the reference pixel pattern by the reference pixel pattern monitoring unit by the compression unit. If so, an image processing apparatus that selects compressed image data.
JP19924298A 1998-07-14 1998-07-14 Image processing device Expired - Fee Related JP3639436B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19924298A JP3639436B2 (en) 1998-07-14 1998-07-14 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19924298A JP3639436B2 (en) 1998-07-14 1998-07-14 Image processing device

Publications (2)

Publication Number Publication Date
JP2000032242A JP2000032242A (en) 2000-01-28
JP3639436B2 true JP3639436B2 (en) 2005-04-20

Family

ID=16404539

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19924298A Expired - Fee Related JP3639436B2 (en) 1998-07-14 1998-07-14 Image processing device

Country Status (1)

Country Link
JP (1) JP3639436B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120084180A (en) 2011-01-19 2012-07-27 삼성전자주식회사 Data compression device, operation method using the same, and data processing apparatus having the same
JP2017200041A (en) * 2016-04-27 2017-11-02 京セラドキュメントソリューションズ株式会社 Image formation apparatus and image formation method

Also Published As

Publication number Publication date
JP2000032242A (en) 2000-01-28

Similar Documents

Publication Publication Date Title
US8254672B2 (en) Image compressing method, image compressing apparatus and image forming apparatus
US7317828B2 (en) Color image processing apparatus with background control
JP5089311B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JPH04252340A (en) Abnormality processing circuit for image processor
US5175632A (en) Multiple image processing system
US5130809A (en) Electrophotographic copier with constant rate data compression and simultaneous storage and decompression of compressed data received on a mutually coupled data bus
EP1976263A1 (en) Image processing apparatus and method for detcting a background color
JP3639436B2 (en) Image processing device
US7307758B2 (en) Image forming apparatus and image forming method
US6577774B1 (en) Image forming apparatus and image forming method
US7307759B2 (en) Method and equipment for automatically performing color/monochrome judging of an original
JPH1070654A (en) Image processor
JP4100116B2 (en) Image processing device
JP4101169B2 (en) Image processing apparatus, image processing method, and computer program
JP2001257849A (en) Image processing apparatus
JP3734082B2 (en) Image processing apparatus and image data storage method of image processing apparatus
JPH06209393A (en) Picture processor and diagnostic method for the same
JP2001136394A (en) Picture processor
JP2008271364A (en) Image processor and image processing method
JP3488477B2 (en) Image processing device
JP3270232B2 (en) Data compression device
JP3846090B2 (en) Image processing device
JP5549937B2 (en) Image processing apparatus and image processing method
JP2000244746A (en) Image processor
JP2004336714A (en) Original image identifying apparatus, color copying machine, and original image identifying method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040513

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040525

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040726

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050111

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050114

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: 20080121

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090121

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100121

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110121

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120121

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130121

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees