JP4035696B2 - Line segment detection apparatus and image processing apparatus - Google Patents

Line segment detection apparatus and image processing apparatus Download PDF

Info

Publication number
JP4035696B2
JP4035696B2 JP2001380768A JP2001380768A JP4035696B2 JP 4035696 B2 JP4035696 B2 JP 4035696B2 JP 2001380768 A JP2001380768 A JP 2001380768A JP 2001380768 A JP2001380768 A JP 2001380768A JP 4035696 B2 JP4035696 B2 JP 4035696B2
Authority
JP
Japan
Prior art keywords
line segment
unit
image
character
area
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
JP2001380768A
Other languages
Japanese (ja)
Other versions
JP2003189090A (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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2001380768A priority Critical patent/JP4035696B2/en
Publication of JP2003189090A publication Critical patent/JP2003189090A/en
Application granted granted Critical
Publication of JP4035696B2 publication Critical patent/JP4035696B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color, Gradation (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、線分検出装置及び画像処理装置に関するものである。
【0002】
【従来の技術】
従来より複写機やファクシミリなどの画像処理装置においては、画像中の各領域毎に適した画像処理を施し、画質を向上させている。例えば入力された画像や文字や線画などの文字領域と写真や網点などの絵柄領域が混在していた場合、その画像を再生するときには文字領域と絵柄領域を分離し、文字領域には解像度を重視した処理を実施し、絵柄領域には階調性を重視した処理を施すことが、画像品質の面から望ましい。また、上記のような画像データを伝送する場合にも、文字領域と絵柄領域を分離し、それぞれに対して異なった手法で圧縮処理を行った方が、画像品質および圧縮率の面から望ましい。
【0003】
具体的には、スキャナ等によって読み取ったり、あるいはファクシミリ等で送信されてきた、文字・線画・写真・網点等が混在した画像をハードコピーする場合、文字・線画などの文字領域に対しては解像度を重視した処理を実施し、写真・網点などの絵柄領域に対しては、階調性を重視した処理を施す。これにより、高画質な再生画像を得ることが可能となる。
【0004】
また、文字・線画・写真・網点等の混在した画像を、ネットワークを介して離れた場所にある画像出力装置に転送する場合、文字領域と絵柄領域を分離し、それぞれの領域に対して異なった手法で圧縮処理を行った方が、高画質で小容量の画像データを得ることができる。従って、転送時間を短縮し、高画質な再生画像を得ることができる。
【0005】
ここで、上述のような解像度を重視した処理と階調性を重視した処理を画像の各領域に対して適応的に施すためには、画像に含まれる文字領域及び絵柄領域を精度良く分離する必要がある。以下、文字領域及び絵柄領域や、その他各種の領域への分離を行うことを像域分離と言う。この像域分離に関しては、従来、種々の提案がなされている。
【0006】
例えば、画像をある一定の大きさのブロックに分割し、各ブロックごとにそのブロックに含まれる画素の最大濃度と最小濃度を求めるとともに、最大濃度と最小濃度の差をあらかじめ決められた閾値と比較し、当該閾値よりも大きな値を持つブロックは文字領域、小さい値を持つブロックは絵柄領域と判定する方法(以下、従来例1と呼ぶ)がある。この従来例1としては、例えば特開平4−317261号公報などに記載されている。しかし、この従来例1の技術では、ブロック単位に像域分離が行われるため、文字・線画の輪郭部の像域判定結果が入力画像に忠実な判定結果とならないという欠点がある。
【0007】
また別の技術として、注目画素を中心とした局所オペレータ(フィルタ)を用い、フィルタリング結果を予め決められた閾値と比較し、閾値よりも大きな値を持つ画素は文字領域画素、小さい場合は絵柄領域画素と判定する方法(以下、従来例2と呼ぶ)がある。この従来例2としては、例えば、電子情報通信学会論文誌D−II,Vol.J75−D−II,No.1,pp.39−47,1992,「文字/絵柄(網点、写真)混在画像の像域分離方式」、あるいは、特開昭61−157167号公報などに記載されている。しかしながら、この従来例2の場合には、画像中に含まれるエッジを抽出する手法であるため、ノイズを抽出したり、絵柄中に含まれるエッジを抽出しやすいという問題がある。
【0008】
さらに、上述の従来例1または従来例2の一方だけを用いて像域分離を行うのではなく、文字領域を抽出する処理や絵柄領域を抽出する処理などの複数の処理を行い、各処理結果から精度良く像域分離を行う手法(以下、従来例3と呼ぶ)も提案されている。従来例3の技術の一つとして、例えば特開平2−294885号公報に記載されている技術などがある。
【0009】
この従来例3について図15を用いて簡単に説明する。図15は、従来の画像処理装置の一例を示すブロック図である。図中、61は文字抽出部、62は網点抽出部、63は輪郭抽出部、64は論理和演算部、65は誤判定除去部、66は論理積演算部、67は輪郭再生成部、68は収縮部、69は膨張部、70は論理積演算部である。
【0010】
図15において、入力された画像信号は文字抽出部61、網点抽出部62および輪郭抽出部63に供給される。文字抽出部61は、入力された画像信号から画素単位に文字領域か否かの判定を行い、その判定結果を出力する。網点抽出部62は、画素単位に網点領域か否かの判定を行い、その判定結果を出力する。文字抽出部61と網点抽出部62の各判定結果は、論理和演算部64において画素単位に論理和演算が行われた後、誤判定除去部65に供給される。
【0011】
誤判定除去部65においては、文字抽出結果の補正処理が行われる。すなわち、文字抽出部61では絵柄の一部についても文字領域と判定している恐れがあるため、絵柄部分を除去して文字領域のみとする。ここで、論理和演算部64の出力は文字抽出部61で文字領域として抽出された部分(実際には絵柄領域も含んでいる可能性がある)と、網点抽出部62で絵柄領域として抽出された部分が混在している信号である。この信号に対して収縮部68で収縮処理を行うことによって小領域は消去される。そして膨張部69で膨張処理を施し、元に戻すことによって、収縮処理で除去されなかった大きな領域のみの画像が生成される。この大きな領域を絵柄領域とみなし、論理和演算部64から出力される文字領域と絵柄領域が混在した信号から膨張部69の出力により絵柄領域を除去する。具体的には、膨張部69の出力を反転し、論理和演算部64との論理積を論理積演算部70において演算すればよい。これによって、文字抽出部61で抽出された領域のうち、絵柄部分を文字領域と誤判定した領域が除去され、文字領域のみが出力される。
【0012】
次に、誤判定除去部65と輪郭抽出部63の各出力結果は、論理積演算部66において画素単位で論理積演算が行われ、文字・線画の輪郭部が抽出された後、輪郭再生成部67に供給される。輪郭再生成部67においては、論理積演算部66の論理積演算結果に対して文字・線画の輪郭補正が行われる。そして、この輪郭再生成部67の出力結果を像域分離結果とすることにより、精度の高い像域分離を行うことができる。
【0013】
このような従来例3の技術は、絵柄中でのエッジ誤抽出が少なく、文字・線画の輪郭部は入力画像に忠実な抽出結果となる、など比較的優れた手法である。しかしながら、下記のような課題も残されている。
(1)太文字・太線の場合、輪郭部のみの抽出となり、文字線画内部までの抽出が困難である。
(2)一つの文字の中で幅の太い箇所と細い箇所が存在した場合に、抽出される箇所とされない箇所が存在する。
(3)絵柄中に誤抽出が発生する場合は、ブロック状の誤抽出となることがあり、画像再現した際に画質劣化が目立ちやすい。
【0014】
図16は、誤検出の一例の説明図である。図中のA、C部は細く、B部は太くなっている。すると、図中、黒く示した部分は文字・線画として抽出されるが、図中のハッチングを施した部分は絵柄部分として抽出されてしまう。このように文字・線画中に絵柄部分が存在していると、A部とB部の接続部分、及びB部とC部の接続部分においてB部内部における絵柄としての処理との間で視覚的に色や明度の段差が目立ってしまい、画質が低下するという問題がある。この図16に示した不具合の例は上述の(2)に相当する問題であるが、このほかにも(1)や(3)など、様々な問題がある。
【0015】
このように分離を困難にしている理由の一つに、どの程度の線幅までを文字・線分として認識し、どの程度の線幅からを「絵柄」として認識することが適当かが明確でないことが挙げられる。従来の手法では、「文字」と「絵柄」の境界線幅を人為的に設定している。従って、この境界線幅付近の文字・線分は識別が不安定となり、画質劣化につながる。言い換えると、このような境界付近の画質特性は本来「文字」と「絵柄」の中間的特性を持つ部分であるが、従来の手法では、このような箇所においても「文字」と「絵柄」のいずれかに強制的に識別している。特に太文字や太線分の場合には、一つの文字・線分中でその文字線分幅が様々に変化しており、このような文字線分中に分離境界幅が存在する場合には、「絵柄」と「文字」の判定が不安定となり、結果として上述の(2)のように「絵柄用画像処理」と「文字用画像処理」が同じ線分内で部分的に切り替わりながら行われることとなり、画質が劣化していた。
【0016】
【発明が解決しようとする課題】
本発明は、上述した事情に鑑みてなされたもので、上述のような2値的な領域判定における不具合を解消し、さらに画質の向上を図ることができる画像処理装置を提供することを目的とするものである。
【0017】
【課題を解決するための手段】
本発明は、入力された画像データから線分を検出する線分検出装置において、処理対象となる各画素を中心画素として該中心画素を中心とし検出する線分幅に対応する所定の大きさの領域を構造要素とし該構造要素に外接する1ないし複数画素からなる複数の外接領域についてそれぞれ平均濃度を算出する平均値算出手段と、該平均値算出手段で算出した複数の外接領域の平均濃度が最小となる外接領域を選択する選択手段と、該選択手段で選択された外接領域及び該外接領域と前記構造要素を挟んで対向する外接領域の平均濃度及び前記構造要素内の画素値により線分を検出する検出手段を有することを特徴とするものである。ここで前記検出手段は、構造要素内の画素の濃度差が所定の値より小さいか否かを判定する判定手段と、該判定手段で濃度差が所定の値より小さいと判定されたとき前記選択手段で選択された2つの外接領域の画素値の平均値の差が小さくかつ2つの外接領域の平均値と前記構造要素の平均濃度との差が大きい場合に前記構造要素内の画素を線分の画素として検出する線分画素検出手段を有する構成とすることができる。さらに、前記検出手段による線分の検出結果に対して膨張処理を行う膨張処理手段を有してもよい。さらに、線分で構成された小領域を抽出する小領域抽出手段と、前記小領域抽出手段による抽出結果と前記膨張処理手段による膨張処理結果の論理演算を行う論理演算手段を有してもよい。
【0018】
また本発明の画像処理装置では、入力された画像データから、小領域抽出手段で小領域を抽出し、また1ないし複数の上述の本発明の線分検出装置からなる線分抽出手段で線分を抽出し、さらにまたエッジ検出手段でエッジ部分を検出する。そして像域信号生成手段において、抽出した小領域の情報と線分の情報、さらに検出したエッジの情報に基づいて、画像データの文字を含む線分または絵柄とともに、線分内部を示す像域信号を生成することを特徴としている。さらに線分内部を示す像域信号を生成する際に、当該線分内部の領域幅に応じた像域信号を生成するように構成してもよい。そして、このような像域信号を用いて、線分領域と線分内部領域と絵柄領域でそれぞれの特性に応じた画像処理を施すことができる。
このように、本発明の画像処理装置では、画像を「文字」と「絵柄」の2つに分離するのではなく、これらの中間的な特性に位置する領域として線分内部領域を定義している。このような線分内部領域を示す像域信号を利用して画像処理を行うことによって、文字と絵柄の識別境界上にある太さの線分・文字においても、それらの内部領域の画質をコントロールすることが可能であり、従来以上に文字線分画質を向上させることができる。
【0019】
【発明の実施の形態】
図2は、本発明の画像処理装置及び画像処理方法の実施の形態を含む基本的な一構成例を示すブロック図である。図中、1は画像入力部、2は入力階調補正部、3は色信号変換部、4は色信号変換部、5は墨版生成部、6は空間フィルタ部、7は出力階調補正部、8は画像出力部、9は像域分離部である。画像入力部1はCCD撮像素子などの光電変換素子によって構成されるイメージスキャナなどで構成され、原稿のカラー画像情報を色別に読み取り、電気的なディジタル画像信号に変換して出力する。なお、この画像入力部1によって読み取られ、変換されたディジタル画像信号は、解像度600dpi、各色8ビットのRGBカラー画像信号であるものとして、以下の説明を行う。もちろん本発明はこのような画像信号に限られるものではない。
【0020】
画像入力部1から出力される画像信号(RGB各色8ビット)は、入力階調補正部2によって階調補正される。色信号変換部3では、階調補正されたRGB画像信号が、他の色信号(例えば、L* * * )に変換される。色信号変換部3から出力されるL* * * 画像信号は色変換部4に供給され、他の色信号(例えばYMC)に変換され、さらに墨版生成部5によってYMC画像信号から墨版が生成されてYMCK画像信号に変換される。墨版生成部5には後述する像域分離部9からの像域判定結果も入力され、これに対応して墨版生成係数が切り替えられる。
【0021】
墨版生成部5から出力されるYMCK画像信号は空間フィルタ部6に供給され、各色ごとに空間フィルタリング処理が施される。また、空間フィルタ部6には後述する像域分離部9からの像域判定結果も入力され、像域判定結果に従って例えばフィルタリング係数などを切り替えて空間フィルタリング処理を行う。
【0022】
空間フィルタリング処理がなされたYMCK画像信号は出力階調補正部7に供給され、各色ごとに画像出力階調特性に合うように出力階調の補正がなされる。また、出力階調補正部7にも後述する像域分離部9からの像域判定結果が入力され、その像域判定結果に応じた出力階調の補正がなされる。
【0023】
出力階調が補正されたYMCK画像信号は画像出力部8に供給される。画像出力部8はさらに、後述する像域分離部9からの像域判定結果も入力され、その像域判定結果に応じて、例えばスクリーンなどを切り替えて画像を出力する。
【0024】
また、色信号変換部3から出力されるL* * * 画像信号のうち、L* 信号は像域分離部9にも供給され、後述するように、各画素ごとに文字部、文字内部、あるいは絵柄部の像域判定がなされる。この像域判定結果は、墨版生成部5、空間フィルタ部6、出力階調補正部7および画像出力部8に供給され、前述したように、像域判定結果に対応した処理が施される。
【0025】
図2に示した構成は一例であって、像域分離部9、及び、像域分離部9から出力される像域判定結果を利用する処理部を有する構成であれば、任意に構成することが可能である。
【0026】
図1は、像域分離部の第1の構成例を示すブロック図である。図中、11は小領域抽出部、12は線分抽出部、13はエッジ検出部、14は像域信号生成部、15は文字抽出部、16は網点抽出部、17は論理和演算部、18は収縮部、19は膨張部、20は否定−論理積演算部、21は論理積演算部、22は否定−論理積演算部、23は属性信号生成部である。像域分離部9は、小領域抽出部11、線分抽出部12、エッジ検出部13、像域信号生成部14などから構成されている。
【0027】
小領域抽出部11は、入力された画像信号から小領域を抽出する。小領域抽出部11は、文字抽出部15、網点抽出部16、論理和演算部17、収縮部18、膨張部19、否定−論理積演算部20から構成されている。文字抽出部15では、入力された画像信号に対して文字抽出処理を実施する。文字抽出には、文字が抽出されやすいように設定した固定閾値の2値化処理でもよいし、2値化対象画素周辺の濃度値を参照して、その都度、2値化閾値を切り替えるような動的閾値設定可能な浮動2値化処理でもよい。文字は比較的高い濃度を持つことが多いことから、これを考慮したその他の文字抽出処理手法を適用してもよい。文字抽出部15からの文字抽出結果として、例えば文字抽出された画素レベルをON画素(論理“1”)、抽出されなかった画素をOFF画素(論理“0”)とし、各画素1ビットの画像信号を出力することができる。この文字抽出部15から出力された画像信号は、論理和演算部17に入力される。
【0028】
網点抽出部16では、入力された画像信号から、画像中に含まれる網点領域の抽出が行われる。網点抽出部16による網点領域の抽出結果として、例えば、抽出された画素レベルをON画素(論理“1”)、抽出されなかった画素をOFF画素(論理“0”)とする1ビットの画像信号を出力することができる。この網点抽出部16から出力された画像信号は、論理和演算部17に入力される。網点抽出部16としては、例えば特開平11−73503号公報に記載されている技術などを用いることができる。ここではその詳細については記載しないが、概略は、入力画像の2値化を行い、2値画像データの高レベル(ON画素)となっている画素(または低レベル(OFF画素)となっている画素)が注目画素を中心としたN1×N1(例えばN1=19)の広範囲領域の中で周期構造をなしているか否かを判定した後、その判定結果に対してN2×N2(例えばN2=37)の広範囲の領域を用いて網点領域を判定、抽出するものである。
【0029】
論理和演算部17は、文字抽出部15から出力された文字抽出結果と網点抽出部16から出力された網点領域抽出結果とを2入力とし、画素単位で論理和演算を行う。この論理和演算の結果、文字や線分などに関しては、文字抽出部15で抽出された結果と同等の信号が論理和演算部17から出力される。一方、絵柄領域に関しては、その領域の大部分が網点抽出部16により抽出されるが、人物像の髪の毛など濃度の非常に高い(濃い)領域については網点周期構造が無くなっており、網点抽出部16では抽出できない。しかしながら、そのような濃度の非常に高い(濃い)領域は、文字抽出15によって抽出することも可能であるため、論理和演算部17からは絵柄領域全体についても抽出された結果が出力される。論理和演算部17から出力された文字線画及び絵柄の抽出結果の情報は、収縮処理部18に供給されるとともに、2入力の否定−論理積演算部20の一方の入力となる。
【0030】
収縮処理部18では、注目画素を中心としたM1×M1(例えばM1=31)画素領域での収縮処理を行う。収縮処理は縮退処理とも呼ばれる。図3は、収縮処理の概要の説明図である。収縮処理とは、例えば“画像工学”,コロナ社,p98−101で述べられているように、「注目画素の座標値と値をf(i,j)=0とするとき、点(i,j)の8近傍の値をすべて0とする」操作のことである。すなわち、2値画像の画素を細らせる処理と言い換えることができる。例えば図3に示す例では、図3(A)における中心の注目画素が白(=0)であるので、この注目画素の8近傍の値をすべて0とし、図3(B)に示すように変換する。これによって、例えばエッジ部などでは白領域に隣接している黒部分が白に変換され、実質的に黒部分を収縮させることができる。マトリクスの大きさは収縮量と関連しており、図3に示した例の場合はM1=3であるので、黒領域の周囲1画素が削減されることになる。もちろん収縮処理として任意の方法を適用することが可能である。収縮処理部18から出力された画像データは膨張処理部19に入力される。
【0031】
膨張処理部19では、注目画素を中心としたM2×M2(例えばM2=49)画素領域での膨張処理を行う。膨張処理は拡大処理とも呼ばれる。図4は、膨張処理の概要の説明図である。拡大処理とは前述の文献、同ページの説明にあるように、「注目画素の座標値と値をf(i,j)=1とするとき、点(i,j)の8近傍の値をすべて1とする」操作のことである。すなわち、拡大処理とは画素を太らせる処理と考えることができる。例えば図4に示す例では、図4(A)における中心の注目画素が黒(=1)であるので、この注目画素の8近傍の値をすべて1とし、図4(B)に示すように変換する。これによって、例えばエッジ部などでは黒領域に隣接している白部分が黒に変換され、実質的に黒部分を膨張させることができる。マトリクスの大きさは膨張量と関連しており、図4に示した例の場合にはM2=3であるので、黒領域の周囲が1画素分だけ膨張する。もちろん収縮処理として任意の方法を適用することが可能である。膨張処理部19から出力された画像データは、論理和演算部17から出力される演算結果と同期がとられて、否定−論理積演算部20の他方の入力となる。
【0032】
上述の収縮部18及び膨張部19によって、論理和演算部17から出力される文字線画領域及び絵柄領域の抽出結果のうち、小さな領域については収縮部18による収縮処理によって消去され、膨張部19で膨張させても元には戻らない。従って、膨張処理部19の出力は、論理和演算部17から出力される文字線画領域及び絵柄領域の抽出結果のうち、小さな領域を除去したものとなる。除去される領域の大きさは、収縮部18において用いるマトリクスの大きさに依存する。
【0033】
否定−論理積演算部20では、膨張処理部19からの入力について各画素ごとにビット反転(NOT処理)が行われた後、論理和演算部17から入力される文字線画領域及び絵柄領域の抽出結果の対応する画素との論理積演算が行われる。これによって、膨張部19までの処理で除去された小領域のみが抽出されることになる。通常、文字線画領域は絵柄領域に比べて小さく、上述のような小領域抽出部11の処理によって、文字や線画などの線分で構成された領域のみを抽出することができる。
【0034】
また、線分抽出部12では、入力された画像信号から、画像中に含まれる文字や線分が抽出される。線分抽出部12からの文字抽出結果として、例えば、抽出された画素をON画素(論理“1”)、抽出されなかった画素をOFF画素(論理“0”)とする各画素1ビットの画像信号を出力することができる。この線分抽出部12の詳細については後述する。線分抽出部12から出力された線分抽出結果は、像域信号生成部14中の論理積演算部21の一方の入力端に入力される。
【0035】
一方、エッジ検出部13では、入力画像中の輪郭エッジを検出する。エッジ検出手法は、例えばソベルフィルタなどの公知の技術を用いることができる。エッジ検出部13の検出結果としては、例えばエッジ部の画素レベルをON画素(“論理1”)、非エッジ部の画素レベルをOFF画素(“論理0”)とすることができる。このようにしてエッジ検出部13から得られた輪郭エッジ出力が、像域信号生成部14中の否定−論理積演算部22の一方の入力端に入力される。
【0036】
像域信号生成部14は、小領域抽出部11による小領域の抽出結果と、線分抽出部12による線分の抽出結果と、エッジ検出部13によるエッジの検出結果に基づいて、画像信号の文字を含む線分、その線分内部、絵柄のいずれかを示す像域信号を生成する。像域信号生成部14は、論理積演算部21、否定−論理積演算部22、属性信号生成部23から構成されている。
【0037】
論理積演算部21には、小領域抽出部11中の否定−論理積演算部20での演算結果、即ち小領域抽出部11からの出力結果と、線分抽出部12からの線分抽出結果がそれぞれ入力され、両者の論理積を画素ごとに演算する。この結果、小領域でしかも線分を構成する画素が抽出される。このようにして得られた論理積演算結果出力、すなわち文字・線分出力が属性信号生成部23の一方の入力端及び否定−論理積演算部22の一方の入力端へと入力される。
【0038】
否定−論理積演算部22には、論理積演算部21の出力が入力されるとともに、エッジ検出部13から得られた輪郭エッジの検出結果が入力される。エッジ検出部13から得られた輪郭エッジの検出結果については、各画素ごとにビット反転(NOT処理)が行われた後、論理積演算部21の出力と論理積演算が行われる。この演算により、輪郭エッジに囲まれた文字・線分内部領域の内部が抽出される。さらに否定−論理積演算部22の出力(文字・線分内部領域を示す)が、属性信号生成部23に入力される。
【0039】
属性信号生成部23では、論理積演算部21の出力(文字・線分を示す)と、否定−論理積演算部22の出力(文字・線分内部領域を示す)とを用いて像域信号を生成する。像域信号は、「文字」、「文字内部」、「絵柄」の3通りからなる。像域信号生成部23からの出力データは像域分離部9での像域判定結果として、例えば図2に示した構成例では墨版生成部5、空間フィルタ部6、出力階調補正部7および画像出力部8に供給される。そして、これら各処理部において、画像変換処理や画像補正処理、または画像変換係数や画像補正係数を像域信号に従って切り替えることにより、像域判定結果に対応した処理が施される。すなわち、「文字」、「文字内部」、「絵柄」それぞれに適した画像処理が施されることになり、従来手法に比べて劣化の少ない極めて高画質が画像出力が得られることになる。
【0040】
図5は、像域分離部による像域分離結果の一例の説明図である。ここでは図16に示した例と同様に、図中のA、C部が細く、B部が太い線画の場合を示している。このような画像信号が入力された場合、図5において黒く示したエッジ部分が「文字」、A,C部において細かいハッチングを施した部分が「文字内部」、B部の内部において荒いハッチングを施した部分が「絵柄」として、それぞれ像域信号が出力されることになる。
【0041】
例えば「文字内部」と判定された領域について、「文字」と「絵柄」の中間的な処理を施すことによって、A部とB部の接続部分、及びB部とC部の接続部分において「文字内部」と「絵柄」とが隣接した部分においても、従来のような色や明度の段差が少なくなり、このような境界部分を目立たなくすることができる。従って、画像全体の画質を向上させることができる。
【0042】
次に、図1における線分抽出部12、エッジ検出部13,属性信号生成部23における内部構成例を順に説明してゆく。図6は、線分抽出部の一構成例を示すブロック図である。図中、31−1〜Kは第1〜K縮小部、32−0〜Kは線分抽出部、33−1〜Kは第1〜K拡大部、34は論理和演算部、35は膨張部である。線分抽出部12に入力された画像データは、第1縮小部31−1〜第K縮小部31−Kに入力され、画像データの縮小処理が行われる。例えば、第1縮小部31−1では、画像の縦・横方向それぞれ1/2の縮小が行われる。また、第2縮小部31−2では、画像の縦・横方向それぞれ1/4の縮小が行われる。同様にして、第K縮小部31−Kでは、画像の縦・横方向それぞれ1/(2K)の縮小が行われる。第1縮小部31−1〜第K縮小部31−Kにおける画像縮小方式としては、単純間引き法、4点補間法、16点補間法、投影法、中央値採用法など、公知の縮小方式でよい。
【0043】
第1縮小部31−1〜第K縮小部31−Kによって縮小された画像データは、それぞれ線抽出部32−1〜線抽出部32−Kに入力される。また、線分抽出部12に入力された画像データは、線抽出部32−0にも入力される。線抽出部32−0〜線抽出部32−Kでは、入力された画像データから所定範囲の幅を有する線分の抽出が行われる。この例の場合は、第1縮小部31−1〜第K縮小部31−Kによって画像データはそれぞれ1/2,1/4、1/6、…、1/(2K)に縮小が行われた後、線抽出部32−0〜線抽出部32−Kの処理が行われる。線抽出部32−0〜線抽出部32−Kの詳細については後述するが、線抽出部32−0〜線抽出部32−Kについては例えば同一の構成で実現することができる。その場合でも、第1縮小部31−1〜第K縮小部31−Kにおいてそれぞれの縮小率で画像データを縮小しているため、それぞれ異なった線幅の線分を抽出することができる。
【0044】
続いて、線抽出部32−1〜線抽出部32−Kから出力された線分の抽出結果は、それぞれ第1拡大部33−1〜第K拡大部33−Kに入力され、それぞれ拡大処理が実施される。第1拡大部33−1〜第K拡大部33−Kでの拡大率は、それぞれ第1縮小部31−1〜第K縮小部31−Kでの縮小率の逆数、即ちこの例では、縦・横方向共、2,4,6、…、2K倍とする。第1拡大部33−1〜第K拡大部33−Kにおける画像拡大方式としては、単純補間法、4点補間法、16点補間法、投影法、中央値採用法など、公知の拡大方式でよい。
【0045】
さらに第1拡大部33−1〜第K拡大部33−Kおよび、前述の線抽出部32−0からの出力結果は論理和演算部34に入力され、画素単位に論理和演算が行われる。この論理和演算によって、線分抽出部32−0〜Kによって抽出されたすべての線分が出力結果として出力されることになる。論理和演算部34からの出力結果の画像データは膨張部35に入力される。膨張部35では、線分抽出処理において抽出補正を行う。膨張処理については、図4を用いて説明した通りであり、任意の公知の手法を用いることができる。この膨張部35の出力結果が線分抽出部12の出力となる。
【0046】
続いて、線分抽出部32−0〜線分抽出部32−Kについて説明する。上述のように、線抽出部32−0〜線抽出部32−Kはすべて同じ構成とすることができるので、ここでは線分抽出部32−0についてのみ説明する。しかしこれに限らず、線抽出部32−0〜線抽出部32−Kをそれぞれ異なる構成として線分抽出するようにしても構わない。
【0047】
図7は、線抽出部32−0の一構成例を示すブロック図である。図中、41−1〜Lは画素幅検知部、42は論理和演算部である。線分抽出部32−0は、図7に示すように、1×1画素幅検知部41−1〜L×L画素幅検知部41−Lと、これらの結果の論理和演算を行うための論理和演算部42で構成されている。Lの大きさは抽出する線分幅に応じて設定すればよい。
【0048】
ここで用いる線分検出手法は基本的に「抽出線分幅に基づくパタンマッチング処理」と考えてよい。図8は、線分検出処理の一例の概念図である。線分検出処理は、具体的には図8に示すように、抽出する線分幅を直径とする「線分検出フィルタ」をラスタ走査し、各画素単位でその画素が線分上に存在するか否かを判別する。
【0049】
一例として、5×5画素幅検知部41−5を用いて説明する。図9は、5×5画素幅検知部41−5における線分検出動作の具体例の説明図である。図9中、黒く塗りつぶした画素が中心画素であり、ハッチングを施した検出フィルタ画素を構造要素と呼ぶことにする。図9において、5×5画素幅線分検出フィルタは(B)〜(E)に示すように角度90度、0度、45度、角度135度の4つのサブフィルタから構成される。以下、検出手順を示す。
(1)入力画像をラスタ走査し、処理対象となる各画素を中心画素として、図9(B)〜(E)に示す各サブフィルタの構造要素に外接する領域a〜hにおけるそれぞれの画素平均値を算出する。
(2)(1)の平均値が最小となる領域を持つサブフィルタを選択する。
(3)(2)で選択されたサブフィルタ内で、後述する判定を行って線分判定結果を出力する。
【0050】
図10は、線分検出動作の詳細の一例の説明図である。上述の(1)〜(3)の検出手順において、(1)、(2)の手順に従って画素平均値の最小値を求めたとき、例えば領域aの平均値が最小値であったとする。この場合、図9(B)に示す角度90度のサブフィルタが選択されるが、このときの線分と線分検出フィルタとは、図10(A)に示すような関係になっているものと判断することができる。実際にこのような関係になっているか否かを判定するため、上述の(3)の検出手順において図10(B)に示すような演算を実施することによって線分判定を行うことができる。
【0051】
図10(B)に示す演算では、まずS81において、構造要素内の画素の濃度差を検出する。そのために、構造要素内の画素の最大値と構造要素内の画素の平均値との差分の絶対値がしきい値パラメータαよりも小さいか否かを判定する。この判定は、構造要素がすべて文字あるいは線分内に含まれていることを判定するものである。もし、濃度差が大きい場合には、文字や線分のエッジが構造要素内に存在するため、線幅の検出を行うことができない。その場合には5×5画素幅の線分領域とは判定しない。
【0052】
構造要素内の画素の濃度差が小さければ、さらにS82における判定を行う。ここではまず、構造要素内の画素の平均値と領域aの平均値との差分を演算し、しきい値パラメータβよりも大きいか否かを判定する。これによって、構造要素と領域aとの間にエッジが存在しているか否かを判定する。同様に、構造要素内の画素の平均値と領域bの平均値との差分を演算し、しきい値パラメータβよりも大きいか否かを判定する。これによって、構造要素と領域bとの間にエッジが存在しているか否かを判定する。さらに、領域aの平均値と領域bの平均値との差分の絶対値がしきい値パラメータγよりも小さいことを判定する。この判定は、領域a及び領域bとも、文字または線分の外であることを確認するための判定である。これらの条件がすべてそろっている場合に、図10(A)に示すような関係にあるものとして、S83において、構造要素内のすべての画素について、5×5画素幅の線分であると判定する。なお、いずれかの条件を満たさない場合には、S84において、5×5画素幅の線分ではないと判定する。
【0053】
ここでは図9(B)に示す角度90度のサブフィルタについて示したが、他の図9(C)〜(E)に示すサブフィルタにおいても同様である。また、5×5画素幅検知部41−5以外の1×1画素幅検知部41−1〜L×L画素幅検知部41−Lの線分検出についても、図9に示したフィルタとはサイズが異なるフィルタ、およびサイズが異なるサブフィルタを用いて同様の演算処理を行えばよい。
【0054】
さらに1×1画素幅検出部41−1〜L×L画素幅検出部41−Lの処理出力全てが論理和演算部42入力され、論理和が求められる。この論理和出力が図6に示した線分抽出部32−0の出力となる。その他の線分抽出部32−1〜線分抽出部32−Kについては、前述したように、ここでは全て図7に示したものと同じものを使用することができる。但し、線分抽出部32−0以外は、第1縮小部31−1〜第K縮小部31−Kで縮小されたデータに対して線分抽出処理がなされた後、拡大処理がなされるので、実際に抽出される線分画素幅はそれぞれ異なる。つまり、第1拡大部33−1〜第K拡大部33−Kの各出力はそれぞれ異なる結果が出力されることになる。例えば、線分抽出部32−0では、等倍画像データに対して線分検知が行われる。しかしながら、線分抽出部32−1では、第1縮小部31−1の処理が行われるので、1/2縮小処理後の画像データに対して、図7の線分検知が行われた後、第1拡大部33−1の処理が実施される。結果として、線分抽出部32−0で検知された線分幅に対して2倍の幅を持つ画素線分を抽出することになる。以下、第2拡大部33−2の出力は、線分抽出部32−0に対して4倍の幅を持つ画素線分を抽出することになる。以下、他の拡大部の出力についても同様である。
【0055】
なお、上述の説明では、すべての縮小画像データに対して図7に示す同じ線分検出フィルタを用いるものとして説明したが、これに限らず、各縮小画像データに対して異なる線分検出フィルタを適用するように構成してもよい。
【0056】
以上のようにして、図6に示した線分抽出部32−0の出力、および、第1拡大部33−1〜第K拡大部33−Kの出力のすべてが図6に示す論理和演算部34に入力され、論理和が求められる。この結果、得られた画像データは、膨張部35へとさらに入力される。次に膨張部35の処理内容について説明する。
【0057】
前述した線分抽出処理は、その手法の制約から、検出画素幅以外の線分幅は抽出できない。図11は、線分抽出部により抽出できない文字部分の一例の説明図である。例えば線幅が大きく変化している場合には、いずれの線幅としても検出されないことがある。具体例としては、図11(A)に示すように、文字の「払い」の部分(破線で示す)については、黒く塗りつぶされた部分までは線幅の検出ができるものの、先にゆくに従い、検出幅に合致するフィルタがなくなり、抽出できないことがある。また、図11(B)に示すように、線分の交点を抽出できないことがある。これは、図9に示したように構造要素を囲む領域a〜hの濃度と構造要素内の濃度差を用いて線分検出しているため、交点部分では縦、横、斜めのいずれの線分としても検出できなくなってしまうことによる。
【0058】
以上の理由から、文字・線分検出結果として、図6に示す論理和演算部34の出力をそのまま用いることはできず、不十分である。このような問題に対処するため、論理和演算部34の結果に対して、膨張部35において膨張処理を実施することとしている。膨張処理の詳細は、図4を用いて前述した通りである。ここでの膨張量は、抽出する文字幅に応じて設定すればよい。例えば図1に示した収縮部18(=31画素収縮)、膨張部19(=49画素膨張)により抽出される文字幅が設定されるので、これらに合わせ、また若干の抽出余裕を考慮して設定することができる。具体例としては、35×35画素程度とすればよい。
【0059】
以上の膨張処理によって、図11に示したような問題は回避できる。しかしながら、膨張処理によって、文字の正確な形状が失われてしまっている。すなわち、実際の文字幅よりも太く潰れ気味となっている。このような文字潰れに対処するため、膨張処理後の線分抽出結果(=図1における線分抽出部12の出力)と、小領域抽出部11中の否定−論理積演算部20の出力(文字形状が正確に反映されている)とを用いて、像域信号生成部14中の論理積演算部21において論理積演算を実施することによって、文字潰れを取り除くことができる。この結果、絵柄部が取り除かれ、かつ、文字形状を正確に反映した画像データが論理積演算部21より出力されることとなる。
【0060】
次に、図1におけるエッジ検出部13を説明する。エッジ検出部13は公知のエッジ検出技術をそのまま用いればよい。例えば、ソベルフィルタ、ラプラシアンフィルタなどを用いることができる。これらのエッジ検出技術を用いることによって、画像中の輪郭エッジ成分が求められる。エッジ判定画素出力を“ON画素”(論理“1”)とし、非エッジ画素を“OFF画素”(論理“0”)とすることができる。なお、このエッジ検出結果には、文字線画のエッジ以外にも、絵柄中のエッジ成分についても検出される。
【0061】
このエッジ検出結果は、否定−論理積演算部22においてビット反転(NOT処理)された後、論理積演算部21の出力と論理積演算が実施される。すなわち、画像中の非エッジ部と文字成分との論理積を否定−論理積演算部22で求めることになり、結果として文字のエッジ成分を除く文字内部が抽出されることになる。
【0062】
以上のようにして、入力画像中の文字線分データ(図1における論理積演算部21の出力)と、文字線分内部データ(否定−論理積演算部22の出力)が属性信号生成部23へと入力される。
【0063】
次に、属性信号生成部23について詳細を説明する。属性信号生成部23では、例えば図2に示した墨版生成部5、空間フィルタ部6,出力階調補正部7、画像出力部8などへ入力する像域信号を生成する。例えば、次のような2ビットの像域信号を各画素ごとに生成する。
(1)文字エッジを示す信号 01(2進数)=1(10進数)
(2)文字内部を示す信号 10(2進数)=2(10進数)
(3)絵柄部を示す信号 11(2進数)=3(10進数)
なお、(1)の文字エッジ信号は、論理積演算部21の出力(=文字全体)から、否定−論理積演算部22の出力(=文字内部)を除くことによって得ることができる。具体的には、論理積演算部21の出力と否定−論理積演算部22の出力の排他的論理和を演算すればよい。
【0064】
このようにして生成された像域信号が、例えば図2に示した墨版生成部5、空間フィルタ部6,出力階調補正部7、画像出力部8へと入力される。墨版生成部5では、像域分離部9から出力される上記(1)〜(3)のいずれかを示す2ビット信号をもとに、例えば、像域信号の値が01(2進数)、あるいは、10(2進数)の場合は文字用の墨版生成係数を用いて処理し、像域信号の値が11(2進数)の場合は絵柄用の墨版係数を用いて処理を実施することができる。
【0065】
また空間フィルタ部6では、例えば、像域信号が01(2進数)の場合は文字エッジ部を強調するフィルタ係数を用いて処理を施し、像域信号が11(2進数)の場合には絵柄部を平滑化するフィルタ係数を用いて処理を実施することができる。文字内部を示す像域信号10(2進数)の場合には、文字エッジ用フィルタと絵柄部用フィルタの中間的な特性を持つフィルタ係数を用いて処理が実施するとよい。
【0066】
さらに出力階調補正部7では、像域信号の値が01(2進数)の場合はコントラストを強調して補正する。像域信号の値が11(2進数)の場合は、絵柄用に滑らかなコントラストとなるように補正する。文字内部を示す像域信号10(2進数)の場合には、01(2進数)の場合と11(2進数)の場合の中間的な性質を持つ階調補正を行うことができる。
【0067】
最後に画像出力部8では、像域信号の像域信号の値が01(2進数)の場合は、文字エッジであるから、線密度の高い印字スクリーンを用い、像域信号の値が11(2進数)の場合は、絵柄用に階調を豊かに表現可能な線密度の荒い印字スクリーンを用いる。さらに、これまでと同様に文字内部を示す像域信号10(2進数)の場合には、01(2進数)の場合と11(2進数)の場合の中間的な性質を持つ印字スクリーンを用いて印字出力することができる。
【0068】
上述のように、像域信号を受けた各処理部では、文字内部は絵柄と文字エッジの中間的な画像処理を加えることによって、従来の手法と比較して、絵柄と文字の判定が混在するために画質劣化していた文字線画内部に対して、絵柄用画像処理と文字用画像処理の中間的な画像処理を施すことができる。これによって、従来は絵柄領域と文字線画領域が隣接した部分でも隣接部分の明度や色などの段差の発生が抑制され、画質を向上させることができる。
【0069】
図12は、像域分離部の第2の構成例を示すブロック図である。図中、図1と同様の部分には同じ符号を付して重複する説明を省略する。24は線分幅検出部、25は属性信号生成部である。この第2の構成例では、文字内部の太さに応じて段階的に文字内部信号を生成することを可能とした構成を示している。そのために、この第2の構成例では像域信号生成部14に線分幅検出部24を設けている。そして、否定−論理積演算部22の出力結果が文字内部信号となるとともに、この結果がさらに線分幅検出部24に入力される。線分幅検出部24では、文字内部信号から文字内部画素の線幅を検出する。
【0070】
図13は、線分幅検出部の一例である。図中、51−1〜4は収縮部、52は線幅信号生成部である。線分幅検出部24に入力された文字内部信号は、13×13収縮部51−1、19×19収縮部51−2、25×25収縮部51−3、31×31収縮部51−4の4つの演算部へと入力される。それぞれ、例えば図3において説明したような収縮処理が実施され、その結果が、さらに線幅信号生成部52へと入力される。線幅信号生成部52では、各線分内部画素ごとに線分内部の線幅信号を生成する。
【0071】
線幅信号生成部52では、以下に示すように収縮した画像を用いて画素幅検知処理を実施する。
(1)13×13収縮部51−1の結果、残余画素が0個の場合、画素幅は「13画素以下」とする。
(2)(1)の収縮処理の結果、残余画素が0個でない場合(残余画素が存在する場合)は、さらに、19×19収縮部51−2の処理の結果を参照する。この結果、残余画素が0個の場合、画素幅は「14画素以上19画素以下」とする。
残余画素が0個でない場合(残余画素が存在する場合)は、25×25収縮部51−3の処理結果を参照する。
(3)(2)で、残余画素が0個でない場合、25×25収縮部51−3による処理結果が参照され、残余画素が0個の場合、画素幅は「20画素以上25画素以下」とする。残余画素が0個でない場合(残余画素が存在する場合)は、31×31収縮部51−4の処理結果を参照する。
(4)(3)で、残余画素が0個でない場合、31×31収縮部51−4による処理結果が参照され、残余画素が0個の場合、画素幅は「26画素以上31画素以下」とする。残余画素が0個でない場合(残余画素が存在する場合)は、31×31よりも太い線幅を持つ領域と判定する。
【0072】
以上のようにして、文字内部の線幅が下記の5つのカテゴリーに分類される。
(a)13画素以下
(b)14画素以上19画素以下
(c)20画素以上25画素以下
(d)26画素以上31画素以下
(e)32画素以上
これら5つのカテゴリーを示す信号が線分幅検出部24の出力となり、属性信号生成部25に入力される。したがって、属性信号生成部25に入力されるデータは、論理積演算部21の演算結果(エッジを含む文字線分信号)、否定−論理積演算部22の演算結果(文字内部信号)、および上述した線分幅検出部24の結果(文字内部の線幅情報信号(a)〜(e))が属性信号生成部25へと入力される。これら入力された信号データにしたがって、属性信号生成部25にて像域信号が生成される。
【0073】
なお、ここでは上述のような収縮による画素幅検知処理を実施しているが、他の画素幅検出方法を用いてもよい。また、この例では13画素、19画素、25画素、31画素をしきい値としているが、これに限らず、任意の値をしきい値とすることができる。あるいは、画素幅の検出方法によっては画素幅を示す値を出力するように構成してもよい。
【0074】
次に、属性信号生成部25について詳細を説明する。属性信号生成部25には、上述のように論理積演算部21の演算結果(エッジを含む文字線分信号)、否定−論理積演算部22の演算結果(文字内部信号)、および上述した線分幅検出部24の結果(文字内部の線幅情報信号(a)〜(e))が入力される。属性信号生成部25では、入力されたこれらの信号データを参照しながら、例えば図2に示した墨版生成部5、空間フィルタ部6,出力階調補正部7、画像出力部8へと入力する像域信号を生成する。例えば、次のような3ビットの像域信号を各画素ごとに生成することができる。
(1)文字エッジを示す信号:01(2進数)=1(10進数)
(2)13画素未満の線幅を持つ文字内部を示す信号:10(2進数)=2(10進数)
(3)14画素以上19画素以下の線幅を持つ文字内部を示す信号:11(2進数)=3(10進数)
(4)20画素以上25画素以下の線幅を持つ文字内部を示す信号:100(2進数)=4(10進数)
(5)26画素以上31画素以下の線幅を持つ文字内部を示す信号:101(2進数)=5(10進数)
(6)32画素以上の線幅を持つ文字内部を示す信号:111(2進数)=7(10進数)
(7)絵柄部を示す信号: 00(2進数)=0(10進数)
【0075】
このようにして、文字内部については(2)〜(6)にさらに分類して像域信号を生成することができる。なお、(1)の文字エッジ信号は、論理積演算部21の出力(=文字全体)から、否定−論理積演算部22の出力(=文字内部)を除くことで得ることができる。具体的には、論理積演算部21の出力と否定−論理積演算部22の出力の排他的論理和を演算すればよい。
【0076】
上述のようにして生成された像域信号が、例えば図2に示した墨版生成部5、空間フィルタ部6,出力階調補正部7、画像出力部8へと入力される。各処理部では、上記(1)〜(7)のカテゴリに応じて、それぞれの画像特性に適したパラメータを用いて画像処理を実施することができる。文字内部の処理については、上述の像域分離部の第1の構成例を利用した場合に比べて、さらに線幅ごとに詳細パラメータの調整が可能となり、さらなる高画質の出力を得ることができる。
【0077】
なお、上述の各構成例では、像域分離部9の構成として明度信号L* の値を利用して像域分離処理を行うものとして説明した。しかしこれに限らず、さらにa* * 信号も参照してカラー属性も含めた像域分離結果を出力してもよい。
【0078】
図14は、本発明の画像処理装置の機能または画像処理方法をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体の一例の説明図である。図中、101はプログラム、102はコンピュータ、111は光磁気ディスク、112は光ディスク、113は磁気ディスク、114はメモリ、121は光磁気ディスク装置、122は光ディスク装置、123は磁気ディスク装置である。
【0079】
上述の本発明の画像処理装置の機能または画像処理方法は、コンピュータにより実行可能なプログラム101によっても実現することが可能である。その場合、そのプログラム101およびそのプログラムが用いるデータなどは、コンピュータが読み取り可能な記憶媒体に記憶することも可能である。記憶媒体とは、コンピュータのハードウェア資源に備えられている読取装置に対して、プログラムの記述内容に応じて、磁気、光、電気等のエネルギーの変化状態を引き起こして、それに対応する信号の形式で、読取装置にプログラムの記述内容を伝達できるものである。例えば、光磁気ディスク111,光ディスク112、磁気ディスク113,メモリ114(ICカード、メモリカードなどを含む)等である。もちろんこれらの記憶媒体は、可搬型に限られるものではない。
【0080】
これらの記憶媒体にプログラム101を格納しておき、例えばコンピュータ102の光磁気ディスク装置121,光ディスク装置122,磁気ディスク装置123,あるいは図示しないメモリスロットにこれらの記憶媒体を装着することによって、コンピュータからプログラム101を読み出し、本発明の画像処理装置の機能または画像処理方法を実行することができる。あるいは、予め記憶媒体をコンピュータ102に装着しておき、例えばネットワークなどを介してプログラム101をコンピュータ102に転送し、記憶媒体にプログラム101を格納して実行させてもよい。なお、コンピュータ102は、画像入力装置1あるいは画像出力部8における画像形成機構と一体となっていてもよいし、他のコンピュータにおいて記憶媒体に格納されたプログラムが読み出され、コンピュータ102(画像入力装置1や画像形成機構等と一体となっている場合を含む)に転送して実行してもよい。
【0081】
【発明の効果】
以上の説明から明らかなように、本発明によれば、像域信号として文字線画のエッジ部と絵柄部を示す信号とともに、文字内部を示す信号を出力するように構成した。これによって、従来のように絵柄と文字判定が混在するために画質が劣化していた文字等の部分について、その文字や線画の内部領域に対して文字線画のエッジ部と絵柄部の中間的な画像処理を施すことが可能となり、画質を向上させることができるという効果がある。
【図面の簡単な説明】
【図1】 像域分離部の第1の構成例を示すブロック図である。
【図2】 本発明の画像処理装置及び画像処理方法の実施の形態を含む基本的な一構成例を示すブロック図である。
【図3】 収縮処理の概要の説明図である。
【図4】 膨張処理の概要の説明図である。
【図5】 像域分離部による像域分離結果の一例の説明図である。
【図6】 線分抽出部の一構成例を示すブロック図である。
【図7】 線抽出部32−0の一構成例を示すブロック図である。
【図8】 線分検出処理の一例の概念図である。
【図9】 5×5画素幅検知部41−5における線分検出動作の具体例の説明図である。
【図10】 線分検出動作の詳細の一例の説明図である。
【図11】 線分抽出部により抽出できない文字部分の一例の説明図である。
【図12】 像域分離部の第2の構成例を示すブロック図である。
【図13】 線分幅検出部の一例である。
【図14】 本発明の画像処理装置の機能または画像処理方法をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体の一例の説明図である。
【図15】 従来の画像処理装置の一例を示すブロック図である。
【図16】 誤検出の一例の説明図である。
【符号の説明】
1…画像入力部、2…入力階調補正部、3…色信号変換部、4…色信号変換部、5…墨版生成部、6…空間フィルタ部、7…出力階調補正部、8…画像出力部、9…像域分離部、11…小領域抽出部、12…線分抽出部、13…エッジ検出部、14…像域信号生成部、15…文字抽出部、16…網点抽出部、17…論理和演算部、18…収縮部、19…膨張部、20…否定−論理積演算部、21…論理積演算部、22…否定−論理積演算部、23…属性信号生成部、24…線分幅検出部、25…属性信号生成部、31−1〜K…第1〜K縮小部、32−0〜K…線分抽出部、33−1〜K…第1〜K拡大部、34…論理和演算部、35…膨張部、41−1〜L…画素幅検知部、42…論理和演算部、51−1〜4…収縮部、52…線幅信号生成部、61…文字抽出部、62…網点抽出部、63…輪郭抽出部、64…論理和演算部、65…誤判定除去部、66…論理積演算部、67…輪郭再生成部、68…収縮部、69…膨張部、70…論理積演算部、101…プログラム、102…コンピュータ、111…光磁気ディスク、112…光ディスク、113…磁気ディスク、114…メモリ、121…光磁気ディスク装置、122…光ディスク装置、123…磁気ディスク装置。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a line segment detection device and an image processing device.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, image processing apparatuses such as copiers and facsimiles perform image processing suitable for each area in an image to improve image quality. For example, if a character area such as an input image or text or line drawing and a picture area such as a photo or halftone dot are mixed, the character area and the picture area are separated when the image is played back, and the resolution is set for the character area. From the viewpoint of image quality, it is desirable to perform processing with emphasis and to perform processing with emphasis on gradation on the pattern area. Also, when transmitting image data as described above, it is desirable from the viewpoint of image quality and compression rate that the character area and the picture area are separated and the compression process is performed on each of them separately.
[0003]
Specifically, when hard-copying an image that contains characters, line drawings, photos, halftone dots, etc. that have been read by a scanner or transmitted by facsimile, etc., for character areas such as characters and line drawings Processing with an emphasis on resolution is performed, and processing with an emphasis on gradation is performed on picture areas such as photographs and halftone dots. Thereby, it becomes possible to obtain a high-quality reproduced image.
[0004]
Also, when transferring mixed images of characters, line drawings, photos, halftone dots, etc. to an image output device at a remote location via a network, the character area and the picture area are separated and different for each area. When the compression process is performed by the above-described method, it is possible to obtain a small amount of image data with high image quality. Accordingly, it is possible to shorten the transfer time and obtain a high-quality reproduced image.
[0005]
Here, in order to adaptively apply the above-described processing emphasizing resolution and processing emphasizing gradation to each area of the image, the character area and the picture area included in the image are accurately separated. There is a need. Hereinafter, separation into a character region, a pattern region, and other various regions is referred to as image region separation. Conventionally, various proposals have been made regarding this image area separation.
[0006]
For example, an image is divided into blocks of a certain size, and for each block, the maximum density and minimum density of the pixels included in the block are obtained, and the difference between the maximum density and the minimum density is compared with a predetermined threshold value. There is a method of determining a block having a value larger than the threshold as a character area and a block having a smaller value as a picture area (hereinafter referred to as Conventional Example 1). This conventional example 1 is described, for example, in JP-A-4-317261. However, the technique of Conventional Example 1 has a drawback in that image area separation is performed in units of blocks, so that the image area determination result of the outline of the character / line drawing does not become a determination result faithful to the input image.
[0007]
As another technique, a local operator (filter) centering on the target pixel is used, and the filtering result is compared with a predetermined threshold value. Pixels having a value larger than the threshold value are character region pixels, and if smaller, the pattern region. There is a method of determining a pixel (hereinafter referred to as Conventional Example 2). As this conventional example 2, for example, IEICE Transactions D-II, Vol. J75-D-II, No. 1, pp. 39-47, 1992, “Image Area Separation Method for Mixed Image of Character / Picture (Half Dots, Photos)”, or Japanese Patent Application Laid-Open No. 61-157167. However, in the case of the conventional example 2, there is a problem that it is easy to extract noise or an edge included in a picture because it is a method of extracting an edge included in an image.
[0008]
Furthermore, instead of performing image area separation using only one of the above-described Conventional Example 1 and Conventional Example 2, a plurality of processes such as a process of extracting a character area and a process of extracting a pattern area are performed, and each processing result From the above, a technique for performing image area separation with high accuracy (hereinafter referred to as Conventional Example 3) has also been proposed. As one of the techniques of Conventional Example 3, there is a technique described in, for example, Japanese Patent Laid-Open No. Hei 2-29485.
[0009]
The conventional example 3 will be briefly described with reference to FIG. FIG. 15 is a block diagram illustrating an example of a conventional image processing apparatus. In the figure, 61 is a character extraction unit, 62 is a halftone dot extraction unit, 63 is a contour extraction unit, 64 is a logical sum operation unit, 65 is an erroneous determination removal unit, 66 is a logical product operation unit, 67 is a contour regeneration unit, 68 is a contraction unit, 69 is an expansion unit, and 70 is an AND operation unit.
[0010]
In FIG. 15, the input image signal is supplied to a character extraction unit 61, a halftone dot extraction unit 62 and a contour extraction unit 63. The character extraction unit 61 determines whether or not it is a character region in pixel units from the input image signal, and outputs the determination result. The halftone dot extraction unit 62 determines whether or not the pixel area is a halftone dot region, and outputs the determination result. The determination results of the character extraction unit 61 and the halftone dot extraction unit 62 are supplied to the erroneous determination removal unit 65 after the logical sum operation is performed for each pixel in the logical sum operation unit 64.
[0011]
In the erroneous determination removal unit 65, the character extraction result correction process is performed. That is, the character extraction unit 61 may determine that a part of the pattern is also a character area, so that the pattern part is removed to make only the character area. Here, the output of the logical sum operation unit 64 is extracted as a character region by the character extraction unit 61 (which may actually include a pattern region), and is extracted as a design region by the halftone dot extraction unit 62. This is a signal with mixed parts. The small area is erased by performing a contraction process on the signal by the contraction unit 68. Then, an expansion process is performed in the expansion unit 69, and the image is restored to the original, thereby generating an image of only a large area that has not been removed by the contraction process. This large area is regarded as a picture area, and the picture area is removed by the output of the expansion section 69 from the signal in which the character area and the picture area output from the logical sum calculation section 64 are mixed. Specifically, the output of the expansion unit 69 is inverted, and the logical product with the logical sum operation unit 64 is calculated by the logical product operation unit 70. As a result, of the regions extracted by the character extraction unit 61, the region in which the pattern portion is erroneously determined as the character region is removed, and only the character region is output.
[0012]
Next, each output result of the erroneous determination removal unit 65 and the contour extraction unit 63 is subjected to a logical product operation in units of pixels in the logical product operation unit 66, and after the contour part of the character / line drawing is extracted, the contour regeneration is performed. Supplied to the unit 67. In the contour regenerating unit 67, the contour correction of the character / line drawing is performed on the logical product calculation result of the logical product calculating unit 66. Then, by using the output result of the contour regeneration unit 67 as the image region separation result, it is possible to perform image region separation with high accuracy.
[0013]
The technique of the conventional example 3 is a relatively excellent technique such that there are few erroneous edge extractions in the pattern, and the outline portion of the character / line drawing is an extraction result faithful to the input image. However, the following problems remain.
(1) In the case of thick characters and thick lines, only the outline portion is extracted, and it is difficult to extract the inside of the character line image.
(2) When a thick part and a thin part exist in one character, there are parts that are not extracted parts.
(3) When erroneous extraction occurs in a pattern, it may be a block-shaped erroneous extraction, and image quality deterioration is easily noticeable when an image is reproduced.
[0014]
FIG. 16 is an explanatory diagram of an example of erroneous detection. In the figure, the A and C parts are thin and the B part is thick. Then, the black portions in the drawing are extracted as characters / line drawings, but the hatched portions in the drawing are extracted as pattern portions. Thus, if there is a pattern part in the character / line drawing, it is visually between the connection part of the A part and the B part and the processing as the pattern in the B part in the connection part of the B part and the C part. However, there is a problem that the color and brightness steps become conspicuous and the image quality deteriorates. The example of the problem shown in FIG. 16 is a problem corresponding to the above (2), but there are various other problems such as (1) and (3).
[0015]
One of the reasons why separation is difficult in this way is not clear how much line width is recognized as a character / line segment, and from what line width it is appropriate to recognize as “picture” Can be mentioned. In the conventional method, the boundary line width between “character” and “picture” is artificially set. Therefore, the character / line segment in the vicinity of the boundary line width becomes unstable and leads to image quality deterioration. In other words, the image quality characteristic near the boundary is originally a part having an intermediate characteristic between “character” and “picture”, but in the conventional method, “character” and “picture” are also in such a place. It is forcibly identified as either. In particular, in the case of bold characters and thick line segments, the width of the character line segment varies in one character / line segment, and when there is a separation boundary width in such a character line segment, The determination of “picture” and “character” becomes unstable, and as a result, as shown in (2) above, “picture image processing” and “character image processing” are performed while being partially switched within the same line segment. As a result, the image quality was degraded.
[0016]
[Problems to be solved by the invention]
The present invention has been made in view of the above-described circumstances, and an object of the present invention is to provide an image processing apparatus capable of solving the problems in the binary region determination as described above and further improving the image quality. To do.
[0017]
[Means for Solving the Problems]
The present invention relates to a line segment detection apparatus that detects a line segment from input image data, and sets each pixel to be processed as a central pixel to have a predetermined size corresponding to a line segment width detected around the central pixel. An average value calculating means for calculating an average density for each of a plurality of circumscribed areas consisting of one or a plurality of pixels circumscribing the structural element as a structural element, and an average density of the plurality of circumscribed areas calculated by the average value calculating means A selection unit that selects a circumscribed region that is the smallest, a circumscribed region selected by the selecting unit, an average density of the circumscribed region that faces the circumscribed region and the structural element, and a pixel value in the structural element It has the detection means which detects this, It is characterized by the above-mentioned. Here, the detection means determines whether or not the density difference between the pixels in the structural element is smaller than a predetermined value, and the selection means determines that the density difference is smaller than the predetermined value by the determination means. When the difference between the average values of the pixel values of the two circumscribed areas selected by the means is small and the difference between the average value of the two circumscribed areas and the average density of the structural elements is large, the pixels in the structural elements are segmented. A line segment pixel detecting means for detecting the pixel as a pixel can be provided. Furthermore, you may have the expansion process means which performs an expansion process with respect to the detection result of the line segment by the said detection means. Further, the image processing apparatus may further include a small area extraction unit that extracts a small area composed of line segments, and a logical operation unit that performs a logical operation on an extraction result of the small area extraction unit and an expansion processing result of the expansion processing unit. .
[0018]
In the image processing apparatus of the present invention, a small region is extracted from the input image data by the small region extraction unit, and a line segment is extracted by the line segment extraction unit including one or more of the above-described line segment detection devices of the present invention. And edge portions are detected by the edge detection means. Then, in the image area signal generation means, based on the extracted information on the small area and the line segment, and further on the detected edge information, the image area signal indicating the inside of the line segment together with the line segment or the picture including the characters of the image data It is characterized by generating. Further, when an image area signal indicating the inside of the line segment is generated, an image area signal corresponding to the area width inside the line segment may be generated. Then, using such an image area signal, image processing corresponding to the respective characteristics can be performed in the line segment area, the line segment internal area, and the pattern area.
As described above, in the image processing apparatus of the present invention, instead of separating an image into two parts, “character” and “picture”, an internal region of a line segment is defined as a region located between these characteristics. Yes. By performing image processing using the image area signal indicating the internal area of the line segment, the image quality of the internal area can be controlled even for line segments / characters with thickness on the boundary between the character and the picture. Therefore, the image quality of the character line segment can be improved more than before.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 2 is a block diagram showing a basic configuration example including an embodiment of an image processing apparatus and an image processing method of the present invention. In the figure, 1 is an image input unit, 2 is an input tone correction unit, 3 is a color signal conversion unit, 4 is a color signal conversion unit, 5 is a black plate generation unit, 6 is a spatial filter unit, and 7 is an output tone correction. , 8 is an image output unit, and 9 is an image area separation unit. The image input unit 1 includes an image scanner including a photoelectric conversion element such as a CCD image pickup element, reads color image information of a document for each color, converts it into an electrical digital image signal, and outputs it. The following description will be made assuming that the digital image signal read and converted by the image input unit 1 is an RGB color image signal having a resolution of 600 dpi and 8 bits for each color. Of course, the present invention is not limited to such an image signal.
[0020]
An image signal (8 bits for each color of RGB) output from the image input unit 1 is subjected to gradation correction by the input gradation correction unit 2. In the color signal converter 3, the gradation-corrected RGB image signal is converted into another color signal (for example, L * a * b * ). L output from the color signal converter 3 * a * b * The image signal is supplied to the color conversion unit 4 and converted into another color signal (for example, YMC), and a black plate is generated from the YMC image signal by the black plate generation unit 5 and converted into a YMCK image signal. An image area determination result from an image area separation unit 9 to be described later is also input to the black plate generation unit 5, and the black plate generation coefficient is switched correspondingly.
[0021]
The YMCK image signal output from the black plate generation unit 5 is supplied to the spatial filter unit 6 and subjected to spatial filtering processing for each color. The spatial filter unit 6 also receives an image region determination result from an image region separation unit 9 described later, and performs a spatial filtering process by switching, for example, a filtering coefficient in accordance with the image region determination result.
[0022]
The YMCK image signal that has been subjected to the spatial filtering process is supplied to the output tone correction unit 7, and the output tone is corrected so as to match the image output tone characteristics for each color. The output tone correction unit 7 also receives an image region determination result from an image region separation unit 9 described later, and corrects the output tone according to the image region determination result.
[0023]
The YMCK image signal whose output gradation has been corrected is supplied to the image output unit 8. The image output unit 8 further receives an image area determination result from an image area separation unit 9 described later, and outputs an image by switching, for example, a screen or the like according to the image area determination result.
[0024]
In addition, L output from the color signal conversion unit 3 * a * b * Among image signals, L * The signal is also supplied to the image area separation unit 9, and as will be described later, the image area of the character part, the inside of the character, or the picture part is determined for each pixel. The image area determination result is supplied to the black plate generation unit 5, the spatial filter unit 6, the output tone correction unit 7, and the image output unit 8, and as described above, processing corresponding to the image area determination result is performed. .
[0025]
The configuration shown in FIG. 2 is an example, and any configuration is possible as long as the configuration includes an image area separation unit 9 and a processing unit that uses the image area determination result output from the image area separation unit 9. Is possible.
[0026]
FIG. 1 is a block diagram illustrating a first configuration example of the image area separation unit. In the figure, 11 is a small area extraction unit, 12 is a line segment extraction unit, 13 is an edge detection unit, 14 is an image area signal generation unit, 15 is a character extraction unit, 16 is a halftone dot extraction unit, and 17 is an OR operation unit. , 18 is a contraction unit, 19 is an expansion unit, 20 is a negative-logical product operation unit, 21 is a logical product operation unit, 22 is a negative-logical product operation unit, and 23 is an attribute signal generation unit. The image area separating unit 9 includes a small area extracting unit 11, a line segment extracting unit 12, an edge detecting unit 13, an image area signal generating unit 14, and the like.
[0027]
The small area extraction unit 11 extracts a small area from the input image signal. The small area extraction unit 11 includes a character extraction unit 15, a halftone dot extraction unit 16, a logical sum operation unit 17, a contraction unit 18, an expansion unit 19, and a negative-logical product operation unit 20. The character extraction unit 15 performs character extraction processing on the input image signal. The character extraction may be a binarization process with a fixed threshold value set so that characters are easily extracted, or the binarization threshold value is switched each time with reference to the density value around the binarization target pixel. Floating binarization processing in which a dynamic threshold can be set may be used. Since characters often have a relatively high density, other character extraction processing methods that take this into account may be applied. As a result of character extraction from the character extraction unit 15, for example, a pixel level where characters are extracted is an ON pixel (logic “1”), and a pixel which is not extracted is an OFF pixel (logic “0”). A signal can be output. The image signal output from the character extraction unit 15 is input to the logical sum operation unit 17.
[0028]
The halftone dot extraction unit 16 extracts a halftone dot area included in the image from the input image signal. As a result of extraction of a halftone dot region by the halftone dot extraction unit 16, for example, a 1-bit pixel having an extracted pixel level as an ON pixel (logic “1”) and a pixel not extracted as an OFF pixel (logic “0”). An image signal can be output. The image signal output from the halftone dot extraction unit 16 is input to the logical sum operation unit 17. As the halftone dot extraction unit 16, for example, a technique described in JP-A-11-73503 can be used. Although the details are not described here, the outline is obtained by binarizing the input image, and the pixel is the high level (ON pixel) of the binary image data (or the low level (OFF pixel)). After determining whether or not the pixel has a periodic structure in a wide area of N1 × N1 (for example, N1 = 19) centered on the target pixel, N2 × N2 (for example, N2 = A halftone dot region is determined and extracted using a wide area 37).
[0029]
The logical sum operation unit 17 receives the character extraction result output from the character extraction unit 15 and the halftone dot region extraction result output from the halftone dot extraction unit 16 as two inputs, and performs a logical sum operation on a pixel basis. As a result of the logical sum operation, a signal equivalent to the result extracted by the character extraction unit 15 is output from the logical sum operation unit 17 for characters and line segments. On the other hand, with regard to the pattern region, most of the region is extracted by the halftone dot extraction unit 16, but the halftone dot periodic structure is lost in a very high density region such as the hair of a human image. The point extraction unit 16 cannot extract. However, since such a very high (dark) area can be extracted by the character extraction 15, the OR operation unit 17 outputs the extracted result for the entire picture area. The information of the character line drawing and the pattern extraction result output from the logical sum operation unit 17 is supplied to the contraction processing unit 18 and becomes one input of the two-input negation-logical product operation unit 20.
[0030]
The contraction processing unit 18 performs contraction processing in an M1 × M1 (for example, M1 = 31) pixel region centered on the target pixel. The contraction process is also called a contraction process. FIG. 3 is an explanatory diagram outlining the contraction process. For example, as described in “Image Engineering”, Corona, p. 98-101, the contraction processing is “when the coordinate value and value of the target pixel are set to f (i, j) = 0, the point (i, This is an operation in which all values near 8 in j) are set to 0. That is, it can be paraphrased as a process of thinning the pixels of the binary image. For example, in the example shown in FIG. 3, since the pixel of interest at the center in FIG. 3A is white (= 0), the values in the vicinity of 8 of this pixel of interest are all set to 0, as shown in FIG. Convert. As a result, for example, in the edge portion or the like, the black portion adjacent to the white region is converted to white, and the black portion can be substantially contracted. The size of the matrix is related to the contraction amount. In the case of the example shown in FIG. 3, M1 = 3, so that one pixel around the black region is reduced. Of course, any method can be applied as the shrinking process. The image data output from the contraction processing unit 18 is input to the expansion processing unit 19.
[0031]
The expansion processing unit 19 performs expansion processing in an M2 × M2 (for example, M2 = 49) pixel region centered on the target pixel. The expansion process is also called an expansion process. FIG. 4 is an explanatory diagram outlining the expansion process. As described in the above-mentioned document, the same page, “enlargement processing” means that when the coordinate value and the value of the pixel of interest are f (i, j) = 1, the value near 8 of the point (i, j) is This is an operation of “all 1”. That is, the enlargement process can be considered as a process of fattening pixels. For example, in the example shown in FIG. 4, the pixel of interest at the center in FIG. 4A is black (= 1). Therefore, the values in the vicinity of 8 of the pixel of interest are all 1, and as shown in FIG. Convert. Thereby, for example, in the edge portion or the like, the white portion adjacent to the black region is converted to black, and the black portion can be substantially expanded. The size of the matrix is related to the expansion amount. In the case of the example shown in FIG. 4, M2 = 3, so that the periphery of the black region expands by one pixel. Of course, any method can be applied as the shrinking process. The image data output from the expansion processing unit 19 is synchronized with the operation result output from the logical sum operation unit 17 and becomes the other input of the negative-logical product operation unit 20.
[0032]
Of the extraction results of the character line drawing area and the pattern area output from the logical sum calculation unit 17 by the contraction unit 18 and the expansion unit 19, small regions are erased by the contraction process by the contraction unit 18. Even if it expands, it does not return. Therefore, the output of the expansion processing unit 19 is obtained by removing a small area from the extraction results of the character / line drawing area and the pattern area output from the logical sum calculation unit 17. The size of the area to be removed depends on the size of the matrix used in the contraction portion 18.
[0033]
In the negative-logical product operation unit 20, bit inversion (NOT processing) is performed for each pixel with respect to the input from the expansion processing unit 19, and then the character line drawing region and the pattern region input from the logical sum operation unit 17 are extracted. A logical product operation with the corresponding pixel of the result is performed. As a result, only the small area removed by the processing up to the expansion unit 19 is extracted. Usually, the character / line drawing area is smaller than the pattern area, and only the area composed of line segments such as characters and line drawings can be extracted by the processing of the small area extracting unit 11 as described above.
[0034]
Further, the line segment extraction unit 12 extracts characters and line segments included in the image from the input image signal. As a character extraction result from the line segment extraction unit 12, for example, a 1-bit image of each pixel in which the extracted pixel is an ON pixel (logic “1”) and an unextracted pixel is an OFF pixel (logic “0”). A signal can be output. Details of the line segment extraction unit 12 will be described later. The line segment extraction result output from the line segment extraction unit 12 is input to one input terminal of the AND operation unit 21 in the image area signal generation unit 14.
[0035]
On the other hand, the edge detector 13 detects a contour edge in the input image. As the edge detection method, a known technique such as a Sobel filter can be used. As the detection result of the edge detection unit 13, for example, the pixel level of the edge part can be set to ON pixels ("logic 1"), and the pixel level of the non-edge part can be set to OFF pixels ("logic 0"). The contour edge output obtained from the edge detection unit 13 in this way is input to one input terminal of the negative-AND operation unit 22 in the image area signal generation unit 14.
[0036]
The image area signal generation unit 14 generates an image signal based on the small region extraction result by the small region extraction unit 11, the line segment extraction result by the line segment extraction unit 12, and the edge detection result by the edge detection unit 13. An image area signal indicating any of a line segment including characters, the inside of the line segment, or a pattern is generated. The image area signal generation unit 14 includes a logical product calculation unit 21, a negative-logical product calculation unit 22, and an attribute signal generation unit 23.
[0037]
The AND operation unit 21 includes an operation result in the negation-AND operation unit 20 in the small region extraction unit 11, that is, an output result from the small region extraction unit 11 and a line segment extraction result from the line segment extraction unit 12. Are input, and the logical product of the two is calculated for each pixel. As a result, pixels that form a line segment in a small area are extracted. The logical product operation result output thus obtained, that is, the character / line segment output, is input to one input terminal of the attribute signal generator 23 and one input terminal of the negative-logical product arithmetic unit 22.
[0038]
The negative-logical product operation unit 22 receives the output of the logical product operation unit 21 and the detection result of the contour edge obtained from the edge detection unit 13. The contour edge detection result obtained from the edge detection unit 13 is subjected to bit inversion (NOT processing) for each pixel, and then subjected to an AND operation with the output of the AND operation unit 21. By this calculation, the inside of the character / line segment internal region surrounded by the contour edge is extracted. Further, the output of the negative-AND operation unit 22 (indicating the character / line segment internal region) is input to the attribute signal generation unit 23.
[0039]
The attribute signal generation unit 23 uses the output of the logical product operation unit 21 (indicating a character / line segment) and the output of the negative-logical product operation unit 22 (indicates an internal region of the character / line segment) to generate an image area signal. Is generated. The image area signal consists of “character”, “character interior”, and “picture”. The output data from the image area signal generation unit 23 is obtained as an image area determination result in the image area separation unit 9. For example, in the configuration example shown in FIG. 2, the black plate generation unit 5, the spatial filter unit 6, and the output tone correction unit 7. And supplied to the image output unit 8. In each of these processing units, processing corresponding to the image area determination result is performed by switching the image conversion process and the image correction process, or the image conversion coefficient and the image correction coefficient according to the image area signal. That is, image processing suitable for each of “character”, “inside of character”, and “picture” is performed, and an image output with extremely high image quality with less deterioration compared to the conventional method can be obtained.
[0040]
FIG. 5 is an explanatory diagram of an example of an image area separation result by the image area separation unit. Here, as in the example shown in FIG. 16, a case is shown in which the A and C portions in the drawing are thin and the B portion is a thick line drawing. When such an image signal is input, the edge portion shown in black in FIG. 5 is “character”, the portion that has been finely hatched in A and C portions is “inside the character”, and rough hatching is performed in the inside of B portion. The image area signals are output as the “patterns” of the areas that have been processed.
[0041]
For example, by performing an intermediate process between “character” and “picture” for the area determined to be “inside the character”, the “character” is connected to the connection part between the A part and the B part and the connection part between the B part and the C part. Even in the portion where the “inside” and the “pattern” are adjacent to each other, the conventional color and lightness steps are reduced, and such a boundary portion can be made inconspicuous. Therefore, the image quality of the entire image can be improved.
[0042]
Next, examples of internal configurations of the line segment extraction unit 12, the edge detection unit 13, and the attribute signal generation unit 23 in FIG. 1 will be described in order. FIG. 6 is a block diagram illustrating a configuration example of the line segment extraction unit. In the figure, 31-1 to K are first to K reduction units, 32 to 0 to K are line segment extraction units, 33-1 to K are first to K expansion units, 34 is an OR operation unit, and 35 is an expansion. Part. The image data input to the line segment extraction unit 12 is input to the first reduction unit 31-1 to the Kth reduction unit 31-K, and image data reduction processing is performed. For example, in the first reduction unit 31-1, the image is reduced by half in both the vertical and horizontal directions. In the second reduction unit 31-2, the image is reduced by ¼ in both the vertical and horizontal directions. Similarly, the Kth reduction unit 31-K performs 1 / (2K) reduction in the vertical and horizontal directions of the image. As the image reduction method in the first reduction unit 31-1 to the Kth reduction unit 31-K, a known reduction method such as a simple decimation method, a 4-point interpolation method, a 16-point interpolation method, a projection method, or a median value adoption method is used. Good.
[0043]
The image data reduced by the first reduction unit 31-1 to the Kth reduction unit 31-K is input to the line extraction unit 32-1 to the line extraction unit 32-K, respectively. The image data input to the line segment extraction unit 12 is also input to the line extraction unit 32-0. The line extraction unit 32-0 to line extraction unit 32-K extract line segments having a predetermined range of width from the input image data. In the case of this example, the image data is reduced to 1/2, 1/4, 1/6,..., 1 / (2K) by the first reduction unit 31-1 to the Kth reduction unit 31-K, respectively. After that, the processing of the line extraction unit 32-0 to the line extraction unit 32-K is performed. Although details of the line extraction unit 32-0 to line extraction unit 32-K will be described later, the line extraction unit 32-0 to line extraction unit 32-K can be realized with the same configuration, for example. Even in that case, since the image data is reduced at the respective reduction ratios in the first reduction unit 31-1 to the Kth reduction unit 31-K, line segments having different line widths can be extracted.
[0044]
Subsequently, the line segment extraction results output from the line extraction unit 32-1 to the line extraction unit 32-K are input to the first enlargement unit 33-1 to the Kth enlargement unit 33-K, respectively, and the enlargement process is performed. Is implemented. The enlargement ratios of the first enlargement unit 33-1 to the Kth enlargement unit 33-K are the reciprocals of the reduction ratios of the first reduction unit 31-1 to the Kth reduction unit 31-K, that is, in this example,・ The horizontal direction is 2, 4, 6, ... 2K times. As the image enlargement method in the first enlargement unit 33-1 to the Kth enlargement unit 33-K, known enlargement methods such as a simple interpolation method, a 4-point interpolation method, a 16-point interpolation method, a projection method, and a median value adoption method are used. Good.
[0045]
Further, output results from the first enlargement unit 33-1 to the Kth enlargement unit 33-K and the line extraction unit 32-0 are input to the logical sum operation unit 34, and a logical sum operation is performed on a pixel basis. By this logical sum operation, all line segments extracted by the line segment extraction units 32-0 to 32-K are output as output results. Image data as an output result from the logical sum operation unit 34 is input to the expansion unit 35. The expansion unit 35 performs extraction correction in the line segment extraction process. The expansion process is as described with reference to FIG. 4, and any known method can be used. The output result of the expansion unit 35 becomes the output of the line segment extraction unit 12.
[0046]
Next, the line segment extraction unit 32-0 to line segment extraction unit 32-K will be described. As described above, all of the line extraction units 32-0 to 32-K can have the same configuration, so only the line segment extraction unit 32-0 will be described here. However, the present invention is not limited to this, and the line extraction unit 32-0 to the line extraction unit 32-K may be extracted with different configurations.
[0047]
FIG. 7 is a block diagram illustrating a configuration example of the line extraction unit 32-0. In the figure, 41-1 to L are pixel width detection units, and 42 is a logical sum operation unit. As illustrated in FIG. 7, the line segment extraction unit 32-0 is used to perform a logical sum operation on the 1 × 1 pixel width detection unit 41-1 to L × L pixel width detection unit 41 -L and these results. The logical sum calculation unit 42 is configured. The size of L may be set according to the line segment width to be extracted.
[0048]
The line segment detection method used here may be basically considered as “a pattern matching process based on the extracted line segment width”. FIG. 8 is a conceptual diagram of an example of a line segment detection process. Specifically, in the line segment detection process, as shown in FIG. 8, a “line segment detection filter” having the diameter of the line segment to be extracted is raster-scanned, and the pixel exists on the line segment for each pixel unit. It is determined whether or not.
[0049]
As an example, a description will be given using the 5 × 5 pixel width detection unit 41-5. FIG. 9 is an explanatory diagram of a specific example of the line segment detection operation in the 5 × 5 pixel width detection unit 41-5. In FIG. 9, the black pixel is the central pixel, and the hatched detection filter pixel is called a structural element. In FIG. 9, the 5 × 5 pixel width line segment detection filter is composed of four sub-filters having an angle of 90 degrees, 0 degrees, 45 degrees, and an angle of 135 degrees as shown in (B) to (E). The detection procedure is shown below.
(1) A raster scan of the input image, and each pixel average in regions a to h circumscribing the structural elements of the sub-filters shown in FIGS. Calculate the value.
(2) Select a sub-filter having a region where the average value of (1) is minimum.
(3) In the sub-filter selected in (2), the determination described later is performed and the line segment determination result is output.
[0050]
FIG. 10 is an explanatory diagram of an example of details of the line segment detection operation. In the detection procedures (1) to (3) described above, when the minimum pixel average value is obtained according to the procedures (1) and (2), for example, it is assumed that the average value of the region a is the minimum value. In this case, the sub-filter having an angle of 90 degrees shown in FIG. 9B is selected, and the line segment and the line segment detection filter at this time have a relationship as shown in FIG. It can be judged. In order to determine whether or not such a relationship actually exists, line segment determination can be performed by performing the calculation shown in FIG. 10B in the detection procedure (3) described above.
[0051]
In the calculation shown in FIG. 10B, first, in S81, a density difference between pixels in the structural element is detected. For this purpose, it is determined whether or not the absolute value of the difference between the maximum value of the pixels in the structural element and the average value of the pixels in the structural element is smaller than the threshold parameter α. This determination is to determine that all the structural elements are included in the characters or line segments. If the density difference is large, the line width cannot be detected because the edge of the character or line segment exists in the structural element. In that case, the line segment region having a width of 5 × 5 pixels is not determined.
[0052]
If the density difference between the pixels in the structural element is small, the determination in S82 is further performed. Here, first, the difference between the average value of the pixels in the structural element and the average value of the region a is calculated, and it is determined whether or not it is larger than the threshold parameter β. Thereby, it is determined whether or not an edge exists between the structural element and the region a. Similarly, the difference between the average value of the pixels in the structural element and the average value of the region b is calculated to determine whether or not it is larger than the threshold parameter β. Thereby, it is determined whether or not an edge exists between the structural element and the region b. Further, it is determined that the absolute value of the difference between the average value of the region a and the average value of the region b is smaller than the threshold parameter γ. This determination is a determination for confirming that both the region a and the region b are outside the character or line segment. When all of these conditions are met, it is determined that all the pixels in the structural element are 5 × 5 pixel line segments in S83, assuming that the relationship is as shown in FIG. To do. If any of the conditions is not satisfied, it is determined in S84 that the line segment is not a 5 × 5 pixel width.
[0053]
Although the sub-filter having an angle of 90 degrees shown in FIG. 9B is shown here, the same applies to the other sub-filters shown in FIGS. 9C to 9E. The line segment detection of the 1 × 1 pixel width detection unit 41-1 to L × L pixel width detection unit 41-L other than the 5 × 5 pixel width detection unit 41-5 is also the filter illustrated in FIG. The same calculation process may be performed using filters having different sizes and sub-filters having different sizes.
[0054]
Further, all the processing outputs of the 1 × 1 pixel width detection unit 41-1 to L × L pixel width detection unit 41-L are input to the logical sum operation unit 42, and a logical sum is obtained. This logical sum output is the output of the line segment extraction unit 32-0 shown in FIG. As for the other line segment extraction units 32-1 to 32-K, as described above, the same ones as shown in FIG. 7 can be used here. However, since the line segment extraction process is performed on the data reduced by the first reduction unit 31-1 to the Kth reduction unit 31-K except for the line segment extraction unit 32-0, the enlargement process is performed. Actually extracted line segment pixel widths are different. That is, different results are output from the outputs of the first enlargement unit 33-1 to the Kth enlargement unit 33-K. For example, in the line segment extraction unit 32-0, line segment detection is performed on the same size image data. However, since the line segment extraction unit 32-1 performs the process of the first reduction unit 31-1, after the line segment detection of FIG. 7 is performed on the image data after the 1/2 reduction process, The process of the 1st expansion part 33-1 is implemented. As a result, a pixel line segment having a width twice as large as the line segment width detected by the line segment extraction unit 32-0 is extracted. Hereinafter, the output of the second enlargement unit 33-2 extracts a pixel line segment having a width four times that of the line segment extraction unit 32-0. Hereinafter, the same applies to the output of the other enlarged portions.
[0055]
In the above description, the same line segment detection filter shown in FIG. 7 is used for all reduced image data. However, the present invention is not limited to this, and different line segment detection filters are used for each reduced image data. You may comprise so that it may apply.
[0056]
As described above, all the outputs of the line segment extraction unit 32-0 shown in FIG. 6 and the outputs of the first enlargement unit 33-1 to the Kth enlargement unit 33-K are ORed as shown in FIG. This is input to the unit 34 and a logical sum is obtained. As a result, the obtained image data is further input to the expansion unit 35. Next, the processing content of the expansion part 35 is demonstrated.
[0057]
In the above-described line segment extraction process, line segment widths other than the detected pixel width cannot be extracted due to limitations of the method. FIG. 11 is an explanatory diagram of an example of a character portion that cannot be extracted by the line segment extraction unit. For example, when the line width changes greatly, it may not be detected as any line width. As a specific example, as shown in FIG. 11 (A), as for the “payment” portion of the character (shown by a broken line), the line width can be detected up to the portion painted in black. There may be no filter that matches the detection width, and extraction may not be possible. In addition, as shown in FIG. 11B, the intersection of the line segment may not be extracted. This is because, as shown in FIG. 9, the line segment is detected by using the density of the regions a to h surrounding the structural element and the density difference in the structural element. This is because even the minute cannot be detected.
[0058]
For the above reasons, the output of the logical sum operation unit 34 shown in FIG. 6 cannot be used as it is as a character / line segment detection result, which is insufficient. In order to deal with such a problem, an expansion process is performed in the expansion unit 35 on the result of the logical sum operation unit 34. The details of the expansion process are as described above with reference to FIG. The amount of expansion here may be set according to the character width to be extracted. For example, the character width extracted by the contraction unit 18 (= 31 pixel expansion) and the expansion unit 19 (= 49 pixel expansion) shown in FIG. 1 is set. Can be set. As a specific example, it may be about 35 × 35 pixels.
[0059]
By the above expansion process, the problem as shown in FIG. 11 can be avoided. However, the exact shape of the character has been lost due to the expansion process. That is, the character width is thicker than the actual character width. In order to deal with such character crushing, the line segment extraction result after expansion processing (= output of the line segment extraction unit 12 in FIG. 1) and the output of the negation-logical product operation unit 20 in the small region extraction unit 11 ( Character shape is accurately reflected), and the logical product operation is performed in the logical product operation unit 21 in the image area signal generation unit 14 to remove the character collapse. As a result, the pattern portion is removed, and image data that accurately reflects the character shape is output from the AND operation unit 21.
[0060]
Next, the edge detection unit 13 in FIG. 1 will be described. The edge detection unit 13 may use a known edge detection technique as it is. For example, a Sobel filter or a Laplacian filter can be used. By using these edge detection techniques, a contour edge component in the image is obtained. The edge determination pixel output can be “ON pixel” (logic “1”), and the non-edge pixel can be “OFF pixel” (logic “0”). In addition, in this edge detection result, edge components in the pattern are detected in addition to the edges of the character / line drawing.
[0061]
The edge detection result is subjected to bit inversion (NOT processing) in the negative-logical product operation unit 22, and then the output from the logical product operation unit 21 and the logical product operation are performed. That is, the logical product of the non-edge portion and the character component in the image is obtained by the negation-logical product operation unit 22, and as a result, the inside of the character excluding the edge component of the character is extracted.
[0062]
As described above, the character line segment data in the input image (output of the logical product operation unit 21 in FIG. 1) and the character line segment internal data (output of the negative-logical product operation unit 22) are the attribute signal generation unit 23. Is input.
[0063]
Next, details of the attribute signal generation unit 23 will be described. The attribute signal generation unit 23 generates an image area signal to be input to, for example, the black plate generation unit 5, the spatial filter unit 6, the output tone correction unit 7, and the image output unit 8 illustrated in FIG. 2. For example, the following 2-bit image area signal is generated for each pixel.
(1) Signal indicating character edge 01 (binary number) = 1 (decimal number)
(2) Signal indicating the inside of a character 10 (binary number) = 2 (decimal number)
(3) Signal indicating a picture part 11 (binary number) = 3 (decimal number)
Note that the character edge signal of (1) can be obtained by removing the output of the negation-logical product operation unit 22 (= inside the character) from the output of the logical product operation unit 21 (= whole character). Specifically, an exclusive OR of the output of the logical product operation unit 21 and the output of the negative-logical product operation unit 22 may be calculated.
[0064]
The image area signal generated in this way is input to, for example, the black plate generation unit 5, the spatial filter unit 6, the output tone correction unit 7, and the image output unit 8 shown in FIG. In the black plate generation unit 5, for example, the value of the image area signal is 01 (binary number) based on the 2-bit signal indicating any one of (1) to (3) output from the image area separation unit 9. Or, if 10 (binary number), processing is performed using the black generation coefficient for characters, and if the value of the image area signal is 11 (binary number), processing is performed using the black plate coefficient for design can do.
[0065]
In the spatial filter unit 6, for example, when the image area signal is 01 (binary number), processing is performed using a filter coefficient that emphasizes the character edge portion, and when the image area signal is 11 (binary number), the picture pattern is processed. The processing can be performed using a filter coefficient for smoothing the part. In the case of an image area signal 10 (binary number) indicating the inside of a character, the processing may be performed using a filter coefficient having an intermediate characteristic between a character edge filter and a picture portion filter.
[0066]
Further, the output tone correction unit 7 corrects the contrast by enhancing the contrast when the value of the image area signal is 01 (binary number). When the value of the image area signal is 11 (binary number), the image area signal is corrected so as to have a smooth contrast. In the case of an image area signal 10 (binary number) indicating the inside of a character, gradation correction having an intermediate property between 01 (binary number) and 11 (binary number) can be performed.
[0067]
Finally, in the image output unit 8, when the image area signal value of the image area signal is 01 (binary number), since it is a character edge, a print screen having a high linear density is used and the image area signal value is 11 ( In the case of (binary number), a printing screen having a rough line density capable of expressing gradations richly is used for a picture. Further, as in the past, in the case of the image area signal 10 (binary number) indicating the inside of the character, a printing screen having an intermediate property between 01 (binary number) and 11 (binary number) is used. Can be printed out.
[0068]
As described above, in each processing unit that has received an image area signal, the inside of the character is subjected to intermediate image processing between the pattern and the character edge, so that the determination of the pattern and the character is mixed as compared with the conventional method. Therefore, intermediate image processing between the pattern image processing and the character image processing can be performed on the inside of the character / line drawing whose image quality has deteriorated. Thus, conventionally, the occurrence of steps such as the brightness and color of the adjacent portion is suppressed even in the portion where the pattern region and the character / line drawing region are adjacent to each other, and the image quality can be improved.
[0069]
FIG. 12 is a block diagram illustrating a second configuration example of the image area separation unit. In the figure, the same parts as those in FIG. Reference numeral 24 denotes a line segment width detector, and 25 denotes an attribute signal generator. In the second configuration example, a configuration in which a character internal signal can be generated step by step according to the thickness of the inside of the character is shown. For this purpose, in the second configuration example, a line segment width detection unit 24 is provided in the image area signal generation unit 14. Then, the output result of the negative-logical AND operation unit 22 becomes a character internal signal, and this result is further input to the line segment width detection unit 24. The line width detector 24 detects the line width of the character internal pixel from the character internal signal.
[0070]
FIG. 13 is an example of a line segment width detection unit. In the figure, reference numerals 51-1 to 4-4 denote contraction parts, and 52 denotes a line width signal generation part. The character internal signals input to the line segment width detection unit 24 are the 13 × 13 contraction unit 51-1, the 19 × 19 contraction unit 51-2, the 25 × 25 contraction unit 51-3, and the 31 × 31 contraction unit 51-4. Are input to the four arithmetic units. For example, the contraction process as described in FIG. 3 is performed, and the result is further input to the line width signal generation unit 52. The line width signal generation unit 52 generates a line width signal inside the line segment for each line segment internal pixel.
[0071]
The line width signal generation unit 52 performs pixel width detection processing using the contracted image as described below.
(1) As a result of the 13 × 13 contraction unit 51-1, when the number of remaining pixels is 0, the pixel width is set to “13 pixels or less”.
(2) If the number of remaining pixels is not 0 (when there are remaining pixels) as a result of the contraction processing in (1), the processing result of the 19 × 19 contraction unit 51-2 is further referred to. As a result, when the number of remaining pixels is 0, the pixel width is set to “14 pixels or more and 19 pixels or less”.
When the number of remaining pixels is not 0 (when there are remaining pixels), the processing result of the 25 × 25 contraction unit 51-3 is referred to.
(3) In (2), when the number of remaining pixels is not 0, the processing result by the 25 × 25 contraction unit 51-3 is referred to. When the number of remaining pixels is 0, the pixel width is “20 pixels or more and 25 pixels or less” And When the number of remaining pixels is not zero (when there are remaining pixels), the processing result of the 31 × 31 contraction unit 51-4 is referred to.
(4) In (3), when the number of remaining pixels is not 0, the processing result by the 31 × 31 contraction unit 51-4 is referred to. When the number of remaining pixels is 0, the pixel width is “26 pixels or more and 31 pixels or less” And When the number of remaining pixels is not 0 (when there are remaining pixels), it is determined that the region has a line width larger than 31 × 31.
[0072]
As described above, the line width inside the character is classified into the following five categories.
(A) 13 pixels or less
(B) 14 pixels or more and 19 pixels or less
(C) 20 pixels or more and 25 pixels or less
(D) 26 pixels or more and 31 pixels or less
(E) 32 pixels or more
Signals indicating these five categories are output from the line segment width detection unit 24 and input to the attribute signal generation unit 25. Therefore, the data input to the attribute signal generation unit 25 includes the operation result of the logical product operation unit 21 (character line segment signal including an edge), the operation result of the negative-logical product operation unit 22 (character internal signal), and the above-described data. The line segment width detection unit 24 results (line width information signals (a) to (e) inside the character) are input to the attribute signal generation unit 25. The attribute signal generation unit 25 generates an image area signal in accordance with the input signal data.
[0073]
In addition, although the pixel width detection process by the above shrinkage | contraction is implemented here, you may use another pixel width detection method. In this example, 13 pixels, 19 pixels, 25 pixels, and 31 pixels are used as threshold values, but the present invention is not limited to this, and any value can be used as the threshold value. Or you may comprise so that the value which shows pixel width may be output depending on the detection method of pixel width.
[0074]
Next, details of the attribute signal generation unit 25 will be described. As described above, the attribute signal generation unit 25 includes the operation result of the logical product operation unit 21 (character line segment signal including an edge), the operation result of the negative-logical product operation unit 22 (character internal signal), and the line described above. The result of the width detection unit 24 (line width information signals (a) to (e) inside the character) is input. The attribute signal generation unit 25 refers to these input signal data and inputs them to, for example, the black plate generation unit 5, the spatial filter unit 6, the output tone correction unit 7, and the image output unit 8 shown in FIG. An image area signal to be generated is generated. For example, the following 3-bit image area signal can be generated for each pixel.
(1) Signal indicating character edge: 01 (binary number) = 1 (decimal number)
(2) Signal indicating the inside of a character having a line width of less than 13 pixels: 10 (binary number) = 2 (decimal number)
(3) Signal indicating the inside of a character having a line width of 14 pixels or more and 19 pixels or less: 11 (binary number) = 3 (decimal number)
(4) Signal indicating the inside of a character having a line width of 20 pixels or more and 25 pixels or less: 100 (binary number) = 4 (decimal number)
(5) Signal indicating the inside of a character having a line width of 26 pixels or more and 31 pixels or less: 101 (binary number) = 5 (decimal number)
(6) Signal indicating the inside of a character having a line width of 32 pixels or more: 111 (binary number) = 7 (decimal number)
(7) Signal indicating the picture part: 00 (binary number) = 0 (decimal number)
[0075]
In this way, the image area signal can be generated by further classifying the inside of the character into (2) to (6). Note that the character edge signal of (1) can be obtained by removing the output of the negative-logical product operation unit 22 (= inside the character) from the output of the logical product operation unit 21 (= whole character). Specifically, an exclusive OR of the output of the logical product operation unit 21 and the output of the negative-logical product operation unit 22 may be calculated.
[0076]
The image area signal generated as described above is input to, for example, the black plate generation unit 5, the spatial filter unit 6, the output tone correction unit 7, and the image output unit 8 shown in FIG. Each processing unit can perform image processing using parameters suitable for the respective image characteristics in accordance with the categories (1) to (7). As for the processing inside the character, compared with the case where the first configuration example of the image area separation unit described above is used, it is possible to adjust the detailed parameters for each line width and to obtain a higher quality output. .
[0077]
In each of the above-described configuration examples, the lightness signal L is used as the configuration of the image area separation unit 9. * It has been described that image area separation processing is performed using the value of. However, not limited to this, * b * The image area separation result including the color attribute may be output with reference to the signal.
[0078]
FIG. 14 is an explanatory diagram of an example of a computer program and a storage medium storing the computer program when the function of the image processing apparatus or the image processing method of the present invention is realized by the computer program. In the figure, 101 is a program, 102 is a computer, 111 is a magneto-optical disk, 112 is an optical disk, 113 is a magnetic disk, 114 is a memory, 121 is a magneto-optical disk apparatus, 122 is an optical disk apparatus, and 123 is a magnetic disk apparatus.
[0079]
The function or the image processing method of the image processing apparatus of the present invention described above can also be realized by a program 101 that can be executed by a computer. In that case, the program 101 and data used by the program can be stored in a computer-readable storage medium. A storage medium is a signal format that causes a state of change in energy such as magnetism, light, electricity, etc. according to the description of a program to a reader provided in hardware resources of a computer. Thus, the description content of the program can be transmitted to the reading device. For example, a magneto-optical disk 111, an optical disk 112, a magnetic disk 113, a memory 114 (including an IC card, a memory card, etc.), and the like. Of course, these storage media are not limited to portable types.
[0080]
By storing the program 101 in these storage media and mounting these storage media in, for example, the magneto-optical disk device 121, the optical disk device 122, the magnetic disk device 123, or a memory slot (not shown) of the computer 102, The program 101 can be read to execute the function of the image processing apparatus or the image processing method of the present invention. Alternatively, a storage medium may be attached to the computer 102 in advance, and the program 101 may be transferred to the computer 102 via a network, for example, and the program 101 may be stored and executed on the storage medium. The computer 102 may be integrated with the image forming mechanism in the image input device 1 or the image output unit 8, or a program stored in a storage medium is read out by another computer and the computer 102 (image input (Including the case where it is integrated with the apparatus 1 or the image forming mechanism).
[0081]
【The invention's effect】
As apparent from the above description, according to the present invention, a signal indicating the inside of a character is output together with a signal indicating an edge portion and a pattern portion of a character / line image as an image area signal. As a result, with respect to a portion of a character or the like whose image quality has deteriorated due to a mixture of a pattern and character determination as in the past, it is intermediate between the edge portion of the character line drawing and the pattern portion with respect to the internal region of the character or line drawing. Image processing can be performed, and the image quality can be improved.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a first configuration example of an image area separation unit.
FIG. 2 is a block diagram showing a basic configuration example including an embodiment of an image processing apparatus and an image processing method of the present invention.
FIG. 3 is an explanatory diagram of an outline of contraction processing.
FIG. 4 is an explanatory diagram of an outline of expansion processing.
FIG. 5 is an explanatory diagram of an example of an image area separation result by an image area separation unit;
FIG. 6 is a block diagram illustrating a configuration example of a line segment extraction unit.
FIG. 7 is a block diagram illustrating a configuration example of a line extraction unit 32-0.
FIG. 8 is a conceptual diagram illustrating an example of a line segment detection process.
FIG. 9 is an explanatory diagram of a specific example of a line segment detection operation in the 5 × 5 pixel width detection unit 41-5.
FIG. 10 is an explanatory diagram of an example of details of a line segment detection operation.
FIG. 11 is an explanatory diagram illustrating an example of a character portion that cannot be extracted by the line segment extraction unit;
FIG. 12 is a block diagram illustrating a second configuration example of an image area separation unit.
FIG. 13 is an example of a line segment width detection unit.
FIG. 14 is an explanatory diagram of an example of a computer program and a storage medium storing the computer program when the function of the image processing apparatus or the image processing method of the present invention is realized by the computer program.
FIG. 15 is a block diagram illustrating an example of a conventional image processing apparatus.
FIG. 16 is an explanatory diagram of an example of erroneous detection.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Image input part, 2 ... Input gradation correction | amendment part, 3 ... Color signal conversion part, 4 ... Color signal conversion part, 5 ... Black plate generation part, 6 ... Spatial filter part, 7 ... Output gradation correction part, 8 DESCRIPTION OF SYMBOLS ... Image output part, 9 ... Image area separation part, 11 ... Small area extraction part, 12 ... Line segment extraction part, 13 ... Edge detection part, 14 ... Image area signal generation part, 15 ... Character extraction part, 16 ... Halftone dot Extraction unit, 17 ... logical sum operation unit, 18 ... contraction unit, 19 ... expansion unit, 20 ... negation-logical product computation unit, 21 ... logical product computation unit, 22 ... negation-logical product computation unit, 23 ... attribute signal generation , 24 ... line segment width detection unit, 25 ... attribute signal generation unit, 31-1 to K ... first to K reduction units, 32 to 0 to K ... line segment extraction unit, 33-1 to K ... first to first K enlargement unit, 34 ... logical sum operation unit, 35 ... expansion unit, 41-1 to L ... pixel width detection unit, 42 ... logical sum operation unit, 51-1-4 ... contraction unit, 52 ... line width signal generator , 61... Character extraction unit, 62... Halftone dot extraction unit, 63... Contour extraction unit, 64... OR calculation unit, 65. DESCRIPTION OF SYMBOLS ... Contraction part, 69 ... Expansion part, 70 ... AND operation part, 101 ... Program, 102 ... Computer, 111 ... Magneto-optical disk, 112 ... Optical disk, 113 ... Magnetic disk, 114 ... Memory, 121 ... Magneto-optical disk apparatus, 122: an optical disk device, 123: a magnetic disk device.

Claims (7)

入力された画像データから線分を検出する線分検出装置において、処理対象となる各画素を中心画素として該中心画素を中心とし検出する線分幅に対応する所定の大きさの領域を構造要素とし該構造要素に外接する1ないし複数画素からなる複数の外接領域についてそれぞれ平均濃度を算出する平均値算出手段と、該平均値算出手段で算出した複数の外接領域の平均濃度が最小となる外接領域を選択する選択手段と、該選択手段で選択された外接領域及び該外接領域と前記構造要素を挟んで対向する外接領域の平均濃度及び前記構造要素内の画素値により線分を検出する検出手段を有することを特徴とする線分検出装置。In a line segment detection device for detecting a line segment from input image data, a structural element having a region of a predetermined size corresponding to a line segment width detected around the center pixel, with each pixel to be processed as a center pixel And an average value calculating means for calculating an average density for each of a plurality of circumscribed areas consisting of one or a plurality of pixels circumscribing the structural element, and a circumscribing that minimizes the average density of the plurality of circumscribed areas calculated by the average value calculating means. Detection means for detecting a line segment by a selection means for selecting an area, a circumscribed area selected by the selection means, an average density of the circumscribed area facing the circumscribed area with the structural element in between, and a pixel value in the structural element A line segment detection apparatus characterized by comprising means. 前記検出手段は、構造要素内の画素の濃度差が所定の値より小さいか否かを判定する判定手段と、該判定手段で濃度差が所定の値より小さいと判定されたとき前記選択手段で選択された2つの外接領域の画素値の平均値の差が小さくかつ2つの外接領域の平均値と前記構造要素の平均濃度との差が大きい場合に前記構造要素内の画素を線分の画素として検出する線分画素検出手段を有することを特徴とする請求項1に記載の線分検出装置。  The detection means determines whether or not the density difference of the pixels in the structural element is smaller than a predetermined value, and the selection means determines that the density difference is smaller than the predetermined value by the determination means. When the difference between the average values of the pixel values of the two circumscribed areas is small and the difference between the average value of the two circumscribed areas and the average density of the structural element is large, the pixels in the structural element are pixels of the line segment The line segment detection apparatus according to claim 1, further comprising: a line segment pixel detection unit that detects the line segment as a pixel segment detection unit. さらに、前記検出手段による線分の検出結果に対して膨張処理を行う膨張処理手段を有することを特徴とする請求項1または請求項2に記載の線分検出装置。  The line segment detection apparatus according to claim 1, further comprising expansion processing means for performing expansion processing on a detection result of the line segment by the detection means. さらに、線分で構成された小領域を抽出する小領域抽出手段と、前記小領域抽出手段による抽出結果と前記膨張処理手段による膨張処理結果の論理演算を行う論理演算手段を有することを特徴とする請求項3に記載の線分検出装置。  And a small area extracting means for extracting a small area composed of line segments, and a logical operation means for performing a logical operation of the extraction result by the small area extracting means and the expansion processing result by the expansion processing means. The line segment detection device according to claim 3. 入力された画像データから線分で構成された小領域を抽出する小領域抽出手段と、前記画像データから線分を抽出する1ないし複数の請求項1ないし請求項3のいずれか1項に記載の線分検出装置からなる線分抽出手段と、前記画像データからエッジ部分を検出するエッジ検出手段と、前記小領域抽出手段による小領域の抽出結果と前記線分抽出手段による線分の抽出結果と前記エッジ検出手段によるエッジの検出結果に基づいて前記画像データの文字を含む線分または該線分内部または絵柄のいずれかを示す像域信号を生成する像域信号生成手段を具備することを特徴とする画像処理装置。  The small region extraction means for extracting a small region composed of line segments from the input image data, and one or more of any one of claims 1 to 3 for extracting a line segment from the image data. A line segment extraction unit comprising the line segment detection device, an edge detection unit for detecting an edge portion from the image data, a small region extraction result by the small region extraction unit, and a line segment extraction result by the line segment extraction unit And an image area signal generating means for generating an image area signal indicating a line segment including characters of the image data or an inside of the line segment or a picture based on the edge detection result by the edge detecting means. A featured image processing apparatus. 前記像域信号生成手段は、前記線分内部を示す像域信号を当該線分内部の領域幅に応じて生成することを特徴とする請求項5に記載の画像処理装置。  The image processing apparatus according to claim 5, wherein the image area signal generation unit generates an image area signal indicating the inside of the line segment according to an area width inside the line segment. さらに、前記像域信号生成手段で生成された前記像域信号を用いて線分領域と線分内部領域と絵柄領域でそれぞれの特性に応じた画像処理を施す画像処理手段を有することを特徴とする請求項5または請求項6に記載の画像処理装置。  And image processing means for performing image processing according to the respective characteristics in the line segment area, the line segment internal area, and the picture area using the image area signal generated by the image area signal generating means. The image processing apparatus according to claim 5 or 6.
JP2001380768A 2001-12-13 2001-12-13 Line segment detection apparatus and image processing apparatus Expired - Fee Related JP4035696B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001380768A JP4035696B2 (en) 2001-12-13 2001-12-13 Line segment detection apparatus and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001380768A JP4035696B2 (en) 2001-12-13 2001-12-13 Line segment detection apparatus and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2003189090A JP2003189090A (en) 2003-07-04
JP4035696B2 true JP4035696B2 (en) 2008-01-23

Family

ID=27591663

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001380768A Expired - Fee Related JP4035696B2 (en) 2001-12-13 2001-12-13 Line segment detection apparatus and image processing apparatus

Country Status (1)

Country Link
JP (1) JP4035696B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4548733B2 (en) 2006-03-01 2010-09-22 株式会社リコー Image processing apparatus, method, program, and recording medium
JP6244755B2 (en) * 2013-09-03 2017-12-13 日本電気株式会社 Character correction apparatus, character correction method and program
US10423854B2 (en) 2017-09-20 2019-09-24 Brother Kogyo Kabushiki Kaisha Image processing apparatus that identifies character pixel in target image using first and second candidate character pixels
CN112686265A (en) * 2021-01-07 2021-04-20 南京大学 Hierarchic contour extraction-based pictograph segmentation method

Also Published As

Publication number Publication date
JP2003189090A (en) 2003-07-04

Similar Documents

Publication Publication Date Title
US6157736A (en) Method and apparatus for automatic image segmentation using template matching filters
JP3176052B2 (en) Image processing device
US8384964B2 (en) Image processing apparatus and image processing method
EP1154634A2 (en) Method and system for see-through image correction in image duplication
US7411699B2 (en) Method and apparatus to enhance digital image quality
JP4035696B2 (en) Line segment detection apparatus and image processing apparatus
JPH0818785A (en) Image output device
JP3754736B2 (en) Image processing apparatus and method
JP4324532B2 (en) Image processing apparatus and storage medium
JP3966448B2 (en) Image processing apparatus, image processing method, program for executing the method, and recording medium storing the program
JPH11136505A (en) Picture processor and picture processing method
JPS60136478A (en) Picture processor
KR100514734B1 (en) Method and apparatus for improvement of digital image quality
JP3564216B2 (en) Image processing device
JP2009105808A (en) Image processing apparatus, image processing method, program for executing image processing method, and storage medium
JP2001144954A (en) Image processing unit and image processing method
JP3596962B2 (en) Image processing device
JP3146516B2 (en) Image processing device
JPH0766976A (en) Picture processing unit
JPH09167228A (en) Method and device for transformation, method and device for reshaping picture using them and system using them
JP2724177B2 (en) Halftone area separation method
JPH01173971A (en) Picture processor
JP2677989B2 (en) Pseudo halftone processor
JPH1155505A (en) Image processing unit
JP2002152515A (en) Image processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040924

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061026

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070109

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070801

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070907

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071016

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111109

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111109

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121109

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121109

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131109

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees