JP4062987B2 - Image area dividing method, image area dividing apparatus, and image area dividing program - Google Patents

Image area dividing method, image area dividing apparatus, and image area dividing program Download PDF

Info

Publication number
JP4062987B2
JP4062987B2 JP2002184889A JP2002184889A JP4062987B2 JP 4062987 B2 JP4062987 B2 JP 4062987B2 JP 2002184889 A JP2002184889 A JP 2002184889A JP 2002184889 A JP2002184889 A JP 2002184889A JP 4062987 B2 JP4062987 B2 JP 4062987B2
Authority
JP
Japan
Prior art keywords
block
image
area
blocks
block connection
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
JP2002184889A
Other languages
Japanese (ja)
Other versions
JP2004030188A (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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP2002184889A priority Critical patent/JP4062987B2/en
Publication of JP2004030188A publication Critical patent/JP2004030188A/en
Application granted granted Critical
Publication of JP4062987B2 publication Critical patent/JP4062987B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Character Input (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、モノクロ濃淡画像、カラー画像、距離画像のように各画素の画素値を多段階に割り当てた多値画像を処理対象として、多値画像を画素値の類似度が高い画素群からなる複数個の領域に分割する画像の領域分割方法、画像の領域分割装置、画像の領域分割プログラムに関するものである。
【0002】
【従来の技術】
近年、画像によって各種対象物の識別、検査、計測、認識を行うために画像処理技術が利用されている。この種の画像処理技術では、画像内において対象物を識別する必要があるから、画像内において対象物を抽出する技術が各種提案されている。たとえば、撮像装置と対象物との位置関係に応じて適宜方向から照明を行うことによって画像内における対象物と背景との濃度値の差が大きくなるようにしておき、濃淡画像における各画素の画素値である濃度値に対して適宜の閾値を適用して濃淡画像を二値化することにより、対象物を背景から分離する技術が広く用いられている。
【0003】
しかしながら、濃淡画像を単純に二値化する技術では、対象物と背景との濃度値の差が不十分な場合や背景に地模様があるような場合には、背景から対象物を分離することができないという問題を有している。たとえば、光学式文字読み取り装置では文字の周囲に図柄や地模様が存在していると、文字の認識精度が低下するという問題が生じる。また、生産ラインにおいてコンベア上を搬送される物品を撮像した画像内でパターンマッチングを行うことによって物品の種別を判別するような場合に、画像内にベルトコンベアなどの画像が含まれていると部品を特定できない場合がある。
【0004】
そこで、画像内において類似した特徴を有する部分ごとに領域を分割することによって、着目する領域を画像内から抽出する技術が種々提案されている。
【0005】
たとえば、特開平11−167634号公報には、キー画像と同一あるいは類似した目的の画像を検索するために、カラー画像を小領域に分割し、平均色や代表色を特徴量として特徴量の類似する小領域を統合することにより多角形の分割領域を形成する技術が記載されている。また、この公報では小領域に多くの色が含まれるときには小領域を再分割し、再分割した小領域の画素数が閾値以上であれば、特徴量を求めて再分割した小領域について類似性を評価する技術が記載されている。
【0006】
また、特開平4−154368号公報には、文書画像を、文字、図形、表、写真などの構成要素に分割することを目的として、画像をブロック化し、隣接するブロックで特徴量が大きく異なる部分を輪郭部位とみなし、輪郭部位のブロック内でさらに領域を細分化する技術が記載されている。
【0007】
さらに、特開平1−312675号公報には、濃淡画像において濃度値にむらがある場合でも輪郭を正しく抽出するために、画像内の画素値を複数の閾値との大小比較により多段階に分割し、分割された各領域ごとに濃度の範囲を拡げたときの面積の増加の有無を判定し、面積が増加しなくなった時点で領域を確定する技術が記載されている。
【0008】
特開平8−167028号公報には、写真画像の処理のために画像を「ライト」「中間」「シャドウ」に分割するために、画像をブロック化し、ブロックを対ごとに類似度を評価することによりブロックを統合するクラスタリングを行い、クラスタリングにより形成された領域を統合の履歴を参照しながら再度評価を行って輪郭を確定する技術が記載されている。
【0009】
【発明が解決しようとする課題】
上述した各公報のうち、特開平11−167634号公報に記載の技術では、小領域内に多くの色が存在するときに小領域を再分割し、かつ分割した小領域の画素数が閾値以上であるときにのみ特徴量の類似性を評価するものであるから、1画素単位まで領域を分割することはできず、また図柄や地模様やノイズによって小領域内に多くの色が存在するようなときに、背景となる領域の分割数が多くなって処理時間が増加する可能性がある。
【0010】
特開平4−154368号公報に記載の技術では、隣接するブロック間の特徴量の差が大きく異なるときに輪郭部位とみなしているから、濃淡画像において濃度むらがある場合や輪郭が不鮮明である場合には、輪郭を正確に抽出することができないことがある。
【0011】
特開平1−312675号公報に記載の技術は、濃淡画像において濃度むらがある場合でも目的とする領域を抽出できる可能性があるが、図柄や地模様やノイズが領域内に残る可能性がある。
【0012】
特開平8−167028号公報に記載の技術では、クラスタリングにより3種類の領域に分割しているが、ノイズが存在する場合にノイズを十分に除去する技術ではなく、とくに文字認識や部品の種別認識のように対象物の領域を背景から分離する目的では採用することができない。
【0013】
本発明は上記事由に鑑みて為されたものであり、その目的は、複雑な背景であっても背景となる領域と対象となる領域とを明瞭に分離することが可能であって、しかも1画素単位までの領域の分割を可能としながらも高速な処理が期待できる画像の領域分割方法、画像の領域分割装置、画像の領域分割プログラムを提供することにある。
【0014】
【課題を解決するための手段】
請求項1の発明は、多値画像をそれぞれ複数個の画素を含む矩形状の複数個のブロックに分割した後に、ブロック内の画素値の分布に関する特徴量を隣接する各一対のブロック間で比較し特徴量の類似度が規定値以上である各一対のブロックには同じラベルを付与するとともに特徴量の類似度が規定値未満である各一対のブロックには異なるラベルを付与して前記多値画像内のすべてのブロックにラベルを付与する初期分割段階と、同ラベルが付与されているブロックからなるブロック連結領域の境界部分に位置するブロックを複数個の分割ブロックに分割するとともに、分割前のブロックに隣接するブロックの前記特徴量と分割ブロックの画素値の分布に関する特徴量との類似度が規定値以上になるときに隣接するブロックと同じラベルを当該分割ブロックに付与することにより当該分割ブロックを前記ブロック連結領域を構成するブロックとして前記ブロック連結領域に統合する細分化段階とを有し、細分化段階を繰り返すことにより多値画像に含まれる全画素にラベルを付与する方法であり、特徴量の類似度の判断には、ブロック内の画素値の平均値の差と標準偏差の差とのうち少なくとも平均値の差を用いることを特徴とする。
【0015】
請求項2の発明は、請求項1の発明において、前記ブロックおよび前記分割ブロックは2×2画素の矩形の領域であることを特徴とする。
【0016】
請求項3の発明は、請求項1または請求項2の発明において、前記初期分割段階において、各一対のブロック間で特徴量を比較する前に、各ブロックの画素値の平均値を規定の閾値と比較することにより前記多値画像内で背景側となるブロックを抽出するとともに、背景側となるブロックには規定した背景側のラベルを付与することを特徴とする。
【0017】
請求項4の発明は、請求項1ないし請求項3の発明において、前記初期分割段階において、着目するブロックに隣接する複数個のブロックを時計方向と反時計方向とのいずれか一方の順で選択するとともに選択したブロックと着目するブロックとの特徴量の類似度が規定値以上であるときに選択したブロックを次に着目するブロックとして追跡し、着目するブロックと選択したブロックとの特徴量の類似度が規定値以上でありかつ選択したブロックに着目するブロックと同ラベルが付与されているときに追跡済みのブロックを前記ブロック連結領域の境界部分に位置するブロックとすることを特徴とする。
【0018】
請求項5の発明は、請求項4の発明において、前記初期分割段階において、着目するブロックと選択したブロックとの特徴量の類似度が規定値以上でありかつ選択したブロックに着目するブロックとは異なるラベルが付与されているときに追跡済みのブロックに選択したブロックと同じラベルを付与することを特徴とする。
【0019】
請求項6の発明は、請求項1の発明において、前記特徴量の類似度の判断には、前記ブロック内の画素値の平均値の差を用いることを特徴とする。
【0020】
請求項7の発明は、請求項1の発明において、前記特徴量の類似度の判断には、前記ブロック内の画素値の平均値の差および標準偏差の差を用いることを特徴とする。
【0021】
請求項8の発明は、請求項1の発明において、前記細分化段階において、分割ブロックが1画素以上の所定の画素数に達した状態で前記ブロック連結領域に統合できない分割ブロックは前記多値画像内で背景側となるブロック連結領域に統合することを特徴とする。
【0022】
請求項9の発明は、請求項1の発明において、前記ラベルが互いに異なる複数個の前記ブロック連結領域について、画素値の分布に関する特徴量の類似度が規定値以上である各一対のブロック連結領域をグループ化することを特徴とする。
【0023】
請求項10の発明は、請求項1の発明において、前記ラベルが互いに異なる複数個の前記ブロック連結領域について、最短距離が規定した閾値以内である各一対のブロック連結領域に同ラベルを付与して統合することを特徴とする。
【0024】
請求項11の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域のうち面積が規定の閾値以上であるブロック連結領域を前記多値画像内での背景側の領域とみなし、当該ブロック連結領域には規定した背景側のラベルを付与することを特徴とする。
【0025】
請求項12の発明は、請求項11の発明において、前記多値画像内における背景側の領域の画素値の分布に関する特徴量を求め、前記ブロック連結領域のうち面積が前記閾値未満であってブロック連結領域内の画素の画素値の分布に関する特徴量と背景側の領域の特徴量との類似度が規定値以上であるブロック連結領域には規定した背景側のラベルを付与することを特徴とする。
【0026】
請求項13の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域のうち面積が規定の閾値以下であるブロック連結領域を着目するブロック連結領域として着目するブロック連結領域内の画素の画素値から画素値の分布に関する特徴量を求め、他のブロック連結領域であってブロック連結領域内の画素の画素値の分布に関する特徴量との類似度が規定値以上になるブロック連結領域が着目するブロック連結領域から規定の距離範囲内に存在しないときに、着目するブロック連結領域に前記多値画像内における背景側であることを示す規定した背景側のラベルを付与することを特徴とする。
【0027】
請求項14の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域ごとにブロック連結領域に外接する最小の矩形を設定し、設定した矩形の大きさが規定範囲を逸脱するときには当該ブロック連結領域に前記多値画像内における背景側であることを示す規定した背景側のラベルを付与することを特徴とする。
【0028】
請求項15の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域ごとに主軸の方向を求め、後処理においてブロック連結領域との類似度を比較するマッチングパターンの主軸の方向にブロック連結領域の主軸の方向が一致するようにブロック連結領域を回転させることを特徴とする。
【0029】
請求項16の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域ごとにブロック連結領域に外接する最小の矩形を設定し、当該矩形のサイズが規定したサイズになるように各ブロック連結領域を拡大または縮小することを特徴とする。
【0030】
請求項17の発明に係る画像の領域分割装置は、多値画像を記憶する記憶手段と、記憶手段に格納された多値画像をそれぞれ複数個の画素を含む矩形状の複数個のブロックに分割する画像分割処理部と、ブロック内の画素値の分布に関する特徴量を求める特徴量演算部と、隣接する各一対のブロック間で特徴量を比較し特徴量の類似度が規定値以上である各一対のブロックには同じラベルを付与するとともに特徴量の類似度が規定値未満である各一対のブロックには異なるラベルを付与して前記多値画像内のすべてのブロックにラベルを付与する追跡処理部と、同ラベルが付与されているブロックからなるブロック連結領域の境界部分に位置するブロックを複数個の分割ブロックに分割するブロック分割処理部とを備え、特徴量演算部はブロック分割処理部で分割した分割ブロックについて特徴量を求める機能を有し、追跡処理部は、分割前のブロックに隣接するブロックの前記特徴量と分割ブロックの画素値の分布に関する特徴量との類似度が規定値以上になるときに隣接するブロックと同じラベルを当該分割ブロックに付与することにより当該分割ブロックを前記ブロック連結領域を構成するブロックとして前記ブロック連結領域に統合する機能を有し、ブロック分割処理部と特徴量演算部と追跡処理部とによりブロックを分割ブロックに分割してラベルを付与する処理を繰り返すことにより多値画像に含まれる全画素にラベルを付与する構成であり、特徴量の類似度の判断には、ブロック内の画素値の平均値の差と標準偏差の差とのうち少なくとも平均値の差を用いることを特徴とする。
【0031】
請求項18の発明に係るプログラムは、請求項1ないし請求項16のいずれか1項に記載の画像の領域分割方法をコンピュータを用いて実現する。
【0032】
【発明の実施の形態】
本実施形態では、図1に示すように、文字が表記された対象物1をCCDカメラのような撮像装置2を用いて撮像し、撮像装置2により得られた画像内において文字の領域を他の領域から分離する場合を例として説明する。ここでは撮像装置2としてモノクロ信号を出力するものを想定する。撮像装置2の出力は後述の処理を行う画像処理装置10に入力される。撮像装置2の出力はアナログ信号であって画像処理装置10に設けたA/D変換器11においてデジタル信号に変換された後、画像処理装置10に設けた記憶手段12に格納される。記憶手段12は、A/D変換器11から出力された濃淡画像を一時的に記憶する一時記憶領域および濃淡画像に対して後述する各種処理を行う間に発生するデータを一時的に記憶する作業記憶領域を備えるメモリと、各種データを長期的に記憶するためのハードディスク装置のような記憶装置とを含む。記憶手段12における一時記憶領域に格納される濃淡画像は、画素がマトリクス状に配列されるとともに各画素に多段階の画素値が設定される多値画像になる。なお、本実施形態では、濃淡画像(グレー画像)を用いるから以下では画素値として濃度値を用いるが、多値画像としてはカラー画像や距離画像を用いることができ、カラー画像では画素値として色相あるいは彩度を用いればよく、距離画像では画素値として距離を用いることになる。また、カラー画像では、適宜の基準色との色差を用いて各画素に1つの画素値を対応させたり、L表色系の明度L色度a,bの3つの値を1画素の画素値として対応させてもよい。
【0033】
画像処理装置10はマイクロコンピュータを主構成とし、記憶手段12に格納した画像に対して図2に示す処理を実行することによって、本実施形態の目的である文字の領域を他の領域から分離する。なお、画像処理装置10にはモニタ3が付設され、記憶手段12に格納された画像や処理中の画像をモニタ3で監視することが可能になっている。いま、記憶手段12に格納された画像が図5(a)に示す内容であるとすれば、画像処理装置10では図5(a)に示す画像内から図5(b)に示すように文字Cの領域を抽出する。ただし、図5(a)に示す画像においては、文字Cのほかにデザインによる図柄Dや地模様Eの領域が含まれ、文字Cのうち「B」では不連続部分(左右両部分の間に隙間)が存在し、また「X」では明暗のむらが大きい部分が存在している。したがって、図5(a)の画像を従来の技術として説明したように画像の画素値(濃度)で単純に二値化すると、図5(c)のように、文字C以外に図柄Dや地模様Eの一部が画像内に残り、「B」の文字Cはひとまとまりに扱うことができず、「X」の文字Cについては形状を明確に抽出することができなくなる。さらに、図5(a)に示す画像内には撮像手段12により生じるノイズが含まれていることもあり、ノイズが含まれていると二値化した画像内で文字Cと同じ画素値の画素が不規則に発生することがある。図5(c)では図柄Dや地模様Eの中にノイズにより生じた画素も含まれている。つまり、図5(c)の画像のように、文字C以外の情報が含まれていたり、本来は1文字Cであるのにひとまとまりに扱っていない情報が含まれていたり、文字Cの形状が不明瞭であったりすると、光学的文字読み取り装置などにおいて文字Cを認識しようとするときに図5(a)のような元の画像の濃度値を二値化しただけでは、得られる情報に過不足が生じ、結果的に文字Cの認識率が低下することになる。
【0034】
そこで、文字C以外の不要な情報(以下、「背景領域」という)を画像内から除去し、さらに文字Cごとに1つのまとまった領域として扱うことを可能にするとともに、文字Cの中で濃度値にばらつきがあっても文字Cの形状をほぼ正確に抽出することを可能にすることが要求される。以下では、文字Cのような目的の領域を「物体領域」と呼ぶ。光学的文字読み取り装置においては、文字Cの認識率を向上させるために、文字の領域である物体領域と背景領域とを分離することが前処理として要求される。また、物品の種別をパターンマッチングによって認識するような場合にも、パターンマッチングの精度を高めるために、物品の領域である物体領域と背景領域とを分離することが前処理として要求される。
【0035】
このような前処理を行うために、本実施形態では記憶手段12に格納された濃淡画像に対して、図2に示す手順の処理を行って物体領域と背景領域とを分離する。すなわち、まず画像分割処理部13では、記憶手段12に格納された濃淡画像を2の累乗個(nを正整数として2個)の画素を一辺とする正方領域であるブロックB(図6参照)に分割する(S1)。画像のアスペクト比は適宜に設定してよいが、現状では4:3が一般的であるから、1画面の画素数は640×480画素、800×600画素、1024×768画素、1152×864画素のいずれかであるものとする。これらの画素数のいずれかを選択すると、2×2画素のブロックBとして設定可能な最大サイズは、それぞれ32×32画素(n=5)、8×8画素(n=3)、256×256画素(n=8)、32×32画素(n=5)になる。ブロックBのサイズは、文字Cを物体領域とする場合であれば、ブロックBの一辺が文字Cの線幅程度になるように設定される。このようなブロックBのサイズは画像における空間周波数に基づいて自動的に設定することができる。
【0036】
次に、画像分割処理部13で得られた各ブロックBは特徴量演算部14に引き渡され、各ブロックBの画素値の分布に関する特徴量がそれぞれ求められる(S2)。本実施形態では特徴量としてブロックBに含まれる各画素の濃度値の平均値および標準偏差を用いる。各ブロックBについて求めた特徴量は追跡処理部15において比較され、着目しているブロックBに隣接するブロックBであって着目しているブロックBとの特徴量の類似度が規定値以上であるブロックBを追跡する(S3)。隣接する各一対のブロックBの類似度が規定値以上であるときには両ブロックBに同じラベルを付与することによって、同ラベルを付与した複数個のブロックBからなるブロック連結領域を形成する。すなわち、着目するブロックBに対して特徴量の類似度が規定値以上になるような隣接するブロックBを順次追跡し、追跡されたブロックBによって図7に示すような形でブロック連結領域が形成される(図7において濃淡の異なるひとまとまりの部分がそれぞれブロック連結領域になる)。追跡可能であったブロックBについては、ブロック連結領域ごとにラベルを付与して記憶手段12に格納する。隣接するブロックBの特徴量を比較してブロック連結領域を追跡する処理手順については後述する。
【0037】
一方、上述のようにしてブロックBを追跡して濃淡画像に複数個のブロック連結領域が形成されると、異なるラベルが付与されたブロック連結領域の境界部分のブロックBをブロック分割処理部16に引き渡す(S4)。ブロック分割処理部16ではブロック連結領域の境界部分である各ブロックBを縦横にそれぞれ2分割した分割ブロックBn(=B1、nは正整数、図13参照)を形成する(S5,S6)。つまり、分割ブロックB1に含まれる画素数はブロックBの画素数の4分の1になる。ブロック分割処理部16において生成された分割ブロックB1は、特徴量演算部14に引き渡されて特徴量が求められ、分割ブロックB1について求めた特徴量は追跡処理部15において周囲のブロックBの特徴量との類似度が評価される。分割ブロックB1の特徴量と周囲のブロックBの特徴量との類似度が規定値以上であるときには、分割ブロックB1に周囲のブロックBと同じラベルが付与され、この分割ブロックB1は周囲のブロックBと同じブロック連結領域に統合される(S7)。このようなラベル付けの処理によって各分割ブロックB1にラベルが付与され、ブロック連結領域の境界部分では分割ブロックB1の単位でブロック連結領域の形状が微細化される。このようにして、ブロック連結領域の境界部分には分割ブロックB1が並ぶから、分割ブロックB1をブロックBと等価に扱い、分割ブロックB1をさらに分割ブロックB2に分割して上述の処理を繰り返し、最終的には1画素単位まで分割する(S8,S9)。ここにおいて、分割ブロックBnを用いて形成したブロック連結領域を記憶手段12に格納するのはもちろんのことである。上述のようにしてすべてのブロックBと分割ブロックBn(nは正整数)とにラベルが付与されれば各ブロック連結領域が物体領域または背景領域であると考えられるから、物体領域と背景領域とを分離することが可能になる。
【0038】
以下では、ブロック連結領域を求める処理についてさらに具体的に説明する。本発明の基本的な処理手順は、上述したように濃淡画像を分割したブロックBを用いる段階と、ブロックBをさらに分割した分割ブロックBn(nは正整数)を用いる段階とを有している。つまり、物体領域と背景領域とのおおまかな分類を行うために濃淡画像を分割したブロックBを用いる初期分割段階と、ブロックBでは物体領域と背景領域とに分類できないような境界付近についてブロックBよりも小さい単位である分割ブロックBnを用いる細分化段階とを有している。
【0039】
まずブロックBを用いる初期分割段階について図3を用いて説明する。上述したように、初期分割段階では、まず記憶手段12に格納されている濃淡画像を、一辺の画素数が2の累乗である正方形のブロックBに分割する。たとえば、図5(a)に示した濃淡画像を図6のような形でブロックBに分割する。図示するブロックBのサイズは一辺の画素数が文字Cの線幅の画素数程度に設定されている。また、ブロックBの一辺の画素数を2の累乗個に設定しておけば、細分化段階においてはブロックBの一辺を2分割することにより等面積の分割ブロックBnを形成することができるから、分割ブロックBnを設定する処理が簡単になる。
【0040】
上述したように、初期分割段階においては、各ブロックBについて求めた特徴量の類似度が高いブロックBを追跡してグループ化することによりブロック連結領域を形成するのであって、ブロック連結領域を形成する複数個のブロックBには同じラベルが付与される。ここでは、ラベルとして数値を用いるものとし、ブロック連結領域ごとに付与されるラベルを「識別番号」と呼ぶことにする。ブロック連結領域を形成するブロックBを追跡する際には、濃淡画像の全体を用いてもよいが、背景領域を確実に分離することができる場合には、追跡の前に背景領域を分離するのが望ましい。追跡の前に背景領域の少なくとも一部を分離しておけば、追跡すべき領域が少なくなるから、処理量の低減につながり、結果的に処理の高速化が期待できる。たとえば、図5(a)に示した濃淡画像であれば、図柄Dの一部や地模様Eの部分については分離することが可能である。
【0041】
本実施形態では、ブロックBの追跡の前に背景領域の一部を分離する処理として、各ブロックBの濃度値の平均値を求め、濃度値の平均値に対する適宜の閾値を設定してブロックBを二値化することにより背景領域を分離する(S1)。たとえば、図5(a)に示した濃淡画像であれば、図柄Dの一部や地模様Eの部分については文字Cの部分の濃度値の平均値よりも十分に小さいから(ここでは、図において白から黒に向かって濃度が増加するものとする)、適宜の閾値との大小比較によって背景領域の一部を分離することができる。このように、各ブロックBごとに濃度値の平均値を求め、濃度値の平均値が規定した閾値以下であるブロックBは識別番号を0に設定する(S2)。図5(a)の濃淡画像に対して識別番号が0である領域を白画素の領域とした例を図7に示す。図7では識別番号として0を付与した領域は白画素の領域になっているが、文字Cや図柄Dの一部を含む領域のブロックBについては識別番号が付与されていないから、このことを利用して以下の手順によってブロック連結領域に含まれるブロックBを追跡する。
【0042】
ブロック連結領域の追跡には、まず濃淡画像の左上端のブロックBを開始点とし、最上段に並ぶブロックBについて識別番号の付与されていないブロックBを左から右に順に追跡し、右端に達した後には1段下に並ぶブロックBについて識別番号の付与されていないブロックBを左から右に順に追跡する。つまり、いわゆるラスタ走査を行う。このようにして、識別番号Bの付与されていないブロックBが最初に発見されると(S3)、このブロックBに適宜の識別番号を付与する(S4)。ここでは、識別番号を0から順次大きくなる整数値として付与する。したがって、最初に発見されたブロックBには1が付与される。また、以下の説明においては、ブロックBの位置を示す必要があるときには図に示した座標(x,y)を用いてブロックB(x,y)と表し、ブロックBを追跡する際に着目しているブロックBに対して追跡の候補になっているブロックBの相対位置を示す必要があるときには相対位置を追跡ベクトルVと呼び、図に示した座標の差(dx,dy)を用いて追跡ベクトルV(dx,dy)と表す。
【0043】
いま、図7に示した画像内で識別番号の付与されていないブロックBを追跡したときに、図8(a)のようにブロックB(3,1)が最初に発見されたとする。この場合に、ブロックB(3,1)に識別番号として1を付与する(S4)。つまり、このブロックB(3,1)は1つのブロック連結領域A1の要素と推定されるから、ブロック連結領域A1を構成する要素としてブロックB(3,1)を加える(S5)。なお、図8では各ブロックBの識別番号を丸付き数字で示してある。
【0044】
上述のようにして識別番号を付与するブロックB(3,1)が発見されると、このブロックB(3,1)を着目するブロックBとし、このブロック(3,1)に近接するブロックBとの間で特徴量(濃度値の平均値および標準偏差)の類似度を評価し、着目するブロックB(3,1)に近接するブロックBとの特徴量の類似度が規定値を超えているときには、近接しているブロックBに対して着目するブロック(3,1)と同じ識別番号を付与する。ここで、着目するブロックBに近接するブロックBは、着目するブロックBの周囲の8個のブロックBであって、着目するブロックBに対する周囲の8個のブロックBの相対位置を表すために方向値kを設定してある。方向値kは0〜7の数値であり、ブロックBを追跡する際の向きを「3」として時計方向の順で45度ずつ4,5,6の値を付与し、「3」に対して反時計方向の順で45度ずつ2,1,0の値を付与する。ただし、最初に識別番号が付与されたブロックB(3,1)については、着目するブロックBの右隣りの方向値kを0とし、時計方向の順で1,2,……,7の番号を付与することにより着目するブロックBとの相対位置を方向値kによって識別可能にしてある。以下では、ブロックB(x,y)に対して方向値kをもって隣接するブロックBを、ブロックBk(x,y)と表記する。
【0045】
そこで、着目するブロックB(3,1)との類似度を評価するブロックBを識別するために、まず方向値kを0に設定し(S7)、設定した方向において隣接するブロックBが存在するか否かを判断し(S8)、図8(b)のようにブロックB0(3,1)(=B(4,1))が存在する場合には、そのブロックB0(3,1)にすでに識別番号が付与されているか否かが判断される(S9)。識別番号が付与されていなければ、このブロックB0(3,1)との類似度を評価し、同じ識別番号を付与するか否かを判断する(S10,S11)。類似度の評価には、まずブロック連結領域A1に含まれる画素の濃度値の平均値とブロックB(4,1)に含まれる画素の濃度値の平均値との差を求める。ここで、両者の差が規定の閾値内であるときには(S10)、ブロック連結領域A1に含まれる画素の濃度値の標準偏差とブロックB(4,1)に含まれる画素の濃度値の標準偏差とを求め、両者の標準偏差の差が規定の閾値内であるときには(S11)、ブロックB(4,1)をブロック連結領域A1に含まれると判断し、このブロックB(4,1)にブロック連結領域A1と同じ識別番号を与える(S12)。つまり、図8(b)のようにブロックB(4,1)にはブロックB(3,1)と同様に識別番号が1になる。このようにして、ブロック連結領域A1にブロックB(4,1)が加えられ(S13)、あらたに生成されたブロック連結領域A1について濃度分布が求められる(S14)。ここに、濃度分布の値としては濃度値の平均値を用いている。
【0046】
一方、ステップS8,S9において比較対象として抽出されたブロックBk(x,y)がステップS10,S11のいずれかにおいて類似しないと判断されたときには、方向値kをインクリメントし(S15)、次のブロックB1(3,1)(=B(4,2))についてステップS8〜S11の処理を行う。上述のようにして、追跡の開始点となるブロックB(3,1)に対して方向値kを順に時計回りに変化させ、B(4,1)→B(4,2)→B(3,2)→B(2,2)→B(2,1)→B(2,0)→B(3,0)→B(4,0)の順で各ブロックBk(3,1)がブロック連結領域A1に含まれるか否かを判断する。ただし、追跡の開始点となるブロックB(3,1)に近接するブロックBk(3,1)のうちでブロック連結領域A1に付加するブロックBk(3,1)が見つかれば、ブロックBk(3,1)の中でブロック連結領域A1に含まれるものを追跡するのではなく、発見したブロックBk(3,1)を次の開始点としてステップS7以降の処理を繰り返す。
【0047】
図8に示す例では、ブロックB(3,1)に隣接するブロックB(4,1)はブロックB(3,1)に類似すると判断されており、ブロックB(3,1)に隣接する他のブロックB(4,2)、B(3,2)、B(2,2)、B(2,1)、B(2,0)、B(3,0)、B(4,0)については類似度を判断していない。したがって、ブロックB(4,1)の識別番号が1に設定され、ブロックB(4,1)を追跡の開始点としてブロックB(4,1)に隣接するブロックBk(4,1)についてブロックB(4,1)と類似するか否かが判定されることになる。
【0048】
ブロックB(4,1)については、図8(b)のように、ブロックB(3,1)からブロックB(4,1)に向かう向きが右向きであるから(つまり、追跡ベクトルがV(1,0)であるから)、ブロックB(4,1)の右隣りであるブロックB(5,1)の方向値kが3になる。つまり、ブロックB(4,1)に隣接するブロックBk(4,1)は、B(3,0)→B(4,0)→B(5,0)→B(5,1)→B(5,2)→B(4,2)→B(3,2)の順で類似度が判定される。ここでは、図8(c)のように、ブロックB(5,2)がブロックB(4,1)と類似すると判断された例を示しており、ブロックB(5,2)に1という識別番号を与えている。以下同様にして、ブロック連結領域A1に含まれるブロックBを追跡するのである。
【0049】
上述のようにして、ブロック連結領域Am(mは0および正整数)に含めるブロックBを追跡する際に、着目するブロックB(x、y)に隣接するブロックBk(x、y)を時計方向に追跡しているから、物体領域の輪郭に相当するブロック連結領域Amが検出されることになる。ここで、図8に示す例では、図8(d)のようにブロック連結領域A1に含めるブロックBを追跡するとブロックB(3,2)に達し、ブロックB(3,2)に隣接するブロックBk(3,2)をB(2,2)→B(2,1)→B(3,1)→B(4,1)→B(4,2)→B(4,3)→B(3,3)の順で追跡すると、識別番号が未設定であってかつ類似度が規定値以上であるブロックB(4,2)の前に、識別番号が既設定であるブロックB(3,1)、B(4,1)が類似度の比較対象として抽出されることになる。しかしながら、これらのブロックB(3,1)、B(4,1)は識別番号がすでに設定されているから、類似度を判断する必要がない。そこで、着目するブロックB(x,y)に隣接しているブロックBk(x,y)にすでに識別番号が設定されているときには(S9)、着目するブロックB(x,y)と同じ識別番号が設定されているか否か(つまり、同じブロック連結領域A1に含まれているか否か)を判断し(S16)、識別番号が一致しているときには、その時点までに追跡されたブロックBをブロック連結領域A1の輪郭(境界部分)O1として記憶手段12に登録する(S17)。要するに、着目するブロックB(x,y)と隣接するブロックBk(x,y)との識別番号が一致すれば、ひとまとまりの物体領域に関する輪郭O1の抽出を終了する。なお、ブロックB(3,1)を抽出した時点で輪郭を記憶手段12に登録するから、その後に、ブロック連結領域A1に含まれかつ識別番号が既設定であるブロックBが発見されても無視する。
【0050】
上述のようにして物体領域の輪郭を決定した後には、輪郭の抽出の終端となったブロックB(x,y)に隣接するブロックBk(x,y)について右回りに追跡を続け、識別番号が未設定であってかつ類似度が規定値以上になるブロックBを抽出する。図8に示す例では、図8(e)のように、ブロックB(3,2)の周囲においてブロックB(4,2)が抽出され、同様にしてブロックB(4,2)に隣接するブロックBk(4,2)をB(3,1)→B(4,1)→B(5,1)→B(5,2)→B(5,3)→B(4,3)→B(3,3)の順で追跡すると、識別番号が付与されておらず類似度が規定値以上になるブロックB(3,3)が抽出される。ブロックB(4,2)に隣接するブロックBk(4,2)を追跡する際には、識別番号が既設定であって類似度が規定値以上であるブロックB(3,1)、B(4,1)、B(5,2)、B(5,3)が存在するが、ブロック連結領域A1の輪郭O1は記憶手段12にすでに記憶されているので、ブロックB(3,1)、B(4,1)、B(5,2)、B(5,3)については輪郭として採用せずに無視する。
【0051】
上述のようにして抽出されたブロックB(3,5)に隣接するブロックBk(3,3)を追跡すると、識別番号が未設定であってかつ類似度が規定値未満であるブロックBは存在しないから、この時点で追跡が終了する。すなわち、各ブロックB(x、y)に隣接するブロックBk(x、y)について、識別番号が未設定かつ類似度が規定値以上であるという条件を満たすブロックBが存在しなくなった時点で追跡を終了するから、図8(f)に示すように、物体領域の輪郭を渦巻き状に追跡してブロック連結領域A1を決定することができる。
【0052】
なお、上述のようにブロック連結領域Amに属するブロックBを追跡する過程において濃度値の平均値および標準偏差を比較するにあたり(S10)、すでに追跡したブロックB(つまり、追跡済みのブロック連結領域Am)の全画素の濃度値の平均値および標準偏差を随時求め(S14)、この値を用いてブロックBを追跡する。いま、図5に示した「X」の文字Cのように濃度にむらを生じているような物体領域を追跡することによって、図9(a)に矢印で示しているような経路でブロックBが追跡されたとする。この経路上の各ブロックBごとの平均濃度は図9(b)の折線イのように変化するのに対して、上述のように追跡済みのブロック連結領域Amの平均濃度を用いると図9(b)の折線ロのように変化する。つまり、各ブロックBごとの平均濃度の差を用いて追跡すると濃度むらの生じている部位で急激な濃度変化が生じるために追跡が中断するおそれがあるが、追跡済みのブロック連結領域Amの平均濃度を用いることによって急激な濃度変化が抑制され、結果的に濃度むらが生じていても追跡の中断を回避することが可能になる。
【0053】
上述のようにしてひとまとまりのブロック連結領域A1の追跡が終了すると(S8)、識別番号をインクリメントし(S18)、濃淡画像の左上端から順にブロックBを追跡して識別番号が未設定であるブロックBについて上述した処理を繰り返す。つまり、図8に示した例では識別番号が1であるブロック連結領域A1に含まれるブロックBを追跡したから、次は識別番号が2であるブロック連結領域A2に含まれるブロックBを追跡するのである。
【0054】
なお、ブロック連結領域Amに含まれるブロックBを追跡する過程において、着目しているブロックB(x,y)に隣接するブロックBk(x,y)の中に類似度が規定値以上になるブロックBが複数個存在している場合(このような場合を追跡において「分岐」がある場合という)、上述の処理では、先に発見されたブロックBのみがブロック連結領域Amに含まれ、残りのブロックBがひとまとまりのブロック連結領域Amに含まれなくなる可能性がある。つまり、本来は1つのブロック連結領域Amに含むべきブロックBであるのに、追跡において分岐があると複数個のブロック連結領域Amに分割されるおそれがある。たとえば、図5に示した「Z」の文字Cでは、図10(a)に矢印で示す経路でブロックBを追跡すると、ブロックB(5,2)ではブロックB(4,3)とブロックB(4,2)とに分岐が生じ、同様にブロックB(4,3)やブロックB(3,5)においても分岐が生じる。このような分岐が生じるとブロック連結領域Amが分割される可能性があるから、分岐を生じるブロックBを記憶手段12に一時的に記憶しておき、追跡の終端側で生じた分岐から順に分岐先を開始点とする追跡を行うことによって、ブロック連結領域Amの分割を回避する。たとえば、図10に示す例では、ブロックB(6,6)が追跡の終端になるから、終端にもっとも近い分岐を生じたブロックB(3,5)に隣接するブロックBk(3,5)のうち、時計方向に追跡したときに追跡の終了したブロックB(4,6)の次に発見されるブロックB(3,6)を開始点として追跡を再開する。ここに、ブロックB(3,6)はブロックB(3,5)から分岐しているので、ブロックB(3,5)と同じ識別番号を付与する。このように追跡を再開すれば、図10(b)のように、B(3,6)→B(2,6)→B(1,6)→B(2,5)→B(3,4)という経路でブロック連結領域Amに含まれるブロックBを追跡することができる。分岐を生じたブロックB(4,3)、ブロックB(3,5)の分岐先は、図10(b)に示した経路に含まれ、追跡を完了していない分岐先のブロックBは、ブロックB(5,2)の分岐先であるブロックB(4,2)のみになるから、ブロックB(4,2)を開始点として追跡を行い、すべての分岐先について追跡を行う。上述のように分岐が生じたときに分岐先からの追跡を行うことにより、ひとまとまりのブロック連結領域Amに含まれるすべてのブロックBを追跡することが可能になる。
【0055】
分岐によるブロック連結領域Amの分割を防止する技術として、図10(c)に矢印で示すように、追跡の終了しているブロックB(つまり、識別番号の付与されているブロックB)について再追跡を許容し、追跡の向きを逆行させる技術を採用してもよい。つまり、図10に示す例では、ブロックB(5,2)とブロックB(4,3)とブロックB(3,5)とにおいて分岐が生じているから、これらのブロックBを記憶手段12に記憶しておき、追跡の終端のブロックB(6,6)に達した後に追跡した経路を逆行する。ブロックB(4,6)は分岐を生じたブロックB(3,5)の分岐先の1つであって、ここでブロックB(3,5)の次の分岐先であるブロックB(3,6)を通る経路での追跡を行うと、分岐を生じたブロックB(4,3)の分岐先の1つであるブロックB(3,4)を経由し、ブロックB(5,2)の分岐先の1つであるブロックB(4,2)に達するように連続した経路が形成されることになる。このようにしてブロック連結領域Amに含まれるブロックBを漏れなく抽出することができる。
【0056】
なお、分岐が生じたブロックBを記憶手段12に記憶しておき、同じブロックBの追跡を許容する処理を行うと処理が煩雑になるから、処理を簡潔化するために分岐を生じたブロックBを記憶手段12に記憶せずに追跡を行い、追跡を行った複数の領域についてひとまとまりになるか否かを検証し、ひとまとまりになる場合に追跡結果を統合するようにしてもよい。この処理について図11の例を用いて説明する。
【0057】
すなわち、図11では図5に示した「田」の文字Cについてブロック連結領域Amに含まれるブロックBを追跡する例を示している。追跡の開始点は図11(a)に示すブロックB(1,1)であって、通常の追跡を行うと図11(a)に矢印で示す経路で文字Cの外周となる「口」形状のブロックBのみがブロック連結領域Amとして抽出される。つまり、「口」形状の内側の「十」形状の部分のブロックBは追跡されないのであるが、ここでは分岐について考慮せず、「十」形状の部分については別のブロック連結領域A(m+1)とみなして追跡する。すなわち、「田」の文字Cにおける外周のブロックBの追跡を終了した後に、濃淡画像の左上端から再度走査して識別番号が付与されていないブロックB(4,2)を抽出し、このブロックB(4,2)を開始点として追跡を行う。ブロックB(4,2)を開始点とする追跡には新たな識別番号が設定されるから、この時点では「田」の文字Cの外周のブロックBにより形成されるブロック連結領域Amとは異なるブロック連結領域A(m+1)とみなされる。ただし、「十」形状の追跡の途中では図11(b)のように、ブロックB(5,3)に隣接するブロックBk(5,3)において、「田」の文字Cの外周の一部であって、識別番号が既設定であるブロックB(6,2)が発見されるから(S9)、識別番号が不一致であることを確認し(S16)、さらに、このブロックB(6,2)についてブロックB(5,3)との類似度を判定し(S19)、類似度が規定値以上であればブロック連結領域A(m+1)をブロック連結領域Amに属するものとみなして、ブロック連結領域A(m+1)をブロック連結領域Amに統合するのである(S20,S21)。要するに、「十」形状の部分の識別番号を「田」の文字Cの外周の識別番号に変更した後に追跡を継続する。2つのブロック連結領域Am,A(m+1)を統合した後には、ブロック連結領域Am,A(m+1)の全体の濃度分布を求め(S22)、次のブロック連結領域の追跡のための識別番号をmに戻す(S23)。
【0058】
上述の処理を行うと、図11(c)のようにブロックB(2,3)を開始点とするブロック連結領域Amでは、ブロックB(3,3)に隣接するブロックB(4,2)が抽出され、このブロックB(4,2)にはすでに識別番号が付与されているから、図11(d)のように統合される。同様の処理を行うことによって、追跡中に識別番号が既設定であるブロック連結領域AmのブロックBを検出したときに、類似度が規定値以上であるときには追跡中のブロック連結領域Amを識別番号が既設定であるブロック連結領域Amに統合するので、ひとまとまりのブロック連結領域Amが分割されるのを防止することができ、ブロック連結領域Amを適正に形成することができる。
【0059】
上述のような処理を、識別番号が付与されていないブロックBがなくなるまで繰り返し行うことにより、濃淡画像のすべてのブロックBがいずれかのブロック連結領域Amに属することになる。図12は図5(a)の濃淡画像を17個のブロック連結領域A0〜A16に分割した例を示している。
【0060】
上述のようにして濃淡画像の含まれるすべてのブロックBをブロック連結領域A0〜A16に分割した後に、各ブロック連結領域A0〜A16の境界部分を形成するブロックBについて細分化する細分化段階に移行し、各ブロック連結領域A0〜A16の境界部分の形状を微細に追跡する。つまり、細分化段階では、上述した初期分割段階において得られたブロック連結領域A0〜A16の境界部分を形成するブロックBを分割ブロックBnに分割し、各分割ブロックBnがどのブロック連結領域A0〜A16に属するかを決定する。
【0061】
次に細分化段階について図4を用いて説明する。細分化段階では、まず細分化の対象であるブロックBを縦横に2等分し、図13(a)のように1個のブロックBを4個の分割ブロックB1に分割する(図4ではL×L個に分割している)。細分化の対象とするブロックBは識別番号の小さいほうから順に選択する。つまり、最初は識別番号がもっとも小さいブロック連結領域A0のブロックBのうち他のブロック連結領域A1〜A16との境界部分に位置するブロックBを分割の対象とする。したがって、図4に示すように、まず識別番号mを0に設定し(S1)、ブロック連結領域Am(=A0)の中で輪郭Om(=O1)のブロックB(x,y)の有無を確認し(S2)、輪郭OmのブロックB(x,y)がない場合にはすべてのブロック連結領域A0〜A16について処理済みか否かを判定し(S3)、未処理のブロック連結領域A0〜A16があれば識別番号をインクリメントして(S4)、未処理のブロック連結領域A0〜A16について分割ブロックBnを生成する処理を行う(S5)。分割ブロックBnは上述のようにブロックBを4分割したものであるから、2n−1 画素×2n−1 画素の大きさになる。
【0062】
次に、各分割ブロックBnの濃度分布(ここでは、平均値および標準偏差)を求め(S8)、各分割ブロックBnごとに分割前のブロックB(x,y)の上下左右に隣接する4個のブロックB(x,y−1)、B(x+1,y)、B(x,y+1)、B(x−1,y)と濃度分布を比較し(S9)、濃度分布の類似度が最大であるブロックBの識別番号を分割ブロックBnに付与する(S10)。ここに、類似度の判断にはたとえば平均濃度の差および標準偏差の差を用い、分割ブロックBnとの平均濃度の差および標準偏差の差が規定の閾値以下であるブロックBのうち、平均濃度の差が最小であるブロックBを類似度が最大であると判断する。上述のような処理により、図13(a)のようにブロックBを用いて設定したブロック連結領域の境界部分の領域を、図13(b)のようにさらに詳細に分割することが可能になる。
【0063】
ところで、ブロック連結領域の境界部分において濃度値が大きく異なるノイズ状のパターンが存在するような場合に、細分化段階において生成した分割ブロックBnの濃度分布を求めると、分割ブロックBnの周囲のブロックBの濃度分布との類似度が規定値未満になり、周囲のどのブロックBとも統合することができない場合がある。つまり、ステップS9において分割ブロックBnに類似するブロックBが存在しないと判断されることがある。このような場合には、分割ブロックBnをさらに分割して分割ブロックB(n+1)を生成し(S12)、分割ブロックBnに対する処理と同様の処理を行う。つまり、各分割ブロックB(n+1)について濃度分布を求め(S13)、分割ブロックB(n+1)に分割する前のブロックBに対して上下左右に位置するブロックBとの濃度分布(平均値および標準偏差)と分割ブロックB(n+1)の濃度分布とを比較し(S14)、類似度が最大になる分割ブロックBnと同じ識別番号を付与するのである(S15)。ここで、類似度に関して条件を満たすものがない分割ブロックB(n+1)については、新規の識別番号を付与する(S16)。このようにしてすべての分割ブロックB(n+1)について処理を行う。要するに、図14のような形で分割ブロックBnを4分割した分割ブロックB(n+1)を生成し、各分割ブロックB(n+1)について類似度を評価するのである。
【0064】
図4のステップS6、S7、S11におけるtはすべての分割ブロックBnについて処理を行うためのカウンタであって、L×L個(つまり4個)のすべての分割ブロックBnについて上述した処理を行った後には、分割ブロックBnをさらに細分化した分割ブロックB(n+1)を生成して同様の処理を行うことにより、ブロック連結領域の境界部分の領域分割をさらに詳細に行うことができる。この処理は、図4におけるステップS2、S5、S9、S10、S14、S15におけるブロックBを分割ブロックBnと読み替えた処理になる。上述のような処理を繰り返すことによって、ブロック連結領域の境界部分において最終的には1画素単位まで領域を分割することができる。また、1画素単位まで領域を分割しても識別番号が付与されない画素については背景領域とみなし、背景領域の識別番号を付与する。なお、領域の分割の際に必ずしも1画素単位まで領域を分割しなくてもよく、適宜設定した所定の画素数になるまで領域を分割した時点で分割の処理を終了してもよい。
【0065】
上述した細分化段階の処理をブロック連結領域の境界部分に存在するすべてのブロックBに対し行うことによって境界部分を細分化すれば、図15に示すような形で領域を分割することができる。領域の分割後には後処理に必要な物体領域を背景領域から分離する。
【0066】
物体領域と背景領域とを分離するには、以下のような2種類の判断を行う。第1には、一般に物体領域については画像内での大きさが既知であることが多いことを利用するのであって、物体領域と背景領域とを分離するための閾値を面積(画素数)について設定しておき、画像内での面積がこの閾値以上である領域は背景領域とみなす。次に、背景領域とみなした領域の全画素の画素値から特徴量として濃度分布(平均値と標準偏差)を求め、上述した閾値よりも面積が小さい領域のうち背景領域と濃度分布が類似している領域は背景領域とみなす。第2には、物体領域よりも面積が十分に小さい領域はノイズの可能性が高いことを利用するのであって、物体領域とノイズとの分離用に設定した閾値よりも面積が小さい領域で、しかもこの領域の近傍に濃度分布の類似した領域が存在しない場合に背景領域とみなす。なお、近傍の程度は画素数によって適宜に設定する。第1の判断によって、物体領域に形成された孔も含めて背景領域の見えている部分を分離することができ、第2の判断によって物体領域よりも小さいノイズ状の背景領域を分離することができる。
【0067】
いま、図16に示すようなブロック連結領域A0〜A4を抽出済みである濃淡画像について考察すると、ブロック連結領域A0およびブロック連結領域A1は面積が大きいから適宜の閾値を用いることによって背景領域として分離することができる。また、ブロック連結領域A3は面積が小さく、しかも濃度分布が背景領域A1と類似していることにより背景領域として分離される。さらに、ブロック連結領域A4は面積が小さく、ブロック連結領域A4の近傍には濃度の類似する領域が存在しないから背景領域として分離される。このようにして、ブロック連結領域A2のみが物体領域として残り後処理への入力になる。
【0068】
上述した初期分割段階および細分化段階の処理を行い、さらに背景領域を分離する処理を行うことによって、物体領域を背景領域から分離して抽出できるが、後処理の内容によっては抽出した物体領域を統合することが必要になる場合もある。たとえば、図5(a)に示した「B」の文字Cには隙間があり、2個の物体領域として抽出されることになるから、後処理が文字認識であるような場合には2個に分離された物体領域を統合して1つの物体領域として扱うことが要求される。
【0069】
そこで、本実施形態では、得られた物体傾城のうちで濃度分布の類似度が規定値以上である場合に1個の物体領域として統合し、また、物体領域ごとに近傍の物体領域との間の最短距離を求め、求めた距離が規定した閾値以下である2個の物体領域については1個の物体領域として統合している。ここに類似度の評価は初期分割段階や細分化段階における類似度の評価と同様に行い、また物体領域の近傍の判断は画素数によって近傍の範囲を適宜に設定する。濃度分布の類似度に基づいて物体領域を統合する技術は、図5(a)に示した「B」の文字Cのように隙間を有するために2個の物体領域に分割されてしまう場合に有効であって、一般に1文字は同色であることを利用して1個の物体領域に統合することができる。また、また、図17に示すように、文字列をグループ化しようとする場合に、複数個の文字列が近接して印刷されている場合に一連の文字列G1〜G3ごとにひとまとめにすることが可能になる。また、図5(a)に示した「B」の文字Cのように隙間を有している場合に、2個の物体領域の距離を用いて統合する技術を採用しても1文字になるように物体領域を統合することが可能である。物体領域を統合するための2種類の技術は組み合わせて用いることが可能である。
【0070】
ところで、画像内の特定のパターンを認識する処理、たとえばニューラルネットワークに文字画像を二値化したパターン入力して文字の判別を行うような文字認識処理を正しく行うには、文字部分だけを物体領域として抽出し、文字部分以外の不要な情報を含まない画像を生成することが必要である。また、コンベア上を搬送される部品であれば、コンベアの模様を除去することによって対象画像の範囲を大幅に絞り込むことが可能になり、また部品の種類をパターンマッチングで認識するような場合には、画像内での部品の姿勢をあらかじめ補正しておけばパターンマッチングの負荷を軽減することでタクトタイムの向上が期待できる。
【0071】
さらに、抽出された物体領域について物体領域の特徴を利用することにより後処理に必要な補正を行うことも可能である。たとえば、抽出した物体領域に外接する最小の矩形を求めるとともに、この矩形の大きさ(高さおよび幅の少なくとも一方)が規定の範囲内かどうかを判断し、規定の範囲を逸脱していればこの物体領域(ブロック連結領域)を背景領域とみなすのである。このような処理によって、抽出された物体領域のうち後処理の処理対象ではない可能性が高い不要な物体領域を除去して後処理の高速化を図ることができる。たとえば図18に示す例では、図柄Dに対応する領域A3,A7に外接する矩形Rと文字Cに対応する領域A1,A2,S10,A11,A12に外接する矩形Rとの高さおよび幅の差を求め、これらの差を規定の閾値と比較することにより、文字Cの領域A1,A2,S10,A11,A12との差が大きい領域A3,A7を背景領域として分離することが可能である。
【0072】
また、抽出した物体領域の主軸方向を求めるとともに、主軸方向が濃淡画像の上下方向あるいは左右方向に一致するよう物体領域を回転変換すれば、対象となる物体の向きを揃えることができ、後処理の負荷を軽減することができる。たとえば、図19に示すように既知形状の部品Pをパターンマッチングによって認識する場合には、部品Pの主軸Axの方向を求めマッチングパターンの主軸の方向に一致させるように部品Pの領域(物体領域)を回転させておけばパターンマッチングの処理が容易になる。
【0073】
さらに、抽出した物体領域について物体領域に外接する最小の矩形を設定し、この矩形の大きさおよび縦横比に基づいて物体領域の大きさおよび縦横比を求め、物体領域の大きさや縦横比を規格化するように物体領域を変形させれば、画像の歪みを補正することによって、後処理における認識精度の向上が期待できる。たとえば、図20(b)(c)のように大きさや縦横比が異なる文字Cがある場合に、設定した矩形Rの大きさおよび縦横比を図20(a)に一致させるように補正すれば、文字認識を後処理とする場合などでは認識精度の向上につながる。
【0074】
なお、上述した例では、濃度分布として濃度値の平均値および標準偏差を用いているが、画像にノイズや濃度むらがほとんどないことがあらかじめわかっているときには標準偏差を用いなくてもよい。また、上述の例では、平均値および標準偏差の差に対して適宜の閾値を設定して類似度を判断したが、濃度値のばらつきを正規化し濃度分布の類似度を求めることを目的として統計的検定法を適用することにより、母集団の平均値・標準偏差を推定した上で両母集団の同一性を検定する方法を用いてもよい。さらに、対象となる画像がカラー画像である場合には、濃度値に加えて色相や彩度の平均値・標準偏差を用いることが可能である。さらに、濃淡画像ではなく距離画像にも本発明の技術思想は適用可能である。また、上述の例ではブロックBを2×2画素に設定しているが、分割ブロックBnに分割する際に最終的に1×1画素が得られるような分割方法を採用するのであれば、ブロックBは2×2画素でなくてもよい。また、ブロックBの追跡の際に時計方向に追跡しているが、反時計方向に追跡してもよいのはもちろんのことである。
【0075】
本実施形態の処理によって領域分割を行った例を図21〜図22に示す。図21は元の画像であって、図22は初期分割段階でのブロック連結領域を示し、図23は細分化処理を行った後のブロック連結領域を示している。この例から明らかなように、元の画像を複数の領域に分割することができ、しかも元の画像内でひとまとまりと考えられる領域がほぼ正確に分割されていることがわかる。図示例のような非常に複雑な画像であっても、よい精度で領域を分割することができるから、たとえば文字認識に用いる画像や部品の種別を識別するために用いる画像では物体領域を正確に抽出することが可能である。
【0076】
【発明の効果】
請求項1の発明は、多値画像をそれぞれ複数個の画素を含む矩形状の複数個のブロックに分割した後に、ブロック内の画素値の分布に関する特徴量を隣接する各一対のブロック間で比較し特徴量の類似度が規定値以上である各一対のブロックには同じラベルを付与するとともに特徴量の類似度が規定値未満である各一対のブロックには異なるラベルを付与して前記多値画像内のすべてのブロックにラベルを付与する初期分割段階と、同ラベルが付与されているブロックからなるブロック連結領域の境界部分に位置するブロックを複数個の分割ブロックに分割するとともに、分割前のブロックに隣接するブロックの前記特徴量と分割ブロックの画素値の分布に関する特徴量との類似度が規定値以上になるときに隣接するブロックと同じラベルを当該分割ブロックに付与することにより当該分割ブロックを前記ブロック連結領域を構成するブロックとして前記ブロック連結領域に統合する細分化段階とを有し、細分化段階を繰り返すことにより多値画像に含まれる全画素にラベルを付与する方法であり、特徴量の類似度の判断には、ブロック内の画素値の平均値の差と標準偏差の差とのうち少なくとも平均値の差を用いることを特徴としており、初期分割段階において画像内で類似性を有する領域をブロックによっておおまかに分割するから、ブロックのサイズよりも小さい領域で画素値が変化するようなノイズや地模様のような背景を容易に分離することができる。また、隣接するブロックのうち画素値の分布が類似しているブロックに同ラベルを付与してブロック連結領域を形成しているので、背景との画素値分布は異なるが同一領域内で画素値にばらつきが生じている(明るさのむらがある場合など)ような対象物、たとえば、かすれた文字や陰影の付いたマークなどの領域を正しく抽出することができる。しかも、ブロック連結領域の境界部分についてのみブロックを細分化し、全画素にラベルを付与するから、ブロック連結領域の境界部分では1画素単位まで微細化することが可能であり、対象物の輪郭形状を正確に抽出することができる。その結果、ノイズが含まれる画像や地模様や図形を背景に含むような画像であっても、対象物を画像内から容易に抽出することができ、結果的に文字認識や物品の種別の認識などにおいて不要な情報を除去でき、高精度かつ高速な処理が期待できる。その上、対象物の内側の領域はブロックの単位で処理することによって処理の負荷が少ないから、ブロック連結領域の境界部分では高精度に形状を抽出しながらも全体では処理の負荷が少なく、結果的に高速な処理が期待できる。
加えて、特徴量の類似度の判断において、ブロック内の画素値の平均値の差と標準偏差の差とのうち少なくとも平均値の差を用いるから、平均値の差を単独で用いる場合には、ブロック内の微細構造にかかわらずブロック同士の類似性を判断することができ、平均値の差と標準偏差の差とを併用する場合には、画素値だけではなくばらつきの程度を評価することで、テクスチャが同じである2つのブロックについて同ラベルを付与することが可能になる。
【0077】
請求項2の発明は、請求項1の発明において、前記ブロックおよび前記分割ブロックは2×2画素の矩形の領域であることを特徴としており、細分化段階においてブロックないし分割ブロックを分割する際に等分することができ、細分化段階における分割ブロックの生成が容易である。
【0078】
請求項3の発明は、請求項1または請求項2の発明において、前記初期分割段階において、各一対のブロック間で特徴量を比較する前に、各ブロックの画素値の平均値を規定の閾値と比較することにより前記多値画像内で背景側となるブロックを抽出するとともに、背景側となるブロックには規定した背景側のラベルを付与することを特徴としており、背景側とみなしてよいブロックには背景側のラベルを付与しているから、処理の不要な画素を無視することができ処理効率を大幅に向上させることができる。
【0079】
請求項4の発明は、請求項1ないし請求項3の発明において、前記初期分割段階において、着目するブロックに隣接する複数個のブロックを時計方向と反時計方向とのいずれか一方の順で選択するとともに選択したブロックと着目するブロックとの特徴量の類似度が規定値以上であるときに選択したブロックを次に着目するブロックとして追跡し、着目するブロックと選択したブロックとの特徴量の類似度が規定値以上でありかつ選択したブロックに着目するブロックと同ラベルが付与されているときに追跡済みのブロックを前記ブロック連結領域の境界部分に位置するブロックとすることを特徴としており、ブロックの追跡が一定の回転方向について行われるから、ブロック連結領域を追跡する処理によって同時にブロック連結領域の境界部分が検出されることになり、他の方法でブロック連結領域を求めた後にブロック連結領域の境界部分を抽出する場合に比較して処理速度が大幅に向上する。
【0080】
請求項5の発明は、請求項4の発明において、前記初期分割段階において、着目するブロックと選択したブロックとの特徴量の類似度が規定値以上でありかつ選択したブロックに着目するブロックとは異なるラベルが付与されているときに追跡済みのブロックに選択したブロックと同じラベルを付与することを特徴としており、ブロックを追跡する途中で追跡すべきブロックの選択肢が複数個である場合、つまり分岐を生じる場合に、ひとまとまりになるべきブロック連結領域に異なるラベルが付与されてしまうのを防止することができる。
【0081】
請求項6の発明は、請求項1の発明において、前記特徴量の類似度の判断には、前記ブロック内の画素値の平均値の差を用いることを特徴としており、ブロックの画素値の平均値を比較しているから、ブロック内の微細構造にかかわらずブロック同士の類似性を判断することができる。
【0082】
請求項7の発明は、請求項1の発明において、前記特徴量の類似度の判断には、前記ブロック内の画素値の平均値の差および標準偏差の差を用いることを特徴とする。画素値のレベルだけではなくばらつきの程度を評価することができ、たとえば、テクスチャが同じである2つのブロックについて特徴量として濃度値の平均値および標準偏差を用いることにより、両ブロックに同ラベルを付与することが可能になる。
【0083】
請求項8の発明は、請求項1の発明において、前記細分化段階において、分割ブロックが1画素以上の所定の画素数に達した状態で前記ブロック連結領域に統合できない分割ブロックは前記多値画像内で背景側となるブロック連結領域に統合することを特徴としており、強いノイズや画素値の大きなばらつき(濃度むらや色むら)などによってどのブロック連結領域にも統合できない領域があるときに、このような領域を背景側に統合させることによって、この種の領域を処理の対象外として除去することができる。
【0084】
請求項9の発明は、請求項1の発明において、前記ラベルが互いに異なる複数個の前記ブロック連結領域について、画素値の分布に関する特徴量の類似度が規定値以上である各一対のブロック連結領域をグループ化することを特徴としており、1個の領域として扱うべき部分が互いに離間していることによって複数のブロック連結領域に分割されている場合でも、これらの領域をグループ化するから1個の領域として扱うことが可能になる。
【0085】
請求項10の発明は、請求項1の発明において、前記ラベルが互いに異なる複数個の前記ブロック連結領域について、最短距離が規定した閾値以内である各一対のブロック連結領域に同ラベルを付与して統合することを特徴としており、1個の領域として扱うべき部分が画素値のばらつき(文字のかすれなど)によって複数の領域に分割されている場合でも、これらの領域を統合して1個の領域として扱うことが可能になる。
【0086】
請求項11の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域のうち面積が規定の閾値以上であるブロック連結領域を前記多値画像内での背景側の領域とみなし、当該ブロック連結領域には規定した背景側のラベルを付与することを特徴としており、ブロック連結領域の面積を用いて背景領域を簡単な処理で分離することができる。
【0087】
請求項12の発明は、請求項11の発明において、前記多値画像内における背景側の領域の画素値の分布に関する特徴量を求め、前記ブロック連結領域のうち面積が前記閾値未満であってブロック連結領域内の画素の画素値の分布に関する特徴量と背景側の領域の特徴量との類似度が規定値以上であるブロック連結領域には規定した背景側のラベルを付与することを特徴としており、対象物に穴が存在することによって対象物の外側の輪郭線の内側に背景領域が飛び地として存在するような場合にも、この種の領域を背景領域に統合することが可能になる。
【0088】
請求項13の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域のうち面積が規定の閾値以下であるブロック連結領域を着目するブロック連結領域として着目するブロック連結領域内の画素の画素値から画素値の分布に関する特徴量を求め、他のブロック連結領域であってブロック連結領域内の画素の画素値の分布に関する特徴量との類似度が規定値以上になるブロック連結領域が着目するブロック連結領域から規定の距離範囲内に存在しないときに、着目するブロック連結領域に前記多値画像内における背景側であることを示す規定した背景側のラベルを付与することを特徴としており、ノイズなどにより偶発的に発生した不要な領域を背景領域に統合することができる。
【0089】
請求項14の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域ごとにブロック連結領域に外接する最小の矩形を設定し、設定した矩形の大きさが規定範囲を逸脱するときには当該ブロック連結領域に前記多値画像内における背景側であることを示す規定した背景側のラベルを付与することを特徴としており、対象物の大きさが既知であるときには不要な領域を簡単な処理で容易に除去することができる。
【0090】
請求項15の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域ごとに主軸の方向を求め、後処理においてブロック連結領域との類似度を比較するマッチングパターンの主軸の方向にブロック連結領域の主軸の方向が一致するようにブロック連結領域を回転させることを特徴としており、対象物の向きをマッチングパターンの向きと一致させることによって、対象物とマッチングパターンとの回転による誤差を補正するから、パターンマッチングの処理を容易かつ正確に行うことが可能になる。
【0091】
請求項16の発明は、請求項1の発明において、前記細分化段階の終了後において前記ブロック連結領域ごとにブロック連結領域に外接する最小の矩形を設定し、当該矩形のサイズが規定したサイズになるように各ブロック連結領域を拡大または縮小することを特徴としており、画像に歪みがあって対象物の縦横比にばらつきが生じているような場合でも、対象物のサイズを揃えることによって対象物に対する後処理が容易になる。
【0092】
請求項17の発明に係る画像の領域分割装置は、多値画像を記憶する記憶手段と、記憶手段に格納された多値画像をそれぞれ複数個の画素を含む矩形状の複数個のブロックに分割する画像分割処理部と、ブロック内の画素値の分布に関する特徴量を求める特徴量演算部と、隣接する各一対のブロック間で特徴量を比較し特徴量の類似度が規定値以上である各一対のブロックには同じラベルを付与するとともに特徴量の類似度が規定値未満である各一対のブロックには異なるラベルを付与して前記多値画像内のすべてのブロックにラベルを付与する追跡処理部と、同ラベルが付与されているブロックからなるブロック連結領域の境界部分に位置するブロックを複数個の分割ブロックに分割するブロック分割処理部とを備え、特徴量演算部はブロック分割処理部で分割した分割ブロックについて特徴量を求める機能を有し、追跡処理部は、分割前のブロックに隣接するブロックの前記特徴量と分割ブロックの画素値の分布に関する特徴量との類似度が規定値以上になるときに隣接するブロックと同じラベルを当該分割ブロックに付与することにより当該分割ブロックを前記ブロック連結領域を構成するブロックとして前記ブロック連結領域に統合する機能を有し、ブロック分割処理部と特徴量演算部と追跡処理部とによりブロックを分割ブロックに分割してラベルを付与する処理を繰り返すことにより多値画像に含まれる全画素にラベルを付与する構成であり、特徴量の類似度の判断には、ブロック内の画素値の平均値の差と標準偏差の差とのうち少なくとも平均値の差を用いるものであって、画像内で類似性を有する領域をブロックによっておおまかに分割するから、ブロックのサイズよりも小さい領域で画素値が変化するようなノイズや地模様のような背景を容易に分離することができる。また、隣接するブロックのうち画素値の分布が類似しているブロックに同ラベルを付与してブロック連結領域を形成しているので、背景との画素値分布は異なるが同一領域内で画素値にばらつきが生じている(明るさのむらがある場合など)ような対象物、たとえば、かすれた文字や陰影の付いたマークなどの領域を正しく抽出することができる。しかも、ブロック連結領域の境界部分についてのみブロックを細分化し、全画素にラベルを付与するから、ブロック連結領域の境界部分では1画素単位まで微細化することが可能であり、対象物の輪郭形状を正確に抽出することができる。その結果、ノイズが含まれる画像や地模様や図形を背景に含むような画像であっても、対象物を画像内から容易に抽出することができ、結果的に文字認識や物品の種別の認識などにおいて不要な情報を除去でき、高精度かつ高速な処理が期待できる。その上、対象物の内側の領域はブロックの単位で処理することによって処理の負荷が少ないから、ブロック連結領域の境界部分では高精度に形状を抽出しながらも全体では処理の負荷が少なく、結果的に高速な処理が期待できる。
加えて、特徴量の類似度の判断において、ブロック内の画素値の平均値の差と標準偏差の差とのうち少なくとも平均値の差を用いるから、平均値の差を単独で用いる場合には、ブロック内の微細構造にかかわらずブロック同士の類似性を判断することができ、平均値の差と標準偏差の差とを併用する場合には、画素値だけではなくばらつきの程度を評価することで、テクスチャが同じである2つのブロックについて同ラベルを付与することが可能になる。
【0093】
請求項18の発明に係るプログラムは、請求項1ないし請求項16のいずれか1項に記載の画像の領域分割方法をコンピュータを用いて実現するものであって、請求項1ないし請求項16と同様の効果を奏する。
【図面の簡単な説明】
【図1】本発明の実施の形態を示すブロック図である。
【図2】同上の動作の概要を示す動作説明図である。
【図3】同上における初期分割段階の処理手順を示す動作説明図である。
【図4】同上における細分化段階の処理手順を示す動作説明図である。
【図5】同上の動作説明図である。
【図6】同上においてブロックを設定した状態の動作説明図である。
【図7】同上においてブロック連結領域を形成した状態の動作説明図である。
【図8】同上においてブロックを追跡する手順を示す動作説明図である。
【図9】同上の動作説明図である。
【図10】同上においてブロックを追跡する手順を示す動作説明図である。
【図11】同上においてブロックを追跡する手順を示す動作説明図である。
【図12】同上においてブロック連結領域が形成された状態を示す動作説明図である。
【図13】同上の動作説明図である。
【図14】同上の動作説明図である。
【図15】同上において細分化段階の結果を示す動作説明図である。
【図16】同上の動作説明図である。
【図17】同上の動作説明図である。
【図18】同上の動作説明図である。
【図19】同上の動作説明図である。
【図20】同上の動作説明図である。
【図21】同上を説明するための中間調画像をプリンタで印刷した写真である。
【図22】同上を説明するための中間調画像をプリンタで印刷した写真である。
【図23】同上を説明するための中間調画像をプリンタで印刷した写真である。
【符号の説明】
1 対象物
2 撮像装置
3 モニタ
10 画像処理装置
11 A/D変換器
12 記憶手段
13 画像分割処理部
14 特徴量演算部
15 追跡処理部
16 ブロック分割処理部
[0001]
BACKGROUND OF THE INVENTION
The present invention is a multivalued image in which pixel values of each pixel are assigned in multiple stages, such as a monochrome grayscale image, a color image, and a distance image, and the multivalued image is made up of a group of pixels having high pixel value similarity. The present invention relates to an image region dividing method, an image region dividing device, and an image region dividing program for dividing an image into a plurality of regions.
[0002]
[Prior art]
In recent years, image processing techniques have been used to identify, inspect, measure, and recognize various objects using images. In this type of image processing technology, since it is necessary to identify an object in the image, various techniques for extracting the object in the image have been proposed. For example, by performing illumination from the appropriate direction according to the positional relationship between the imaging device and the target object, the difference in density value between the target object and the background in the image is increased, and the pixel of each pixel in the grayscale image A technique for separating an object from a background by binarizing a grayscale image by applying an appropriate threshold to a density value that is a value is widely used.
[0003]
However, the technology that simply binarizes the grayscale image separates the object from the background when the difference in density value between the object and the background is insufficient or when there is a ground pattern in the background. Have the problem of not being able to. For example, in an optical character reader, if there is a pattern or ground pattern around a character, there is a problem that the character recognition accuracy is lowered. In addition, when the type of an article is determined by performing pattern matching in an image obtained by imaging an article conveyed on a conveyor in a production line, if the image includes a belt conveyor or the like, the part May not be identified.
[0004]
Accordingly, various techniques for extracting a region of interest from the image by dividing the region into portions having similar features in the image have been proposed.
[0005]
For example, in Japanese Patent Application Laid-Open No. 11-167634, a color image is divided into small regions in order to search for a target image that is the same as or similar to a key image, and the similarity of the feature amount using the average color and the representative color as the feature amount. A technique for forming a polygonal divided region by integrating small regions is described. Further, in this publication, when a small area includes many colors, the small area is subdivided, and if the number of pixels in the subdivided subarea is equal to or greater than a threshold, similarity is obtained for the subarea subdivided by obtaining a feature amount. Techniques for evaluating are described.
[0006]
Japanese Laid-Open Patent Publication No. 4-154368 discloses that a document image is divided into components for the purpose of dividing the document image into components such as characters, figures, tables, and photographs, and the feature amount greatly differs between adjacent blocks. Is described as a contour region, and a technique for further subdividing the region within the block of the contour region is described.
[0007]
Further, Japanese Patent Laid-Open No. 1-312675 discloses that pixel values in an image are divided into multiple stages by comparing with a plurality of threshold values in order to correctly extract a contour even when there are uneven density values in a grayscale image. A technique is described in which the presence or absence of an increase in area when the concentration range is expanded is determined for each divided area, and the area is determined when the area stops increasing.
[0008]
Japanese Patent Laid-Open No. 8-167028 discloses that an image is divided into “light”, “intermediate”, and “shadow” to process a photographic image, and the similarity is evaluated for each block in pairs. Describes a technique for performing clustering for integrating blocks and re-evaluating an area formed by clustering with reference to an integration history to determine a contour.
[0009]
[Problems to be solved by the invention]
Among the above-mentioned publications, in the technique described in Japanese Patent Application Laid-Open No. 11-167634, when there are many colors in the small area, the small area is subdivided, and the number of pixels in the divided small area is greater than or equal to the threshold value. Since the similarity of the feature quantity is evaluated only when the area is, the area cannot be divided up to one pixel unit, and there are many colors in the small area due to the design, ground pattern, and noise. In some cases, the number of divisions of the background area increases and the processing time may increase.
[0010]
In the technique described in Japanese Patent Laid-Open No. Hei 4-154368, when a difference in feature amount between adjacent blocks is significantly different, it is regarded as a contour portion. Therefore, when there is uneven density in a grayscale image or when the contour is unclear In some cases, the contour cannot be accurately extracted.
[0011]
The technique described in Japanese Patent Laid-Open No. 1-312675 may extract a target area even when there is uneven density in a grayscale image, but there is a possibility that a pattern, a ground pattern, or noise may remain in the area. .
[0012]
In the technique described in Japanese Patent Laid-Open No. 8-167028, although it is divided into three types of areas by clustering, it is not a technique for sufficiently removing noise when noise is present, and in particular, character recognition and part type recognition. Thus, it cannot be used for the purpose of separating the object area from the background.
[0013]
The present invention has been made in view of the above-mentioned reasons, and the object thereof is to clearly separate a background region and a target region even in the case of a complicated background. An object of the present invention is to provide an image region dividing method, an image region dividing device, and an image region dividing program that enable high-speed processing while allowing region division to a pixel unit.
[0014]
[Means for Solving the Problems]
  In the first aspect of the present invention, after dividing a multi-valued image into a plurality of rectangular blocks each including a plurality of pixels, the feature values relating to the distribution of pixel values in the block are compared between each pair of adjacent blocks. The multi-value is obtained by assigning the same label to each pair of blocks in which the similarity of the feature quantity is equal to or greater than the specified value and assigning a different label to each pair of blocks in which the similarity of the feature quantity is less than the specified value. The initial division stage for assigning labels to all the blocks in the image, and the block located at the boundary portion of the block connection area composed of the blocks to which the labels are assigned is divided into a plurality of divided blocks, and before the division. When the similarity between the feature value of the block adjacent to the block and the feature value related to the distribution of pixel values of the divided blocks is equal to or greater than a specified value, the same label as that of the adjacent block is used. Subdividing the block into the block connection area by assigning the divided block to the block connection area by giving the divided block to all the blocks included in the multi-valued image by repeating the subdivision stage. Label a pixelIn this method, at least the difference between the average values of the pixel values in the block and the difference between the standard deviations is used to determine the similarity of the feature amount.It is characterized by that.
[0015]
According to a second aspect of the present invention, in the first aspect of the invention, the block and the divided block are two.n× 2nIt is a rectangular region of pixels.
[0016]
According to a third aspect of the present invention, in the first or second aspect of the present invention, before the feature amount is compared between each pair of blocks in the initial division stage, an average value of pixel values of each block is set to a predetermined threshold value. And a block on the background side is extracted from the multi-valued image, and a specified background-side label is assigned to the block on the background side.
[0017]
According to a fourth aspect of the present invention, in the first to third aspects of the invention, in the initial division stage, a plurality of blocks adjacent to the block of interest are selected in either the clockwise direction or the counterclockwise direction. In addition, the selected block is tracked as the next block of interest when the similarity of the feature amount between the selected block and the block of interest is equal to or greater than the specified value, and the feature amount similarity between the block of interest and the selected block is tracked When the degree is equal to or greater than a specified value and the same label as the block focused on the selected block is given, the tracked block is set as a block located at the boundary portion of the block connection area.
[0018]
The invention of claim 5 is the block of the invention of claim 4, wherein in the initial division stage, the similarity of the feature amount between the block of interest and the selected block is equal to or greater than a specified value, and the block of interest of the selected block When a different label is given, the same label as the selected block is given to the tracked block.
[0019]
  The invention of claim 6 is the invention of claim 1, wherein the similarity of the feature amountTo judgeDifference in average value of pixel values in the blockUseIt is characterized by that.
[0020]
  The invention of claim 7 is the invention according to claim 1, wherein the similarity between the feature quantities is as follows.To judgeDifference in average value and standard deviation of pixel values in the blockUseIt is characterized by that.
[0021]
The invention according to claim 8 is the invention according to claim 1, wherein in the subdivision stage, the divided block that cannot be integrated into the block connection area in a state where the divided block has reached a predetermined number of pixels of 1 pixel or more is the multi-valued image. It is characterized by being integrated into a block connection area on the background side.
[0022]
According to a ninth aspect of the present invention, in the first aspect of the invention, for each of the plurality of block connection areas having different labels, each pair of block connection areas in which the similarity of the feature values related to the distribution of pixel values is equal to or greater than a specified value. It is characterized by grouping.
[0023]
According to a tenth aspect of the present invention, in the first aspect of the invention, for the plurality of block connection regions having different labels, the same label is given to each pair of block connection regions whose shortest distance is within a prescribed threshold value. It is characterized by integration.
[0024]
The invention according to claim 11 is the invention according to claim 1, wherein after the subdivision stage is finished, block connection regions having an area equal to or larger than a predetermined threshold among the block connection regions are arranged on the background side in the multi-valued image. It is regarded as an area, and a specified background side label is given to the block connection area.
[0025]
According to a twelfth aspect of the present invention, in the invention of the eleventh aspect, a feature amount relating to a distribution of pixel values in a background side region in the multi-valued image is obtained, and an area of the block connection region is smaller than the threshold value and is a block A specified background-side label is assigned to a block-connected region in which the similarity between the feature value related to the pixel value distribution of the pixels in the connected region and the feature value of the background-side region is equal to or greater than a specified value. .
[0026]
According to a thirteenth aspect of the present invention, in the first aspect of the present invention, the block concatenation focused on as a block concatenated region focusing on a block concatenated region whose area is equal to or less than a predetermined threshold among the block concatenated regions after the subdivision stage is completed A feature amount related to the pixel value distribution is obtained from the pixel values of the pixels in the region, and the similarity with the feature amount related to the pixel value distribution of the pixels in the block connected region in the block connected region is equal to or greater than the specified value. When a block connection area does not exist within a specified distance range from the block connection area of interest, a specified background side label indicating that the block connection area of interest is the background side in the multi-valued image is given. It is characterized by.
[0027]
According to a fourteenth aspect of the present invention, in the first aspect of the invention, a minimum rectangle circumscribing the block connection region is set for each of the block connection regions after the subdivision stage is completed, and the size of the set rectangle is within a specified range. When deviating from the above, a specified background side label indicating the background side in the multi-valued image is given to the block connection region.
[0028]
According to a fifteenth aspect of the present invention, in the first aspect of the present invention, a matching pattern for obtaining a direction of a principal axis for each of the block connection areas after the subdividing step and comparing the similarity with the block connection area in post-processing. The block connection area is rotated such that the direction of the main axis of the block connection area coincides with the direction of the main axis.
[0029]
According to a sixteenth aspect of the present invention, in the first aspect of the invention, a minimum rectangle circumscribing the block connection region is set for each of the block connection regions after completion of the subdividing step, and the size of the rectangle is defined. Each block connection area is enlarged or reduced so as to be.
[0030]
  An image area dividing device according to the invention of claim 17 divides the multi-valued image stored in the storage means into a plurality of rectangular blocks each including a plurality of pixels. Each of the image segmentation processing unit, the feature amount calculation unit that obtains a feature amount relating to the distribution of pixel values in the block, and the feature amount similarity between each pair of adjacent blocks is equal to or greater than a specified value A tracking process in which the same label is assigned to a pair of blocks, and a different label is assigned to each pair of blocks whose feature amount similarity is less than a specified value, thereby giving a label to all the blocks in the multi-valued image. And a block division processing unit that divides a block located at a boundary portion of a block connection area composed of blocks assigned with the same label into a plurality of divided blocks, and the feature amount calculation unit is a block. The tracking processing unit has a function of obtaining a feature amount for the divided block divided by the block division processing unit, and the tracking processing unit is similar to the feature amount of the block adjacent to the block before the division and the feature amount related to the distribution of pixel values of the divided block A block having a function of integrating the divided block into the block connected area as a block constituting the block connected area by assigning the same label as the adjacent block to the divided block when the degree is equal to or greater than a predetermined value; A label is assigned to all the pixels included in the multi-valued image by repeating the process of dividing the block into divided blocks by the division processing unit, the feature amount calculation unit, and the tracking processing unit, and assigning labels.In the configuration, at least the difference between the average values of the difference between the average values of the pixel values in the block and the difference between the standard deviations is used to determine the similarity of the feature amount.It is characterized by that.
[0031]
A program according to an invention of claim 18 implements the image region dividing method according to any one of claims 1 to 16 using a computer.
[0032]
DETAILED DESCRIPTION OF THE INVENTION
In the present embodiment, as shown in FIG. 1, an object 1 on which characters are written is imaged using an imaging device 2 such as a CCD camera, and other character regions in the image obtained by the imaging device 2 are displayed. As an example, a case of separation from the region will be described. Here, it is assumed that the imaging device 2 outputs a monochrome signal. The output of the imaging device 2 is input to an image processing device 10 that performs processing described later. The output of the imaging device 2 is an analog signal that is converted into a digital signal by the A / D converter 11 provided in the image processing device 10 and then stored in the storage means 12 provided in the image processing device 10. The storage unit 12 temporarily stores the grayscale image output from the A / D converter 11 and temporarily stores data generated during various processes described later on the grayscale image. A memory having a storage area and a storage device such as a hard disk device for storing various data for a long period of time are included. The grayscale image stored in the temporary storage area in the storage unit 12 is a multivalued image in which pixels are arranged in a matrix and multi-stage pixel values are set for each pixel. In this embodiment, since a grayscale image (gray image) is used, a density value is used as a pixel value in the following. However, a color image or a distance image can be used as a multivalued image, and a hue value is used as a pixel value in a color image. Alternatively, saturation may be used, and the distance is used as the pixel value in the distance image. In a color image, one pixel value is associated with each pixel using a color difference from an appropriate reference color, or L*a*b*Lightness L of the color system*Chromaticity a*, B*These three values may be made to correspond as pixel values of one pixel.
[0033]
The image processing apparatus 10 has a microcomputer as a main component, and performs the processing shown in FIG. 2 on the image stored in the storage unit 12 to separate the character area, which is the object of this embodiment, from other areas. . Note that a monitor 3 is attached to the image processing apparatus 10, and an image stored in the storage unit 12 and an image being processed can be monitored by the monitor 3. Now, assuming that the image stored in the storage means 12 has the contents shown in FIG. 5A, the image processing apparatus 10 reads characters from the image shown in FIG. 5A as shown in FIG. 5B. Extract C region. However, in the image shown in FIG. 5A, in addition to the character C, the design pattern D and the ground pattern E are included. In the character C, “B” has a discontinuous portion (between the left and right portions). There is a gap), and in “X”, there is a portion where the unevenness of light and darkness is large. Therefore, when the image of FIG. 5A is simply binarized with the pixel value (density) of the image as described in the prior art, as shown in FIG. A part of the pattern E remains in the image, and the letter C of “B” cannot be handled as a whole, and the shape of the letter C of “X” cannot be clearly extracted. Further, the image shown in FIG. 5A may include noise generated by the imaging unit 12. If the noise is included, the pixel having the same pixel value as that of the character C in the binarized image is included. May occur irregularly. In FIG. 5C, the pixel D and the ground pattern E include pixels generated by noise. That is, as in the image of FIG. 5C, information other than the character C is included, information that is originally a single character C but is not handled as a group, or the shape of the character C If the density value of the original image as shown in FIG. 5 (a) is binarized when trying to recognize the character C in an optical character reader or the like, the information obtained can be obtained. As a result, the recognition rate of the character C is reduced.
[0034]
Therefore, unnecessary information other than the character C (hereinafter referred to as “background region”) can be removed from the image, and can be handled as a single region for each character C. It is required to make it possible to extract the shape of the character C almost accurately even if the values vary. Hereinafter, a target area such as the letter C is referred to as an “object area”. In the optical character reader, in order to improve the recognition rate of the character C, it is required as a pre-processing to separate the object region and the background region which are character regions. Even when the type of article is recognized by pattern matching, separation of the object area and the background area, which is the article area, is required as preprocessing in order to increase the accuracy of pattern matching.
[0035]
In order to perform such preprocessing, in the present embodiment, the object region and the background region are separated by performing the processing of the procedure shown in FIG. 2 on the grayscale image stored in the storage unit 12. That is, first, in the image division processing unit 13, the grayscale image stored in the storage unit 12 is a power of 2 (n is a positive integer 2nThe pixel B is divided into blocks B (see FIG. 6), which is a square area with one side (S1). The aspect ratio of the image may be set as appropriate, but at present, 4: 3 is generally used, so the number of pixels on one screen is 640 × 480 pixels, 800 × 600 pixels, 1024 × 768 pixels, 1152 × 864 pixels It shall be either. Selecting one of these numbers of pixels will result in 2n× 2nThe maximum size that can be set as the pixel block B is 32 × 32 pixels (n = 5), 8 × 8 pixels (n = 3), 256 × 256 pixels (n = 8), and 32 × 32 pixels (n = 5). The size of the block B is set so that one side of the block B is about the line width of the character C if the character C is an object region. The size of such a block B can be automatically set based on the spatial frequency in the image.
[0036]
Next, each block B obtained by the image division processing unit 13 is transferred to the feature amount calculation unit 14, and the feature amount relating to the distribution of the pixel values of each block B is obtained (S2). In the present embodiment, the average value and standard deviation of the density values of each pixel included in the block B are used as the feature amount. The feature amount obtained for each block B is compared in the tracking processing unit 15, and the similarity between the feature amount of the block B adjacent to the target block B and the target block B is equal to or greater than a specified value. Block B is tracked (S3). When the similarity between each pair of adjacent blocks B is equal to or greater than a specified value, the same label is assigned to both blocks B, thereby forming a block connection region composed of a plurality of blocks B to which the same label is assigned. That is, adjacent blocks B whose feature amount similarity is equal to or greater than a predetermined value with respect to the target block B are sequentially tracked, and block connected regions are formed by the tracked blocks B as shown in FIG. (In FIG. 7, a group of different shades is a block connection area). For the block B that can be traced, a label is assigned to each block connection area and stored in the storage unit 12. A processing procedure for comparing block feature areas by comparing feature quantities of adjacent blocks B will be described later.
[0037]
On the other hand, when the block B is tracked as described above and a plurality of block connection areas are formed in the grayscale image, the block B at the boundary of the block connection areas to which different labels are assigned is transferred to the block division processing unit 16. Deliver (S4). The block division processing unit 16 forms divided blocks Bn (= B1, n is a positive integer, see FIG. 13) obtained by dividing each block B, which is a boundary portion of the block connection area, into two vertically and horizontally (S5, S6). That is, the number of pixels included in the divided block B1 is a quarter of the number of pixels in the block B. The divided block B1 generated in the block division processing unit 16 is delivered to the feature amount calculation unit 14 to obtain the feature amount, and the feature amount obtained for the divided block B1 is obtained from the feature amount of the surrounding block B in the tracking processing unit 15. The similarity to is evaluated. When the similarity between the feature amount of the divided block B1 and the feature amount of the surrounding block B is equal to or greater than the specified value, the same label as the surrounding block B is given to the divided block B1, and the divided block B1 is the surrounding block B1. (S7). By such labeling processing, a label is given to each divided block B1, and the shape of the block connection area is refined in units of the division block B1 at the boundary portion of the block connection area. In this way, since the divided blocks B1 are arranged at the boundary portion of the block connection area, the divided block B1 is treated as equivalent to the block B, the divided block B1 is further divided into divided blocks B2, and the above processing is repeated. Specifically, it is divided into units of one pixel (S8, S9). Here, it goes without saying that the block connection area formed using the divided blocks Bn is stored in the storage means 12. If all the blocks B and the divided blocks Bn (n is a positive integer) are labeled as described above, each block connection region is considered to be an object region or a background region. Can be separated.
[0038]
Below, the process which calculates | requires a block connection area | region is demonstrated more concretely. As described above, the basic processing procedure of the present invention includes the step of using the block B obtained by dividing the grayscale image and the step of using the divided block Bn (n is a positive integer) obtained by further dividing the block B. . That is, the initial division stage using the block B obtained by dividing the grayscale image to roughly classify the object region and the background region, and the vicinity of the boundary where the block B cannot be classified into the object region and the background region than the block B. And a subdividing stage using a divided block Bn which is a small unit.
[0039]
First, the initial division stage using the block B will be described with reference to FIG. As described above, in the initial division stage, first, the grayscale image stored in the storage means 12 is divided into square blocks B whose number of pixels on one side is a power of two. For example, the grayscale image shown in FIG. 5A is divided into blocks B in the form shown in FIG. The size of the block B shown in the figure is set such that the number of pixels on one side is about the number of pixels of the line width of the character C. In addition, if the number of pixels on one side of the block B is set to a power of two, a divided block Bn having an equal area can be formed by dividing one side of the block B into two at the subdivision stage. The process of setting the divided block Bn is simplified.
[0040]
As described above, in the initial division stage, the block connection area is formed by tracking and grouping the blocks B having the high similarity of the feature amount obtained for each block B, and forming the block connection area. The same label is given to the plurality of blocks B to be performed. Here, a numerical value is used as a label, and a label given to each block connection area is referred to as an “identification number”. When tracking the block B forming the block connection area, the whole grayscale image may be used. However, if the background area can be reliably separated, the background area should be separated before tracking. Is desirable. If at least a part of the background area is separated before the tracking, the area to be tracked is reduced, which leads to a reduction in the processing amount, and as a result, an increase in the processing speed can be expected. For example, in the case of the grayscale image shown in FIG. 5A, a part of the pattern D and a part of the ground pattern E can be separated.
[0041]
In the present embodiment, as a process of separating a part of the background area before the tracking of the block B, an average value of density values of each block B is obtained, and an appropriate threshold for the average value of density values is set to block B. The background region is separated by binarizing (S1). For example, in the case of the grayscale image shown in FIG. 5A, the part of the pattern D and the part of the ground pattern E are sufficiently smaller than the average value of the density values of the part of the character C (here, In this case, it is assumed that the density increases from white to black), and a part of the background region can be separated by comparing with a suitable threshold value. In this way, the average value of the density values is obtained for each block B, and the identification number is set to 0 for the block B in which the average value of the density values is equal to or less than the defined threshold value (S2). FIG. 7 shows an example in which a region having an identification number of 0 for the gray image in FIG. 5A is a white pixel region. In FIG. 7, the area assigned 0 as the identification number is a white pixel area, but the identification number is not given to the block B of the area including a part of the character C or the design D. By using the following procedure, the block B included in the block connection area is tracked.
[0042]
To track the block connection area, first, the block B at the upper left corner of the grayscale image is set as the starting point, and the block B to which the identification number is not assigned is sequentially traced from the left to the right for the block B arranged in the uppermost row. After that, the blocks B to which no identification number is assigned are tracked in order from the left to the right with respect to the blocks B arranged one step below. That is, so-called raster scanning is performed. In this way, when a block B to which no identification number B is assigned is first found (S3), an appropriate identification number is assigned to this block B (S4). Here, the identification number is assigned as an integer value that increases sequentially from 0. Therefore, 1 is assigned to the first discovered block B. Further, in the following description, when it is necessary to indicate the position of the block B, it is expressed as the block B (x, y) using the coordinates (x, y) shown in the drawing, and attention is paid when the block B is tracked. When it is necessary to indicate the relative position of the block B that is a tracking candidate with respect to the current block B, the relative position is referred to as a tracking vector V, and tracking is performed using the coordinate difference (dx, dy) shown in the figure. This is represented as a vector V (dx, dy).
[0043]
Now, assume that when a block B to which no identification number is assigned is tracked in the image shown in FIG. 7, the block B (3, 1) is first found as shown in FIG. In this case, 1 is assigned to the block B (3, 1) as an identification number (S4). That is, since this block B (3, 1) is estimated as an element of one block connection area A1, the block B (3, 1) is added as an element constituting the block connection area A1 (S5). In FIG. 8, the identification number of each block B is indicated by a circled number.
[0044]
When the block B (3, 1) to which the identification number is assigned is found as described above, this block B (3, 1) is set as the target block B, and the block B adjacent to this block (3, 1) And the similarity of the feature quantity (average value and standard deviation of the density value) is evaluated, and the similarity of the feature quantity with the block B adjacent to the target block B (3, 1) exceeds the specified value When it is, the same identification number as the target block (3, 1) is assigned to the adjacent block B. Here, the blocks B adjacent to the block B of interest are the eight blocks B around the block B of interest, and the direction is used to represent the relative positions of the eight blocks B around the block B of interest. The value k is set. The direction value k is a numerical value of 0 to 7, and the direction when tracking the block B is “3”, and values of 4, 5, and 6 are given in 45 degree increments in the clockwise direction. A value of 2, 1, 0 is given by 45 degrees in the counterclockwise order. However, for the block B (3, 1) to which the identification number is first assigned, the direction value k on the right side of the target block B is set to 0, and the numbers 1, 2,..., 7 in the clockwise order. Is given so that the relative position to the block B of interest can be identified by the direction value k. Hereinafter, the block B adjacent to the block B (x, y) with the direction value k is represented as a block Bk (x, y).
[0045]
Therefore, in order to identify the block B whose similarity is evaluated with the target block B (3, 1), the direction value k is first set to 0 (S7), and there is an adjacent block B in the set direction. Whether or not the block B0 (3,1) (= B (4,1)) exists as shown in FIG. 8B, the block B0 (3,1) It is determined whether or not an identification number has already been assigned (S9). If the identification number is not assigned, the degree of similarity with this block B0 (3, 1) is evaluated, and it is determined whether or not the same identification number is assigned (S10, S11). For the evaluation of the similarity, first, a difference between the average value of the density values of the pixels included in the block connection area A1 and the average value of the density values of the pixels included in the block B (4, 1) is obtained. Here, when the difference between the two is within a predetermined threshold (S10), the standard deviation of the density value of the pixel included in the block connection area A1 and the standard deviation of the density value of the pixel included in the block B (4, 1). When the difference between the two standard deviations is within the prescribed threshold (S11), it is determined that the block B (4, 1) is included in the block connection area A1, and the block B (4, 1) is included in this block B (4, 1). The same identification number as that of the block connection area A1 is given (S12). That is, as shown in FIG. 8B, the identification number is 1 in the block B (4, 1) as in the block B (3, 1). In this way, the block B (4, 1) is added to the block connection area A1 (S13), and the density distribution is obtained for the newly generated block connection area A1 (S14). Here, the average value of the density values is used as the density distribution value.
[0046]
On the other hand, when it is determined that the block Bk (x, y) extracted as the comparison target in steps S8 and S9 is not similar in either step S10 or S11, the direction value k is incremented (S15), and the next block Steps S8 to S11 are performed for B1 (3, 1) (= B (4, 2)). As described above, the direction value k is sequentially changed clockwise with respect to the block B (3, 1) serving as the tracking start point, and B (4, 1) → B (4, 2) → B (3 , 2) → B (2,2) → B (2,1) → B (2,0) → B (3,0) → B (4,0) in this order. It is determined whether or not it is included in the block connection area A1. However, if the block Bk (3, 1) to be added to the block connection area A1 among the blocks Bk (3, 1) close to the block B (3, 1) serving as the tracking start point is found, the block Bk (3 , 1), instead of tracking what is included in the block connection area A1, the process after step S7 is repeated with the found block Bk (3, 1) as the next starting point.
[0047]
In the example shown in FIG. 8, it is determined that the block B (4, 1) adjacent to the block B (3, 1) is similar to the block B (3, 1), and is adjacent to the block B (3, 1). Other blocks B (4,2), B (3,2), B (2,2), B (2,1), B (2,0), B (3,0), B (4,0 ) Is not judged for similarity. Therefore, the identification number of the block B (4, 1) is set to 1, and the block Bk (4, 1) is adjacent to the block B (4, 1) with the block B (4, 1) as the tracking start point. It is determined whether or not it is similar to B (4, 1).
[0048]
As for the block B (4, 1), as shown in FIG. 8B, the direction from the block B (3, 1) to the block B (4, 1) is right (that is, the tracking vector is V ( 1)), the direction value k of the block B (5, 1) adjacent to the right of the block B (4, 1) is 3. That is, the block Bk (4,1) adjacent to the block B (4,1) is B (3,0) → B (4,0) → B (5,0) → B (5,1) → B. The similarity is determined in the order of (5,2) → B (4,2) → B (3,2). Here, as shown in FIG. 8C, an example in which the block B (5, 2) is determined to be similar to the block B (4, 1) is shown, and the block B (5, 2) is identified as 1. Give a number. Similarly, the block B included in the block connection area A1 is traced.
[0049]
As described above, when the block B included in the block connection area Am (m is 0 and a positive integer) is tracked, the block Bk (x, y) adjacent to the block B (x, y) of interest is clockwise. Therefore, the block connection area Am corresponding to the contour of the object area is detected. In the example shown in FIG. 8, when the block B included in the block connection area A1 is traced as shown in FIG. 8D, the block B (3, 2) is reached and the block adjacent to the block B (3, 2) Change Bk (3,2) to B (2,2) → B (2,1) → B (3,1) → B (4,1) → B (4,2) → B (4,3) → B When tracking is performed in the order of (3, 3), before the block B (4, 2) in which the identification number is not set and the similarity is equal to or higher than the specified value, the block B (3 in which the identification number is already set) , 1) and B (4, 1) are extracted as comparison targets of similarity. However, since the identification numbers have already been set for these blocks B (3, 1) and B (4, 1), it is not necessary to determine the degree of similarity. Therefore, when an identification number has already been set for the block Bk (x, y) adjacent to the target block B (x, y) (S9), the same identification number as that of the target block B (x, y) Is set (that is, whether or not they are included in the same block connection area A1) (S16). If the identification numbers match, block B tracked up to that point is blocked. The outline (boundary portion) O1 of the connection area A1 is registered in the storage means 12 (S17). In short, if the identification numbers of the block B (x, y) of interest and the adjacent block Bk (x, y) match, the extraction of the contour O1 relating to a group of object regions is terminated. Since the contour is registered in the storage means 12 when the block B (3, 1) is extracted, any subsequent block B that is included in the block connection area A1 and whose identification number is already set is ignored. To do.
[0050]
After the contour of the object region is determined as described above, the block Bk (x, y) adjacent to the block B (x, y) which is the end of the contour extraction is continuously traced clockwise, and the identification number Is not set, and the block B whose similarity is equal to or higher than a specified value is extracted. In the example shown in FIG. 8, as shown in FIG. 8E, the block B (4, 2) is extracted around the block B (3, 2) and is adjacent to the block B (4, 2) in the same manner. Block Bk (4, 2) is changed from B (3, 1) to B (4, 1) → B (5, 1) → B (5, 2) → B (5, 3) → B (4, 3) → When tracking is performed in the order of B (3, 3), a block B (3, 3) having no identification number and having a similarity equal to or higher than a specified value is extracted. When tracking the block Bk (4, 2) adjacent to the block B (4, 2), the blocks B (3, 1) and B ( 4,1), B (5,2), B (5,3) exist, but since the contour O1 of the block connection area A1 is already stored in the storage means 12, the block B (3,1), B (4,1), B (5,2) and B (5,3) are not adopted as contours and are ignored.
[0051]
When the block Bk (3, 3) adjacent to the block B (3, 5) extracted as described above is tracked, there is a block B in which the identification number is not set and the similarity is less than the specified value. The tracking ends at this point. In other words, the block Bk (x, y) adjacent to each block B (x, y) is tracked when there is no block B that satisfies the condition that the identification number is not set and the similarity is equal to or higher than the specified value. Therefore, as shown in FIG. 8F, the block connection area A1 can be determined by tracking the outline of the object area in a spiral shape.
[0052]
In comparing the average value and the standard deviation of the density values in the process of tracking the block B belonging to the block connection area Am as described above (S10), the already tracked block B (that is, the tracked block connection area Am) is compared. ) The average value and standard deviation of the density values of all the pixels are obtained as needed (S14), and the block B is traced using these values. Now, by tracking an object region in which the density is uneven like the letter C of “X” shown in FIG. 5, the block B follows the path shown by the arrow in FIG. Is tracked. While the average density of each block B on this path changes as shown by the broken line (a) in FIG. 9B, if the average density of the block connection area Am tracked as described above is used, FIG. It changes like the broken line b in b). That is, if tracking is performed using a difference in average density for each block B, there is a possibility that the tracking may be interrupted due to a sudden density change in a portion where density unevenness occurs, but the average of the tracked block connection areas Am By using the density, a rapid density change is suppressed, and as a result, even if density unevenness occurs, it is possible to avoid interruption of tracking.
[0053]
When the tracking of the block connection area A1 as a whole is completed as described above (S8), the identification number is incremented (S18), and the block B is sequentially tracked from the upper left corner of the grayscale image, and the identification number is not set. The process described above for block B is repeated. That is, in the example shown in FIG. 8, since the block B included in the block connection area A1 having the identification number 1 is tracked, the block B included in the block connection area A2 having the identification number 2 is tracked. is there.
[0054]
It should be noted that in the process of tracking the block B included in the block connection area Am, blocks whose similarity is equal to or higher than a specified value among the blocks Bk (x, y) adjacent to the block B (x, y) of interest. In the case where there are a plurality of B (in this case, there is a “branch” in tracking), in the above-described processing, only the block B found earlier is included in the block connection area Am, and the remaining There is a possibility that the block B is not included in the block connection area Am. That is, although the block B should originally be included in one block connection area Am, if there is a branch in tracking, there is a possibility that the block B is divided into a plurality of block connection areas Am. For example, in the letter C of “Z” shown in FIG. 5, when the block B is traced along the path indicated by the arrow in FIG. 10A, the block B (5, 2) and the block B (4, 3) and the block B A branch occurs at (4, 2), and a branch also occurs at block B (4, 3) and block B (3, 5). If such a branch occurs, there is a possibility that the block connection area Am may be divided. Therefore, the block B that causes the branch is temporarily stored in the storage unit 12, and the branch is performed in order from the branch that has occurred on the end side of the tracking. By performing tracking with the starting point as a starting point, division of the block connection area Am is avoided. For example, in the example shown in FIG. 10, since the block B (6, 6) is the end of tracking, the block Bk (3, 5) adjacent to the block B (3, 5) that caused the branch closest to the end Among them, the tracking is resumed with the block B (3, 6) found next to the block B (4, 6) that has been tracked when tracking in the clockwise direction as a starting point. Since the block B (3, 6) is branched from the block B (3, 5), the same identification number as the block B (3, 5) is assigned. If tracking is resumed in this way, as shown in FIG. 10B, B (3,6) → B (2,6) → B (1,6) → B (2,5) → B (3 The block B included in the block connection area Am can be traced by the route 4). The branch destinations of the block B (4, 3) and the block B (3, 5) that have caused the branch are included in the path shown in FIG. Since only the block B (4, 2) that is the branch destination of the block B (5, 2) is obtained, the tracking is performed with the block B (4, 2) as a starting point, and all the branch destinations are traced. By performing tracking from the branch destination when a branch occurs as described above, it is possible to track all the blocks B included in a block connection area Am.
[0055]
As a technique for preventing division of the block connection area Am due to branching, as shown by an arrow in FIG. 10C, retracking is performed for a block B that has been tracked (that is, a block B to which an identification number is assigned). May be adopted, and a technique of reversing the tracking direction may be employed. That is, in the example shown in FIG. 10, since a branch occurs in the block B (5, 2), the block B (4, 3), and the block B (3, 5), these blocks B are stored in the storage unit 12. The tracked path is reversed after reaching block B (6, 6) at the end of tracking. The block B (4, 6) is one of the branch destinations of the block B (3, 5) that caused the branch, and the block B (3, 5) that is the next branch destination of the block B (3, 5) is here. 6) When tracking is performed along the route passing through the block B (3, 4), which is one of the branch destinations of the block B (4, 3) that caused the branch, the block B (5, 2) A continuous path is formed so as to reach block B (4, 2) which is one of the branch destinations. In this way, the blocks B included in the block connection area Am can be extracted without omission.
[0056]
Note that if the block B where the branch is generated is stored in the storage unit 12 and the process of allowing the tracking of the same block B is performed, the process becomes complicated. Therefore, the block B where the branch is generated in order to simplify the process. May be tracked without being stored in the storage means 12, and it may be verified whether or not a plurality of tracked areas are collected, and the tracking results may be integrated when they are collected. This process will be described with reference to the example of FIG.
[0057]
That is, FIG. 11 shows an example in which the block B included in the block connection area Am is traced for the character C of “field” shown in FIG. The starting point of tracking is a block B (1, 1) shown in FIG. 11A, and when normal tracking is performed, a “mouth” shape that becomes the outer periphery of the character C along the path indicated by the arrow in FIG. Only the block B is extracted as the block connection area Am. In other words, the block “B” of the “ten” shape inside the “mouth” shape is not tracked, but here, the branch is not considered, and the “ten” shape portion is separated from another block connection area A (m + 1). To track. That is, after the tracking of the outer peripheral block B in the character C of “da” is finished, the block B (4, 2) to which no identification number is assigned is extracted by scanning again from the upper left corner of the grayscale image. Tracking is performed using B (4,2) as a starting point. Since a new identification number is set for tracking starting from the block B (4, 2), at this time, it is different from the block connection area Am formed by the block B on the outer periphery of the letter “C”. It is regarded as a block connection area A (m + 1). However, during the tracking of the “ten” shape, as shown in FIG. 11B, a part of the outer periphery of the character C of “ta” in the block Bk (5, 3) adjacent to the block B (5, 3). Since the block B (6, 2) with the identification number already set is found (S9), it is confirmed that the identification numbers do not match (S16), and further this block B (6, 2) ) For block B (5, 3) is determined (S19). If the similarity is equal to or greater than a specified value, block connection area A (m + 1) is regarded as belonging to block connection area Am, and block connection is performed. The area A (m + 1) is integrated into the block connection area Am (S20, S21). In short, the tracking is continued after the identification number of the “ten” -shaped portion is changed to the identification number of the outer periphery of the character C of “field”. After integrating the two block connection areas Am and A (m + 1), the entire density distribution of the block connection areas Am and A (m + 1) is obtained (S22), and an identification number for tracking the next block connection area is obtained. Return to m (S23).
[0058]
When the above processing is performed, the block B (4, 2) adjacent to the block B (3, 3) in the block connection area Am starting from the block B (2, 3) as shown in FIG. Are extracted and identification numbers have already been assigned to the blocks B (4, 2), so that they are integrated as shown in FIG. By performing the same processing, when the block B of the block connection area Am whose identification number is already set during the tracking is detected, the block connection area Am being tracked is identified as the identification number when the similarity is equal to or greater than a specified value. Are integrated into the preset block connection area Am, so that the block connection area Am can be prevented from being divided, and the block connection area Am can be formed appropriately.
[0059]
By repeating the above-described process until there is no block B to which no identification number is assigned, all the blocks B of the grayscale image belong to one of the block connection areas Am. FIG. 12 shows an example in which the grayscale image of FIG. 5A is divided into 17 block connection areas A0 to A16.
[0060]
After dividing all the blocks B including the grayscale image into the block connection areas A0 to A16 as described above, the process proceeds to a subdivision stage for subdividing the blocks B forming the boundary portions of the block connection areas A0 to A16. Then, the shape of the boundary portion between the block connection areas A0 to A16 is traced finely. That is, in the subdivision stage, the block B forming the boundary portion of the block connection areas A0 to A16 obtained in the initial division stage is divided into the divided blocks Bn, and which block connection area A0 to A16 each divided block Bn has. To belong to.
[0061]
Next, the subdivision stage will be described with reference to FIG. In the subdivision stage, first, the block B to be subdivided is divided into two equal parts vertically and horizontally, and one block B is divided into four divided blocks B1 as shown in FIG. 13A (L in FIG. 4). X is divided into L pieces). Blocks B to be subdivided are selected in order from the smallest identification number. That is, at first, among the blocks B of the block connection area A0 having the smallest identification number, the block B located at the boundary portion with the other block connection areas A1 to A16 is set as the division target. Therefore, as shown in FIG. 4, first, the identification number m is set to 0 (S1), and the presence or absence of the block B (x, y) of the contour Om (= O1) in the block connection area Am (= A0) is determined. Confirmation (S2), if there is no block B (x, y) of the contour Om, it is determined whether or not all the block connection areas A0 to A16 have been processed (S3), and unprocessed block connection areas A0 If there is A16, the identification number is incremented (S4), and a process of generating a divided block Bn for the unprocessed block connection areas A0 to A16 is performed (S5). Since the divided block Bn is obtained by dividing the block B into four as described above, 2n-1Pixel x 2n-1It becomes the size of the pixel.
[0062]
Next, the density distribution (here, the average value and the standard deviation) of each divided block Bn is obtained (S8), and for each divided block Bn, four adjacent blocks B (x, y) adjacent to the upper, lower, left, and right sides of the divided block Bn. Block B (x, y-1), B (x + 1, y), B (x, y + 1), B (x-1, y) are compared with the density distribution (S9), and the similarity of the density distribution is maximum. Is assigned to the divided block Bn (S10). Here, for example, the average density difference and the standard deviation difference are used to determine the similarity, and the average density among the blocks B in which the average density difference and the standard deviation difference from the divided block Bn are equal to or less than a predetermined threshold value. The block B having the smallest difference is determined to have the maximum similarity. By the processing as described above, it becomes possible to further divide the boundary area of the block connection area set using the block B as shown in FIG. 13A as shown in FIG. 13B. .
[0063]
By the way, when the density distribution of the divided block Bn generated in the subdivision stage is obtained when there is a noise-like pattern with greatly different density values at the boundary part of the block connection area, the blocks B around the divided block Bn are obtained. The degree of similarity with the density distribution may be less than the specified value, and it may not be possible to integrate with any of the surrounding blocks B. That is, in step S9, it may be determined that there is no block B similar to the divided block Bn. In such a case, the divided block Bn is further divided to generate a divided block B (n + 1) (S12), and the same processing as that for the divided block Bn is performed. That is, the density distribution is obtained for each divided block B (n + 1) (S13), and the density distribution (average value and standard) with the block B positioned vertically and horizontally with respect to the block B before being divided into the divided blocks B (n + 1). The deviation) is compared with the density distribution of the divided block B (n + 1) (S14), and the same identification number as that of the divided block Bn having the maximum similarity is given (S15). Here, a new identification number is assigned to the divided block B (n + 1) that does not satisfy the condition regarding the similarity (S16). In this way, processing is performed for all the divided blocks B (n + 1). In short, a divided block B (n + 1) obtained by dividing the divided block Bn into four in the form as shown in FIG. 14 is generated, and the similarity is evaluated for each divided block B (n + 1).
[0064]
T in steps S6, S7, and S11 in FIG. 4 is a counter for performing processing on all divided blocks Bn, and the above-described processing is performed on all L × L (that is, four) divided blocks Bn. Later, by generating a divided block B (n + 1) obtained by further subdividing the divided block Bn and performing the same processing, the region division of the boundary portion of the block connection region can be performed in more detail. This process is a process in which the block B in steps S2, S5, S9, S10, S14, and S15 in FIG. 4 is replaced with the divided block Bn. By repeating the processing as described above, it is possible to finally divide the region up to one pixel unit at the boundary portion of the block connection region. Further, a pixel to which an identification number is not given even if the region is divided up to one pixel unit is regarded as a background region, and an identification number of the background region is given. Note that the region need not be divided into units of one pixel at the time of dividing the region, and the division process may be terminated when the region is divided until a predetermined number of pixels is set as appropriate.
[0065]
If the boundary part is subdivided by performing the above-described subdividing process on all the blocks B existing in the boundary part of the block connection area, the area can be divided in the form shown in FIG. After dividing the area, the object area necessary for post-processing is separated from the background area.
[0066]
In order to separate the object region and the background region, the following two types of determination are performed. First, the fact that the size of an object region in the image is often known is generally used, and a threshold for separating the object region and the background region is set for the area (number of pixels). An area in which the area in the image is equal to or greater than this threshold is regarded as a background area. Next, a density distribution (average value and standard deviation) is obtained as a feature value from the pixel values of all the pixels in the area regarded as the background area, and the background area and the density distribution are similar among the areas whose area is smaller than the above-described threshold. Is considered as the background area. Secondly, an area having a sufficiently smaller area than the object area uses a high possibility of noise, and is an area having an area smaller than a threshold set for separation of the object area and noise. In addition, when there is no region having a similar density distribution in the vicinity of this region, the region is regarded as a background region. Note that the degree of the neighborhood is appropriately set depending on the number of pixels. The first judgment can separate the visible part of the background area including the holes formed in the object area, and the second judgment can separate the noise-like background area smaller than the object area. it can.
[0067]
Now, considering the grayscale image from which the block connection areas A0 to A4 as shown in FIG. 16 have been extracted, the block connection area A0 and the block connection area A1 are separated from each other as a background area by using an appropriate threshold because they have a large area. can do. Further, the block connection area A3 has a small area and is separated as a background area because the density distribution is similar to the background area A1. Further, the block connection area A4 has a small area, and since there is no area having a similar density in the vicinity of the block connection area A4, the block connection area A4 is separated as a background area. In this way, only the block connection area A2 remains as an object area and becomes an input to post-processing.
[0068]
The object region can be extracted separately from the background region by performing the above-described initial division stage and subdivision stage processes, and further the background area separation process. It may be necessary to integrate. For example, since the character C of “B” shown in FIG. 5A has a gap and is extracted as two object regions, two characters are used when the post-processing is character recognition. It is required that the object regions separated into two are integrated and handled as one object region.
[0069]
Therefore, in the present embodiment, when the similarity of the density distribution is equal to or higher than a specified value among the obtained object castles, the object areas are integrated as one object area, and each object area is connected to a nearby object area. The two shortest distances are obtained, and two object areas whose calculated distances are equal to or less than a prescribed threshold are integrated as one object area. Here, the evaluation of the similarity is performed in the same way as the evaluation of the similarity in the initial division stage or the subdivision stage, and the determination of the vicinity of the object region is appropriately set according to the number of pixels. The technique for integrating the object regions based on the similarity of the density distribution is a case where the object regions are divided into two object regions because there is a gap like the letter C of “B” shown in FIG. It is effective and generally can be integrated into one object region by utilizing the fact that one character is the same color. Also, as shown in FIG. 17, when character strings are to be grouped, if a plurality of character strings are printed in close proximity, they are grouped together for a series of character strings G1 to G3. Is possible. Further, when there is a gap like the letter C of “B” shown in FIG. 5A, even if the technique of integrating using the distance between the two object areas is adopted, it becomes one letter. Thus, it is possible to integrate object regions. Two types of techniques for integrating object regions can be used in combination.
[0070]
By the way, in order to correctly perform a process for recognizing a specific pattern in an image, for example, a character recognition process in which a character image is binarized into a neural network and character recognition is performed, only the character portion is moved to the object region. It is necessary to generate an image that does not include unnecessary information other than the character portion. For parts that are transported on a conveyor, it is possible to greatly narrow down the scope of the target image by removing the conveyor pattern, and when the type of part is recognized by pattern matching. If the posture of the part in the image is corrected in advance, the tact time can be improved by reducing the load of pattern matching.
[0071]
Furthermore, it is also possible to perform corrections necessary for post-processing by using the feature of the object region for the extracted object region. For example, if the minimum rectangle circumscribing the extracted object area is obtained, it is determined whether or not the size (at least one of height and width) of the rectangle is within a specified range, and if it deviates from the specified range This object area (block connection area) is regarded as a background area. By such processing, it is possible to remove unnecessary object regions that are not likely to be the target of post-processing from the extracted object regions, thereby speeding up post-processing. For example, in the example shown in FIG. 18, the height and width of the rectangle R circumscribing the areas A3 and A7 corresponding to the pattern D and the rectangle R circumscribing the areas A1, A2, S10, A11 and A12 corresponding to the character C By obtaining the differences and comparing these differences with a prescribed threshold value, it is possible to separate the regions A3 and A7 having a large difference from the regions A1, A2, S10, A11, and A12 of the character C as background regions. .
[0072]
In addition, by obtaining the principal axis direction of the extracted object area and rotating and transforming the object area so that the principal axis direction coincides with the vertical or horizontal direction of the grayscale image, the orientation of the target object can be aligned, and post-processing is performed. Can reduce the load. For example, as shown in FIG. 19, when a part P having a known shape is recognized by pattern matching, the direction of the principal axis Ax of the part P is obtained and the region of the part P (object region) is set so as to match the direction of the main axis of the matching pattern. ) Is rotated, the pattern matching process becomes easy.
[0073]
Furthermore, the smallest rectangle that circumscribes the object area is set for the extracted object area, and the size and aspect ratio of the object area are obtained based on the size and aspect ratio of the rectangle, and the size and aspect ratio of the object area are specified. If the object region is deformed so as to be changed, the recognition accuracy in post-processing can be improved by correcting the distortion of the image. For example, when there is a character C having a different size or aspect ratio as shown in FIGS. 20B and 20C, the size and aspect ratio of the set rectangle R are corrected so as to match those shown in FIG. When the character recognition is post-processed, the recognition accuracy is improved.
[0074]
In the above-described example, the average value and the standard deviation of the density values are used as the density distribution. However, when it is known in advance that the image has almost no noise or density unevenness, the standard deviation may not be used. In the above example, the similarity is determined by setting an appropriate threshold for the difference between the average value and the standard deviation. However, statistical analysis is performed for the purpose of normalizing the variation of the density value and obtaining the similarity of the density distribution. A method of testing the identity of both populations after estimating the average value and standard deviation of the populations by applying a statistical test method may be used. Further, when the target image is a color image, it is possible to use the average value and standard deviation of hue and saturation in addition to the density value. Furthermore, the technical idea of the present invention can be applied to a distance image instead of a grayscale image. In the above example, block B is 2n× 2nIf the division method is adopted in which 1 × 1 pixel is finally obtained when dividing into divided blocks Bn, the block B is 2n× 2nIt does not have to be a pixel. The block B is tracked in the clockwise direction, but may be tracked in the counterclockwise direction.
[0075]
An example in which region division is performed by the processing of this embodiment is shown in FIGS. FIG. 21 shows an original image, FIG. 22 shows a block connection area at the initial division stage, and FIG. 23 shows a block connection area after performing the segmentation process. As is clear from this example, it can be seen that the original image can be divided into a plurality of regions, and the regions considered as a group in the original image are divided almost accurately. Even with a very complex image such as the one shown in the figure, the region can be divided with good accuracy. For example, in the image used for character recognition and the image used for identifying the type of part, the object region is accurately It is possible to extract.
[0076]
【The invention's effect】
  In the first aspect of the present invention, after dividing a multi-valued image into a plurality of rectangular blocks each including a plurality of pixels, the feature values relating to the distribution of pixel values in the block are compared between each pair of adjacent blocks. The multi-value is obtained by assigning the same label to each pair of blocks in which the similarity of the feature quantity is equal to or greater than the specified value and assigning a different label to each pair of blocks in which the similarity of the feature quantity is less than the specified value. The initial division stage for assigning labels to all the blocks in the image, and the block located at the boundary portion of the block connection area composed of the blocks to which the labels are assigned is divided into a plurality of divided blocks, and before the division. When the similarity between the feature value of the block adjacent to the block and the feature value related to the distribution of pixel values of the divided blocks is equal to or greater than a specified value, the same label as that of the adjacent block is used. Subdividing the block into the block connection area by assigning the divided block to the block connection area by giving the divided block to all the blocks included in the multi-valued image by repeating the subdivision stage. Label a pixelIn this method, at least the difference between the average values of the pixel values in the block and the difference between the standard deviations is used to determine the similarity of the feature amount.Since similar areas in the image are roughly divided by blocks in the initial division stage, backgrounds such as noise and background patterns in which pixel values change in areas smaller than the block size Can be easily separated. In addition, the block connection region is formed by assigning the same label to the blocks having the similar pixel value distribution among the adjacent blocks, so that the pixel value distribution in the same region is different but the pixel value distribution in the same region is different. It is possible to correctly extract an object such as a blurred character or a shaded mark, such as an object that has variations (such as uneven brightness). In addition, since the blocks are subdivided only at the boundary part of the block connection area and labels are assigned to all the pixels, the boundary part of the block connection area can be reduced to one pixel unit, and the contour shape of the object can be reduced. It can be extracted accurately. As a result, even if the image contains noise or an image that includes a background pattern or figure in the background, the object can be easily extracted from the image, resulting in character recognition and recognition of the type of article. Unnecessary information can be removed and high-precision and high-speed processing can be expected. In addition, since the area inside the target object is processed in units of blocks, the processing load is small. High-speed processing can be expected.
  In addition, in determining the similarity of feature quantities, at least the difference between the average values of the difference between the average values of the pixel values in the block and the difference between the standard deviations is used. It is possible to judge the similarity between blocks regardless of the fine structure in the block, and when using the difference of the average value and the difference of the standard deviation together, evaluate not only the pixel value but also the degree of variation. Thus, the same label can be given to two blocks having the same texture.
[0077]
According to a second aspect of the present invention, in the first aspect of the invention, the block and the divided block are two.n× 2nIt is characterized by a rectangular region of pixels, and can be equally divided when a block or divided block is divided in the subdivision stage, so that it is easy to generate a divided block in the subdivision stage.
[0078]
According to a third aspect of the present invention, in the first or second aspect of the present invention, before the feature amount is compared between each pair of blocks in the initial division stage, an average value of pixel values of each block is set to a predetermined threshold value. A block on the background side is extracted from the multi-valued image by comparing with the block, and a label on the background side is assigned to the block on the background side, and the block may be regarded as the background side Since a label on the background side is assigned to, pixels that do not need to be processed can be ignored, and the processing efficiency can be greatly improved.
[0079]
According to a fourth aspect of the present invention, in the first to third aspects of the invention, in the initial division stage, a plurality of blocks adjacent to the block of interest are selected in either the clockwise direction or the counterclockwise direction. In addition, the selected block is tracked as the next block of interest when the similarity of the feature amount between the selected block and the block of interest is equal to or greater than the specified value, and the feature amount similarity between the block of interest and the selected block is tracked When the degree is equal to or greater than a specified value and the same label as the block focused on the selected block is given, the tracked block is a block located at the boundary portion of the block connection area, and the block The tracking of the block connection area is performed simultaneously by the process of tracking the block connection area. Min will be detected, compared to the processing speed can be greatly improved when extracting a boundary portion of the block coupling region after obtaining a block coupling region in other ways.
[0080]
The invention of claim 5 is the block of the invention of claim 4, wherein in the initial division stage, the similarity of the feature amount between the block of interest and the selected block is equal to or greater than a specified value, and the block of interest of the selected block It is characterized by giving the same label as the selected block to the tracked block when different labels are given, and when there are multiple block options to be tracked while tracking the block, that is, branching When this occurs, it is possible to prevent different labels from being given to the block connection regions that should be collected.
[0081]
  The invention of claim 6 is the invention of claim 1, wherein the similarity of the feature amountTo judgeDifference in average value of pixel values in the blockUseSince the average values of the pixel values of the blocks are compared, the similarity between the blocks can be determined regardless of the fine structure in the blocks.
[0082]
  The invention of claim 7 is the invention according to claim 1, wherein the similarity between the feature quantities is as follows.To judgeDifference in average value and standard deviation of pixel values in the blockUseIt is characterized by that. It is possible to evaluate not only the pixel value level but also the degree of variation. For example, by using the average value and standard deviation of density values as feature values for two blocks having the same texture, the same label is given to both blocks. It becomes possible to grant.
[0083]
The invention according to claim 8 is the invention according to claim 1, wherein in the subdivision stage, the divided block that cannot be integrated into the block connection area in a state where the divided block has reached a predetermined number of pixels of 1 pixel or more is the multi-valued image. If there is an area that cannot be integrated into any block connection area due to strong noise or large variations in pixel values (density unevenness or color unevenness), etc. By integrating such a region on the background side, this type of region can be excluded from processing.
[0084]
According to a ninth aspect of the present invention, in the first aspect of the invention, for each of the plurality of block connection areas having different labels, each pair of block connection areas in which the similarity of the feature values related to the distribution of pixel values is equal to or greater than a specified value. Even when the parts to be treated as one area are separated from each other by being separated from each other by a plurality of block connection areas, these areas are grouped into one group. It can be handled as an area.
[0085]
According to a tenth aspect of the present invention, in the first aspect of the invention, for the plurality of block connection regions having different labels, the same label is given to each pair of block connection regions whose shortest distance is within a prescribed threshold value. Even if a portion to be treated as one area is divided into a plurality of areas due to variations in pixel values (such as blurred characters), these areas are integrated into one area. Can be handled as
[0086]
The invention according to claim 11 is the invention according to claim 1, wherein after the subdivision stage is finished, block connection regions having an area equal to or larger than a predetermined threshold among the block connection regions are arranged on the background side in the multi-valued image. The block connection area is regarded as an area, and a specified background-side label is assigned to the block connection area, and the background area can be separated by a simple process using the area of the block connection area.
[0087]
According to a twelfth aspect of the present invention, in the invention of the eleventh aspect, a feature amount relating to a distribution of pixel values in a background side region in the multi-valued image is obtained, and an area of the block connection region is smaller than the threshold value and is a block. It is characterized in that a specified background side label is assigned to a block connection area in which the similarity between the feature value relating to the pixel value distribution of the pixels in the connection area and the feature value of the background area is equal to or greater than a specified value. Even when a background area exists as an enclave inside the contour line outside the object due to the presence of a hole in the object, this kind of area can be integrated into the background area.
[0088]
According to a thirteenth aspect of the present invention, in the first aspect of the present invention, the block concatenation focused on as a block concatenated region focusing on a block concatenated region whose area is equal to or less than a predetermined threshold among the block concatenated regions after the subdivision stage is completed. A feature amount related to the pixel value distribution is obtained from the pixel values of the pixels in the region, and the similarity with the feature amount related to the pixel value distribution of the pixels in the block connected region in the block connected region is equal to or greater than the specified value. When a block connection area does not exist within a specified distance range from the block connection area of interest, a specified background side label indicating that the block connection area of interest is the background side in the multi-valued image is given. It is possible to integrate unnecessary areas that occur accidentally due to noise or the like into the background area.
[0089]
According to a fourteenth aspect of the present invention, in the first aspect of the invention, a minimum rectangle circumscribing the block connection region is set for each of the block connection regions after the subdivision stage is completed, and the size of the set rectangle is within a specified range. Is provided with a specified background side label indicating the background side in the multi-valued image to the block connection area, and an unnecessary area when the size of the object is known Can be easily removed by a simple process.
[0090]
According to a fifteenth aspect of the present invention, in the first aspect of the present invention, a matching pattern for obtaining a direction of a principal axis for each of the block connection areas after the subdividing step and comparing the similarity with the block connection area in post-processing. The block connection area is rotated so that the direction of the main axis of the block connection area coincides with the direction of the main axis, and the object and the matching pattern are aligned by matching the direction of the object with the direction of the matching pattern. Since the error due to the rotation is corrected, the pattern matching process can be performed easily and accurately.
[0091]
According to a sixteenth aspect of the present invention, in the first aspect of the invention, a minimum rectangle circumscribing the block connection region is set for each of the block connection regions after completion of the subdividing step, and the size of the rectangle is defined. Each block connection area is enlarged or reduced so that even if the image is distorted and the aspect ratio of the object varies, the object size can be adjusted by aligning the object size. Is easy to post-process.
[0092]
  An image area dividing device according to the invention of claim 17 divides the multi-valued image stored in the storage means into a plurality of rectangular blocks each including a plurality of pixels. Each of the image segmentation processing unit, the feature amount calculation unit that obtains a feature amount relating to the distribution of pixel values in the block, and the feature amount similarity between each pair of adjacent blocks is equal to or greater than a specified value A tracking process in which the same label is assigned to a pair of blocks, and a different label is assigned to each pair of blocks whose feature amount similarity is less than a specified value, thereby giving a label to all the blocks in the multi-valued image. And a block division processing unit that divides a block located at a boundary portion of a block connection area composed of blocks assigned with the same label into a plurality of divided blocks, and the feature amount calculation unit is a block. The tracking processing unit has a function of obtaining a feature amount for the divided block divided by the block division processing unit, and the tracking processing unit is similar to the feature amount of the block adjacent to the block before the division and the feature amount related to the distribution of pixel values of the divided block A block having a function of integrating the divided block into the block connected area as a block constituting the block connected area by assigning the same label as the adjacent block to the divided block when the degree is equal to or greater than a predetermined value; A label is assigned to all the pixels included in the multi-valued image by repeating the process of dividing the block into divided blocks by the division processing unit, the feature amount calculation unit, and the tracking processing unit, and assigning labels.The determination of the similarity of the feature quantity uses at least the difference between the average values of the difference between the average values of the pixel values in the block and the difference between the standard deviations.Since regions having similarity in an image are roughly divided by blocks, it is possible to easily separate backgrounds such as noise and background patterns in which pixel values change in regions smaller than the block size. In addition, the block connection region is formed by assigning the same label to the blocks having the similar pixel value distribution among the adjacent blocks, so that the pixel value distribution in the same region is different but the pixel value distribution in the same region is different. It is possible to correctly extract an object such as a blurred character or a shaded mark, such as an object that has variations (such as uneven brightness). In addition, since the blocks are subdivided only at the boundary part of the block connection area and labels are assigned to all the pixels, the boundary part of the block connection area can be reduced to one pixel unit, and the contour shape of the object can be reduced. It can be extracted accurately. As a result, even if the image contains noise or an image that includes a background pattern or figure in the background, the object can be easily extracted from the image, resulting in character recognition and recognition of the type of article. Unnecessary information can be removed and high-precision and high-speed processing can be expected. In addition, since the area inside the target object is processed in units of blocks, the processing load is small. High-speed processing can be expected.
  In addition, in determining the similarity of feature quantities, at least the difference between the average values of the difference between the average values of the pixel values in the block and the difference between the standard deviations is used. It is possible to judge the similarity between blocks regardless of the fine structure in the block, and when using the difference of the average value and the difference of the standard deviation together, evaluate not only the pixel value but also the degree of variation. Thus, the same label can be given to two blocks having the same texture.
[0093]
According to an eighteenth aspect of the present invention, there is provided a program for realizing the image region dividing method according to any one of the first to sixteenth aspects using a computer. The same effect is produced.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of the present invention.
FIG. 2 is an operation explanatory diagram showing an outline of the operation of the above.
FIG. 3 is an operation explanatory diagram showing a processing procedure of an initial division stage in the same as above.
FIG. 4 is an operation explanatory diagram showing a processing procedure in a subdivision stage in the same as above.
FIG. 5 is an operation explanatory view of the above.
FIG. 6 is an operation explanatory diagram in a state where blocks are set in the same as above.
FIG. 7 is an operation explanatory diagram in a state where a block connection region is formed in the same as above.
FIG. 8 is an operation explanatory diagram showing a procedure for tracking blocks in the same as above.
FIG. 9 is an operation explanatory view of the above.
FIG. 10 is an operation explanatory diagram showing a procedure for tracking blocks in the same as above.
FIG. 11 is an operation explanatory diagram showing a procedure for tracking blocks in the same as above.
FIG. 12 is an operation explanatory diagram showing a state in which block connection regions are formed in the same as above.
FIG. 13 is an operation explanatory diagram of the above.
FIG. 14 is a diagram for explaining the operation of the above.
FIG. 15 is an operation explanatory diagram showing the result of the subdivision stage in the same as above.
FIG. 16 is an operation explanatory diagram of the above.
FIG. 17 is an operation explanatory diagram of the above.
FIG. 18 is an explanatory diagram of the operation of the above.
FIG. 19 is a diagram for explaining the operation of the above.
FIG. 20 is an operation explanatory diagram of the above.
FIG. 21 is a photograph of a halftone image printed by a printer for explaining the above.
FIG. 22 is a photograph of a halftone image printed by a printer for explaining the above.
FIG. 23 is a photograph of a halftone image printed by a printer for explaining the above.
[Explanation of symbols]
1 object
2 Imaging device
3 Monitor
10 Image processing device
11 A / D converter
12 Storage means
13 Image division processing unit
14 Feature value calculator
15 Tracking processor
16 block division processing section

Claims (18)

多値画像をそれぞれ複数個の画素を含む矩形状の複数個のブロックに分割した後に、ブロック内の画素値の分布に関する特徴量を隣接する各一対のブロック間で比較し特徴量の類似度が規定値以上である各一対のブロックには同じラベルを付与するとともに特徴量の類似度が規定値未満である各一対のブロックには異なるラベルを付与して前記多値画像内のすべてのブロックにラベルを付与する初期分割段階と、同ラベルが付与されているブロックからなるブロック連結領域の境界部分に位置するブロックを複数個の分割ブロックに分割するとともに、分割前のブロックに隣接するブロックの前記特徴量と分割ブロックの画素値の分布に関する特徴量との類似度が規定値以上になるときに隣接するブロックと同じラベルを当該分割ブロックに付与することにより当該分割ブロックを前記ブロック連結領域を構成するブロックとして前記ブロック連結領域に統合する細分化段階とを有し、細分化段階を繰り返すことにより多値画像に含まれる全画素にラベルを付与する方法であり、特徴量の類似度の判断には、ブロック内の画素値の平均値の差と標準偏差の差とのうち少なくとも平均値の差を用いることを特徴とする画像の領域分割方法。After dividing the multivalued image into a plurality of rectangular blocks each including a plurality of pixels, the feature values related to the distribution of pixel values in the block are compared between adjacent pairs of blocks, and the similarity of the feature values is determined. The same label is assigned to each pair of blocks that are equal to or greater than the specified value, and a different label is assigned to each pair of blocks that have a feature value similarity less than the specified value to all the blocks in the multi-valued image. An initial division stage for assigning a label, and a block located at a boundary portion of a block connection area composed of blocks to which the label is assigned is divided into a plurality of divided blocks, and the block adjacent to the block before the division When the similarity between the feature value and the feature value related to the pixel value distribution of the divided block is equal to or greater than the specified value, the same label as the adjacent block is assigned to the divided block. A subdivision step of integrating the divided block into the block connection region as a block constituting the block connection region, and labeling all pixels included in the multi-valued image by repeating the subdivision step. An image segmentation characterized in that at least the difference between the average values of the pixel values in the block and the difference between the standard deviations is used to determine the similarity of the feature amount. Method. 前記ブロックおよび前記分割ブロックは2×2画素の矩形の領域であることを特徴とする請求項1記載の画像の領域分割方法。2. The image region dividing method according to claim 1, wherein the block and the divided block are rectangular regions of 2 n × 2 n pixels. 前記初期分割段階において、各一対のブロック間で特徴量を比較する前に、各ブロックの画素値の平均値を規定の閾値と比較することにより前記多値画像内で背景側となるブロックを抽出するとともに、背景側となるブロックには規定した背景側のラベルを付与することを特徴とする請求項1または請求項2記載の画像の領域分割方法。In the initial division stage, before comparing the feature values between each pair of blocks, the block on the background side is extracted from the multi-valued image by comparing the average value of the pixel values of each block with a prescribed threshold value. 3. The image region dividing method according to claim 1, wherein a specified background side label is assigned to a block on the background side. 前記初期分割段階において、着目するブロックに隣接する複数個のブロックを時計方向と反時計方向とのいずれか一方の順で選択するとともに選択したブロックと着目するブロックとの特徴量の類似度が規定値以上であるときに選択したブロックを次に着目するブロックとして追跡し、着目するブロックと選択したブロックとの特徴量の類似度が規定値以上でありかつ選択したブロックに着目するブロックと同ラベルが付与されているときに追跡済みのブロックを前記ブロック連結領域の境界部分に位置するブロックとすることを特徴とする請求項1ないし請求項3のいずれか1項に記載の画像の領域分割方法。In the initial division step, a plurality of blocks adjacent to the target block are selected in either the clockwise direction or the counterclockwise order, and the similarity between the selected block and the target block is defined. The block selected when it is equal to or greater than the value is tracked as the next block of interest, and the similarity of the feature quantity between the block of interest and the selected block is equal to or greater than the specified value and the same label as the block of interest of the selected block The image segmentation method according to any one of claims 1 to 3, wherein the tracked block is a block located at a boundary portion of the block connection region when the block is attached. . 前記初期分割段階において、着目するブロックと選択したブロックとの特徴量の類似度が規定値以上でありかつ選択したブロックに着目するブロックとは異なるラベルが付与されているときに追跡済みのブロックに選択したブロックと同じラベルを付与することを特徴とする請求項4記載の画像の領域分割方法。In the initial division step, when the similarity of the feature amount between the target block and the selected block is equal to or higher than a specified value and a different label from the block focused on the selected block is given, the tracked block is 5. The image region dividing method according to claim 4, wherein the same label as that of the selected block is assigned. 前記特徴量の類似度の判断には、前記ブロック内の画素値の平均値の差を用いることを特徴とする請求項1記載の画像の領域分割方法。The image segmentation method according to claim 1 , wherein the similarity of the feature amounts is determined by using a difference between average values of pixel values in the block. 前記特徴量の類似度の判断には、前記ブロック内の画素値の平均値の差および標準偏差の差を用いることを特徴とする請求項1記載の画像の領域分割方法。Wherein the feature amount similarity judgment, the area dividing method according to claim 1, wherein the image, which comprises using a difference between the difference and the standard deviation of the mean of the pixel values in the block. 前記細分化段階において、分割ブロックが1画素以上の所定の画素数に達した状態で前記ブロック連結領域に統合できない分割ブロックは前記多値画像内で背景側となるブロック連結領域に統合することを特徴とする請求項1記載の画像の領域分割方法。In the subdivision step, divided blocks that cannot be integrated into the block connection area in a state where the divided block has reached a predetermined number of pixels of 1 pixel or more are integrated into a block connection area on the background side in the multi-valued image. 2. The image area dividing method according to claim 1, wherein: 前記ラベルが互いに異なる複数個の前記ブロック連結領域について、画素値の分布に関する特徴量の類似度が規定値以上である各一対のブロック連結領域をグループ化することを特徴とする請求項1記載の画像の領域分割方法。The pair of block connection regions having a feature value similarity with respect to a distribution of pixel values equal to or greater than a predetermined value for a plurality of the block connection regions having different labels from each other. Image segmentation method. 前記ラベルが互いに異なる複数個の前記ブロック連結領域について、最短距離が規定した閾値以内である各一対のブロック連結領域に同ラベルを付与して統合することを特徴とする請求項1記載の画像の領域分割方法。2. The image according to claim 1, wherein, for a plurality of the block connection areas having different labels, the same label is added to each pair of block connection areas whose shortest distance is within a prescribed threshold value and integrated. Region segmentation method. 前記細分化段階の終了後において前記ブロック連結領域のうち面積が規定の閾値以上であるブロック連結領域を前記多値画像内での背景側の領域とみなし、当該ブロック連結領域には規定した背景側のラベルを付与することを特徴とする請求項1記載の画像の領域分割方法。After the subdividing step, the block connection area whose area is equal to or larger than a predetermined threshold among the block connection areas is regarded as a background side area in the multi-valued image, and the block connection area has a specified background side. The image region dividing method according to claim 1, wherein the label is attached. 前記多値画像内における背景側の領域の画素値の分布に関する特徴量を求め、前記ブロック連結領域のうち面積が前記閾値未満であってブロック連結領域内の画素の画素値の分布に関する特徴量と背景側の領域の特徴量との類似度が規定値以上であるブロック連結領域には規定した背景側のラベルを付与することを特徴とする請求項11記載の画像の領域分割方法。A feature amount related to a distribution of pixel values in a background-side region in the multi-valued image is obtained, and a feature amount related to a distribution of pixel values of pixels in the block connection region whose area is less than the threshold in the block connection region; 12. The image region dividing method according to claim 11, wherein a specified background-side label is assigned to a block connection region in which the similarity with the feature amount of the background-side region is a specified value or more. 前記細分化段階の終了後において前記ブロック連結領域のうち面積が規定の閾値以下であるブロック連結領域を着目するブロック連結領域として着目するブロック連結領域内の画素の画素値から画素値の分布に関する特徴量を求め、他のブロック連結領域であってブロック連結領域内の画素の画素値の分布に関する特徴量との類似度が規定値以上になるブロック連結領域が着目するブロック連結領域から規定の距離範囲内に存在しないときに、着目するブロック連結領域に前記多値画像内における背景側であることを示す規定した背景側のラベルを付与することを特徴とする請求項1記載の画像の領域分割方法。A feature relating to a distribution of pixel values from pixel values of pixels in a block connection region focused on as a block connection region focusing on a block connection region whose area is equal to or less than a predetermined threshold among the block connection regions after completion of the subdividing step The block connection area in which the similarity is equal to or greater than the specified value with respect to the distribution of the pixel values of the pixels in the block connection area. 2. The image region dividing method according to claim 1, wherein a specified background side label indicating the background side in the multi-valued image is assigned to the block connection region of interest when the block connection region of interest does not exist. . 前記細分化段階の終了後において前記ブロック連結領域ごとにブロック連結領域に外接する最小の矩形を設定し、設定した矩形の大きさが規定範囲を逸脱するときには当該ブロック連結領域に前記多値画像内における背景側であることを示す規定した背景側のラベルを付与することを特徴とする請求項1記載の画像の領域分割方法。After the subdividing step, a minimum rectangle circumscribing the block connection area is set for each block connection area, and when the set rectangle size deviates from a specified range, the block connection area 2. The region dividing method for an image according to claim 1, wherein a label on the background side that indicates the background side is provided. 前記細分化段階の終了後において前記ブロック連結領域ごとに主軸の方向を求め、後処理においてブロック連結領域との類似度を比較するマッチングパターンの主軸の方向にブロック連結領域の主軸の方向が一致するようにブロック連結領域を回転させることを特徴とする請求項1記載の画像の領域分割方法。After the subdividing step, the direction of the main axis is obtained for each block connection area, and the direction of the main axis of the block connection area matches the direction of the main axis of the matching pattern for comparing the similarity with the block connection area in post-processing. 2. The image area dividing method according to claim 1, wherein the block connection area is rotated as described above. 前記細分化段階の終了後において前記ブロック連結領域ごとにブロック連結領域に外接する最小の矩形を設定し、当該矩形のサイズが規定したサイズになるように各ブロック連結領域を拡大または縮小することを特徴とする請求項1記載の画像の領域分割方法。After completion of the subdivision step, a minimum rectangle circumscribing the block connection area is set for each block connection area, and each block connection area is enlarged or reduced so that the size of the rectangle becomes a prescribed size. 2. The image area dividing method according to claim 1, wherein: 多値画像を記憶する記憶手段と、記憶手段に格納された多値画像をそれぞれ複数個の画素を含む矩形状の複数個のブロックに分割する画像分割処理部と、ブロック内の画素値の分布に関する特徴量を求める特徴量演算部と、隣接する各一対のブロック間で特徴量を比較し特徴量の類似度が規定値以上である各一対のブロックには同じラベルを付与するとともに特徴量の類似度が規定値未満である各一対のブロックには異なるラベルを付与して前記多値画像内のすべてのブロックにラベルを付与する追跡処理部と、同ラベルが付与されているブロックからなるブロック連結領域の境界部分に位置するブロックを複数個の分割ブロックに分割するブロック分割処理部とを備え、特徴量演算部はブロック分割処理部で分割した分割ブロックについて特徴量を求める機能を有し、追跡処理部は、分割前のブロックに隣接するブロックの前記特徴量と分割ブロックの画素値の分布に関する特徴量との類似度が規定値以上になるときに隣接するブロックと同じラベルを当該分割ブロックに付与することにより当該分割ブロックを前記ブロック連結領域を構成するブロックとして前記ブロック連結領域に統合する機能を有し、ブロック分割処理部と特徴量演算部と追跡処理部とによりブロックを分割ブロックに分割してラベルを付与する処理を繰り返すことにより多値画像に含まれる全画素にラベルを付与する構成であり、特徴量の類似度の判断には、ブロック内の画素値の平均値の差と標準偏差の差とのうち少なくとも平均値の差を用いることを特徴とする画像の領域分割装置。Storage means for storing a multivalued image, an image division processing section for dividing the multivalued image stored in the storage means into a plurality of rectangular blocks each including a plurality of pixels, and distribution of pixel values in the block The feature amount calculation unit for obtaining the feature amount and the pair of blocks adjacent to each other compare the feature amount, and assign the same label to each pair of blocks whose feature amount similarity is equal to or greater than the specified value. A block consisting of a tracking processing unit that assigns a different label to each pair of blocks whose similarity is less than a specified value and assigns a label to all the blocks in the multi-valued image, and a block to which the label is assigned A block division processing unit that divides a block located at the boundary portion of the connected region into a plurality of divided blocks, and the feature amount calculation unit uses the block division processing unit for the divided blocks The tracking processing unit is adjacent when the similarity between the feature amount of the block adjacent to the block before division and the feature amount relating to the distribution of pixel values of the divided block is equal to or greater than a predetermined value. A function of integrating the divided block into the block connection area as a block constituting the block connection area by giving the same label as the block to be processed to the block connection area, tracking the block division processing unit, the feature amount calculation unit, and the like This is a configuration in which a label is assigned to all pixels included in a multi-valued image by repeating a process of dividing a block into divided blocks by a processing unit and assigning a label . An image region dividing apparatus using at least a difference between average values of a difference between average values of pixel values and a difference between standard deviations . 請求項1ないし請求項16のいずれか1項に記載の画像の領域分割方法をコンピュータを用いて実現する画像の領域分割プログラム。17. An image region dividing program for realizing the image region dividing method according to claim 1 using a computer.
JP2002184889A 2002-06-25 2002-06-25 Image area dividing method, image area dividing apparatus, and image area dividing program Expired - Fee Related JP4062987B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002184889A JP4062987B2 (en) 2002-06-25 2002-06-25 Image area dividing method, image area dividing apparatus, and image area dividing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002184889A JP4062987B2 (en) 2002-06-25 2002-06-25 Image area dividing method, image area dividing apparatus, and image area dividing program

Publications (2)

Publication Number Publication Date
JP2004030188A JP2004030188A (en) 2004-01-29
JP4062987B2 true JP4062987B2 (en) 2008-03-19

Family

ID=31180693

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002184889A Expired - Fee Related JP4062987B2 (en) 2002-06-25 2002-06-25 Image area dividing method, image area dividing apparatus, and image area dividing program

Country Status (1)

Country Link
JP (1) JP4062987B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110210469A (en) * 2019-05-31 2019-09-06 中科软科技股份有限公司 A kind of method and system identifying picture character languages

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4534599B2 (en) * 2004-05-26 2010-09-01 パナソニック電工株式会社 Image processing method
JP4628712B2 (en) * 2004-07-09 2011-02-09 財団法人生産技術研究奨励会 Method and apparatus for recognizing moving object on image
JP4888290B2 (en) * 2007-09-07 2012-02-29 株式会社明電舎 Intruder detection device
JP5282461B2 (en) * 2008-07-02 2013-09-04 株式会社ニコン Imaging device
JP4772839B2 (en) 2008-08-13 2011-09-14 株式会社エヌ・ティ・ティ・ドコモ Image identification method and imaging apparatus
JP4808267B2 (en) 2009-05-27 2011-11-02 シャープ株式会社 Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
JP5759170B2 (en) * 2010-12-27 2015-08-05 キヤノン株式会社 TRACKING DEVICE AND ITS CONTROL METHOD
JP5547226B2 (en) * 2012-03-16 2014-07-09 株式会社東芝 Image processing apparatus and image processing method
JP6192271B2 (en) * 2012-08-22 2017-09-06 キヤノン株式会社 Image processing apparatus, image processing method, and program
WO2021044629A1 (en) * 2019-09-06 2021-03-11 三菱電機株式会社 Image processing system and image processing method
CN114882482B (en) * 2021-10-12 2023-03-17 北京九章云极科技有限公司 Seal anti-counterfeiting identification method and device
CN116229438B (en) * 2023-05-04 2023-07-21 山东超越纺织有限公司 Spinning quality visual identification system
CN116740056B (en) * 2023-08-10 2023-11-07 梁山水泊胶带股份有限公司 Defect detection method for coating layer of whole-core high-pattern conveyer belt

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110210469A (en) * 2019-05-31 2019-09-06 中科软科技股份有限公司 A kind of method and system identifying picture character languages

Also Published As

Publication number Publication date
JP2004030188A (en) 2004-01-29

Similar Documents

Publication Publication Date Title
JP4062987B2 (en) Image area dividing method, image area dividing apparatus, and image area dividing program
CN102426649B (en) Simple steel seal digital automatic identification method with high accuracy rate
Wu et al. An automated vision system for container-code recognition
EP1271403A1 (en) Method and device for character location in images from digital camera
CN108985305B (en) Laser etching industrial detonator coded image positioning and correcting method
KR19990072314A (en) Color image processing apparatus and pattern extracting apparatus
JP2002133426A (en) Ruled line extracting device for extracting ruled line from multiple image
KR101549495B1 (en) An apparatus for extracting characters and the method thereof
CN110009615B (en) Image corner detection method and detection device
CN114863492A (en) Method and device for repairing low-quality fingerprint image
JP4993615B2 (en) Image recognition method and apparatus
CN115272350A (en) Method for detecting production quality of computer PCB mainboard
CN112508913A (en) Cable section edge detection method based on image detection
JP3814353B2 (en) Image segmentation method and image segmentation apparatus
US20050271260A1 (en) Device, method and program for removing pores
CN108205641B (en) Gesture image processing method and device
Siddique et al. Development of an automatic vehicle license plate detection and recognition system for Bangladesh
JP5010627B2 (en) Character recognition device and character recognition method
CN116469090A (en) Method and device for detecting code spraying pattern, electronic equipment and storage medium
JP6144892B2 (en) Image processing apparatus, image processing method, and program
JP4492258B2 (en) Character and figure recognition and inspection methods
JP2005250786A (en) Image recognition method
JP3150762B2 (en) Gradient vector extraction method and character recognition feature extraction method
Kim License plate location method unaffected by variation in size and aspect ratio
CN111311696A (en) License plate authenticity detection method based on hyperspectral unmixing technology

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070911

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071112

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071224

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

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20110111

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120111

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130111

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees