JP3647071B2 - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP3647071B2
JP3647071B2 JP32911194A JP32911194A JP3647071B2 JP 3647071 B2 JP3647071 B2 JP 3647071B2 JP 32911194 A JP32911194 A JP 32911194A JP 32911194 A JP32911194 A JP 32911194A JP 3647071 B2 JP3647071 B2 JP 3647071B2
Authority
JP
Japan
Prior art keywords
image area
image
color
area
background
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
JP32911194A
Other languages
Japanese (ja)
Other versions
JPH08186706A (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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP32911194A priority Critical patent/JP3647071B2/en
Priority to EP95309438A priority patent/EP0724229B1/en
Priority to DE69523135T priority patent/DE69523135T2/en
Priority to US08/579,358 priority patent/US5848185A/en
Publication of JPH08186706A publication Critical patent/JPH08186706A/en
Priority to US09/162,727 priority patent/US6556711B2/en
Application granted granted Critical
Publication of JP3647071B2 publication Critical patent/JP3647071B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Description

【0001】
【産業上の利用分野】
本発明は画像形成装置およびその方法に関し、例えば、カラー画像から特性の異なる像域を抽出して、その像域それぞれの特性を判定する画像処理に関する。
【0002】
【従来の技術】
近年、カラー画像の入出力を行う装置がOA分野に普及し始め、これに伴い、主に文章で構成され、白黒部分や色数が限定された部分が大半を占めるカラー画像(以下この画像を「文章画像」と呼ぶ)の原稿を、スキャナなどの入力装置で読込んだカラー画像を扱う機会が増加している。しかし、他の画像に比べて、文章画像は性質の異なる像域(文字の像域や写真の像域など)が混在しているという特徴があり、他の分野で利用されている変倍やデータ量削減などの処理手法をそのまま用いても、画質の良好な画像が得られない場合がある。また、原稿のカラー画像を構造化したディジタルデータ、つまり原稿中の文字は文字コードとして、写真は画像データとして計算機へ入力し、DTP(Desk Top Publishing)装置などで再利用する要求も高まっている。
【0003】
次に、画像の変倍処理技術、データ量を削減する技術、像域を分離する(文書画像の構造化も含む)技術について、それぞれ説明する。
【0004】
[変倍処理]
画像を変倍(画素密度変換も含む)する方法としては、その変倍率に応じて原画の各画素を周期的に間引く(縮小)、その倍率に応じて各画素を繰返す(拡大)、ことによって変倍するSPC(Selective Processing Conversion)法(松本、小林: ファクシミリ解像度変換における画質評価の一検討、画像電子学会誌、Vol.12, No.5, pp.354-356, 1983)や、座標変換(アフィン変換など)を施した後、近傍の値を補間して画素値を求める方法などがある。
【0005】
また、二値画像を変倍する方法としては、本出願人が提案している方法がある。この方法は、二値画像の輪郭線情報を抽出して、平滑・変倍を行う装置に関するもので、二値画像からアウトラインベクトルを抽出し、抽出したアウトラインベクトル表現の状態で、所望の倍率(任意)に、滑らかに変倍されたアウトラインベクトルを作成し、その滑らかに変倍されたアウトラインベクトルから二値画像を再生することによって、所望の倍率(任意)で変倍した高画質のディジタル画像を得るものである。
【0006】
[データ量削減]
画像を蓄積したり、通信したりする際に、そのデータ量を削減する方法としては、JPEG(Joint Photographic Expert Group)による離散コサイン変換(DCT)を用いた符号化方式などのデータ量削減方法がある。また、カラー画像を均等色空間へ変換した後、色差を用いて領域分割を行い、領域の形状はチェーン符号化し、色相は領域ごとに記憶色を用いた粗量子化し、彩度は領域ごとに多項式近似し、明度は適応型離散コサイン変換符号化することにより、符号化する方法(電子情報通信学会論文誌B-I、Vol.75-B-I, No.6, pp422-430, 1992年6月)が提案されている。
【0007】
また、二値画像のデータ量を削減する方法としては、MR/MMR符号化やJBIG(Joint Bi-level Image Group)による符号化方法などがある。
【0008】
[像域分離(文書画像の構造化も含む)]
カラー画像の像域を分離する方法としては、再帰的閾値法(領域分割処理によるカラー画像情報の構造化、情報処理、Vol.19, No.12, pp.1130-1136, Dec. 1987)がある。この方法は、カラー画像に対して、RGB,HSI,TIQのカラー特徴におけるヒストグラムの谷から領域分割の閾値を決定して、領域を取出すという処理を、切出したそれぞれの領域に対して再帰的に繰返す。また、限定色表現法、つまり人間の視覚では色誤差を識別できない色数に達するまで、色分布を繰返し分割する色量子化手法を利用する方法(1990年電子情報通信学会春期全国大会 D146 7-168)などの報告もある。
【0009】
文書画像を対象とする像域分離法としては、近傍画素の情報を用いて画素毎に像域を判定する方法(鉄谷、赤田: 二値画像と濃淡画像の混在する原稿の二値化処理法、電子通信学会論文誌、Vol.J65-D, No.1, pp.307-314, 1982)や、像域は背景によって区切られているという性質に基づいて、文章画像の背景を利用して像域を分離した後、像域を判定する方法(伊藤等: フリーフォーマット文書の並列フィールドセグメンテーション手法、昭和54年度情報処理学会第20回全国大会、pp.453-454)などがある。これら提案の一部には、像域を分離した結果を文書画像の構造化へ応用する提案もある(例えば、山田等: マルチメディア文書構造処理システム、画像電子学会誌、Vol.19, No.5, pp.286-295, 1990)。
【0010】
【発明が解決しようとする課題】
しかし、上記従来例においては、次のような問題点があった。
【0011】
[変倍処理]
SPC変倍法は、簡易に変倍画像を作成できるものの、斜線部分が階段状になるなど画質に問題がある。
【0012】
また、座標変換を用いた変倍方法は、風景などの自然画像には有効であるが、文書画像に適用した場合は、文字やグラフなどの文字線画部分のエッジが補間処理によってぼけるという欠点がある。
【0013】
また、本出願人が提案している二値画像の変倍方法は、二値画像の輪郭線情報を抽出し平滑・変倍する方法としては極めて有効であるが、カラー画像や濃淡画像の変倍に直接適用することはできない。
【0014】
[データ量削減]
離散コサイン変換(DCT)を用いた符号化方式によるデータ量の削減方法は、自然画像には有効であるが、文書画像を圧縮し再生した場合は、文字やグラフなどの文字線画部分における画質劣化が大きいという問題がある。
【0015】
領域を分割して符号化する方法も、自然画像を対象としているため、明度を適応型離散コサイン変換符号化するので、明度情報が全情報量の大半を占めることになる。このため、カラー画像の連続調の部分に対しては有効であるが、白黒部分や限定色部分が大半を占め、明度情報の重要度が低い文書においては、符号化効率が悪い。
【0016】
MR/MMR符号化やJBIGによる符号化方法は、二値画像のデータ量を削減する場合には有効であるが、カラー画像や濃淡画像のデータ量を削減する場合は、直接適用することができない。
【0017】
[像域分離]
再帰的閾値法や限定色表現法を用いた像域分離方法は、自然画像の領域分割に適用することはできるが、自然画像とは性質の異なる像域(像域の定義が異なるので)が混在する文書画像に対しては、直接適用することができない。
【0018】
また、上述した文書画像を対象とした像域分離方法(文章の構造化も含む)は、二値画像や濃淡画像を対象とするもので、像域が重畳することが多いなどの特徴をもつカラー画像への適用は難しい。
【0019】
このように、提案されている変倍方法,データ削減方法,像域分離方法は、自然画像を対象としたものが多く、文書画像へ適用しても充分な効果を期待することができない。また、提案されている文書画像を対象とするそれらの方法は、二値画像や濃淡画像を対象とするもので、カラー画像に対して直接適用することができるものはない。
【0020】
本発明は、上述の問題を解決するためのもので、特性が異なる像域が混在したカラー画像に対して、良好な処理を施すことを目的とする。
【0021】
【課題を解決するための手段】
本発明は、前記の目的を達成する一手段として、以下の構成を備える。
【0022】
本発明にかかる画像処理方法は、カラー画像を入力する入力ステップと、入力したカラー画像の背景像域に注目して、そのカラー画像から特性の異なる像域を抽出する抽出ステップと、抽出した像域それぞれの特性を判定する判定ステップとを有し、前記抽出ステップは、前記カラー画像の処理対象領域から背景像域を分離する第一の分離ステップ、および、分離された背景像域以外の像域を少なくとも一つの像域に分離する第二の分離ステップを含み、分離した像域に、前記第一および第二の分離ステップを再帰的に繰り返すことにより像域を抽出することを特徴とする。
【0023】
本発明にかかる画像処理装置は、カラー画像を入力する入力手段と、入力されたカラー画像の背景像域に注目して、そのカラー画像から特性の異なる像域を抽出する抽出手段と、抽出された像域それぞれの特性を判定する判定手段とを有し、前記抽出手段は、前記カラー画像の処理対象領域から背景像域を分離する第一の分離手段、および、分離された背景像域以外の像域を少なくとも一つの像域に分離する第二の分離手段を含み、分離した像域に、前記第一および第二の分離手段による処理を再帰的に繰り返すことにより像域を抽出することを特徴とする。
【0024】
【実施例】
本発明の概要は、異なる成分をもつ像域が混在するカラー文書画像に対して、各像域の抽出および成分の判定を行い、背景(下地)になる像域に注目することにより、画像中の像域を抽出し、各像域の成分(以下「像域成分」と呼ぶ)を判定する。
【0025】
ここで、像域成分とは、像域が文字や線画からなるのか、写真からなるのか、あるいは、カラーの像域なのかなど、像域の性質を示すものである。以下では、像域成分の一例として、文書画像の像域が「カラー連続調」「限定色文字線画」「限定色擬似中間調」「モノクロ連続調」「限定値文字線画」「限定値擬似中間調」の何れかの像域成分をもつものとして説明する。これらの像域成分の詳細は次のようになるが、勿論、より簡単な、または、より詳しい分類による像域成分を用いることもできる。
カラー連続調: 原稿がカラー写真である像域
限定色文字線画: 原稿が黒以外の色の文字または線画である像域
限定色擬似中間調: 原稿が擬似中間調処理し着色された写真である像域
モノクロ連続調: 原稿が白黒の濃淡(グレイ)の写真である像域
限定値文字線画: 原稿が白黒の文字もしくは線画である像域
限定値擬似中間調: 原稿が白黒の擬似中間調に処理された写真である像域
【0026】
次に、本発明の中心になるカラー文書画像の像域分離について簡単に説明する。
【0027】
文書画像において前述した像域成分をもつ像域は、背景(下地)により区切られていると考えられる。つまり、入力画像を背景によって区切られる部分で分離することにより、像域を抽出することができる。しかし、白黒原稿は、一般に、その背景色は「白」であるが、カラー原稿の場合は背景色が「白」とは限らない。また、カラー原稿の場合は、ある背景の上に他の色をもつ背景が重なったものも多い。そこで、本発明においては、背景の抽出および背景に基づく像域分割を、像域(最初は入力画像)に対して再帰的に繰返すことにより、像域分離を行う。
【0028】
図1は本発明における像域分離手順の一例を示す図である。
【0029】
まず、入力画像5001から背景5002を抽出し、次に、背景5002を用いて分離することができる像域5003と5004を抽出する。像域5003については、さらに背景を抽出することはできないので、像域分離を終了する。一方、像域5004については、さらに背景5005を抽出することができるので、像域分離を継続する。このようにして分離した各像域に対して像域成分を判定する。
【0030】
なお、以下では、背景を示す像域を「背景像域」、背景以外を示す像域を「一般像域」と呼ぶ。また、便宜上、処理途中の像域、つまり背景を含むか含まないかの判定が未了の像域および複数の像域を含む像域を「中間像域」と呼び、分割処理が終了した像域(背景像域を含む)を「終端像域」と呼ぶ。なお、入力画像も中間像域である。
【0031】
以下、本発明にかかる一実施例の画像処理装置を図面を参照して詳細に説明する。
【0032】
以下で説明する画像処理装置およびその方法は、カラーの文章画像を扱う機器、例えば、カラープリンタの画素密度変換や変倍出力、DTP装置の拡大・縮小や出力時の画素密度変換、カラーファクシミリ装置の画素密度変換や変倍出力、などに利用することができる。また、カラーファクシミリや、LANなどのネットワーク機器における画像通信時、および、磁気ディスク装置などの記憶装置へカラー画像を蓄積する際のデータ量削減に利用することができる。また、DTP装置などにおいて紙面原稿を入力する際のデータ構造化に利用することができる。
【0033】
【第1実施例】
[処理手順]
図2は本発明を画像処理装置のカラー画像変倍処理に適用する場合の処理手順の一例を示す図である。
【0034】
同図において、カラー画像入力工程1で処理を施すディジタルカラー画像を入力し、像域抽出工程2で入力したカラー画像から像域を抽出して、抽出した像域のデータを作成する。次に、像域判定工程3で抽出した各像域の像域成分を判定し、適応的変倍工程4で、抽出した各像域に対して、判定した像域成分に応じた変倍処理を施し、入力画像の変倍画像を作成する。そして、カラー画像出力工程5で、作成した変倍画像を表示したり、ハードコピー出力したり、または、通信路へ出力したりする。
【0035】
[装置の構成]
図3は図2に示した処理を行う画像処理装置の構成例を示すブロック図で、図4は図3に示す構成を実現するハードウェアの一例を示すブロック図である。
【0036】
まず、図4から説明すると、2001はCPU、2007はCPU2001と以下の構成とを相互に接続するバス、2004はCPUが実行するプログラムやデータなどが予め格納されたROM、2006はCPU2001のワークとして利用されるRAM、2002はプログラムや画像などを記憶するハードディスクや光磁気ディスクなどの記憶装置、2003は記憶装置2002のデータ入出力を行うディスクI/O、2008はカラー画像入力装置、2009はカラー画像出力装置、2005はカラー画像入出力装置2008,2009のデータ入出力を行うI/Oポートである。
【0037】
CPU2001は、ROM2004や記憶装置2002などに予め格納されたプログラムに従い、バス2007を介して各構成を制御するとともに、RAM2006をワーク領域として、カラー画像入力装置2008から入力されたカラー画像や記憶装置2002に記憶されたカラー画像に処理を施した結果を、カラー画像出力装置2009へ出力する。
【0038】
図3において、カラー画像入力部1001は、処理を施すディジタルカラー画像を入力して、入力画像記憶部1006に格納する。このカラー画像入力部1001は、例えば、ROM2004または記憶装置2002に格納されたプログラムに従って動作するCPU2001の制御により、カラー画像入力装置2009でカラー画像を入力して、RAM2006または記憶装置2002に格納することで構成することができる。なお、カラー画像入力部1001は、カラーイメージスキャナで画像を読込む入力部でも、通信路からカラー画像を受信する入力部でも、画像蓄積装置に格納されたカラー画像を読込む入力部であっても構わないし、これらを複数組合わせたものでも構わない。
【0039】
像域抽出部1002は、入力画像記憶部1006に記憶された画像から像域を抽出し、抽出した像域データを像域データ記憶部1007に格納する。像域判定部1003は、像域抽出部1002により抽出された各像域の像域成分を判定し、像域データ記憶部1007に格納する。適応的変倍部1004は、像域抽出部1002により抽出され各像域に対して、像域判定部1003で判定された像域成分に応じた変倍処理を施して、入力画像を変倍した画像を作成し、その変倍画像を変倍画像記憶部1008に格納する。なお、像域データ記憶部1007には各像域の属性を示す情報が格納される。
【0040】
この像域抽出部1002,像域判定部1003,適応的変倍部1004は、例えば、ROM2004または記憶装置2002に格納されたプログラムに従って動作するCPU2001とワークメモリとして使用するRAM2004または記憶装置2002で構成することができる。勿論、それぞれ専用のCPU,RAM,記憶装置で構成したり、専用のハードウェアにより構成しても構わない。
【0041】
カラー画像出力部1005は、適応的変倍部1004により作成され、変倍画像記憶部1008に格納された変倍画像を出力する。なお、その出力先は、ディスプレイ、ハードコピーを行うプリンタや複写機、通信路、または、画像蓄積装置などである。このカラー画像出力部1005は、例えば、ROM2004または記憶装置2002に格納されたプログラムに従って動作するCPU2001の制御により、RAM2006または記憶装置2002に格納された変倍画像を、カラー画像出力装置2009により出力することで構成することができる。
【0042】
また、入力画像記憶部1006,像域データ記憶部1007,変倍画像記憶部1008は、例えば、RAM2006または記憶装置2002で構成することができる。勿論、それぞれの記憶部を、専用の記憶装置で構成しても構わない。
【0043】
[処理の詳細]
次に、図2に示した主な工程について、図3の構成を用いながら詳細に説明する。
【0044】
●像域抽出工程
像域抽出工程2では、カラー画像入力工程1で入力画像記憶部1006に格納したカラー画像から像域を抽出し、抽出した像域のデータを作成し、そのデータを像域データ記憶部1007に格納する。
【0045】
ここで、像域のデータ(以下「像域データ」と呼ぶ)について説明する。
【0046】
図5Aは像域データの概略を示す図である。像域データは、各像域をノードとするツリー構造により入力画像の像域群を表現する。ツリー構造の親子関係は像域の包含関係を表し、中間像域を示すノードは、中間像域内にある一つの背景像域と幾つかの中間像域もしくは一般像域を表す子ノードをもつ。
【0047】
図5Bは各ノード、つまり個々の像域を表すデータの一例を示す図である。各像域データは「像域種類」「像域位置」「像域形状」「像域成分」「像域色」「親ノード」および「子ノード」から構成され、これらの詳細は次のようになる。
像域種類: その像域の種類(背景像域,一般像域,中間像域)を示す
像域位置: 像域を囲む外接矩形の座標位置(左上xy座標,幅,高)を示す
像域形状: 像域の形状を二値画像で表現したもの
像域成分: その像域がどの像域成分として判定されたかを示す
像域色: 限定色か限定値の像域成分の場合に像域の平均RGB値を格納する
親ノード: 親ノードを示すポインタ
子ノード: 子ノードを示す複数個のポインタ
【0048】
なお、像域形状を表す二値画像の黒画素(画素値=‘1’)が像域を示し、二値画像の大きさおよび入力画像上での位置は、像域位置に示した矩形位置に対応する。
【0049】
図6は像域抽出工程2の詳細な手順の一例を示す図である。像域抽出工程2は、前述したように、未分離像域探索工程21により像域分離工程20が終了したと判断されるまで、画像中の中間像域(入力画像を含む)を背景像域および中間像域へと、さらに分離する像域分離工程20を再帰的に繰返して、像域を抽出する。
【0050】
未分離像域探索工程21は、像域データ記憶部1007に格納された像域データを探索し、分離が未了の中間像域、つまり子ノードをもたない中間像域を探す。像域データに分離が未了の中間像域がある場合は、その中間像域を入力中間像域として像域分離工程20を行う。像域データに分離が未了の中間像域がない場合は、像域抽出工程2を終了する。
【0051】
像域分離工程20は、中間像域(入力画像を含む)を入力し、入力された中間像域が、さらに背景像域と幾つかの中間像域を分離できるかを判断する。分離できないと判断した場合は、入力された中間像域を終端像域と判定し、その情報を像域データ記憶部1007に格納されたその像域の像域データに登録する。分離できると判断した場合は、入力された中間像域から背景像域と幾つかの中間像域を分離し、その情報を像域データ記憶部1007に格納されたその像域の像域データに登録する。
【0052】
具体的に説明すると、例えば、図1に示した像域5003を入力中間像域とし、像域5003から中間像域を分離できないと判断した場合は、像域5003を終端像域と判定する。また、図1に示す像域5004を入力中間像域とし、像域5004から中間像域を分離できると判断した場合は、像域5004から背景像域5005と中間像域5006を分離する。
【0053】
背景像域分離工程22は、入力された中間像域に背景像域があるかを判定し、背景像域があると判定した場合は背景像域を分離する。中間像域分離工程23は、背景像域分離工程22で背景像域として分離された像域以外の像域を、幾何学的な関係を用いて幾つかの中間像域に分離する。具体的には、連結した画素または幾何学的に近い連結成分を一つの中間像域とする。像域登録工程24は、背景像域分離工程22および中間像域分離工程23で分離された像域を、像域データ記憶部1007に登録する。以下、背景像域分離工程22,中間像域分離工程23,像域登録工程24の詳細を説明する。
【0054】
図7は背景像域分離工程21の詳細な手順の一例を示す図である。背景色抽出工程211は、入力された中間像域の色を解析し、入力された中間像域中に背景像域を示す色があるかを判定する。具体的には、特定範囲の色をもつ画素が入力された中間像域の大部分を占めるかなどにより判定を行う。二値化工程212は、背景色抽出工程211で抽出された背景像域を示す色を用いて、背景像域を示す二値画像を作成する。背景像域整形工程213は、二値化工程212で作成された背景像域を表す二値画像に対して、ノイズや小像域の除去を行い、背景像域の整形を行うとともに、小像域などの除去処理により背景像域がなくならないかを確認する。
【0055】
図8はCPU2001の処理により背景像域分離工程22を実現する手順の一例を示すフローチャートである。
【0056】
ステップS101からS103が背景色抽出工程211に対応する。
【0057】
具体的には、ステップS101で色ヒストグラムをワークメモリ(RAM2006または記憶装置2002)上に作成する。例えば、入力画像がRGB表色系で表現されている場合、この色ヒストグラムは、中間像域の各画素の色の頻度、つまり中間像域の画素数に対するあるRGB値をもつ画素数の割合を表すRGBの三次元データである。なお、色ヒストグラムを作成する際に再量子化してもよい。例えば、RGBそれぞれ8ビットの画像が入力された場合、RGBそれぞれを4ビットや7ビットなどに再量子化しながら色ヒストグラムを作成することにより、工程は複雑になるが、色ヒストグラムを格納するメモリサイズを小さくすることができるとともに、背景像域の色にばらつきがあった場合にも安定に背景像域を分離することができる効果がある。
【0058】
また、処理する画像の表色系はRGB表色系でなくても構わない。例えば、入力画像を予め他の表色系、例えばL*a*b*表色系,L*u*v*表色系,HSI表色系などに変換して、色ヒストグラムを作成する。このとき、色ヒストグラムの次元も、変換した表色系の三成分の次元、例えばL*a*b*表色系の場合はL*a*b*の三次元データを用いる。L*a*b*などの他の表色系を用いることにより、工程は複雑になるが、人間の視覚に近い背景像域を分離することができる効果が期待される。なお、以下では、RGB表色系で色ヒストグラムを作成した場合を説明する。
【0059】
続いて、ステップS102で最大頻度の色(つまり背景色の候補)を得る。そして、ステップS103で、得られた最大頻度が閾値thより大きいかを判定して、最大頻度が閾値th以下の場合は入力された中間像域には背景像域がないと判断し、背景像域分離工程21を終了する。また、最大頻度が閾値thより大きい場合は入力された中間像域に背景像域があると判断して、ステップS104へ進む。ここで閾値thは、入力画像の性質を考慮して決定するもので、例えば0.5(50%)などである。
【0060】
ステップS104は、二値化工程212に対応し、最大頻度の色をもつ画素とそれ以外の画素とに二値化した中間像域の二値画像をワークメモリ上に作成する。例えば、最大頻度の色をもつ画素を‘1’、それ以外の画素を‘0’にした二値画像を作成する。
【0061】
ステップS105からS109は、背景像域整形工程213に対応する。
【0062】
具体的には、ステップS105で、例えば公知の縮小/膨張処理を施すことにより、作成した二値画像からノイズを除去し、ステップS106からステップS108でノイズを除去した二値画像から小像域を除去する。まず、ステップS106で、ノイズを除去した二値画像に対して、例えば公知のラベリング処理により、ワークメモリ上にラベル画像を作成して連結成分の抽出を行う。ラベル画像は、各連結成分に一意の番号を付けて、その番号を各連結成分の画素値にした画像である。次に、ステップS107で各連結成分の画素数(面積)を求めてワークメモリに格納し、ステップS108で、画素数が閾値以下の連結成分(小面積の連結成分)を削除、つまり、二値画像のその連結成分に対応する画素の値を‘0’にする。
【0063】
そして、ステップS109で、残った連結成分(背景像域)があるかを判定し、残っていれば背景像域ありと判断し、残っていなければ背景像域なしと判断する。なお、背景像域がある場合は、ワークメモリ上に背景像域を示す二値画像が残る。
【0064】
図9はCPU2001の処理により中間像域分離工程23を実現する手順の一例を示すフローチャートである。
【0065】
ステップS201で、背景像域分離工程22で作成した背景像域を示す二値画像を白黒反転、つまりその値が‘1’の画素を‘0’に、‘0’の画素を‘1’にした背景像域以外の像域、つまり入力された中間像域の中の中間像域を示す二値画像を作成し、ワークメモリに格納する。
【0066】
次に、ステップS202で、白黒反転した二値画像から中間像域に分離するために、近隣成分を抽出する。ここで近隣成分とは、二値画像において近接する(連結している必要はなし)黒画素の集合を一つの成分とするもので、この近隣成分を中間像域とする。例えば、文書画像において、連結はしていないが、近接する文字の集まりからなるコラムなどを、近隣成分と呼ぶ。なお、近隣成分の抽出方法としては、例えば、伊藤等の方法(「フリーフォーマット文書の並列フィールドセグメンテーション手法」昭和54年度 情報処理学会第20回全国大会 2E-1)などがある。
【0067】
次に、ステップS203で、抽出した近隣成分の位置を示す外接矩形を算出し、ワークメモリに格納する。
【0068】
以上の手順により、入力された中間像域から背景像域以外の像域を一つまたは複数の中間像域に分離して、その位置(外接矩形)をワークメモリに格納することができる。
【0069】
図10はCPU2001の処理により像域登録工程24を実現する手順の一例を示すフローチャートで、背景像域分離工程22で入力された中間像域に背景像域があると判断された場合に、分離された背景像域および中間像域を、図5Aおよび図5Bに示した形態で登録する。また、背景像域がないと判断された場合は、入力中間像域が一般像域であると登録する。具体的には、ステップS200で背景像域があるか判定して、あればステップS211へ進み、なければステップS219へ進んで、入力された中間像域を示すノードの像域種類を「一般像域」に変更して処理を終了する。
【0070】
背景像域がある場合は、ステップS211で新しい像域を示すノードを作成し、ステップS212で新ノードに像域種類を登録し、ステップS213で処理する像域種類を判定して、背景像域の場合はステップS214で新ノードの像域形状に背景像域を示す二値画像を登録する。また、中間像域の場合はステップS215で新ノードの像域位置に外接矩形から得た位置情報を登録し、ステップS216で新ノードの像域形状に中間像域を示す白黒反転した二値画像を登録する。なお、背景像域の像域位置は、親ノード(入力中間像域)の像域位置と同じなので、その登録は省略する。
【0071】
続いて、ステップS217で新ノードの親ノードとして入力された中間像域を登録し、ステップS218でその入力中間像域を示すノードの子ノードとして新ノードを登録して、処理を終了する。
【0072】
●像域判定工程
像域判定工程3は、像域抽出工程2で抽出された各像域の種類を判定し、その判定結果を像域データに格納する。以下では、各像域が「カラー連続調」「限定色文字線画」「限定色疑似中間調」「モノクロ連続調」「限定値文字線画」「限定値擬似中間調」の何れの像域成分か判定する一例を説明する。
【0073】
図11は像域判定工程3の詳細な手順の一例を示す図である。像域判定工程3は、カラー/モノクロ判定工程32により、対象とする像域がカラーかモノクロ(グレーまたは白黒)かを判定し、次に、カラー連続調/限定色判定工程33またはモノクロ連続調/限定値判定工程34により、像域が連続調か限定色または限定値かを判定する。そして、限定色または限定値と判定された像域に対しては、文字線画/擬似中間調判定工程35により、文字線画の像域か擬似中間調の像域かを判定する。像域判定制御工程31の制御により、未判定像域がなくなるまで、以上の工程を繰返すことによって各像域の像域成分を判定する。
【0074】
図12は四つの像域成分におけるRGB値の分布例を示す図で、左上から順番に「カラー連続調像域」「モノクロ連続調像域」「限定色像域」「限定値像域」の各RGB値分布の一例を示している。
【0075】
カラー/モノクロ判定工程32は、対象とする像域がカラー(カラー連続調像域または限定色像域)かモノクロ(モノクロ連続調像域または限定値像域)であるかを判定する。具体的には、図12に示すように、モノクロ像域の場合の各画素の彩度が零(RGB表色系ではR=G=B)近傍の値になることを利用して、像域の彩度ヒストグラムにおける頻度がピークを示す彩度が零の付近に一つあり、ヒストグラムの分散が小さい像域をモノクロ像域と判断する。
【0076】
図13はCPU2001の処理によりカラー/モノクロ判定工程32を実現する手順の一例を示すフローチャートである。
【0077】
ステップS301で、像域中の画素値(例えばRGB値)から彩度を算出して、彩度ヒストグラムを作成しワークメモリに格納する。なお、HSI表色系など、既に彩度を含む表色系で表現されている場合は、直接、彩度ヒストグラムを作成することができる。次に、ステップS302で作成した彩度ヒストグラムの頻度がピークを示す彩度を検出し、ステップS303で作成した彩度ヒストグラムの分散を算出し、ステップS304で得られた頻度がピークを示す彩度および分散を用いて像域の判定を行う。この判定は、頻度がピークを示す彩度が零付近(つまり所定の閾値以下)に一つあるとともに、分散が所定の閾値以下の場合はモノクロ像域とし、それ以外の場合はカラー像域とする。
【0078】
図14はCPU2001の処理によりカラー/モノクロ判定工程32を実現する手順の他の例を示すフローチャートで、図13の手順に比べて判定精度は劣るが、簡単に判定することができる。
【0079】
ステップS401で変数Eを零にリセットし、ステップS402で変数Eに対象像域の注目画素のR値とG値の差の絶対値(|R-G|)を加算し、ステップS403で変数Eにその注目画素のR値とB値の差の絶対値(|R-B|)を加算する。そして、ステップS404の判断によりステップS402とS403を像域のすべての画素に繰返し実行する。すべての画素の処理が終了するとステップS405で変数Eを対象像域の画素数Nで割った値(E/N)と所定の閾値thとを比較して、E/N>thであればカラー像域と判定し、そうでなければモノクロ像域と判定する。つまり、この方法は、像域のすべての画素におけるR-GとR-Bの絶対値の和の平均値によって、その像域がカラーかモノクロかを判定するものである。
【0080】
次に、カラー連続調/限定色判定工程33は、図12に示したように、限定色像域の場合はその画素値が特定の値に集中することから、像域の色ヒストグラムにおいて頻度がピークを示す色が一つあり、色ヒストグラムの分散が小さい像域を限定色像域と判断する。
【0081】
図15はCPU2001の処理によりカラー連続調/限定色判定工程33を実現する手順の一例を示すフローチャートである。
【0082】
ステップS501で、像域の画素値(例えばRGB値)から色ヒストグラムを作成して、ワークメモリに格納する。次に、ステップS502で作成した色ヒストグラムの頻度のピーク数を検出する。なお、所定の閾値以上の頻度をもつ色の数をピーク数とするが、ヒストグラム上で隣合うピークは一つのピークとして数える。続いて、ステップS503で作成した色ヒストグラムの分散を算出し、ステップS504で得られたピーク数および分散から像域成分を判定する。この判定は、ピーク数が一つであるとともに分散が所定の閾値以下の場合に限定色像域とし、それ以外の場合はカラー連続調像域とする。
【0083】
次に、モノクロ連続調/限定値判定工程34は、図12に示したように、限定値像域の場合はその画素値が特定の値に集中することから、像域の明度ヒストグラムにおいて頻度がピークを示す明度が一つあり、明度ヒストグラムの分散が小さい像域を限定値像域と判断する。
【0084】
図16はCPU2001の処理によりモノクロ連続調/限定値判定工程34を実現する手順の一例を示すフローチャートである。
【0085】
ステップS601で、像域の画素値(例えばRGB値)から明度を算出し、明度ヒストグラムを作成してワークメモリに格納する。なお、HSI表色系など、既に明度を含む表色系で表現されている場合は、直接、明度ヒストグラムを作成することができる。次に、ステップS602で作成した明度ヒストグラムの頻度のピーク数を検出する。なお、所定の閾値以上の頻度をもつ明度の数をピーク数とするが、ヒストグラム上で隣合うピークは一つのピークとして数える。続いて、ステップS603で作成した明度ヒストグラムの分散を算出し、ステップS604で得られたピーク数および分散から像域成分を判定する。この判定は、ピーク数が一つであるとともに分散が所定の閾値以下の場合に限定値像域とし、それ以外の場合はモノクロ連続調像域とする。
【0086】
次に、文字線画/擬似中間調判定工程35について説明する。
【0087】
二値画像や多値画像を対象とした像域分離技術として、多くの文字線画/擬似中間調像域判別技術が提案されているが、ここでは、本出願人が提案している方法を例として説明する。
【0088】
本実施例においては、前述したように、入力像域の形状を示す二値画像を中間像域分離工程3において作成し、図5Aおよび図5Bに示す形態の像域データとして格納している。文字線画/擬似中間調判定工程35では、判定対象とする像域の像域形状(二値画像)を入力として、文字線画像域か擬似中間調像域かを判別する。
【0089】
図17は上述した判別処理を実現する像域分離部3000の構成例を示すブロック図である。なお、同図においては専用のハードウェアにより像域分離部を実現しているが、図4に示した装置でも実現することができるのはいうまでもない。
【0090】
図17において、3010はデータ保持部で、像域判定処理に必要になる小領域内の各画素値を逐次更新し保持する。このデータ保持部3010は、ラスタ走査形式で入力されるディジタル二値画像データ3040に対して、例えば図18に示すように、注目画素321の周囲最大8×8画素の領域324の計64画素のデータを保持する。そして、注目画素321の位置が更新(ラスタ走査形式で順次移動する)されるのに同期して、保持するデータを対応する領域のデータに更新する。
【0091】
図19はデータ保持部3010の構成例を示すブロック図で、3011はFIFOメモリなどで構成されるラインバッファ部で、現在入力されているラスタの直前の7ラスタ(走査線)分に相当するデータを保持する。3012はラッチ群で、各ラスタ当り八画素分のデータを保持し、合計64個のデータを保持する。
【0092】
再び、図17において、3020は像域判定条件部で、データ保持部3010より出力される小領域324を形成する注目画素321を含む画素群のデータに基づいて、注目画素321が擬似中間調領域の画素か否かを判定するこの像域判定部3020は、孤立画素判定部3021、周期性判定部3022および高周波成分判定部3023を含み、三つの判定部でそれぞれ異なる条件が成立するか否かを判定して、それらの条件の一つでも成立すれば、ORゲート3024から注目画素321が擬似中間調領域の画素であることを示す信号3050が出力される。つまり、ORゲート3024は、注目画素321が孤立点か、または、孤立画素領域,周期性画素領域,高周波成分領域の何れかに含まれる画素と判定された場合に、擬似中間調領域であることを示す信号3050を出力する。
【0093】
孤立画素判定部3021は、注目画素321が孤立画素領域にあるか否かを判定するもので、具体的には、図20に示す4×4画素領域322内の16画素それぞれに対して、図21に示す上下左右の四画素がすべて同値の画素(白画素もしくは黒画素)で、かつ中央(k,l)の画素と異なる値か否かを検出する。そして16個の検出結果を得て、この内、例えば二つ以上が上記の条件に該当する場合、この4×4画素領域322内の注目画素321は孤立画素領域内にあると判定する。言い換えれば、注目画素321の近傍画素領域322の16画素の中で、孤立画素(上下左右の何れにも連結していない黒画素もしくは白画素)が例えば二画素以上あるか否かを判断して、二画素以上ある場合、注目画素321は孤立画素領域内にあると判定する。
【0094】
周期性判定部3022は、画素値が所定の画素周期で繰返されているかどうかを判定するもので、具体的には、図18に示す8×8画素領域324において、その64画素がすべて白画素であったり、すべて黒画素である場合を除き、お互いに主走査方向に四画素かつ/または副走査方向に四画素離れた位置関係にある四画素、例えば、図18にハッチングで示す画素A,B,C,Dの各画素値がすべて同じか否かを判定する。なお、8×8画素領域324においては、画素A,B,C,Dのような相対位置関係にある四画素の組を16通り定義することができる。これら16組それぞれについて、四画素の画素値がすべて等しいか否かを検査し、等しい場合が、例えば14組以上あれば、64画素がすべて白画素または黒画素の場合を除いて、周期性部分、つまりディザ部分であると判定する。
【0095】
高周波成分判定部3023は、近接する画素間において濃度変化が頻繁に生じているか否かを判定するもので、具体的には、図22に示す6×6画素領域326において、その36画素の横(主走査)方向に隣接する二画素間の組合わせ30通り(図に水平方向の双方向矢印で示す)と、縦(副走査)方向に隣接する二画素間の組合わせ30通り(図に垂直方向の双方向矢印で示す)との、合わせて60組の隣接二画素の画素値が互いに異なるか否かを判定する。そして、互いに異なる組合わせが、例えば28組以上あれば高周波成分領域にあると判定する。
【0096】
なお、像域判定工程3の判定結果(各像域の像域成分)は、像域データ記憶部1007にある像域データへ、各像域の像域成分として格納する。また、限定色文字線画、限定色擬似中間調、限定値文字線画、限定値擬似中間調の各像域成分と判定された像域に対しては、その像域内の平均色(例えばRGBそれぞれの平均画素値)を算出して、像域データ記憶部1007にある像域データへ、その像域の平均色として格納する。
【0097】
●適応的変倍工程
適応的変倍工程4は、像域抽出工程2で抽出された各像域に対して、像域判定工程3で判定された像域成分に応じた変倍処理を施し、入力画像の変倍画像を作成する。
【0098】
図23は適応的変倍工程4の詳細な手順の一例を示す図である。適応的変倍工程4は、変倍制御工程41により、その像域成分に応じた変倍工程を像域ごとに適応して、それぞれの像域の変倍画像を合成することにより、入力画像の変倍画像を作成する。具体的には、カラー連続調の像域はカラー連続調像域変倍工程42で、限定色文字線画の像域は限定色文字線画像域変倍工程43で、限定色疑似中間調の像域は限定色疑似中間調像域変倍工程44で、モノクロ連続調の像域はモノクロ連続調像域変倍工程45で、限定値文字線画の像域は限定値文字線画像域変倍工程46で、限定値疑似中間調の像域は限定値疑似中間調像域変倍工程47で、それぞれ変倍し、それぞれ変倍された像域を一つの変倍画像に合成する。以下、各工程を詳細に説明する。
【0099】
変倍制御工程41は、変倍が完了していない像域がなくなるまで、その像域成分に応じた変倍行程を像域ごとに適応的に施す。図24は変倍を施す像域の順序の一例を示す図で、変倍は、像域データ(ツリー構造)に記述された像域ノードを、ルートノード(最上位ノード)から辿りながら行うが、各像域の変倍は、それ自身よりも上位階のノードの一階下にある背景像域より先に行ってはならない。つまり、一つの中間像域の下にある像域を変倍する場合は、背景像域から変倍しなければならない。
【0100】
カラー連続調変倍工程42は、入力された像域を線形補間を用いたカラー画像変倍方法などにより変倍し、その変倍画像を変倍画像記憶部1008へ書込む。なお、変倍画像記憶部1008への変倍画像の書込みは、他の工程も同様であるが、入力された像域の像域位置から算出した変倍後の像域位置に基づいて行う。
【0101】
限定色文字線画変倍工程43は、入力された像域の像域形状に格納された二値画像を、既に出願人が出願している特願平3-345062号など、文字線画画像に適した公知の二値画像変倍方法により変倍し、その変倍画像を変倍画像記憶部1008へ書込む。限定色疑似中間調変倍工程44は、入力された像域の像域形状に格納された二値画像を、SPC変倍法などの二値画像変倍方法により変倍し、その変倍画像を変倍画像記憶部1008へ書込む。ただし、限定色文字線画変倍工程43および限定色疑似中間調変倍工程44は、変倍した二値画像の画素値が‘1’の場合は入力画像の画素値を書込み、画素値が‘0’の画素は書込みを行わないことによって、変倍画像の書込みを行う。なお、書込む値は、入力画像の画素値ではなく、入力された像域の像域色でもよく、そうすれば、入力画像に含まれるノイズを除去する効果が期待できる。
【0102】
モノクロ連続調変倍工程45は、入力された像域を線形補間を用いたカラー画像変倍方法などにより変倍し、その変倍画像を変倍画像記憶部1008へ書込む。
【0103】
限定値文字線画変倍工程46は、入力された像域の像域形状に格納された二値画像を、既に出願人が出願している特願平3-345062号など、文字線画画像に適した公知の二値画像変倍方法により変倍し、その変倍画像を変倍画像記憶部1008へ書込む。限定値疑似中間調変倍工程47は、入力された像域の像域形状に格納された二値画像を、SPC法などの二値画像変倍方法により変倍し、その変倍画像を変倍画像記憶部1008へ書込む。ただし、限定値文字線画変倍工程46および限定値疑似中間調変倍工程47は、入力された像域の像域形状に格納された二値画像を、SP変倍した二値画像の画素値が‘1’の場合は入力画像の画素値を書込み、画素値が‘0’の画素は書込みを行わないことによって、変倍画像の書込みを行う。なお、書込む値は、入力画像の画素値ではなく、入力された像域の領域色や黒(例えば出力画像がRGB各8ビットの場合はRGBすべての画素値が255)でもよく、そうすれば、入力画像に含まれるノイズを除去する効果が期待できる。
【0104】
また、変倍率は、予めROM204上に格納された値や、キーボードやディップスイッチなどによってユーザから指定された値を用いる。
【0105】
以上説明したように、本実施例によれば、カラー画像として入力した異なる成分をもつ像域が混在する文書画像に対して、カラー文書画像の特徴に基づいた像域分離を行うことにより、白以外の色をもつ背景(下地)が複数ある文書画像でも良好な像域分離が可能であり、分離した像域それぞれの特性に応じた変倍処理を施して、良好な画質の変倍カラー画像を得ることができる。
【0106】
【第2実施例】
以下、本発明にかかる第2実施例の画像処理装置を説明する。なお、第2実施例において、第1実施例と略同様の構成については、同一符号を付して、その詳細説明を省略する。
【0107】
[処理手順]
図25は本発明を画像処理装置のカラー画像圧縮処理に適用する場合の処理手順の一例を示す図で、カラー画像入力工程1から像域判定工程3およびカラー画像出力工程5は第1実施例と同様であり、その詳細説明は省略する。
【0108】
同図において、適応的圧縮工程6は、像域抽出工程2で抽出された各像域に対して、像域判定工程3で判定されたその像域の像域成分に応じた圧縮処理を施し、入力画像の圧縮データを作成し、圧縮データ出力工程7は、適応的圧縮工程6で作成された圧縮データを、図示しない通信路や画像蓄積装置へ出力する。圧縮データ入力工程8は、適応的圧縮工程6で圧縮されたデータを通信路や画像蓄積装置から入力し、カラー画像再生工程9は、適応的圧縮工程6で圧縮されたデータをカラー画像に再生する。なお、カラー画像入力工程1から圧縮データ出力工程7までは、カラー画像を圧縮する際に実行されるものであり、圧縮データ入力工程8からカラー画像出力工程5までは、圧縮データを再生する際に実行されるものである。
【0109】
[装置の構成]
図26は図25に示した処理を行う画像処理装置の構成例を示すブロック図で、図27は図26に示す構成を実現するハードウェアの一例を示すブロック図である。
【0110】
まず、図27から説明すると、本実施例においては、データ入力装置2010とデータ出力装置2011が追加され、ともにI/Oポート2005へ接続されている。
【0111】
図26において、カラー画像入力部1001は、処理を施すディジタルカラー画像を入力して、入力画像記憶部1006に格納する。像域抽出部1002は、入力画像記憶部1006に記憶された画像から像域を抽出し、抽出した像域データを像域データ記憶部1007に格納する。像域判定部1003は、像域抽出部1002により抽出された各像域の像域成分を判定し、像域データ記憶部1007に格納する。適応的圧縮部1014は、像域抽出部1002により抽出された各像域に対して、像域判定部1003で判定されたその像域の像域成分に応じた圧縮処理を施して、入力画像の圧縮データを作成し、その圧縮データを圧縮データ記憶部1012に格納する。
【0112】
圧縮データ出力部1009は、適応的圧縮部1014により圧縮され、圧縮データ記憶部1012に格納された圧縮データを出力する。なお、その出力先は通信路または画像蓄積装置などである。この圧縮データ出力部1009は、例えば、ROM2004または記憶装置2002に格納されたプログラムに従って動作するCPU2001の制御により、RAM2006または記憶装置2002に格納された圧縮データを、データ出力装置2011により出力することで構成することができる。
【0113】
圧縮データ入力部1011は、通信路や画像蓄積装置から圧縮データを入力し、圧縮データ記憶部1012に格納する。この圧縮データ入力部1011は、例えば、ROM2004または記憶装置2002に格納されたプログラムに従って動作するCPU2001の制御により、通信路を介して送られてきた圧縮データや、画像蓄積装置に蓄積された圧縮データを、データ入力装置2010により入力することで構成することができる。
【0114】
カラー画像再生部1010は、圧縮データ記憶部1012に格納された圧縮データからカラー画像を再生して再生画像記憶部1013に格納する。再生画像記憶部1013に格納された再生カラー画像は、カラー画像出力部1005により出力される。その出力先は、ディスプレイ、ハードコピーを行うプリンタや複写機、通信路、または、画像蓄積装置などである。
【0115】
なお、適応的圧縮部1014とカラー画像生成部1010は、例えば、ROM2004または記憶装置2002に格納されたプログラムに従って動作するCPU2001とワークメモリとして使用するRAM2004または記憶装置2002で構成することができる。勿論、専用のCPU,RAM,記憶装置で構成したり、専用のハードウェアにより構成しても構わない。また、圧縮データ記憶部1012と再生画像記憶部1013は、例えば、RAM2006または記憶装置2002で構成することができる。勿論、それぞれの記憶部を、専用の記憶装置で構成しても構わない。
【0116】
さらに、通信路を介して圧縮データをやり取りするなど、データの圧縮と再生を別々の装置で行う場合は、図28に示すように、データ圧縮を行う装置と、圧縮データを再生する装置というように、二つの機器を用いて実現することもできる。
【0117】
[圧縮データの形態]
次に、圧縮データの形態について説明するが、入力画像を圧縮した後も、図5Aに示した各像域をノードとするツリー構造は保持される。
【0118】
図29は圧縮データの構造例を示す図で、圧縮データは、画像サイズおよび各像域成分に対する圧縮方法が格納されたヘッダ(以下「圧縮データヘッダ」と呼ぶ)と、各像域の圧縮データ(以下「圧縮像域データ」と呼ぶ)から構成され、圧縮像域データにはその像域の像域データが含まれる。
【0119】
図30は圧縮像域データに含まれる像域データの形態例を示す図で、二種類の形態のうち、像域成分に応じてどちらかの形態の像域データが保持される。具体的には、「限定色文字線画像域」「限定色疑似中間調像域」「限定値文字線画像域」「限定値疑似中間調像域」の場合は、同図(a)に示す形態の像域データが保持される。なお、図30(a)に示す各要素は図5Bに示した各要素に対応する。ただし、第1実施例では像域の形状を示す二値画像を「像域形状」として登録したが、第2実施例においては、圧縮データヘッダに格納された圧縮方法で圧縮した二値画像を「像域形状」として登録する。
【0120】
一方、「カラー連続調像域」「モノクロ連続調像域」の場合は、図30(b)に示す形態の像域データが保持される。なお、「像域形状」と「像域画像データ」以外の各要素は図5Bに示した各要素と対応し、入力画像の像域位置に対応する部分を圧縮データヘッダに格納された圧縮方法で圧縮したデータを「像域画像データ」として登録し、限定値文字線画像域の圧縮方法で圧縮した二値画像を「像域形状」として登録する。
【0121】
[処理の詳細]
次に、図25に示した主な工程について、図26の構成を用いながら詳細に説明するが、カラー画像入力工程1から像域判定工程3およびカラー画像出力工程5は第1実施例と同様であり、その詳細説明は省略する。
【0122】
●適応的圧縮工程
適応的圧縮工程6は、像域抽出工程2で抽出された各像域に対して、像域判定工程3で判定された像域成分に応じた圧縮処理を施し、入力画像の圧縮データを作成する。
【0123】
図31は適応的圧縮工程6の詳細な手順の一例を示す図である。適応的圧縮工程6は、圧縮制御工程61により、その像域成分に応じた圧縮工程を像域ごとに適応して、それぞれの像域の圧縮データを作成し、その圧縮データを圧縮データ記憶部1012に格納する。具体的には、カラー連続調の像域はカラー連続調像域圧縮工程62で、限定色文字線画の像域は限定色文字線画像域圧縮工程63で、限定色疑似中間調の像域は限定色疑似中間調像域圧縮工程64で、モノクロ連続調の像域はモノクロ連続調像域圧縮工程65で、限定値文字線画の像域は限定値文字線画像域圧縮工程66で、限定値疑似中間調の像域は限定値疑似中間調像域圧縮工程67で、それぞれ圧縮する。以下、各工程を詳細に説明する。
【0124】
圧縮制御工程61は、圧縮されていない像域がなくなるまで、その像域成分に応じた圧縮行程を像域ごとに適応的に施す。
【0125】
カラー連続調像域圧縮工程62は、カラー連続調像域を圧縮し、作成した圧縮データを圧縮データ格納部1012に格納する。具体的には、処理するノードの像域位置に相当する画像部分を、カラー連続調に適した符号化方式により圧縮して、図30(b)に示した「像域画像データ」に登録する。また、像域データ記憶部1007に格納された像域データ中の「像域形状」を、限定値文字線画像域の圧縮方法で圧縮して、図30(b)に示した「像域形状」に登録し、その他の要素には像域データと同じ値を登録する。なお、カラー連続調に適した符号化方式としては、例えばDCTを用いるJPEG符号化方式などを利用する。
【0126】
限定色文字線画像域圧縮工程63は、限定色文字線画像域を圧縮し、作成した圧縮データを圧縮データ格納部1012に格納する。具体的には、処理するノードの像域形状に格納された二値画像を、限定色文字線画に適した符号化方式により圧縮して、図30(a)に示した「像域形状」に登録し、その他の要素には像域データと同じ値を登録する。なお、限定色文字線画に適した符号化方式としては、例えばMR/MMR符号化方式などを利用する。
【0127】
限定色疑似中間調像域圧縮工程64は、限定色疑似中間調像域を圧縮し、作成した圧縮データを圧縮データ格納部1012に格納する。具体的には、処理するノードの像域形状に格納された二値画像を、限定色疑似中間調に適した符号化方式により圧縮して、図30(a)に示した「像域形状」に登録し、その他の要素は像域データと同じ値を登録する。なお、限定色疑似中間調に適した符号化方式としては、例えばJBIG符号化方式などを利用する。
【0128】
モノクロ連続調像域圧縮工程65は、モノクロ連続調像域を圧縮し、作成した圧縮データを圧縮データ格納部1012に格納する。具体的には、処理するノードの像域位置に相当する画像部分を、モノクロ連続調に適した符号化方式により圧縮して、図30(b)に示した「像域画像データ」に登録する。また、像域データ記憶部1007に格納された像域データ中の「像域形状」を、限定値文字線画像域の圧縮方法で圧縮して、図30(b)に示した「像域形状」に登録し、その他の要素には像域データと同じ値を登録する。なお、モノクロ連続調に適した符号化方式としては、例えばJPEG符号化方式などを利用する。
【0129】
限定値文字線画像域圧縮工程66は、限定値文字線画像域を圧縮し、作成した圧縮データを圧縮データ格納部1012に格納する。具体的には、処理するノードの像域形状に格納された二値画像を、限定値文字線画に適した符号化方式により圧縮して、図30(a)に示した「像域形状」に登録し、その他の要素は像域データと同じ値を登録する。なお、限定値文字線画に適した符号化方式としては、例えばMR/MMR符号化方式を利用する。
【0130】
限定値疑似中間調像域圧縮工程67は、限定値疑似中間調の像域データを圧縮し、作成した圧縮データを圧縮データ格納部1012に格納する。具体的には、処理するノードの像域形状に格納された二値画像を限定値疑似中間調に適した符号化方式により圧縮して、図30(a)に示した「像域形状」に登録し、その他の要素は像域データと同じ値を登録する。なお、限定値疑似中間調に適した符号化方式としては、例えばJBIG符号化方式などを利用する。
【0131】
●カラー画像再生工程
カラー画像再生工程9は、圧縮データ記憶部1012に格納された圧縮データからカラー画像を再生する。
【0132】
図32はカラー画像再生工程9の詳細な手順の一例を示す図である。カラー画像再生工程9は、再生制御工程91により、圧縮像域データに含まれる像域データの「像域種類」に応じた再生工程を、像域ごとに施してカラー画像を再生し、そのカラー画像を再生画像記憶部1013へ格納する。具体的には、カラー連続調の場合はカラー連続調像域再生工程92で、限定色文字線画の場合は限定色文字線画像域再生工程93で、限定色疑似中間調の場合は限定色疑似中間調像域再生工程94で、モノクロ連続調の場合はモノクロ連続調再生工程95で、限定値文字線画の場合は限定値文字線画像域再生工程96で、限定値疑似中間調の場合は限定値疑似中間調像域再生工程97で、それぞれ再生し、それぞれ再生された像域を一つの再生画像に合成する。以下、各工程を詳細に説明する。
【0133】
再生制御工程91は、再生されていない圧縮像域データがなくなるまで、その像域種類に応じた再生工程を像域ごとに適応的に施す。像域の再生は、図24に示した順序で行う。つまり、像域データ(ツリー構造)に記述された像域ノードを、ルートノード(最上位ノード)から辿りながら行うが、各像域の再生は、それ自身よりも上位階のノードの一階下にある背景像域より先に行ってはならない。つまり、一つの中間像域の下にある像域を再生する場合は、背景像域から再生しなければならない。
【0134】
カラー連続調像域再生工程92は、カラー連続調の圧縮像域データからその像域を再生して、再生画像記憶部1013に格納する。図33はカラー連続調像域再生工程92の詳細な手順の一例を示すフローチャートで、例えばCPU2001によって実行されるものである。
【0135】
まず、ステップS701で、圧縮像域データの「像域形状」に登録されたデータを、圧縮データヘッダに格納された限定値文字線画像域の圧縮方法に対応する復号方法で復号することにより、像域形状を示す二値画像を再生してワークメモリに格納する。次に、ステップS702で、圧縮像域データの「像域画像データ」に登録されたデータを、圧縮データヘッダに格納されたカラー連続調像域の圧縮方法に対応する復号方法で復号することにより、像域画像データを再生してワークメモリに格納する。そして、ステップS703で、再生した二値画像の値が‘1’の画素に対応する、再生した像域画像データの画素を、再生画像記憶部1013に格納する。なお、再生画像記憶部1013への再生画像の書込みは、他の工程も同様であるが、圧縮像域データの「像域位置」から算出した位置に基づいて行う。
【0136】
限定色文字線画像域再生工程93は、限定色文字線画の圧縮像域データからその像域を再生して、再生画像記憶部1013に格納する。図34は限定色文字線画像域再生工程93の詳細な手順の一例を示すフローチャートで、例えばCPU2001によって実行されるものである。
【0137】
まず、ステップS801で、圧縮像域データの「像域形状」に登録されたデータを、圧縮データヘッダに格納された限定色文字線画像域の圧縮方法に対応する復号方法で復号することにより、像域形状を示す二値画像を再生してワークメモリに格納する。次に、ステップS802で、再生した二値画像の値が‘1’の画素に対応する、再生画像記憶部1013の位置へ、圧縮像域データの「像域色」に登録された画素を格納する。
【0138】
限定色疑似中間調像域再生工程94は、限定色疑似中間調の圧縮像域データからその像域を再生して、生成画像記憶部1013に格納する。限定色疑似中間調像域再生工程94は、図34に示した限定色文字線画像域再生工程93と同様の手順で像域を再生する。
【0139】
モノクロ連続調像域再生工程95は、モノクロ連続調の圧縮像域データからその像域を再生して、再生画像記憶部1013に格納する。モノクロ連続調像域再生工程95は、図33に示したカラー連続調像域再生工程92と同様の手順で像域を再生する。
【0140】
限定値文字線画像域再生工程96は、限定値文字線画の圧縮像域データからその像域を再生して、再生画像記憶部1013に格納する。限定値疑似中間調像域再生工程97は、限定値疑似中間調の圧縮像域データからその像域を再生して、再生画像記憶部1013に格納する。限定色文字線画像域再生工程96および限定値疑似中間調像域再生工程97は、図34に示した限定色文字線画像域再生工程93と同様の手順で像域を再生する。
【0141】
以上説明したように、本実施例によれば、カラー画像として入力した異なる成分をもつ像域が混在する文書画像に対して、カラー文書画像の特徴に基づいた像域分離を行うことにより、白以外の色をもつ背景(下地)が複数ある文書画像でも良好な像域分離が可能であり、分離した像域それぞれの特性に応じた圧縮処理を施して、良好な圧縮率の圧縮データを得ることができるとともに、その圧縮データに含まれる圧縮像域データを、その像域の特性に応じた方法で伸長して、良好な画質で再生されたカラー画像を得ることができる。
【0142】
【第3実施例】
以下、本発明にかかる第3実施例の画像処理装置を説明する。なお、第3実施例において、第1実施例と略同様の構成については、同一符号を付して、その詳細説明を省略する。
【0143】
次に、カラー原稿画像を構造化したデータとしてDTP装置へ入力するために、本発明を文書画像を編集する画像処理装置に適用する実施例を説明する。
【0144】
図35は本発明を画像処理装置の文書画像編集処理に適用する場合の処理手順の一例を示す図で、カラー画像入力工程1から像域判定工程3は第1実施例と同様であり、その詳細説明は省略する。
【0145】
データ変換工程10は、像域判定工程3まで工程で作成された像域データを、像域ごとに、DTP装置などで文書画像を編集するのに適したデータ形式の画像データに変換する。これにより、入力画像を、像域判定工程3までの工程で分離した像域ごとに、文書画像編集処理へ入力することができ、その編集も像域ごと行うことが可能になる。
【0146】
なお、データ変換工程10においては、限定色文字線画または限定値文字線画像域に含まれる文字や記号などついて、ユーザの指示に応じて、文字認識により文字コードに変換することもできる。また、限定色文字線画または限定値文字線画像域について、ユーザの指示に応じて、ラスタベクトル変換によりベクトルデータに変換することもできる。
【0147】
文書画像編集工程11は、ユーザの指示に従って、文書画像を編集して、その編集結果の文書画像を出力する。
【0148】
以上の処理は、DTP装置上で実現することもできるし、第1実施例に示した専用の装置上で実現することもできる。
【0149】
以上説明したように、本実施例によれば、カラー画像として入力した異なる成分をもつ像域が混在する文書画像に対して、カラー文書画像の特徴に基づいた像域分離を行うことにより、白以外の色をもつ背景(下地)が複数ある文書画像でも良好な像域分離が可能であり、カラー原稿画像を構造化して、DTP装置などの文書画像編集装置へ入力することができるとともに、分離した像域それぞれの特性に応じた編集処理を施して、画質の良好なカラー文書画像を得ることができる。
【0150】
【第4実施例】
以下、本発明にかかる第4実施例の画像処理装置を説明する。なお、第4実施例において、第1実施例と略同様の構成については、同一符号を付して、その詳細説明を省略する。
【0151】
前述した第1実施例においては、中間像域に背景像域があるか否かを判定するとともに、背景像域を分離する背景像域分離工程として、処理対象の中間像域の大部分を占める同一色の像域を背景像域として抽出する例を説明した。この方法は、多くのカラー文書画像において有効であるが、明るさや色の変化が少ない部分がある写真画像などの連続調像域を含むカラー文書画像においては、本来は、一つの像域と判断されなくてはならない連続調像域に背景像域があると判断されて、連続調像域が背景像域と中間像域へ過分割されてしまうことがある。
【0152】
そこで、本実施例においては、抽出した背景像域が適切か否かを判定することによって、明るさや色変化が少ない部分がある連続調像域の過分割を防いだ背景像域分離工程を説明する。
【0153】
図36は本実施例の背景像域分離工程22の詳細な手順の一例を示す図で、第1実施例の図7に対応するものである。
【0154】
同図において、背景色抽出工程221は、入力された中間像域の色を解析し、背景像域の色を抽出する。具体的には、入力された中間像域において、一番多い色、または、その色に近い色をもつ画素が他の色の場合に比べて一番多い色を抽出する。背景像域抽出工程222は、抽出された背景像域の色を用いて、背景像域の二値画像を作成する。背景像域判定工程223は、作成された二値画像の示す像域が背景画像として適切かどうかを判定し、適切であると判定した場合は背景像域整形工程224に処理を移し、不適切と判定した場合は背景像域なしとして処理を終了するか、背景像域抽出工程222へ処理を戻して、処理パラメータを変更して、再度、背景像域を抽出させる。背景像域整形工程224は、背景像域として適切であると判定された像域を示す二値画像に対して、ノイズや小像域の除去を行い、背景像域の整形を行うとともに、小像域などの除去処理により背景像域がなくならないかを確認する。
【0155】
図37は背景像域を判定する処理の概要を説明する図で、同図(a)は背景像域を含む中間像域から背景像域を抽出した例、同図(b)は写真などの連続調像域の中間像域から背景像域を抽出した例、同図(c)はノイズの多いカラー文書画像の中間像域から背景像域を抽出した例である。背景像域判定工程223は、同図(a)に示すような抽出結果に対しては適切な背景像域であると判定し、同図(b)(c)に示すような抽出結果に対しては不適切な背景像域であると判定する。つまり、背景像域判定工程223は、同図(b)に示すように、抽出された像域の外周形状が入力された中間像域の辺部から離れている場合は、明るさや色の変化が少ない連続調部分と判断して、抽出された像域は背景画像として不適切であると判定する。また、同図(c)に示すように、新たに生成される中間像域、つまり背景像域として抽出された像域に含まれない部分に小面積の像域(中間像域として意味がない)が多数存在する場合は、例えば背景像域として抽出する色範囲が狭いため、背景像域が充分に抽出されていないと判断して、抽出された像域は背景画像として不適切であると判定する。
【0156】
図38は背景像域判定工程223の詳細な手順の一例を示す図である。背景像域形状判定工程2231は、前述したように、背景像域として抽出された像域の形状が、入力された中間像域に充分広がっているかから、どうかを判定する。生成中間像域判定工程2232は、前述したように、新たに生成される中間像域に小面積の像域が多数存在するどうかを判定する。
【0157】
図39から図41はCPU2001の処理により本実施例の背景像域分離工程22を実現する手順の一例を示すフローチャートで、第1実施例の図8に対応するものである。
【0158】
ステップS901からS902が背景色抽出工程221に対応する。ステップS901で色ヒストグラムをワークメモリ上に作成し、ステップS902で最大頻度の色(つまり背景色の候補)を得る。
【0159】
ステップS903は、背景像域抽出工程222に対応し、最大頻度の色に近い色をもつ画素とそれ以外の画素とに二値化した中間像域の二値画像をワークメモリ上に作成する。例えば、最大頻度の色に近い色をもつ画素を‘1’、それ以外の画素を‘0’にした二値画像を作成する。ここで、注目画素が最大頻度の色に近い色をもつか否かは、例えば、次式によって距離Dを求めることによって行う。つまり、得られた距離Dが所定の範囲(以下「背景範囲」と呼ぶ)内にある場合に近い色をもつと判定する。

Figure 0003647071
【0160】
なお、背景範囲の値は、その初期値にROM2004などに格納されたデータを用いるが、背景像域判定工程223の判定結果に応じて変更される。
【0161】
ステップS904からS908は背景像域形状判定工程2231に対応する。ステップS904で背景像域として抽出された像域の外側の面積(以下「背景外面積」と呼ぶ)を計測し、ステップS905で入力された中間像域の面積を計測する。
【0162】
図42は背景外面積の計測方法の一例を説明する図で、最初に、入力された中間像域の各副走査について、左右の中間像域境界から背景像域として抽出された像域の辺部に達するまで(図の矢印に対応する)の、フラグが立っていない画素数(面積)を計測するとともに、計測した画素にはフラグを立てる。次に、各主走査について同様の計測を行うが、副走査における計測でフラグが立った画素については計測しない。
【0163】
次に、ステップS906で、計測した背景外面積と中間像域の面積との比(背景外面積/中間像域面積、以下「背景外面積比」と呼ぶ)を求めて、その比と所定の閾値とを比較する。そして、閾値よりも比が大きいときは抽出された像域が背景像域として適切であると判断してステップS909へ進み、そうでないときは背景像域として不適切であると判断してステップS907へ進む。
【0164】
ステップS907およびS908は、再度、背景像域の抽出を行なうか判定するもので、この判定には、最初の背景像域形状の判定かどうかを示す再抽出フラグAと、再抽出を行う直前の背景外面積比(以下「前回抽出比」という)を用いる。なお、これらの値はRAM2006に格納される。ステップS907で、再抽出フラグAを判定して、最初の判定であればステップS903へ戻って再抽出を実行し、そうでなければステップS908へ進んで、(背景外面積比/前回抽出比)と所定の閾値とを比較して、閾値の方が大きければステップS903へ戻って再抽出を実行し、そうでなければ背景像域なしと判定して処理を終了する。なお、再抽出を行う場合は背景色範囲を増加し、入力された中間像域の背景像域の判定が終了すると、再抽出フラグAと背景色範囲をリセットする。
【0165】
ステップS909からS915は生成中間像域判定工程2232に対応する。ステップS909で背景像域を示す二値画像を白黒反転し、ステップS910で反転した二値画像から連結成分を抽出し、ステップS911で抽出した連結成分の面積を計測し、ステップS912でその面積が所定の閾値以下の連結成分(以下「小連結成分」と呼ぶ)の数を計測する。そして、ステップS913で、小連結成分の数と所定の閾値とを比較して、その数が閾値よりも小さければ抽出された像域が背景像域として適切であると判断してステップS916へ進み、そうでないときは背景像域として不適切であると判断してステップS914へ進む。
【0166】
ステップS914およびS915は、再度、背景像域の抽出を行なうか判定するもので、この判定には、最初の生成中間像域の判定かどうかを示す再抽出フラグBと、再抽出を行う直前の小連結成分の数(以下「前回抽出数」という)を用いる。なお、これらの値はRAM2006に格納される。ステップS914で、再抽出フラグBを判定して、最初の判定であればステップS903へ戻って再抽出を実行し、そうでなければステップS915へ進んで、(小連結成分の数/前回抽出数)と所定の閾値とを比較して、閾値の方が大きければステップS903へ戻って再抽出を実行し、そうでなければ背景像域なしと判定して処理を終了する。なお、再抽出を行う場合は背景色範囲を増加し、入力された中間像域の背景像域の判定が終了すると、再抽出フラグBと背景色範囲をリセットする。
【0167】
ステップS916からS920は背景像域整形工程224に対応する。ステップS916で、例えば公知の縮小/膨張処理を施すことにより、抽出された背景像域を示す二値画像からノイズを除去し、ステップS917からステップS919でノイズを除去した二値画像から小像域を除去する。まず、ステップS917で、ノイズを除去した二値画像に対して、例えば公知のラベリング処理により、ワークメモリ上にラベル画像を作成して連結成分の抽出を行う。ラベル画像は、各連結成分に一意の番号を付けて、その番号を各連結成分の画素値にした画像である。次に、ステップS918で各連結成分の画素数(面積)を求めてワークメモリに格納し、ステップS919で、画素数が閾値以下の連結成分(小面積の連結成分)を削除、つまり、二値画像のその連結成分に対応する画素の値を‘0’にする。
【0168】
そして、ステップS920で、残った連結成分(背景像域)があるかを判定し、残っていれば背景像域ありと判断し、残っていなければ背景像域なしと判断する。なお、背景像域がある場合は、ワークメモリ上に背景像域を示す二値画像が残る。
【0169】
以上説明したように、本実施例によれば、抽出した背景像域が適切か否かを判定することによって、明るさや色変化が少ない部分があるカラー文書画像や、ノイズが多いカラー文書画像についても、像域を過分割することがない背景像域分離工程を提供することができる。
【0170】
なお、本発明は、複数の機器から構成されるシステムに適用しても、一つの機器からなる装置に適用してもよい。
【0171】
また、本発明は、システムあるいは装置にプログラムを供給することによって達成される場合にも適用できることはいうまでもない。
【0172】
【発明の効果】
以上説明したように、本発明によれば、特性が異なる像域が混在したカラー画像の処理対象領域から背景像域を分離するステップと、その背景像域以外の像域を少なくとも一つの像域に分離するステップとを再起的に繰り返して像域を判定する、つまり背景像域に注目した像域抽出を行うことで、特性が異なる像域が混在したカラー画像に対して、良好な処理を施すことができる。例えば、カラー文書画像に良好な処理(画像の変倍、データ量の削減、データの構造化など)を施すことができる。
【図面の簡単な説明】
【図1】本発明における像域分離手順の一例を示す図である。
【図2】本発明を画像処理装置のカラー画像変倍処理に適用する場合の処理手順の一例を示す図、
【図3】図2に示す処理を行う画像処理装置の構成例を示すブロック図、
【図4】図3に示す構成を実現するハードウェアの一例を示すブロック図、
【図5A】像域データの概略を示す図、
【図5B】図5Aに示す各ノードを表すデータの一例を示す図、
【図6】図1に示す像域抽出工程の詳細な手順の一例を示す図、
【図7】図6に示す背景像域分離工程の詳細な手順の一例を示す図、
【図8】図4に示すCPUの処理により背景像域分離工程を実現する手順の一例を示すフローチャート、
【図9】図4に示すCPUの処理により中間像域分離工程を実現する手順の一例を示すフローチャート、
【図10】図4に示すCPUの処理により像域登録工程を実現する手順の一例を示すフローチャート、
【図11】図1に示す像域判定工程の詳細な手順の一例を示す図、
【図12】四つの像域成分におけるRGB値の分布例を示す図、
【図13】図4に示すCPUの処理によりカラー/モノクロ判定工程を実現する手順の一例を示すフローチャート、
【図14】図4に示すCPUの処理によりカラー/モノクロ判定工程を実現する手順の他の例を示すフローチャート、
【図15】図4に示すCPUの処理によりカラー連続調/限定色判定工程を実現する手順の一例を示すフローチャート、
【図16】図4に示すCPUの処理によりモノクロ連続調/限定値判定工程を実現する手順の一例を示すフローチャート、
【図17】文字線画像域か擬似中間調像域かを判別する像域分離部の構成例を示すブロック図、
【図18】図17に示す像域分離部の処理を説明する図、
【図19】図17に示すデータ保持部の構成例を示すブロック図、
【図20】図17に示す像域分離部の処理を説明する図、
【図21】図17に示す像域分離部の処理を説明する図、
【図22】図17に示す像域分離部の処理を説明する図、
【図23】図1に示す適応的変倍工程の詳細な手順の一例を示す図、
【図24】変倍を施す像域の順序の一例を示す図、
【図25】本発明を画像処理装置のカラー画像圧縮処理に適用する場合の処理手順の一例を示す図、
【図26】図25に示す処理を行う画像処理装置の構成例を示すブロック図、
【図27】図26に示す構成を実現するハードウェアの一例を示すブロック図、
【図28】図25に示す処理を行う画像処理装置の他の構成例を示すブロック図、
【図29】圧縮データの構造例を示す図、
【図30】圧縮像域データに含まれる像域データの形態例を示す図、
【図31】図25に示す適応的圧縮工程の詳細な手順の一例を示す図、
【図32】図25に示すカラー画像再生工程の詳細な手順の一例を示す図、
【図33】図32に示すカラー連続調像域再生工程の詳細な手順の一例を示すフローチャート、
【図34】図32に示す限定色文字線画像域再生工程の詳細な手順の一例を示すフローチャート、
【図35】本発明を画像処理装置の文書画像編集処理に適用する場合の処理手順の一例を示す図、
【図36】本発明にかかる第4実施例の背景像域分離工程の詳細な手順の一例を示す図、
【図37】背景像域を判定する処理の概要を説明する図、
【図38】図36に示す背景像域判定工程の詳細な手順の一例を示す図、
【図39】図38に示す背景像域分離工程を実現する手順の一例を示すフローチャート、
【図40】図38に示す背景像域分離工程を実現する手順の一例を示すフローチャート、
【図41】図38に示す背景像域分離工程を実現する手順の一例を示すフローチャート、
【図42】背景外面積の計測方法の一例を説明する図である。
【符号の説明】
1 カラー画像入力工程
2 像域抽出工程
3 像域判定工程
4 適応的変倍工程
5 カラー画像出力工程
6 適応的圧縮工程
7 圧縮データ出力工程
8 圧縮データ入力工程
9 カラー画像再生工程
10 データ変換工程
11 文書画像編集工程[0001]
[Industrial application fields]
The present invention relates to an image forming apparatus and a method therefor, for example, to image processing for extracting image areas having different characteristics from a color image and determining the characteristics of the image areas.
[0002]
[Prior art]
In recent years, color image input / output devices have begun to spread in the OA field, and as a result, color images (hereinafter referred to as “images”) that are mainly composed of text, and that are mostly black-and-white and parts with a limited number of colors. Opportunities to handle color images read by an input device such as a scanner are increasing. However, compared to other images, text images are characterized by a mixture of different image areas (character image areas, photo image areas, etc.). Even if a processing method such as data amount reduction is used as it is, an image with good image quality may not be obtained. There is also a growing demand for digital data that is a structured color image of a manuscript, that is, characters in the manuscript are used as character codes, photos are entered as image data into a computer, and reused on a DTP (Desk Top Publishing) device. .
[0003]
Next, an image scaling process technique, a data amount reduction technique, and an image area separation technique (including document image structuring) will be described.
[0004]
[Scale processing]
As a method of scaling the image (including pixel density conversion), each pixel of the original image is periodically thinned (reduced) according to the scaling ratio, and each pixel is repeated (enlarged) according to the scaling ratio. SPC (Selective Processing Conversion) method for scaling (Matsumoto, Kobayashi: A study of image quality evaluation in facsimile resolution conversion, Journal of the Institute of Image Electronics Engineers of Japan, Vol.12, No.5, pp.354-356, 1983) and coordinate conversion There is a method of obtaining a pixel value by interpolating neighboring values after performing (affine transformation or the like).
[0005]
As a method for scaling a binary image, there is a method proposed by the present applicant. This method relates to an apparatus for extracting contour information of a binary image, and performing smoothing / scaling. An outline vector is extracted from a binary image, and a desired magnification ( (Optional), by creating a smoothly scaled outline vector and playing a binary image from the smoothly scaled outline vector, a high-quality digital image scaled at the desired magnification (optional) Is what you get.
[0006]
[Data reduction]
As a method of reducing the amount of data when storing and communicating images, there is a data amount reduction method such as a coding method using discrete cosine transform (DCT) by JPEG (Joint Photographic Expert Group). is there. Also, after converting the color image to a uniform color space, region division is performed using the color difference, the shape of the region is chain coded, the hue is coarsely quantized using a memory color for each region, and the saturation is divided for each region. Polynomial approximation and lightness are encoded by adaptive discrete cosine transform encoding (Journal of IEICE BI, Vol.75-BI, No.6, pp422-430, June 1992) Proposed.
[0007]
Also, methods for reducing the data amount of binary images include MR / MMR coding and JBIG (Joint Bi-level Image Group) coding methods.
[0008]
[Image separation (including document image structuring)]
As a method of separating the image area of a color image, a recursive threshold method (structuring of color image information by area division processing, information processing, Vol.19, No.12, pp.1130-1136, Dec. 1987) is used. is there. In this method, for a color image, the process of determining the area division threshold from the valley of the histogram in the RGB, HSI, and TIQ color features and extracting the area is recursively performed for each extracted area. Repeat. Also, a limited color expression method, that is, a method using a color quantization method that repeatedly divides the color distribution until the number of colors that cannot be discerned by human vision is reached (1990 IEICE Spring National Conference D146 7- 168).
[0009]
An image area separation method for document images is a method of determining the image area for each pixel using information on neighboring pixels (Tetsuya, Akada: binarization processing of a document containing binary images and grayscale images) Law, the IEICE Transactions, Vol.J65-D, No.1, pp.307-314, 1982) and the nature of the image area is delimited by the background. There is a method of determining the image area after separating the image areas (Ito et al .: Parallel field segmentation method of free format documents, 1984 Information Processing Society of Japan 20th National Convention, pp.453-454). Some of these proposals include the application of the image region separation results to document image structuring (eg, Yamada et al .: Multimedia document structure processing system, Journal of the Institute of Image Electronics Engineers of Japan, Vol.19, No. 5, pp.286-295, 1990).
[0010]
[Problems to be solved by the invention]
However, the conventional example has the following problems.
[0011]
[Scale processing]
Although the SPC scaling method can easily create a scaled image, there is a problem in image quality, such as the shaded portion being stepped.
[0012]
In addition, the scaling method using coordinate transformation is effective for natural images such as landscapes, but when applied to document images, the edge of character line drawings such as characters and graphs is blurred by interpolation processing. is there.
[0013]
The binary image scaling method proposed by the present applicant is extremely effective as a method for extracting and smoothing / scaling the contour information of the binary image. It cannot be applied directly to the double.
[0014]
[Data reduction]
The method of reducing the amount of data by the encoding method using the discrete cosine transform (DCT) is effective for natural images, but when the document image is compressed and played back, the image quality deteriorates in the character line drawing parts such as characters and graphs. There is a problem that is large.
[0015]
Since the method of dividing and coding the region is also for a natural image, the lightness information occupies most of the total information amount because the lightness is adaptive discrete cosine transform coding. For this reason, although it is effective for a continuous tone portion of a color image, a black and white portion and a limited color portion occupy most of the document, and the encoding efficiency is poor in a document where the importance of lightness information is low.
[0016]
MR / MMR encoding and JBIG encoding methods are effective when reducing the amount of binary image data, but cannot be applied directly when reducing the amount of color or grayscale data. .
[0017]
[Image separation]
The image area separation method using the recursive threshold method and the limited color expression method can be applied to the segmentation of natural images, but the image areas that are different in nature from the natural images (because the definition of the image area is different). It cannot be applied directly to mixed document images.
[0018]
Further, the image area separation method (including text structuring) for the document image described above is intended for binary images and grayscale images, and has a feature that image areas are often superimposed. It is difficult to apply to color images.
[0019]
As described above, many of the proposed scaling methods, data reduction methods, and image area separation methods are intended for natural images, and even when applied to document images, sufficient effects cannot be expected. In addition, those proposed methods for document images target binary images and grayscale images, and none can be directly applied to color images.
[0020]
An object of the present invention is to solve the above-described problems, and an object of the present invention is to perform favorable processing on a color image in which image areas having different characteristics are mixed.
[0021]
[Means for Solving the Problems]
The present invention has the following configuration as one means for achieving the above object.
[0022]
An image processing method according to the present invention includes an input step of inputting a color image, an extraction step of focusing on the background image area of the input color image and extracting an image area having different characteristics from the color image, and an extracted image A determination step for determining characteristics of each of the regions, and the extraction step includes a first separation step of separating a background image region from a processing target region of the color image, and an image other than the separated background image region. A second separation step of separating the region into at least one image region, wherein the image region is extracted by recursively repeating the first and second separation steps in the separated image region .
[0023]
An image processing apparatus according to the present invention includes: an input unit that inputs a color image; an extraction unit that extracts an image area having different characteristics from the color image by paying attention to a background image area of the input color image; Determination means for determining characteristics of each image area, and the extraction means includes first separation means for separating a background image area from a processing target area of the color image, and other than the separated background image area Including second separation means for separating the image area into at least one image area, and extracting the image area by recursively repeating the processing by the first and second separation means in the separated image area It is characterized by.
[0024]
【Example】
The outline of the present invention is to extract each image area and determine the component of a color document image in which image areas having different components are mixed, and pay attention to the image area that becomes the background (background). Are extracted, and components of each image area (hereinafter referred to as “image area components”) are determined.
[0025]
Here, the image area component indicates the properties of the image area such as whether the image area is composed of characters or line drawings, a photograph, or a color image area. In the following, as an example of the image area component, the image area of the document image is “color continuous tone” “limited color character line drawing” “limited color pseudo halftone” “monochrome continuous tone” “limit value character line drawing” “limited value pseudo intermediate” A description will be given assuming that any of the image area components of “tone” is included. Details of these image area components are as follows, but of course, image area components by simpler or more detailed classification can also be used.
Continuous color: Image area where the original is a color photograph
Limited-color character line drawing: Image area where the original is a character or line drawing of a color other than black
Limited-color pseudo-halftone: An image area that is a photograph of a manuscript that has been processed by pseudo-halftone processing.
Monochrome continuous tone: Image area where the document is a black and white photo in gray
Limited-value text line drawing: Image area where the original is black and white text or line drawing
Limited-value pseudo halftone: An image area that is a photograph of a manuscript that has been processed into a black and white pseudo halftone.
[0026]
Next, the image area separation of the color document image which is the center of the present invention will be briefly described.
[0027]
It is considered that the image area having the above-described image area component in the document image is divided by the background (background). In other words, the image area can be extracted by separating the input image at a portion delimited by the background. However, a black and white document generally has a background color of “white”, but a color document does not always have a background color of “white”. In the case of a color document, many backgrounds having other colors are superimposed on a certain background. Therefore, in the present invention, image area separation is performed by recursively repeating background extraction and background-based image area division for an image area (initially an input image).
[0028]
FIG. 1 is a diagram showing an example of an image area separation procedure in the present invention.
[0029]
First, a background 5002 is extracted from the input image 5001, and then image areas 5003 and 5004 that can be separated using the background 5002 are extracted. For the image area 5003, since no further background can be extracted, the image area separation is terminated. On the other hand, for the image area 5004, since the background 5005 can be further extracted, the image area separation is continued. An image area component is determined for each image area thus separated.
[0030]
In the following, an image area indicating the background is referred to as a “background image area”, and an image area indicating other than the background is referred to as a “general image area”. Also, for convenience, an image area that is in the middle of processing, that is, an image area that has not been determined whether it contains a background or an image area that includes a plurality of image areas is referred to as an “intermediate image area”, and an image that has undergone division processing A region (including a background image region) is called a “terminal image region”. The input image is also an intermediate image area.
[0031]
Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings.
[0032]
An image processing apparatus and method described below are provided for devices that handle color text images, for example, pixel density conversion and scaling output of a color printer, enlargement / reduction of a DTP apparatus, and pixel density conversion at the time of output, a color facsimile apparatus It can be used for pixel density conversion and variable magnification output. Further, it can be used to reduce the amount of data during image communication in a network device such as a color facsimile or a LAN, and when a color image is stored in a storage device such as a magnetic disk device. Further, it can be used for data structuring when inputting a paper original in a DTP device or the like.
[0033]
[First embodiment]
[Processing procedure]
FIG. 2 is a diagram showing an example of a processing procedure when the present invention is applied to the color image scaling process of the image processing apparatus.
[0034]
In the figure, a digital color image to be processed in the color image input process 1 is input, an image area is extracted from the color image input in the image area extraction process 2, and data of the extracted image area is created. Next, the image area component of each image area extracted in the image area determination step 3 is determined, and in the adaptive scaling process 4, the scaling process according to the determined image area component is performed on each extracted image area To create a scaled image of the input image. Then, in the color image output step 5, the created scaled image is displayed, output as a hard copy, or output to a communication path.
[0035]
[Device configuration]
FIG. 3 is a block diagram illustrating a configuration example of the image processing apparatus that performs the processing illustrated in FIG. 2, and FIG. 4 is a block diagram illustrating an example of hardware that realizes the configuration illustrated in FIG.
[0036]
First, from FIG. 4, 2001 is a CPU, 2007 is a bus that connects the CPU 2001 and the following components to each other, 2004 is a ROM that stores programs and data executed by the CPU in advance, 2006 is a work of the CPU 2001 RAM used, 2002 is a storage device such as a hard disk or magneto-optical disk for storing programs and images, 2003 is a disk I / O for data input / output of the storage device 2002, 2008 is a color image input device, 2009 is color An image output device 2005 is an I / O port for data input / output of the color image input / output devices 2008 and 2009.
[0037]
The CPU 2001 controls each component via the bus 2007 in accordance with a program stored in advance in the ROM 2004, the storage device 2002, and the like, and uses the RAM 2006 as a work area, and the color image input from the color image input device 2008 and the storage device 2002. The result of processing the color image stored in is output to the color image output device 2009.
[0038]
In FIG. 3, a color image input unit 1001 inputs a digital color image to be processed and stores it in the input image storage unit 1006. The color image input unit 1001 inputs a color image with the color image input device 2009 and stores it in the RAM 2006 or the storage device 2002 under the control of the CPU 2001 that operates according to a program stored in the ROM 2004 or the storage device 2002, for example. Can be configured. The color image input unit 1001 is an input unit that reads an image with a color image scanner, an input unit that receives a color image from a communication channel, or an input unit that reads a color image stored in an image storage device. It is also possible to use a combination of these.
[0039]
The image area extraction unit 1002 extracts an image area from the image stored in the input image storage unit 1006, and stores the extracted image area data in the image area data storage unit 1007. The image area determination unit 1003 determines the image area component of each image area extracted by the image area extraction unit 1002 and stores it in the image area data storage unit 1007. The adaptive scaling unit 1004 performs scaling processing according to the image area component determined by the image area determination unit 1003 on each image area extracted by the image area extraction unit 1002, and scales the input image. The scaled image is created, and the scaled image is stored in the scaled image storage unit 1008. The image area data storage unit 1007 stores information indicating the attributes of each image area.
[0040]
The image area extraction unit 1002, the image area determination unit 1003, and the adaptive scaling unit 1004 are configured by, for example, a CPU 2001 that operates according to a program stored in the ROM 2004 or the storage device 2002, and a RAM 2004 or storage device 2002 that is used as a work memory. can do. Of course, each may be configured by a dedicated CPU, RAM, and storage device, or by dedicated hardware.
[0041]
The color image output unit 1005 outputs the scaled image created by the adaptive scaling unit 1004 and stored in the scaled image storage unit 1008. The output destination is a display, a printer or copier that performs hard copy, a communication path, an image storage device, or the like. The color image output unit 1005 outputs, for example, a scaled image stored in the RAM 2006 or the storage device 2002 by the color image output device 2009 under the control of the CPU 2001 that operates according to a program stored in the ROM 2004 or the storage device 2002. Can be configured.
[0042]
Further, the input image storage unit 1006, the image area data storage unit 1007, and the scaled image storage unit 1008 can be configured by the RAM 2006 or the storage device 2002, for example. Of course, each storage unit may be configured by a dedicated storage device.
[0043]
[Process Details]
Next, the main steps shown in FIG. 2 will be described in detail using the configuration of FIG.
[0044]
● Image area extraction process
In the image area extraction step 2, the image area is extracted from the color image stored in the input image storage unit 1006 in the color image input step 1, the extracted image area data is created, and the data is stored in the image region data storage unit 1007. Store.
[0045]
Here, image area data (hereinafter referred to as “image area data”) will be described.
[0046]
FIG. 5A is a diagram showing an outline of image area data. The image area data represents an image area group of the input image by a tree structure having each image area as a node. The parent-child relationship of the tree structure represents the inclusive relation of the image area, and the node indicating the intermediate image area has one background image area in the intermediate image area and several child nodes representing the intermediate image area or the general image area.
[0047]
FIG. 5B is a diagram showing an example of data representing each node, that is, an individual image area. Each image area data is composed of “image area type”, “image area position”, “image area shape”, “image area component”, “image area color”, “parent node”, and “child node”. become.
Image area type: Indicates the type of the image area (background image area, general image area, intermediate image area)
Image area position: Indicates the coordinate position (upper left xy coordinate, width, height) of the circumscribed rectangle surrounding the image area
Image area shape: A representation of the image area shape as a binary image.
Image area component: Indicates which image area component the image area was determined to be
Image area color: Stores the average RGB value of the image area in the case of limited color or limited value image area components
Parent node: Pointer to the parent node
Child node: multiple pointers to child nodes
[0048]
Note that black pixels (pixel value = '1') in the binary image representing the image area shape indicate the image area, and the size of the binary image and the position on the input image are the rectangular positions indicated in the image area position. Corresponding to
[0049]
FIG. 6 is a diagram showing an example of a detailed procedure of the image area extraction step 2. In FIG. As described above, the image area extraction process 2 uses the intermediate image area (including the input image) in the image as the background image area until the unseparated image area search process 21 determines that the image area separation process 20 is completed. Then, the image area separation step 20 for further separation into the intermediate image area is recursively repeated to extract the image area.
[0050]
The unseparated image area search step 21 searches the image area data stored in the image area data storage unit 1007 and searches for an intermediate image area that has not been separated, that is, an intermediate image area having no child nodes. When there is an intermediate image area that has not been separated in the image area data, the image area separation step 20 is performed using the intermediate image area as the input intermediate image area. If there is no intermediate image area that has not been separated in the image area data, the image area extraction step 2 is terminated.
[0051]
The image area separation step 20 inputs an intermediate image area (including an input image) and determines whether the input intermediate image area can further separate a background image area and several intermediate image areas. When it is determined that separation is not possible, the input intermediate image area is determined as the terminal image area, and the information is registered in the image area data of the image area stored in the image area data storage unit 1007. If it is determined that the image can be separated, the background image area and several intermediate image areas are separated from the input intermediate image area, and the information is stored in the image area data of the image area stored in the image area data storage unit 1007. register.
[0052]
Specifically, for example, when it is determined that the image area 5003 shown in FIG. 1 is the input intermediate image area and the intermediate image area cannot be separated from the image area 5003, the image area 5003 is determined as the terminal image area. Further, when it is determined that the image area 5004 shown in FIG. 1 is an input intermediate image area and the intermediate image area can be separated from the image area 5004, the background image area 5005 and the intermediate image area 5006 are separated from the image area 5004.
[0053]
The background image area separation step 22 determines whether or not there is a background image area in the input intermediate image area. If it is determined that there is a background image area, the background image area is separated. The intermediate image area separation step 23 separates an image area other than the image area separated as the background image area in the background image area separation step 22 into several intermediate image areas using a geometric relationship. Specifically, connected pixels or geometrically connected components are defined as one intermediate image area. The image area registration process 24 registers the image areas separated in the background image area separation process 22 and the intermediate image area separation process 23 in the image area data storage unit 1007. Details of the background image region separation step 22, the intermediate image region separation step 23, and the image region registration step 24 will be described below.
[0054]
FIG. 7 is a diagram showing an example of a detailed procedure of the background image area separation step 21. In FIG. The background color extraction step 211 analyzes the color of the input intermediate image area and determines whether there is a color indicating the background image area in the input intermediate image area. Specifically, the determination is made based on whether pixels having a specific color range occupy most of the input intermediate image area. In the binarization step 212, a binary image indicating the background image region is created using the color indicating the background image region extracted in the background color extraction step 211. In the background image area shaping step 213, noise and a small image area are removed from the binary image representing the background image area created in the binarization step 212, and the background image area is shaped. Check if the background image area disappears due to the removal process.
[0055]
FIG. 8 is a flowchart showing an example of a procedure for realizing the background image area separation step 22 by the processing of the CPU 2001.
[0056]
Steps S101 to S103 correspond to the background color extraction step 211.
[0057]
Specifically, a color histogram is created on the work memory (RAM 2006 or storage device 2002) in step S101. For example, when the input image is expressed in the RGB color system, this color histogram shows the frequency of the color of each pixel in the intermediate image area, that is, the ratio of the number of pixels having a certain RGB value to the number of pixels in the intermediate image area. Represents RGB three-dimensional data. Note that requantization may be performed when the color histogram is created. For example, when an 8-bit RGB image is input, creating a color histogram while requantizing each RGB to 4 bits, 7 bits, etc. complicates the process, but the memory size for storing the color histogram The background image area can be stably separated even when the color of the background image area varies.
[0058]
The color system of the image to be processed may not be the RGB color system. For example, the input image is previously converted into another color system such as L * a * b * color system, L * u * v * color system, HSI color system, etc., and a color histogram is created. At this time, the dimension of the color histogram also uses the three component dimensions of the converted color system, for example, L * a * b * three-dimensional data in the case of the L * a * b * color system. By using other color systems such as L * a * b *, the process becomes complicated, but it is expected that the background image area close to human vision can be separated. Hereinafter, a case where a color histogram is created in the RGB color system will be described.
[0059]
Subsequently, in step S102, a color with the highest frequency (that is, a background color candidate) is obtained. In step S103, it is determined whether or not the obtained maximum frequency is greater than the threshold value th.If the maximum frequency is equal to or less than the threshold value th, it is determined that the input intermediate image area has no background image area, and the background image The area separation step 21 is finished. If the maximum frequency is greater than the threshold th, it is determined that there is a background image area in the input intermediate image area, and the process proceeds to step S104. Here, the threshold th is determined in consideration of the properties of the input image, and is 0.5 (50%), for example.
[0060]
Step S104 corresponds to the binarization step 212, and creates a binary image in the intermediate image area binarized into a pixel having the highest frequency color and other pixels on the work memory. For example, a binary image in which the pixel having the highest frequency color is “1” and the other pixels are “0” is created.
[0061]
Steps S105 to S109 correspond to the background image area shaping step 213.
[0062]
Specifically, in step S105, for example, by performing a known reduction / expansion process, noise is removed from the created binary image, and a small image area is removed from the binary image from which noise is removed in steps S106 to S108. Remove. First, in step S106, for a binary image from which noise has been removed, for example, a known labeling process is performed to create a label image on the work memory and extract connected components. The label image is an image in which a unique number is assigned to each connected component, and the number is the pixel value of each connected component. Next, in step S107, the number of pixels (area) of each connected component is obtained and stored in the work memory, and in step S108, connected components having a pixel count equal to or smaller than the threshold value (small area connected components) are deleted, that is, binary. The value of the pixel corresponding to the connected component of the image is set to “0”.
[0063]
In step S109, it is determined whether there is a remaining connected component (background image area). If it remains, it is determined that there is a background image area, and if it does not remain, it is determined that there is no background image area. When there is a background image area, a binary image indicating the background image area remains on the work memory.
[0064]
FIG. 9 is a flowchart showing an example of a procedure for realizing the intermediate image area separation step 23 by the processing of the CPU 2001.
[0065]
In step S201, the binary image indicating the background image area created in the background image area separation step 22 is reversed in black and white, that is, a pixel whose value is '1' is set to '0', and a pixel whose '0' is set to '1' A binary image indicating an image area other than the background image area, that is, an intermediate image area in the input intermediate image area is created and stored in the work memory.
[0066]
Next, in step S202, neighboring components are extracted in order to separate the binary image obtained by reversing black and white into an intermediate image area. Here, the neighboring component is a set of adjacent black pixels in the binary image (not necessarily connected) as one component, and this neighboring component is an intermediate image area. For example, in a document image, a column that is not connected but is composed of a group of adjacent characters is called a neighborhood component. As a method for extracting neighboring components, for example, the method of Ito et al. ("Parallel field segmentation method of free format documents", 1979 Information Processing Society of Japan 20th Annual Conference 2E-1) is available.
[0067]
Next, in step S203, a circumscribed rectangle indicating the position of the extracted neighboring component is calculated and stored in the work memory.
[0068]
By the above procedure, an image area other than the background image area is separated from the input intermediate image area into one or a plurality of intermediate image areas, and the position (circumscribed rectangle) can be stored in the work memory.
[0069]
FIG. 10 is a flowchart showing an example of a procedure for realizing the image area registration process 24 by the processing of the CPU 2001. When it is determined that the background image area exists in the intermediate image area input in the background image area separation process 22, separation is performed. The registered background image area and intermediate image area are registered in the form shown in FIGS. 5A and 5B. When it is determined that there is no background image area, the input intermediate image area is registered as a general image area. Specifically, in step S200, it is determined whether there is a background image area. If there is, the process proceeds to step S211. If not, the process proceeds to step S219, and the image area type of the node indicating the input intermediate image area is set to “general image”. Change to "area" and end the process.
[0070]
If there is a background image area, a node indicating a new image area is created in step S211, the image area type is registered in the new node in step S212, the image area type to be processed is determined in step S213, and the background image area is determined. In step S214, a binary image indicating the background image area is registered in the image area shape of the new node. In the case of an intermediate image area, the position information obtained from the circumscribed rectangle is registered in the image area position of the new node in step S215, and the binary image obtained by reversing the black and white indicating the intermediate image area in the image area shape of the new node in step S216. Register. Since the image area position of the background image area is the same as the image area position of the parent node (input intermediate image area), its registration is omitted.
[0071]
Subsequently, in step S217, the intermediate image area input as the parent node of the new node is registered. In step S218, the new node is registered as a child node of the node indicating the input intermediate image area, and the process ends.
[0072]
● Image area judgment process
The image area determination step 3 determines the type of each image area extracted in the image area extraction step 2, and stores the determination result in the image area data. In the following, each image area is an image area component of “color continuous tone”, “limited color character line drawing”, “limited color pseudo halftone”, “monochrome continuous tone”, “limited value character line drawing”, or “limited value pseudo halftone”. An example of determination will be described.
[0073]
FIG. 11 is a diagram showing an example of a detailed procedure of the image area determination step 3. In the image area determination step 3, the color / monochrome determination step 32 determines whether the target image area is color or monochrome (gray or black and white), and then the color continuous tone / limited color determination step 33 or monochrome continuous tone. In the limit value determining step 34, it is determined whether the image area is continuous tone, limited color or limited value. For an image area determined to be a limited color or a limited value, a character / line image / pseudo halftone determination step 35 determines whether the image area is a character / line image or a pseudo halftone image area. Under the control of the image area determination control step 31, the image area components of each image area are determined by repeating the above steps until there is no undetermined image area.
[0074]
Fig. 12 is a diagram showing an example of RGB value distribution in the four image area components. From the upper left, "color continuous image area", "monochrome continuous image area", "limited color image area", and "limited value image area" An example of each RGB value distribution is shown.
[0075]
The color / monochrome determination step 32 determines whether the target image area is color (color continuous tone area or limited color image area) or monochrome (monochrome continuous tone area or limited value image area). Specifically, as shown in FIG. 12, using the fact that the saturation of each pixel in the case of a monochrome image area becomes a value near zero (R = G = B in the RGB color system), the image area An image area in which the saturation in the saturation histogram shows a peak in the vicinity of zero and the variance of the histogram is small is determined as a monochrome image area.
[0076]
FIG. 13 is a flowchart showing an example of a procedure for realizing the color / monochrome determination step 32 by the processing of the CPU 2001.
[0077]
In step S301, the saturation is calculated from the pixel values (for example, RGB values) in the image area, and a saturation histogram is created and stored in the work memory. Note that if the color is already expressed in a color system including saturation, such as the HSI color system, a saturation histogram can be created directly. Next, the saturation at which the frequency of the saturation histogram created at step S302 shows the peak saturation is detected, the variance of the saturation histogram created at step S303 is calculated, and the saturation at which the frequency obtained at step S304 shows the peak Then, the image area is determined using dispersion. This determination has one saturation near zero (that is, a predetermined threshold value or less), and a monochrome image area when the variance is less than the predetermined threshold value, and a color image area otherwise. To do.
[0078]
FIG. 14 is a flowchart showing another example of a procedure for realizing the color / monochrome determination process 32 by the processing of the CPU 2001. Although the determination accuracy is inferior to that of the procedure of FIG.
[0079]
In step S401, the variable E is reset to zero, and in step S402, the absolute value (| RG |) of the difference between the R value and G value of the target pixel in the target image area is added to the variable E. The absolute value (| RB |) of the difference between the R value and B value of the target pixel is added. Then, steps S402 and S403 are repeatedly executed for all the pixels in the image area based on the determination in step S404. When processing for all pixels is completed, a value obtained by dividing the variable E by the number N of pixels in the target image area (E / N) is compared with a predetermined threshold th in step S405, and if E / N> th, color is determined. It is determined as an image area, otherwise it is determined as a monochrome image area. That is, in this method, whether the image area is color or monochrome is determined based on the average value of the sum of absolute values of RG and RB in all pixels in the image area.
[0080]
Next, as shown in FIG. 12, the color continuous tone / limited color determination step 33, in the limited color image area, the pixel values are concentrated on a specific value. An image area having one peak and having a small color histogram variance is determined as a limited color image area.
[0081]
FIG. 15 is a flowchart showing an example of a procedure for realizing the color continuous tone / limited color determination step 33 by the processing of the CPU 2001.
[0082]
In step S501, a color histogram is created from pixel values (for example, RGB values) in the image area and stored in the work memory. Next, the frequency peak number of the color histogram created in step S502 is detected. The number of colors having a frequency equal to or higher than a predetermined threshold is used as the peak number, but adjacent peaks on the histogram are counted as one peak. Subsequently, the variance of the color histogram created in step S503 is calculated, and the image area component is determined from the number of peaks and the variance obtained in step S504. In this determination, the limited color image area is set when the number of peaks is one and the variance is equal to or smaller than a predetermined threshold value, and the color continuous image area is set otherwise.
[0083]
Next, in the monochrome continuous tone / limited value determination step 34, as shown in FIG. 12, in the case of the limited value image area, the pixel values are concentrated on a specific value. An image area having one brightness indicating a peak and having a small variance in the brightness histogram is determined as a limited value image area.
[0084]
FIG. 16 is a flowchart showing an example of a procedure for realizing the monochrome continuous tone / limited value determination step 34 by the processing of the CPU 2001.
[0085]
In step S601, brightness is calculated from pixel values (eg, RGB values) in the image area, a brightness histogram is created, and stored in the work memory. Note that a brightness histogram can be created directly when the colorimetric system already includes brightness, such as the HSI color system. Next, the number of frequency peaks in the brightness histogram created in step S602 is detected. The number of brightness having a frequency equal to or higher than a predetermined threshold is used as the peak number, but adjacent peaks on the histogram are counted as one peak. Subsequently, the variance of the brightness histogram created in step S603 is calculated, and the image area component is determined from the number of peaks and the variance obtained in step S604. In this determination, the limited value image area is set when the number of peaks is one and the variance is equal to or smaller than a predetermined threshold value, and the monochrome continuous image area is set otherwise.
[0086]
Next, the character line drawing / pseudo halftone determination step 35 will be described.
[0087]
Many character line drawing / pseudo halftone image discrimination techniques have been proposed as image area separation techniques for binary images and multivalued images. Here, the method proposed by the present applicant is taken as an example. Will be described.
[0088]
In this embodiment, as described above, a binary image indicating the shape of the input image area is created in the intermediate image area separation step 3 and stored as image area data in the form shown in FIGS. 5A and 5B. In the character / line image / pseudo halftone determination step 35, an image area shape (binary image) of the image area to be determined is input, and it is determined whether it is a character line image area or a pseudo halftone area.
[0089]
FIG. 17 is a block diagram illustrating a configuration example of the image area separation unit 3000 that realizes the above-described determination processing. In the figure, the image area separation unit is realized by dedicated hardware, but it is needless to say that the image area separation unit can also be realized by the apparatus shown in FIG.
[0090]
In FIG. 17, reference numeral 3010 denotes a data holding unit that sequentially updates and holds each pixel value in a small area necessary for the image area determination processing. For example, as shown in FIG. 18, for example, as shown in FIG. Retain data. Then, in synchronization with the update of the position of the pixel of interest 321 (sequential movement in the raster scan format), the held data is updated to the data of the corresponding region.
[0091]
FIG. 19 is a block diagram showing a configuration example of the data holding unit 3010. Reference numeral 3011 denotes a line buffer unit composed of a FIFO memory or the like, and data corresponding to seven rasters (scan lines) immediately before the currently input raster. Hold. A latch group 3012 holds data for eight pixels for each raster, and holds a total of 64 data.
[0092]
In FIG. 17 again, reference numeral 3020 denotes an image region determination condition unit, and the pixel of interest 321 is a pseudo halftone region based on the data of the pixel group including the pixel of interest 321 forming the small region 324 output from the data holding unit 3010. This image area determination unit 3020 that determines whether or not the pixel is a pixel includes an isolated pixel determination unit 3021, a periodicity determination unit 3022, and a high-frequency component determination unit 3023, and whether or not different conditions are satisfied in each of the three determination units If one of these conditions is satisfied, a signal 3050 indicating that the pixel of interest 321 is a pixel in the pseudo halftone region is output from the OR gate 3024. In other words, the OR gate 3024 is a pseudo halftone region when it is determined that the pixel of interest 321 is an isolated point or a pixel included in any of the isolated pixel region, the periodic pixel region, and the high frequency component region. A signal 3050 indicating is output.
[0093]
The isolated pixel determination unit 3021 determines whether or not the target pixel 321 is in the isolated pixel region. Specifically, for each of the 16 pixels in the 4 × 4 pixel region 322 illustrated in FIG. It is detected whether the four pixels shown in FIG. 21 are the same value (white pixel or black pixel) and are different from the pixel at the center (k, l). Then, 16 detection results are obtained. If, for example, two or more of the detection results satisfy the above condition, it is determined that the target pixel 321 in the 4 × 4 pixel region 322 is in the isolated pixel region. In other words, it is determined whether there are, for example, two or more isolated pixels (black pixels or white pixels that are not connected to any of the upper, lower, left, and right) among the 16 pixels in the neighboring pixel region 322 of the target pixel 321. When there are two or more pixels, it is determined that the target pixel 321 is in the isolated pixel region.
[0094]
The periodicity determination unit 3022 determines whether or not the pixel value is repeated at a predetermined pixel cycle. Specifically, in the 8 × 8 pixel region 324 shown in FIG. 18, all 64 pixels are white pixels. Except for the case where all pixels are black pixels, the four pixels in the positional relationship are separated from each other by four pixels in the main scanning direction and / or four pixels in the sub-scanning direction, for example, the pixels A, It is determined whether the pixel values of B, C, and D are all the same. In the 8 × 8 pixel region 324, 16 sets of four pixels having a relative positional relationship such as pixels A, B, C, and D can be defined. For each of these 16 sets, check whether the pixel values of all four pixels are equal, and if they are equal, for example, if there are 14 sets or more, the periodicity part except for the case where all 64 pixels are white pixels or black pixels That is, it is determined to be a dither portion.
[0095]
The high-frequency component determination unit 3023 determines whether density changes frequently occur between adjacent pixels. Specifically, in the 6 × 6 pixel region 326 shown in FIG. 30 combinations between two pixels adjacent in the (main scanning) direction (indicated by a two-way horizontal arrow in the figure) and 30 combinations between two pixels adjacent in the vertical (sub-scanning) direction (in the figure) It is determined whether or not the pixel values of the 60 pairs of adjacent two pixels are different from each other. Then, if there are 28 or more combinations different from each other, for example, it is determined that they are in the high frequency component region.
[0096]
Note that the determination result of the image area determination step 3 (image area components of each image area) is stored as image area components of each image area in the image area data in the image area data storage unit 1007. In addition, for the image areas determined as the image area components of the limited color character line drawing, the limited color pseudo halftone, the limited value character line drawing, and the limited value pseudo half tone, the average color (for example, each RGB) in the image area is determined. (Average pixel value) is calculated and stored in the image area data in the image area data storage unit 1007 as the average color of the image area.
[0097]
● Adaptive scaling process
The adaptive scaling process 4 performs a scaling process according to the image area component determined in the image area determination process 3 on each image area extracted in the image area extraction process 2, thereby scaling the input image. Create an image.
[0098]
FIG. 23 is a diagram showing an example of a detailed procedure of the adaptive scaling step 4. In the adaptive scaling step 4, the scaling control step 41 adapts the scaling step corresponding to the image area component for each image area, and synthesizes the scaled images of the respective image areas, thereby obtaining an input image. Create a zoomed image of. Specifically, the color continuous tone image area is the color continuous tone image area scaling process 42, and the limited color text line image area is the limited color text line image area scaling process 43. The area is the limited color pseudo halftone image area scaling process 44, the monochrome continuous tone image area is the monochrome continuous image area scaling process 45, and the image area of the limited value character line image is the limited value character line image area scaling process. In 46, the limit value pseudo-halftone image area is scaled in the limit value pseudo-halftone image area scaling step 47, and the scaled image areas are combined into one scaled image. Hereinafter, each process will be described in detail.
[0099]
The scaling control step 41 adaptively performs a scaling process corresponding to the image area component for each image area until there is no image area in which the scaling has not been completed. FIG. 24 is a diagram showing an example of the order of the image areas to be subjected to scaling. The scaling is performed while tracing the image area node described in the image area data (tree structure) from the root node (top node). Scaling of each image area should not be done before the background image area below the upper level node of itself. In other words, when changing the image area under one intermediate image area, the image area must be changed from the background image area.
[0100]
In the color continuous tone scaling step 42, the input image area is scaled by a color image scaling method using linear interpolation or the like, and the scaled image is written in the scaled image storage unit 1008. Note that writing the scaled image to the scaled image storage unit 1008 is performed in the same manner in other steps, but based on the image area position after scaling calculated from the image area position of the input image area.
[0101]
The limited-color character / line image scaling step 43 is suitable for character / line image images such as Japanese Patent Application No. 3-345062 already filed by the applicant, based on the binary image stored in the image area shape of the input image area. The image is scaled by the known binary image scaling method, and the scaled image is written into the scaled image storage unit 1008. The limited color pseudo halftone scaling process 44 scales the binary image stored in the image area shape of the input image area by a binary image scaling method such as the SPC scaling method, and the scaled image. Is stored in the variable magnification image storage unit 1008. However, the limited color character line drawing scaling process 43 and the limited color pseudo halftone scaling process 44 write the pixel value of the input image when the pixel value of the scaled binary image is' 1 ', and the pixel value is' The pixel of 0 ′ is not written, so that the scaled image is written. Note that the value to be written may not be the pixel value of the input image, but the image area color of the input image area, and the effect of removing noise contained in the input image can be expected.
[0102]
The monochrome continuous tone scaling process 45 scales the input image area by a color image scaling method using linear interpolation or the like, and writes the scaled image into the scaled image storage unit 1008.
[0103]
The limited-value character / line image scaling step 46 is suitable for character / line image images such as Japanese Patent Application No. 3-345062 already filed by the applicant, based on the binary image stored in the image area shape of the input image area. The image is scaled by the known binary image scaling method, and the scaled image is written into the scaled image storage unit 1008. The limited-value pseudo-halftone scaling process 47 scales the binary image stored in the image area shape of the input image area by a binary image scaling method such as the SPC method, and modifies the scaled image. Write to the double image storage unit 1008. However, the limited value character line drawing scaling process 46 and the limited value pseudo halftone scaling process 47 are the pixel values of the binary image obtained by SP scaling the binary image stored in the image area shape of the input image area. When “1” is “1”, the pixel value of the input image is written, and the pixel value of “0” is not written, thereby writing the scaled image. Note that the value to be written may not be the pixel value of the input image, but may be the region color or black of the input image area (for example, if the output image is RGB each 8 bits, all RGB pixel values are 255). For example, an effect of removing noise included in the input image can be expected.
[0104]
As the scaling factor, a value stored in advance on the ROM 204 or a value designated by the user using a keyboard or a dip switch is used.
[0105]
As described above, according to the present embodiment, the image area separation based on the characteristics of the color document image is performed on the document image in which the image areas having different components input as the color image are mixed. Good image area separation is possible even for document images with multiple backgrounds (backgrounds) with colors other than the above, and the image is scaled according to the characteristics of each separated image area, resulting in a good quality image Can be obtained.
[0106]
[Second embodiment]
The image processing apparatus according to the second embodiment of the present invention will be described below. Note that the same reference numerals in the second embodiment denote the same parts as in the first embodiment, and a detailed description thereof will be omitted.
[0107]
[Processing procedure]
FIG. 25 is a diagram showing an example of a processing procedure when the present invention is applied to the color image compression processing of the image processing apparatus. The color image input process 1 to the image area determination process 3 and the color image output process 5 are performed in the first embodiment. The detailed description is omitted.
[0108]
In the figure, the adaptive compression step 6 performs a compression process on each image area extracted in the image area extraction step 2 according to the image area component of the image area determined in the image area determination step 3. Then, compressed data of the input image is created, and the compressed data output step 7 outputs the compressed data created in the adaptive compression step 6 to a communication path (not shown) or an image storage device. The compressed data input process 8 inputs the data compressed in the adaptive compression process 6 from a communication channel or an image storage device, and the color image reproduction process 9 reproduces the data compressed in the adaptive compression process 6 into a color image. To do. The color image input process 1 to the compressed data output process 7 are executed when the color image is compressed, and the compressed data input process 8 to the color image output process 5 are performed when the compressed data is reproduced. To be executed.
[0109]
[Device configuration]
26 is a block diagram illustrating a configuration example of an image processing apparatus that performs the processing illustrated in FIG. 25, and FIG. 27 is a block diagram illustrating an example of hardware that realizes the configuration illustrated in FIG.
[0110]
First, referring to FIG. 27, in this embodiment, a data input device 2010 and a data output device 2011 are added, and both are connected to the I / O port 2005.
[0111]
In FIG. 26, a color image input unit 1001 inputs a digital color image to be processed and stores it in the input image storage unit 1006. The image area extraction unit 1002 extracts an image area from the image stored in the input image storage unit 1006, and stores the extracted image area data in the image area data storage unit 1007. The image area determination unit 1003 determines the image area component of each image area extracted by the image area extraction unit 1002 and stores it in the image area data storage unit 1007. The adaptive compression unit 1014 performs a compression process on each image area extracted by the image area extraction unit 1002 according to the image area component of the image area determined by the image area determination unit 1003, and performs input processing. And the compressed data is stored in the compressed data storage unit 1012.
[0112]
The compressed data output unit 1009 outputs the compressed data compressed by the adaptive compression unit 1014 and stored in the compressed data storage unit 1012. The output destination is a communication channel or an image storage device. The compressed data output unit 1009 outputs, for example, compressed data stored in the RAM 2006 or the storage device 2002 by the data output device 2011 under the control of the CPU 2001 that operates according to the program stored in the ROM 2004 or the storage device 2002. Can be configured.
[0113]
A compressed data input unit 1011 inputs compressed data from a communication path or an image storage device and stores the compressed data in the compressed data storage unit 1012. The compressed data input unit 1011 is, for example, compressed data sent via a communication path under the control of the CPU 2001 that operates according to a program stored in the ROM 2004 or the storage device 2002, or compressed data stored in the image storage device. Can be configured by inputting the data using the data input device 2010.
[0114]
The color image reproduction unit 1010 reproduces a color image from the compressed data stored in the compressed data storage unit 1012 and stores the color image in the reproduction image storage unit 1013. The reproduction color image stored in the reproduction image storage unit 1013 is output by the color image output unit 1005. The output destination is a display, a printer or a copier that performs hard copy, a communication path, an image storage device, or the like.
[0115]
The adaptive compression unit 1014 and the color image generation unit 1010 can be configured by, for example, a CPU 2001 that operates according to a program stored in the ROM 2004 or the storage device 2002 and a RAM 2004 or storage device 2002 that is used as a work memory. Of course, it may be configured by a dedicated CPU, RAM, and storage device, or by dedicated hardware. In addition, the compressed data storage unit 1012 and the reproduction image storage unit 1013 can be configured by the RAM 2006 or the storage device 2002, for example. Of course, each storage unit may be configured by a dedicated storage device.
[0116]
Furthermore, when data compression and reproduction are performed by separate devices, such as exchange of compressed data via a communication path, as shown in FIG. 28, a device that performs data compression and a device that reproduces compressed data In addition, it can be realized by using two devices.
[0117]
[Compressed data format]
Next, the form of the compressed data will be described. Even after the input image is compressed, the tree structure having each image area shown in FIG. 5A as a node is maintained.
[0118]
FIG. 29 is a diagram showing an example of the structure of compressed data. The compressed data includes a header (hereinafter referred to as a “compressed data header”) that stores an image size and a compression method for each image area component, and compressed data for each image area. (Hereinafter referred to as “compressed image area data”), and the compressed image area data includes image area data of the image area.
[0119]
FIG. 30 is a diagram illustrating an example of image area data included in the compressed image area data, and one of the two types of image area data is held according to the image area component. Specifically, in the case of “limited color text line image area”, “limited color pseudo halftone area”, “limit value text line image area”, and “limit value pseudo halftone area”, it is shown in FIG. The image area data of the form is retained. Each element shown in FIG. 30 (a) corresponds to each element shown in FIG. 5B. However, in the first embodiment, the binary image indicating the shape of the image area is registered as the “image area shape”, but in the second embodiment, the binary image compressed by the compression method stored in the compressed data header is used. Register as “image area shape”.
[0120]
On the other hand, in the case of “color continuous image area” and “monochrome continuous image area”, the image area data in the form shown in FIG. 30B is held. Each element other than “image area shape” and “image area image data” corresponds to each element shown in FIG. 5B, and a compression method in which a portion corresponding to the image area position of the input image is stored in the compressed data header. The data compressed in step (b) is registered as “image area image data”, and the binary image compressed by the compression method of the limited character line image area is registered as “image area shape”.
[0121]
[Process Details]
Next, the main steps shown in FIG. 25 will be described in detail using the configuration of FIG. 26, but the color image input step 1 to the image area determination step 3 and the color image output step 5 are the same as in the first embodiment. Therefore, detailed description thereof is omitted.
[0122]
● Adaptive compression process
The adaptive compression process 6 performs compression processing according to the image area component determined in the image area determination process 3 on each image area extracted in the image area extraction process 2 to create compressed data of the input image. To do.
[0123]
FIG. 31 is a diagram showing an example of a detailed procedure of the adaptive compression step 6. In FIG. In the adaptive compression step 6, the compression control step 61 adapts the compression process corresponding to the image area component for each image area, creates compressed data for each image area, and stores the compressed data in the compressed data storage unit. Store in 1012. Specifically, the color continuous tone image area is the color continuous tone image area compression step 62, the limited color character line image area is the limited color character line image area compression step 63, and the limited color pseudo-halftone image area is In the limited color pseudo-halftone image area compression step 64, the monochrome continuous tone image area is in the monochrome continuous image area compression process 65, and the image area of the limited value character line image is in the limited value character line image area compression process 66. The pseudo-halftone image area is compressed in a limited value pseudo-halftone area compression step 67, respectively. Hereinafter, each process will be described in detail.
[0124]
The compression control step 61 adaptively performs a compression process corresponding to the image area component for each image area until there is no uncompressed image area.
[0125]
In the color continuous image area compression step 62, the color continuous image area is compressed, and the created compressed data is stored in the compressed data storage unit 1012. Specifically, the image portion corresponding to the image area position of the node to be processed is compressed by an encoding method suitable for color continuous tone and registered in the “image area image data” shown in FIG. 30 (b). . In addition, the “image area shape” in the image area data stored in the image area data storage unit 1007 is compressed by the compression method of the limited character line image area, and the “image area shape” shown in FIG. And the other elements are registered with the same value as the image area data. As a coding method suitable for color continuous tone, for example, a JPEG coding method using DCT is used.
[0126]
The limited color character line image area compression step 63 compresses the limited color character line image area, and stores the created compressed data in the compressed data storage unit 1012. Specifically, the binary image stored in the image area shape of the node to be processed is compressed by the encoding method suitable for the limited-color character / line image to obtain the “image area shape” shown in FIG. Register the same value as the image area data for the other elements. As an encoding method suitable for the limited-color character / line image, for example, an MR / MMR encoding method or the like is used.
[0127]
The limited color pseudo halftone image compression step 64 compresses the limited color pseudo halftone image area and stores the created compressed data in the compressed data storage unit 1012. Specifically, the binary image stored in the image area shape of the node to be processed is compressed by the encoding method suitable for the limited color pseudo-halftone, and the “image area shape” shown in FIG. The other elements are registered with the same values as the image area data. As an encoding method suitable for the limited color pseudo-halftone, for example, a JBIG encoding method is used.
[0128]
The monochrome continuous image area compression step 65 compresses the monochrome continuous image area and stores the created compressed data in the compressed data storage unit 1012. Specifically, the image portion corresponding to the image area position of the node to be processed is compressed by an encoding method suitable for monochrome continuous tone and registered in the “image area image data” shown in FIG. 30 (b). . In addition, the “image area shape” in the image area data stored in the image area data storage unit 1007 is compressed by the compression method of the limited character line image area, and the “image area shape” shown in FIG. And the other elements are registered with the same value as the image area data. For example, a JPEG encoding method is used as an encoding method suitable for monochrome continuous tone.
[0129]
The limited value character / line image area compression step 66 compresses the limited value character / line image area and stores the created compressed data in the compressed data storage unit 1012. Specifically, the binary image stored in the image area shape of the node to be processed is compressed by the encoding method suitable for the limited-value character / line image to obtain the “image area shape” shown in FIG. Register the other elements and register the same values as the image area data. Note that, for example, an MR / MMR encoding method is used as an encoding method suitable for a limited-value character / line image.
[0130]
The limit value pseudo halftone image area compression step 67 compresses the limit value pseudo halftone image area data, and stores the created compressed data in the compressed data storage unit 1012. Specifically, the binary image stored in the image area shape of the node to be processed is compressed by an encoding method suitable for the limited-value pseudo-halftone to obtain the “image area shape” shown in FIG. Register the other elements and register the same values as the image area data. For example, a JBIG encoding method or the like is used as an encoding method suitable for the limited value pseudo-halftone.
[0131]
● Color image reproduction process
In the color image reproduction step 9, a color image is reproduced from the compressed data stored in the compressed data storage unit 1012.
[0132]
FIG. 32 is a diagram showing an example of a detailed procedure of the color image reproduction step 9. In the color image reproduction step 9, the reproduction control step 91 reproduces a color image by performing a reproduction step according to the “image area type” of the image area data included in the compressed image area data for each image area. The image is stored in the reproduction image storage unit 1013. Specifically, the color continuous tone gamut reproduction step 92 for color continuous tone, the limited color character line image gamut reproduction step 93 for limited color character line drawing, and the limited color pseudo tone for limited color pseudo halftone. Halftone image reproduction step 94, monochrome continuous tone reproduction in monochrome continuous tone reproduction step 95, limited value character line drawing in limited value character line image region reproduction step 96, limited value pseudo halftone, limited In the value pseudo halftone image area reproduction step 97, reproduction is performed, and the reproduced image areas are combined into one reproduced image. Hereinafter, each process will be described in detail.
[0133]
The reproduction control step 91 adaptively performs a reproduction step corresponding to the type of image area for each image area until there is no compressed image area data that has not been reproduced. Image areas are reproduced in the order shown in FIG. In other words, the image area node described in the image area data (tree structure) is traced from the root node (the highest node), but each image area is reproduced one level below the node higher than itself. Do not go beyond a certain background image area. In other words, when reproducing an image area under one intermediate image area, the image area must be reproduced from the background image area.
[0134]
The color continuous image area reproduction step 92 reproduces the image area from the color continuous tone compressed image area data and stores it in the reproduction image storage unit 1013. FIG. 33 is a flowchart showing an example of a detailed procedure of the color continuous image area reproduction step 92, which is executed by the CPU 2001, for example.
[0135]
First, in step S701, the data registered in the “image area shape” of the compressed image area data is decoded by a decoding method corresponding to the compression method of the limited value character line image area stored in the compressed data header, A binary image indicating the image area shape is reproduced and stored in the work memory. Next, in step S702, the data registered in the “image area image data” of the compressed image area data is decoded by a decoding method corresponding to the color continuous image area compression method stored in the compressed data header. The image area image data is reproduced and stored in the work memory. In step S703, the reproduced image area image data corresponding to the pixel having the reproduced binary image value “1” is stored in the reproduced image storage unit 1013. The reproduction image is written in the reproduction image storage unit 1013 in the same manner as in other steps, but is performed based on the position calculated from the “image area position” of the compressed image area data.
[0136]
The limited color character / line image area reproduction step 93 reproduces the image area from the compressed image area data of the limited color character / line image and stores it in the reproduction image storage unit 1013. FIG. 34 is a flowchart showing an example of a detailed procedure of the limited-color character / line image area reproduction step 93, which is executed by the CPU 2001, for example.
[0137]
First, in step S801, the data registered in the “image area shape” of the compressed image area data is decoded by a decoding method corresponding to the compression method of the limited color character line image area stored in the compressed data header, A binary image indicating the image area shape is reproduced and stored in the work memory. Next, in step S802, the pixel registered in the “image area color” of the compressed image area data is stored in the position of the reproduced image storage unit 1013 corresponding to the pixel whose reproduced binary image value is “1”. To do.
[0138]
The limited color pseudo-halftone image area reproduction step 94 reproduces the image area from the limited color pseudo-halftone compressed image area data and stores it in the generated image storage unit 1013. In the limited color pseudo-halftone image area reproduction step 94, the image area is reproduced in the same procedure as the limited color character line image area reproduction step 93 shown in FIG.
[0139]
In the monochrome continuous tone area reproduction step 95, the image area is reproduced from the monochrome continuous tone compressed image area data and stored in the reproduction image storage unit 1013. In the monochrome continuous image area reproduction step 95, the image area is reproduced in the same procedure as the color continuous image area reproduction step 92 shown in FIG.
[0140]
The limited value character / line image area reproduction step 96 reproduces the image area from the compressed image area data of the limited value character / line image and stores it in the reproduction image storage unit 1013. The limited value pseudo halftone area reproduction step 97 reproduces the image area from the limited value pseudo halftone compressed image area data and stores it in the reproduction image storage unit 1013. In the limited color character line image area reproduction step 96 and the limited value pseudo halftone image area reproduction step 97, the image area is reproduced in the same procedure as the limited color character line image area reproduction step 93 shown in FIG.
[0141]
As described above, according to the present embodiment, the image area separation based on the characteristics of the color document image is performed on the document image in which the image areas having different components input as the color image are mixed. Good image area separation is possible even for document images with multiple backgrounds (backgrounds) with colors other than the above, and compression processing according to the characteristics of each separated image area is performed to obtain compressed data with a good compression rate In addition, the compressed image area data included in the compressed data can be expanded by a method according to the characteristics of the image area to obtain a color image reproduced with good image quality.
[0142]
[Third embodiment]
The image processing apparatus according to the third embodiment of the present invention will be described below. Note that the same reference numerals in the third embodiment denote the same parts as in the first embodiment, and a detailed description thereof will be omitted.
[0143]
Next, an embodiment in which the present invention is applied to an image processing apparatus for editing a document image in order to input a color original image as structured data to a DTP apparatus will be described.
[0144]
FIG. 35 is a diagram showing an example of a processing procedure when the present invention is applied to the document image editing process of the image processing apparatus, and the color image input process 1 to the image area determination process 3 are the same as those in the first embodiment. Detailed description is omitted.
[0145]
The data conversion process 10 converts the image area data created in the processes up to the image area determination process 3 into image data in a data format suitable for editing a document image with a DTP device or the like for each image area. As a result, the input image can be input to the document image editing process for each image area separated in the processes up to the image area determining step 3, and the editing can be performed for each image area.
[0146]
In the data conversion step 10, characters or symbols included in the limited color character line image or the limited value character line image area can be converted into character codes by character recognition in accordance with a user instruction. Further, the limited color character line image or the limited value character line image region can be converted into vector data by raster vector conversion in accordance with a user instruction.
[0147]
The document image editing step 11 edits a document image according to a user instruction and outputs a document image as a result of the editing.
[0148]
The above processing can be realized on the DTP device, or can be realized on the dedicated device shown in the first embodiment.
[0149]
As described above, according to the present embodiment, the image area separation based on the characteristics of the color document image is performed on the document image in which the image areas having different components input as the color image are mixed. Good image area separation is possible even for document images with multiple backgrounds (backgrounds) with colors other than, and color document images can be structured and input to document image editing devices such as DTP devices. A color document image having a good image quality can be obtained by performing an editing process according to the characteristics of each image area.
[0150]
[Fourth embodiment]
The image processing apparatus according to the fourth embodiment of the present invention will be described below. Note that the same reference numerals in the fourth embodiment denote the same parts as in the first embodiment, and a detailed description thereof will be omitted.
[0151]
In the first embodiment described above, it is determined whether or not there is a background image area in the intermediate image area, and occupies most of the intermediate image area to be processed as a background image area separation step for separating the background image area. The example in which the image area of the same color is extracted as the background image area has been described. This method is effective for many color document images. However, in a color document image including a continuous image area such as a photographic image where there is little change in brightness and color, it is originally determined as one image area. It may be determined that there is a background image area in the continuous image area that must be performed, and the continuous image area may be excessively divided into a background image area and an intermediate image area.
[0152]
Therefore, in this embodiment, a background image area separation process that prevents overdivision of a continuous image area where there is a portion with little brightness or color change by determining whether or not the extracted background image area is appropriate is described. To do.
[0153]
FIG. 36 is a diagram showing an example of a detailed procedure of the background image area separation step 22 of the present embodiment, and corresponds to FIG. 7 of the first embodiment.
[0154]
In the figure, a background color extraction step 221 analyzes the color of the input intermediate image area and extracts the color of the background image area. Specifically, in the input intermediate image area, the largest number of colors or the largest number of colors is extracted as compared to the case where the pixels having colors close to the color are other colors. The background image area extraction step 222 creates a binary image of the background image area using the color of the extracted background image area. The background image area determination step 223 determines whether the image area indicated by the created binary image is appropriate as the background image. If it is determined to be appropriate, the process proceeds to the background image area shaping step 224 and is inappropriate. If it is determined that the background image area is absent, the process is terminated or the process is returned to the background image area extraction step 222, the processing parameters are changed, and the background image area is extracted again. The background image area shaping step 224 removes noise and a small image area from the binary image indicating the image area determined to be appropriate as the background image area, shapes the background image area, Check if the background image area disappears due to image area removal processing.
[0155]
FIG. 37 is a diagram for explaining the outline of the process for determining the background image area. FIG. 37 (a) shows an example in which the background image area is extracted from the intermediate image area including the background image area, and FIG. An example in which the background image area is extracted from the intermediate image area of the continuous tone image area, and FIG. 8C is an example in which the background image area is extracted from the intermediate image area of the color document image having a lot of noise. The background image area determination step 223 determines that the background image area is appropriate for the extraction result as shown in the same figure (a), and the extraction result as shown in the same figure (b) and (c). Is determined to be an inappropriate background image area. In other words, the background image area determination step 223 performs a change in brightness or color when the outer peripheral shape of the extracted image area is away from the side of the input intermediate image area, as shown in FIG. Therefore, it is determined that the extracted image area is inappropriate as a background image. In addition, as shown in FIG. 4C, a newly generated intermediate image area, that is, a part not included in the image area extracted as the background image area has a small area (meaning no intermediate image area). ) Exists in large numbers, for example, since the color range to be extracted as a background image area is narrow, it is determined that the background image area is not sufficiently extracted, and the extracted image area is inappropriate as a background image. judge.
[0156]
FIG. 38 is a diagram showing an example of a detailed procedure of the background image area determination step 223. As described above, the background image area shape determining step 2231 determines whether or not the shape of the image area extracted as the background image area is sufficiently spread over the input intermediate image area. The generation intermediate image area determination step 2232 determines whether there are many small area image areas in the newly generated intermediate image area, as described above.
[0157]
39 to 41 are flowcharts showing an example of a procedure for realizing the background image area separation step 22 of the present embodiment by the processing of the CPU 2001, and corresponds to FIG. 8 of the first embodiment.
[0158]
Steps S901 to S902 correspond to the background color extraction step 221. In step S901, a color histogram is created on the work memory, and in step S902, a color with the highest frequency (that is, a background color candidate) is obtained.
[0159]
Step S903 corresponds to the background image area extraction step 222, and creates on the work memory a binary image in the intermediate image area binarized into pixels having a color close to the color of the maximum frequency and other pixels. For example, a binary image is created in which the pixel having a color close to the color of the maximum frequency is “1” and the other pixels are “0”. Here, whether or not the pixel of interest has a color close to the color with the highest frequency is determined, for example, by obtaining the distance D by the following equation. That is, it is determined that the obtained color D has a color close to that when the obtained distance D is within a predetermined range (hereinafter referred to as “background range”).
Figure 0003647071
[0160]
The value of the background range uses data stored in the ROM 2004 or the like as its initial value, but is changed according to the determination result of the background image area determination step 223.
[0161]
Steps S904 to S908 correspond to the background image area shape determination step 2231. The area outside the image area extracted as the background image area in step S904 (hereinafter referred to as “outer background area”) is measured, and the area of the intermediate image area input in step S905 is measured.
[0162]
FIG. 42 is a diagram for explaining an example of a method for measuring the area outside the background. First, for each sub-scan of the input intermediate image area, the edges of the image area extracted as the background image area from the left and right intermediate image area boundaries. The number of pixels (area) on which no flag is set is measured until it reaches the part (corresponding to the arrow in the figure), and a flag is set on the measured pixel. Next, the same measurement is performed for each main scan, but the pixels that are flagged in the measurement in the sub-scan are not measured.
[0163]
Next, in step S906, a ratio of the measured area outside the background to the area of the intermediate image area (background area / intermediate image area area, hereinafter referred to as “background area ratio”) is obtained, Compare with the threshold. If the ratio is larger than the threshold, it is determined that the extracted image area is appropriate as the background image area, and the process proceeds to step S909. Otherwise, it is determined that the extracted image area is inappropriate as the background image area, and step S907 is performed. Proceed to
[0164]
Steps S907 and S908 determine whether or not the background image area is to be extracted again. This determination includes a re-extraction flag A indicating whether or not the first background image area shape is determined, and a state immediately before the re-extraction is performed. The area ratio outside the background (hereinafter referred to as “previous extraction ratio”) is used. These values are stored in the RAM 2006. In step S907, the re-extraction flag A is determined. If it is the first determination, the process returns to step S903 to execute re-extraction, and if not, the process proceeds to step S908 (outer background area ratio / previous extraction ratio). Is compared with a predetermined threshold value, and if the threshold value is larger, the process returns to step S903 and re-extraction is performed. Otherwise, it is determined that there is no background image area, and the process is terminated. When performing re-extraction, the background color range is increased, and when the determination of the background image area of the input intermediate image area is completed, the re-extraction flag A and the background color range are reset.
[0165]
Steps S909 to S915 correspond to the generated intermediate image area determination step 2232. In step S909, the binary image indicating the background image area is reversed in black and white, the connected component is extracted from the binary image inverted in step S910, the area of the connected component extracted in step S911 is measured, and the area is determined in step S912. The number of connected components (hereinafter referred to as “small connected components”) equal to or less than a predetermined threshold is measured. In step S913, the number of small connected components is compared with a predetermined threshold. If the number is smaller than the threshold, it is determined that the extracted image area is appropriate as the background image area, and the process proceeds to step S916. Otherwise, it is determined that the background image area is inappropriate, and the process proceeds to step S914.
[0166]
Steps S914 and S915 determine again whether or not the background image area is to be extracted. This determination includes a re-extraction flag B indicating whether or not the first generated intermediate image area is determined, and immediately before the re-extraction is performed. The number of small connected components (hereinafter referred to as “number of previous extractions”) is used. These values are stored in the RAM 2006. In step S914, the re-extraction flag B is determined. If it is the first determination, the process returns to step S903 and re-extraction is performed. Otherwise, the process proceeds to step S915, and (number of small connected components / number of previous extractions) ) And a predetermined threshold value, and if the threshold value is larger, the process returns to step S903 and re-extraction is performed. Otherwise, it is determined that there is no background image area, and the process is terminated. When performing re-extraction, the background color range is increased, and when the determination of the background image area of the input intermediate image area is completed, the re-extraction flag B and the background color range are reset.
[0167]
Steps S916 to S920 correspond to the background image area shaping step 224. In step S916, for example, by performing a known reduction / expansion process, noise is removed from the binary image indicating the extracted background image area, and the small image area is removed from the binary image from which noise has been removed in steps S917 to S919. Remove. First, in step S917, a label image is created on the work memory and a connected component is extracted from the binary image from which noise has been removed by, for example, a known labeling process. The label image is an image in which a unique number is assigned to each connected component, and the number is the pixel value of each connected component. Next, in step S918, the number of pixels (area) of each connected component is obtained and stored in the work memory, and in step S919, connected components having a pixel count equal to or smaller than the threshold value (small area connected components) are deleted, that is, binary. The value of the pixel corresponding to the connected component of the image is set to “0”.
[0168]
In step S920, it is determined whether there is a remaining connected component (background image area). If it remains, it is determined that there is a background image area, and if it does not remain, it is determined that there is no background image area. When there is a background image area, a binary image indicating the background image area remains on the work memory.
[0169]
As described above, according to the present embodiment, by determining whether or not the extracted background image area is appropriate, a color document image having a portion with little brightness or color change or a color document image having a lot of noise. In addition, it is possible to provide a background image area separation step that does not overdivide the image area.
[0170]
Note that the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device.
[0171]
Needless to say, the present invention can also be applied to a case where the present invention is achieved by supplying a program to a system or apparatus.
[0172]
【The invention's effect】
As described above, according to the present invention, the step of separating the background image area from the processing target area of the color image in which the image areas having different characteristics are mixed, and the image area other than the background image area is at least one image area. The image area is determined by recursively repeating this step, that is, by extracting the image area focusing on the background image area. Can be applied. For example, good processing (such as image scaling, data amount reduction, data structuring, etc.) can be performed on a color document image.
[Brief description of the drawings]
FIG. 1 is a diagram showing an example of an image area separation procedure in the present invention.
FIG. 2 is a diagram showing an example of a processing procedure when the present invention is applied to a color image scaling process of an image processing apparatus;
FIG. 3 is a block diagram showing a configuration example of an image processing apparatus that performs the processing shown in FIG.
4 is a block diagram showing an example of hardware that realizes the configuration shown in FIG. 3;
FIG. 5A is a diagram showing an outline of image area data;
FIG. 5B is a diagram showing an example of data representing each node shown in FIG. 5A;
FIG. 6 is a diagram showing an example of a detailed procedure of the image area extraction step shown in FIG.
FIG. 7 is a diagram showing an example of a detailed procedure of the background image area separation step shown in FIG.
FIG. 8 is a flowchart showing an example of a procedure for realizing a background image area separation step by the processing of the CPU shown in FIG.
FIG. 9 is a flowchart showing an example of a procedure for realizing an intermediate image region separation step by the processing of the CPU shown in FIG.
FIG. 10 is a flowchart showing an example of a procedure for realizing an image area registration process by the processing of the CPU shown in FIG.
FIG. 11 is a diagram showing an example of a detailed procedure of the image area determination step shown in FIG.
FIG. 12 is a diagram showing an example of RGB value distribution in four image area components;
13 is a flowchart showing an example of a procedure for realizing a color / monochrome determination process by the processing of the CPU shown in FIG.
FIG. 14 is a flowchart showing another example of the procedure for realizing the color / monochrome determination process by the processing of the CPU shown in FIG. 4;
FIG. 15 is a flowchart showing an example of a procedure for realizing a color continuous tone / limited color determination step by the processing of the CPU shown in FIG. 4;
FIG. 16 is a flowchart showing an example of a procedure for realizing a monochrome continuous tone / limited value determination step by the processing of the CPU shown in FIG. 4;
FIG. 17 is a block diagram illustrating a configuration example of an image area separation unit that determines whether a character line image area or a pseudo halftone image area;
FIG. 18 is a diagram for explaining processing of the image area separation unit shown in FIG.
19 is a block diagram showing a configuration example of a data holding unit shown in FIG.
20 is a diagram for explaining processing of the image area separation unit shown in FIG.
FIG. 21 is a diagram for explaining processing of the image area separation unit shown in FIG. 17;
FIG. 22 is a diagram for explaining processing of the image area separation unit shown in FIG. 17;
FIG. 23 is a diagram showing an example of a detailed procedure of the adaptive scaling process shown in FIG.
FIG. 24 is a diagram showing an example of the order of image areas to be subjected to scaling;
FIG. 25 is a diagram showing an example of a processing procedure when the present invention is applied to color image compression processing of an image processing apparatus;
FIG. 26 is a block diagram showing a configuration example of an image processing apparatus that performs the process shown in FIG. 25;
FIG. 27 is a block diagram showing an example of hardware that realizes the configuration shown in FIG. 26;
FIG. 28 is a block diagram showing another configuration example of the image processing apparatus that performs the processing shown in FIG. 25;
FIG. 29 is a diagram showing an example of the structure of compressed data;
FIG. 30 is a diagram showing an example of image area data included in compressed image area data;
31 is a diagram showing an example of a detailed procedure of the adaptive compression process shown in FIG. 25;
32 is a diagram showing an example of a detailed procedure of the color image reproduction process shown in FIG. 25;
FIG. 33 is a flowchart showing an example of a detailed procedure of the color continuous image area reproduction step shown in FIG. 32;
34 is a flowchart showing an example of a detailed procedure of the limited-color character / line image area reproduction step shown in FIG. 32;
FIG. 35 is a diagram showing an example of a processing procedure when the present invention is applied to document image editing processing of the image processing apparatus;
FIG. 36 is a diagram showing an example of a detailed procedure of a background image area separation process according to the fourth embodiment of the present invention;
FIG. 37 is a diagram for explaining an outline of processing for determining a background image area;
FIG. 38 is a view showing an example of a detailed procedure of the background image area determination step shown in FIG. 36;
FIG. 39 is a flowchart showing an example of a procedure for realizing the background image area separation step shown in FIG. 38;
40 is a flowchart showing an example of a procedure for realizing the background image area separation step shown in FIG. 38;
41 is a flowchart showing an example of a procedure for realizing the background image area separation step shown in FIG. 38;
FIG. 42 is a diagram illustrating an example of a method for measuring an area outside the background.
[Explanation of symbols]
1 Color image input process
2 Image area extraction process
3 Image area determination process
4 Adaptive scaling process
5 Color image output process
6 Adaptive compression process
7 Compressed data output process
8 Compressed data input process
9 Color image reproduction process
10 Data conversion process
11 Document image editing process

Claims (21)

カラー画像を入力する入力ステップと、
入力したカラー画像の背景像域に注目して、そのカラー画像から特性の異なる像域を抽出する抽出ステップと、
抽出した像域それぞれの特性を判定する判定ステップとを有し、
前記抽出ステップは、前記カラー画像の処理対象領域から背景像域を分離する第一の分離ステップ、および、分離された背景像域以外の像域を少なくとも一つの像域に分離する第二の分離ステップを含み、分離した像域に、前記第一および第二の分離ステップを再帰的に繰り返すことにより像域を抽出することを特徴とする画像処理方法。
An input step for inputting a color image;
Focusing on the background image area of the input color image, an extraction step for extracting an image area with different characteristics from the color image;
The extracted image area their characteristics have a a determining step,
The extraction step includes a first separation step of separating a background image region from the processing target region of the color image, and a second separation of separating an image region other than the separated background image region into at least one image region. An image processing method comprising: extracting an image area by recursively repeating the first and second separation steps in a separated image area .
さらに、前記抽出ステップで抽出した像域それぞれに、前記判定ステップで判定したその像域の特性に応じた変倍処理を施すことにより、前記カラー画像を変倍する変倍ステップを有することを特徴とする請求項1に記載された画像処理方法。The image processing apparatus further includes a scaling step for scaling the color image by applying a scaling process according to the characteristics of the image area determined in the determination step to each image area extracted in the extraction step. The image processing method according to claim 1. さらに、前記抽出ステップで抽出した像域それぞれに、前記判定ステップで判定したその像域の特性に応じた圧縮処理を施すことにより、前記カラー画像を圧縮する圧縮ステップを有することを特徴とする請求項1に記載された画像処理方法。The image processing apparatus further includes a compression step of compressing the color image by applying a compression process according to the characteristics of the image area determined in the determination step to each image area extracted in the extraction step. Item 8. The image processing method according to Item 1. 前記圧縮ステップは、前記像域それぞれの画像データを圧縮した像域圧縮データをひとまとめにして、前記カラー画像の圧縮データとすることを特徴とする請求項3に記載された画像処理方法。4. The image processing method according to claim 3, wherein in the compression step, the image area compressed data obtained by compressing the image data of each of the image areas is collectively used as the compressed data of the color image. さらに、前記圧縮ステップで得た圧縮データを、その像域圧縮データごとに伸長することにより、カラー画像を再生する再生ステップを有することを特徴とする請求項4に記載された画像処理方法。5. The image processing method according to claim 4, further comprising a reproduction step of reproducing a color image by expanding the compressed data obtained in the compression step for each image area compressed data. さらに、前記抽出ステップで抽出した像域それぞれの画像データを、前記判定ステップで判定したその像域の特性に応じたデータ形式に変換することにより、画像編集に適したデータ形式の像域データに変換する変換ステップを有することを特徴とする請求項1に記載された画像処理方法。Furthermore, by converting the image data of each image area extracted in the extraction step into a data format corresponding to the characteristics of the image area determined in the determination step, the image area data in a data format suitable for image editing is obtained. 2. The image processing method according to claim 1, further comprising a conversion step of converting. さらに、前記変換ステップで得た像域データを編集する編集ステップを有することを特徴とする請求項6に記載された画像処理方法。7. The image processing method according to claim 6, further comprising an editing step of editing the image area data obtained in the conversion step. 前記第一の分離ステップは、前記処理対象領域の画素値分布に基づいて背景部分を検出し、その背景画素値近傍の値をもつ像域を分離し、分離した像域を整形して背景像域とすることを特徴とする請求項1に記載された画像処理方法。The first separation step detects a background portion based on the pixel value distribution of the processing target region, separates an image area having a value near the background pixel value, shapes the separated image area, 2. The image processing method according to claim 1 , wherein the image processing method is a region. 前記第一の分離ステップは、前記処理対象領域の画素値分布に基づいて背景部分を検出し、その背景画素値近傍の値をもつ像域を分離し、分離した像域が背景像域として適切か否かを判断し、適切と判断した像域を整形して背景像域とすることを特徴とする請求項1に記載された画像処理方法。The first separation step detects a background portion based on a pixel value distribution of the processing target region, separates an image area having a value near the background pixel value, and the separated image area is suitable as a background image area. 2. The image processing method according to claim 1 , wherein an image area determined to be suitable is shaped to form a background image area by shaping the image area determined to be appropriate. 前記背景画素値は前記処理対象領域の最頻値であることを特徴とする請求項8または請求項9に記載された画像処理方法。Image processing method according to claim 8 or claim 9 wherein the background pixel values characterized in that it is a mode of the processing target area. 前記第一の分離ステップは、前記処理対象領域の面積と前記分離した像域の面積とを比較した結果と、前記処理対象領域内で前記分離した像域外である部分の面積と、その分離した像域以外に存在する所定面積以下の連結成分の数とから、その分離した像域が背景像域として適切か否かを判断することを特徴とする請求項9または請求項10に記載された画像処理方法。In the first separation step, the result of comparing the area of the processing target area with the area of the separated image area, the area of the portion outside the separated image area in the processing target area, and the separation and a number of connected components less than a predetermined area exists other than the image area, the separated image area is described in claim 9 or claim 10, characterized in that determining whether appropriate as a background image area Image processing method. 前記第一の分離ステップは、前記分離した像域が背景像域として不適切であると判断した場合、前記背景画素値近傍の値を変更して、再び、像域を分離することを特徴とする請求項9または請求項10に記載された画像処理方法。In the first separation step, when it is determined that the separated image area is inappropriate as a background image area, the value in the vicinity of the background pixel value is changed, and the image area is separated again. The image processing method according to claim 9 or 10 . 前記第二の分離ステップは前記背景像域以外の像域で互いに近接しているものを一つ像域として分離することを特徴とする請求項1に記載された画像処理方法。2. The image processing method according to claim 1 , wherein the second separation step separates image areas other than the background image area that are close to each other as one image area. 前記判定ステップは、判定した像域の特性として、その種類、位置、形状を示す二値画像および包含関係を示す情報を保持することを特徴とする請求項1に記載された画像処理方法。2. The image processing method according to claim 1 , wherein the determination step holds a binary image indicating the type, position, and shape and information indicating an inclusion relationship as the characteristics of the determined image area. 前記判定ステップは、前記像域の彩度ヒストグラムのピーク値および分散に基づいて、その像域がカラー成分からなる像域かモノクロ成分からなる像域かを判断する第一の判断ステップ、前記第一の判断ステップでカラー成分像域と判断した場合は、その像域の色ヒストグラムのピーク値および分散に基づいて、そのカラー成分が連続調か限定色かを判断する第二の判断ステップ、前記第一の判断ステップでモノクロ成分像域と判断した場合は、その像域の明度ヒストグラムのピーク値および分散に基づいて、そのモノクロ成分が連続調か限定値かを判断する第三の判断ステップ、前記第二または第三の判断ステップで限定色または限定値成分と判断した場合は、注目画素とその近傍の画素の値から疑似中間調成分か否かを判断する第四の判断ステップ、並びに、前記第二から第四の判断ステップの判断結果に基づいて前記像域の種類を判断する第五の判断ステップを含むことを特徴とする請求項14に記載された画像処理方法。The determination step is a first determination step of determining whether the image area is an image area consisting of a color component or an image area consisting of a monochrome component based on the peak value and the variance of the saturation histogram of the image area. A second determination step for determining whether the color component is continuous tone or limited color based on the peak value and dispersion of the color histogram of the image area when the color component image area is determined in one determination step; A third determination step for determining whether the monochrome component is continuous tone or limited based on the peak value and dispersion of the lightness histogram of the image area when the monochrome component image area is determined in the first determination step; If it is determined in the second or third determination step that the color is a limited color or a limited value component, a fourth determination that determines whether it is a pseudo halftone component from the values of the pixel of interest and its neighboring pixels. Step, and image processing method according to claim 14, characterized in that it comprises a fifth determination step of determining a type of said image area on the basis of the judgment result of the fourth determination step from the second. 前記像域の種類にはカラー連続調、限定色文字線画、限定色擬似中間調、モノクロ連続調、限定値文字線画および限定値擬似中間調が含まれることを特徴とする請求項15に記載された画像処理方法。16. The type of the image area according to claim 15 , wherein the types of image areas include color continuous tone, limited color character line drawing, limited color pseudo halftone, monochrome continuous tone, limited value character line drawing, and limited value pseudo half tone. Image processing method. 前記判定ステップは、その種類が限定色文字線画、限定色擬似中間調、限定値文字線画および限定値擬似中間調の像域を判定した場合、その像域内の平均データを保持することを特徴とする請求項16に記載された画像処理方法。In the determination step, when the image areas of the limited color character line drawing, the limited color pseudo halftone, the limited value character line drawing, and the limited value pseudo half tone are determined, average data in the image area is held. The image processing method according to claim 16 . カラー画像を入力する入力手段と、
入力されたカラー画像の背景像域に注目して、そのカラー画像から特性の異なる像域を抽出する抽出手段と、
抽出された像域それぞれの特性を判定する判定手段とを有し、
前記抽出手段は、前記カラー画像の処理対象領域から背景像域を分離する第一の分離手段、および、分離された背景像域以外の像域を少なくとも一つの像域に分離する第二の分離手段を含み、分離した像域に、前記第一および第二の分離手段による処理を再帰的に繰り返すことにより像域を抽出することを特徴とする画像処理装置。
An input means for inputting a color image;
Focusing on the background image area of the input color image, extracting means for extracting an image area having different characteristics from the color image;
Have a determination means for extracted image area respective characteristics,
The extraction means is a first separation means for separating a background image area from a processing target area of the color image, and a second separation for separating an image area other than the separated background image area into at least one image area. An image processing apparatus comprising: means for extracting an image area by recursively repeating the processing by the first and second separation means on the separated image area .
さらに、前記抽出手段により抽出された像域それぞれに、前記判定手段により判定されたその像域の特性に応じた変倍処理を施すことにより、前記カラー画像を変倍する変倍手段を有することを特徴とする請求項18に記載された画像処理装置。Furthermore, each image area extracted by the extracting means has a scaling means for scaling the color image by applying a scaling process according to the characteristics of the image area determined by the determining means. 19. The image processing apparatus according to claim 18 , wherein さらに、前記抽出手段により抽出された像域それぞれに、前記判定手段により判定されたその像域の特性に応じた圧縮処理を施すことにより、前記カラー画像を圧縮する圧縮手段を備え、
前記圧縮手段は、前記像域それぞれの画像データを圧縮した像域圧縮データをひとまとめにして、前記カラー画像の圧縮データとすることを特徴とする請求項18に記載された画像処理装置。
Further, each image area extracted by the extraction means includes compression means for compressing the color image by performing a compression process according to the characteristics of the image area determined by the determination means ,
19. The image processing apparatus according to claim 18 , wherein the compression unit collectively sets compressed image data of the image area by compressing image area compressed data obtained by compressing the image data of each of the image areas.
さらに、前記圧縮手段から出力された圧縮データを、その像域圧縮データごとに伸長することにより、カラー画像を再生する再生手段を有することを特徴とする請求項20に記載された画像処理装置。21. The image processing apparatus according to claim 20 , further comprising reproduction means for reproducing a color image by expanding the compressed data output from the compression means for each image area compressed data.
JP32911194A 1994-12-28 1994-12-28 Image processing apparatus and method Expired - Fee Related JP3647071B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP32911194A JP3647071B2 (en) 1994-12-28 1994-12-28 Image processing apparatus and method
EP95309438A EP0724229B1 (en) 1994-12-28 1995-12-27 Image processing apparatus and method
DE69523135T DE69523135T2 (en) 1994-12-28 1995-12-27 Image processing device and method
US08/579,358 US5848185A (en) 1994-12-28 1995-12-27 Image processing apparatus and method
US09/162,727 US6556711B2 (en) 1994-12-28 1998-09-30 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32911194A JP3647071B2 (en) 1994-12-28 1994-12-28 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JPH08186706A JPH08186706A (en) 1996-07-16
JP3647071B2 true JP3647071B2 (en) 2005-05-11

Family

ID=18217740

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32911194A Expired - Fee Related JP3647071B2 (en) 1994-12-28 1994-12-28 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP3647071B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030210803A1 (en) 2002-03-29 2003-11-13 Canon Kabushiki Kaisha Image processing apparatus and method
JP5007639B2 (en) * 2007-09-27 2012-08-22 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP4948442B2 (en) 2008-02-06 2012-06-06 株式会社Pfu Image processing apparatus, image processing method, and image processing program
JP6776719B2 (en) * 2016-08-17 2020-10-28 富士通株式会社 Mobile group detection program, mobile group detection device, and mobile group detection method

Also Published As

Publication number Publication date
JPH08186706A (en) 1996-07-16

Similar Documents

Publication Publication Date Title
US5848185A (en) Image processing apparatus and method
US6334001B2 (en) Iterative smoothing technique for pre-processing mixed raster content planes to improve the quality of a decompressed image and increase document compression ratios
JP4568460B2 (en) Image processing apparatus and recording medium
US6272255B2 (en) Method and apparatus for pre-processing mixed raster content planes to improve the quality of a decompressed image and increase document compression ratios
US7782339B1 (en) Method and apparatus for generating masks for a multi-layer image decomposition
JP5302768B2 (en) Image processing apparatus and image processing method
JP3376129B2 (en) Image processing apparatus and method
EP0650287B1 (en) Image processing method and apparatus
JP4176114B2 (en) Image compression apparatus, image reading apparatus including the same, image processing apparatus including the image compression apparatus, image forming apparatus including the same, and image compression processing method
US7526137B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
EP1494457A2 (en) Prioritized PDL segmentation producing two bit selector
JP3647071B2 (en) Image processing apparatus and method
JP4441300B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium storing the program
US7308136B2 (en) Weak edge repositioning in a MRC segmentor
EP1006714A2 (en) Method of processing mixed raster content planes
US7269294B2 (en) Foreground erosion method and system for Multiple Raster Content (MRC) representation of documents
JP4060559B2 (en) Image processing apparatus and image processing method
JPH07334648A (en) Method and device for processing image
JP2001283212A (en) Method of base interpolation by vector transformation
JP3931468B2 (en) Image area separating apparatus and method
JP5118171B2 (en) Segmentation method and system for multi-raster content (MRC) representation of documents
JP7185451B2 (en) Image processing device, image processing method, and program
JP2002290763A (en) Image processing method and image processing device
JP3230122B2 (en) Data compression method and apparatus for binary image
EP1006711A2 (en) Method and apparatus for processing a pixel map

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040220

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050208

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090218

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100218

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100218

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110218

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120218

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130218

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20140218

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees