Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4624487B2 - Image outline extraction processing method and outline extraction processing apparatus - Google Patents
[go: Go Back, main page]

JP4624487B2 - Image outline extraction processing method and outline extraction processing apparatus - Google Patents

Image outline extraction processing method and outline extraction processing apparatus Download PDF

Info

Publication number
JP4624487B2
JP4624487B2 JP2001031133A JP2001031133A JP4624487B2 JP 4624487 B2 JP4624487 B2 JP 4624487B2 JP 2001031133 A JP2001031133 A JP 2001031133A JP 2001031133 A JP2001031133 A JP 2001031133A JP 4624487 B2 JP4624487 B2 JP 4624487B2
Authority
JP
Japan
Prior art keywords
contour
point
points
cell
cells
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
JP2001031133A
Other languages
Japanese (ja)
Other versions
JP2002236929A (en
Inventor
高幸 永瀬
勝 横山
慎一 高橋
Original Assignee
パナソニックシステムネットワークス株式会社
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 パナソニックシステムネットワークス株式会社 filed Critical パナソニックシステムネットワークス株式会社
Priority to JP2001031133A priority Critical patent/JP4624487B2/en
Publication of JP2002236929A publication Critical patent/JP2002236929A/en
Application granted granted Critical
Publication of JP4624487B2 publication Critical patent/JP4624487B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像から輪郭線を抽出する輪郭線抽出処理方法に関し、特に被処理画像内の人物などの主要対象物と背景との境界を表す輪郭線の抽出に適した輪郭線抽出処理方法及び輪郭線抽出処理装置に関するものである。
【0002】
【従来の技術】
写真画像などの被処理画像から被写体としての人物などの主要対象物を切り抜く場合、その主要対象物の画像域と背景の画像域とに分割するため、主要対象物と背景との境界を表す輪郭線を被処理画像から抽出する必要があり、このような輪郭線抽出操作では、主要対象物について1本の輪郭線を正確に抽出することができればそれで十分である。
【0003】
【発明が解決しようとする課題】
ところが、前記の輪郭線抽出操作を手入力で行う、すなわちオペレータがディスプレイなどに表示された画像を見ながらマウスなどのポインティングデバイスでトレースを行う場合には、オペレータの作業負担が大きい上にオペレータの技能の差により均一な処理ができないといった不都合が生じる。他方、輪郭線抽出操作を自動化するための処理方法が種々知られているが、一般的な方法では必要のない輪郭線を多数抽出したり、あるいは連続した輪郭線が得られないために後処理が面倒になるなど、使い勝手が良いものとは言い難い。
【0004】
本発明は、このような従来技術の問題点を解消するべく案出されたものであり、その主な目的は、オペレータの作業負担を軽減するために輪郭線抽出操作を自動化するにあたり、主要対象物と背景との境界を表す輪郭線の抽出に適した処理を行うことによって、適切な輪郭線を抽出可能で、かつ処理手順の効率化により処理時間の短縮を図ることが可能なように構成された輪郭線抽出処理方法及び輪郭線抽出処理装置を提供することにある。
【0005】
【課題を解決するための手段】
このような目的を果たすために、本発明においては、請求項1に示した通り、被処理画像内の主要対象物とその背景との境界を表す輪郭線を抽出する輪郭線抽出処理方法において、被処理画像を格子状に分割し、これにより得られた複数のセルの中から、所定の閾値を超えるエッジ強度を有する画素を含むセルをエッジセルとして抽出して、該エッジセルが互いに連続した状態で集合した連続領域を作成し、連続領域が主要対象物の画像域において複数作成される場合に、被処理画像の前記セルへの分割数を少なくすることによって連続領域を1つとし、該連続領域の外周に位置するセルを輪郭セルとして抽出し、輪郭セル及びその近傍の非輪郭セルにかかる境界線上において輪郭線の通過点となる接続点を探索した上で、該接続点を相互に結ぶように輪郭線を抽出するものとした。これによると、輪郭セルを目安にして輪郭線の抽出が行われるため、輪郭線抽出処理を効率化することができる。なお、画素単位で輪郭線を抽出する場合、以下に示す「点」は画素に対応し、「線」は所定の条件(例えば8隣接条件)で連続する画素列を表す。また、「セル」は矩形に仕切られた画素の集合体であり、「領域」はセルまたは画素の集合体を表す。セルは、縦横の画素数が概ね等しい略正方形をなすものとすることが望ましい。
【0006】
また、セルの分割線上において輪郭線の通過点となる接続点を探索した上で、それらの接続点を相互に結ぶように輪郭線を抽出するので、輪郭線のおおまかな位置が特定され、輪郭線抽出処理をより一層効率化することができる。この場合、輪郭セル同士の境界線、及び輪郭セルとこれに隣接する非輪郭セルとの間の境界線以外にも接続点が必要になる場合があり、必要に応じて非輪郭セル同士の境界線も探索対象に加えると良いが、輪郭線が輪郭セルから大きく外れることを避けるため、探索対象とする非輪郭セルを所定の近傍位置のものに限定することが望ましい。
【0007】
また、輪郭セルを抽出するにあたり、所定の閾値を超えるエッジ強度を有する画素を含むセルをエッジセルとして抽出して、このエッジセルが互いに連続した状態で集合した連続領域を作成し、その連続領域の外周に位置するセルを輪郭セルとして抽出するので、輪郭線に概ね沿って連続した輪郭セルを得ることができ、輪郭セルをもとにした輪郭線抽出処理が効率化する。この場合、エッジ強度の検出のために被処理画像がカラーであれば輝度レベルなどに基づいてモノクロ濃淡画像に変換した上で処理を行うと良い。なお、エッジ強度の閾値には、一定値を用いるようにしても良いが、被処理画像に応じて適切な値に適宜に設定することも可能である。
【0008】
また、被処理画像のセルへの分割数を少なくすることによって連続領域を1つに統合するので、エッジセルの連続領域が主要対象物の画像域を全体的に取り囲むように形成され、輪郭線が通過する適切なセルを輪郭セルとして確実に抽出することができる。例えば人物の顔写真のように被処理画像内に主要対象物が唯一である場合は、被処理画像内に唯一の連続領域を作成する。
【0009】
前記輪郭線抽出処理方法においては、請求項2に示した通り、エッジセルの連続領域を作成するにあたり、被処理画像が人物の顔写真である場合には、左上端及び右上端の各エッジセルの真下に並ぶセル、並びにそれらの中の最も下に位置する左右の下端セルの間のセルを全てエッジセルとして連続領域を作成する構成をとることができる。これによると、人物の顔写真に適した輪郭セルが抽出されるため、輪郭線抽出処理を効率良く行うことができる。人物の顔写真では、左右及び下の辺縁で主要対象物としての人物の上半身が途切れた状態となるため、ここを一律にエッジセルとすることで、無駄な輪郭線抽出処理を避けることができる。
【0010】
前記輪郭線抽出処理方法においては、請求項3に示した通り、接続点を探索するにあたり、輪郭セル並びにこの輪郭セルにより閉じられた領域内の非輪郭セルを探索対象とし、これらのセルの境界線上を輪郭セルによる閉領域の内側に向けて探索する構成をとることができる。これによると、輪郭線が通る可能性が低い輪郭セルによる閉領域の外部を除外すると共に接続点が存在する可能性が高い部分を優先させることで接続点探索処理の効率化を図ることができる。
【0011】
前記輪郭線抽出処理方法においては、請求項4に示した通り、接続点を探索するにあたり、所定の配列にしたがって隣り合う一対の輪郭セルの相対的な位置関係に基づいて場合分けして接続点を探索する構成をとることができる。これによると、接続点探索処理の効率化を図ることができる。この場合、輪郭セルの配列は、例えば時計回りの探索により連続領域の外周に位置するセルを輪郭セルとして抽出した順に設定すれば良い。
【0012】
前記輪郭線抽出処理方法においては、請求項5に示した通り、隣り合う一対の輪郭セルが上下及び左右のいずれかの方向に並ぶ場合、この一対の輪郭セル相互の境界線上を探索し、これで接続点を抽出不能な場合は、一対の輪郭セルにそれぞれ接する非輪郭セルとの境界線上を探索する構成をとることができる。これによると、接続点が存在する可能性が高い部分を優先させることで接続点探索処理の効率化を図ることができる。
【0013】
前記輪郭線抽出処理方法においては、請求項6に示した通り、隣り合う一対の輪郭セルが斜め方向に並ぶ場合、この一対の輪郭セルの双方に接する非輪郭セルとの境界線上を探索し、これで接続点を抽出不能な場合は、一対の輪郭セルのいずれか一方にのみ接する非輪郭セルとの境界線上を探索する構成をとることができる。これによると、接続点が存在する可能性が高い部分を優先させることで接続点探索処理の効率化を図ることができる。
【0014】
前記輪郭線抽出処理方法においては、請求項7に示した通り、輪郭線を抽出するにあたり、開始点となる接続点から所定の配列にしたがった直近の接続点を目標点として、輪郭線を構成する輪郭点を順次探索する構成をとることができる。これによると、直近の接続点同士を順次輪郭点で結んでいくことで1本の輪郭線を得ることができ、輪郭線抽出処理を効率良く行うことができる。この場合、輪郭点としての所定の条件を満足する点、例えば所定の閾値を超えるエッジ強度を有する点を隣接点の中から抽出して輪郭点とすれば良い。また接続点の配列は、輪郭セルの配列にしたがって抽出された順に設定すれば良い。
【0015】
前記輪郭線抽出処理方法においては、請求項8に示した通り、開始点から目標点に向けて輪郭点を順次探索するにあたり、抽出された点の総数が所定の値(最大許容値)を越えると、その段階で探索を中止し、それまでに抽出された点を全て棄却して、開始点と目標点とを結ぶ線分上の点を輪郭点とする構成をとることができる。これによると、輪郭点数を制限することにより輪郭点探索における迷走を回避することができる。この場合、輪郭点数の最大許容値は、開始点と目標点との間の距離を基準に設定すると良い。
【0016】
前記輪郭線抽出処理方法においては、請求項9に示した通り、開始点から目標点に向けて輪郭点を順次探索するにあたり、新たに抽出された点から目標点までの距離が所定の値(最小距離)以下になると、その段階で探索を終了し、最後に抽出された点と目標点とを結ぶ線分上の点を輪郭点とする構成をとることができる。これによると、目標接続点の近傍での迷走を回避することができる。
【0017】
前記輪郭線抽出処理方法においては、請求項10に示した通り、開始点から目標点に向けて輪郭点を順次探索するにあたり、既に抽出された点を重ねて抽出すると、その段階で探索を中止し、その二重に抽出された点を前回抽出してから後に抽出された点を全て棄却して、二重に抽出された点と目標点とを結ぶ線分上の点を輪郭点とする構成をとることができる。これによると、無駄な輪郭点を抽出することによる迷走を回避することができる。この場合、二重に抽出されたか否かの判定は、既抽出点の全てについて行う必要はなく、処理を効率化する上でも、遡って照合する既抽出点の範囲を所定の点数に制限することが望ましい。この照合対象となる既抽出点の点数は、例えば開始点と目標点との間の距離に応じて定めれば良い。
【0018】
前記輪郭線抽出処理方法においては、請求項11に示した通り、開始点から目標点に向けて輪郭点を順次探索するにあたり、目標点に対して連続して後退した回数が所定の値(後退制限回数)に達すると、その段階で探索を中止し、後退を開始した点以降に抽出された点を全て棄却して、後退を開始する直前に抽出された点と目標点とを結ぶ線分上の点を輪郭点とする構成をとることができる。これによると、目標点から大きく遠ざかって迷走することを回避することができる。この場合、後退制限回数は、開始点と目標点との間の距離を基準に設定すれば良い。なおここで目標点に対して後退するとは目標点までの距離が増大することをいう。
【0019】
前記輪郭線抽出処理方法においては、請求項12に示した通り、開始点から目標点に向けて輪郭点を順次探索するにあたり、次の点の抽出が不能な場合、すなわち現在の点の周囲の隣接点の中に所定の条件を満足する点がない場合、現在の点の周囲の隣接点のうち、目標点に最も近い点を輪郭点とする構成をとることができる。これによると、輪郭点探索処理が中断することを回避することができる。
【0020】
前記輪郭線抽出処理方法においては、請求項13に示した通り、輪郭線を構成する輪郭点を順次探索するにあたり、現在の点の周囲の8隣接点のうち、直前の点とこれに接する両側の点とを除外した残りの点の中から次の点を抽出するものとする。これによると、輪郭線の折れ曲がり角度を90度以下に抑えることで、輪郭線が急角度で折れ曲がって目標点から大きく外れた誤った方向に進むことを避けることができる。ここで、8隣接点とは、現在の点に対して上下、左右及び斜めのいずれかの方向に並んで接する点をさす。また探索対象から除外される直前の点に接する両側の点とは、4隣接条件、すなわち直前の点に対して上下及び左右のいずれかの方向に並んで接する点をさす。
【0021】
前記輪郭線抽出処理方法においては、請求項14に示した通り、輪郭線を構成する輪郭点を順次探索するにあたり、現在の点を中心にして各隣接点の方向に並んだ所定数の点をその隣接点と同時に探索して次の点を抽出するものとする。これによると、同時に探索する点数を増やすことで、小さな切れ目に落ち込んで輪郭線が誤った方向に進むことを避けることができる。
【0022】
また、本発明においては、請求項15に示した通り、被処理画像内の主要対象物とその背景との境界を表す輪郭線を抽出する輪郭線抽出処理装置において、被処理画像を格子状に分割して得られた複数のセルの中から、所定の閾値を超えるエッジ強度を有する画素を含むセルをエッジセルとして抽出するエッジセル抽出部と、エッジセルが互いに連続した状態で集合した連続領域を作成し、連続領域が主要対象物の画像域において唯一か否かを判定して、唯一でない場合には被処理画像のセルへの分割数を少なくすることによって連続領域を1つに統合する連続領域作成部と、連続領域の外周に位置するセルを輪郭セルとして抽出する輪郭セル抽出部と、輪郭セル及びその近傍の非輪郭セルにかかる境界線上において輪郭線の通過点となる接続点を探索する接続点探索部と、接続点を相互に結ぶように輪郭線を構成する輪郭点を順次探索する輪郭点探索部とを有するものとした。これによると、輪郭線抽出処理の効率化を図ることができる。
【0024】
【発明の実施の形態】
以下に添付の図面を参照して本発明の構成を詳細に説明する。
【0025】
図1は、本発明が適用された輪郭線抽出処理装置の概略構成を示している。この装置は、外部記憶装置を備えた画像入力部1と、エッジ強度検出用データ作成部2と、エッジ強度閾値設定部3と、エッジセル抽出部4と、連続領域作成部5と、輪郭セル抽出部6と、接続点探索部7と、輪郭点探索部8と、顔写真用処理部9と、抽出輪郭線出力部10と、抽出輪郭線編集部11と、対象画像用メモリ12a、エッジ強度検出用メモリ12b、及びエッジ強度用メモリ12cで構成された画像メモリ12と、演算用メモリ13と、各部の動作を制御するコントローラ14とからなっており、これらの各部により実行される輪郭線抽出のプログラムは、所定のOS上で動作する画像処理エンジンと輪郭線抽出ライブラリとで構成される。得られた輪郭線は、抽出輪郭線出力部10によりディスプレイなどに出力させ、キーボードやマウスなどの入力装置を介して抽出輪郭線編集部11により編集することができる。
【0026】
本装置は、図2(A)に示すように被処理画像内の主要対象物とその背景との境界を表す輪郭線を抽出するものであり、これにはまず図2(B)に示すように被処理画像を格子状に分割し、これにより得られた複数のセルの中から、主要対象物の画像域の外周に位置するセルを輪郭セルとして抽出する。そして、輪郭線の通過点となる接続点を、輪郭セル及びその近傍の非輪郭セルにかかる境界線上で探索し、これにより得られた接続点を相互に結ぶように輪郭線を抽出する。なお、ここでは作図の便宜上、主要対象物を線画で示しているが、実際には濃淡の階調のみが現れる。
【0027】
被処理画像から輪郭セルを抽出するにあたっては、図3に示すように、所定の閾値を超えるエッジ強度を有する画素を含むセルをエッジセルとして抽出して、このエッジセルが互いに連続した状態で集合した連続領域を作成した上で、その連続領域の外周に位置するセルを輪郭セルとして抽出する。これらの処理は図1に示したエッジセル抽出部4及び輪郭セル抽出部6により行われる。
【0028】
ここでエッジセルの連続領域を作成するにあたり、適切な輪郭セルが抽出されるように主要対象物の画像域内に唯一の連続領域を作成する。エッジセルの連続領域が主要対象物の画像域において複数作成された場合は、被処理画像のセルへの分割数を変更することによって複数の連続領域を1つに統合する。これにより主要対象物の画像域を取り囲む連続した輪郭セルを抽出することができる。通常、分割数が多い、すなわちセルが小さいと、輪郭線の抽出が容易になる反面、エッジセルの連続領域が複数生じ易い。このため、分割数を多くした条件から次第に分割数を少なくして連続領域が唯一となるようにすると良い。例えば図4に示すようにエッジセルの連続領域が唯一でない場合は、分割数を少なくして処理をやり直す。この連続領域の作成処理は図1に示した連続領域作成部5により行われる。
【0029】
エッジセル相互の連続性の判定は、上下・左右及び対角方向に並んだ8隣接条件で行う。また連続領域が唯一であるか否かの判定は、セル単位でラベリングを行い、主要対象物の画像域に生成したラベル番号の数で行えば良い。具体的にはまず、8隣接条件で連続するエッジセルに番号1を割り当てる。ついで上下・左右のみの4隣接条件で連続する非エッジセルに同じ番号を割り当てる。そして外周に接する非エッジセル領域内の非エッジセルを番号0に振り直す。さらにエッジセルに囲まれた非エッジセルにエッジセルと同じ番号を割り当てる。これによりエッジセルの連続領域が唯一であれば、生成するラベル番号は0と1のみとなる。図4に示す例でラベリングを行うと、エッジセルに1、2、3の3つの番号が生じ、連続領域が唯一でないことがわかる。
【0030】
また、エッジセルの連続領域を作成するにあたり、被処理画像が人物の顔写真である場合は図1に示した顔写真用処理部9により特殊処理を行う。すなわち、図3に示したように左上端及び右上端の各エッジセルの真下に並ぶセル、並びにその中の最も下に位置する左右の下端セルの間のセルを全てエッジセルとして連続領域を作成する。この場合、左上端及び右上端の各エッジセルは、画像の左端及び右端のセルを上端から検索して設定すれば良い。
【0031】
この顔写真用特殊処理を別の例で説明すると、図5(A)に示すように左上端及び右上端のエッジセルが被処理画像の左右の端にある場合は、被処理画像の左右及び下の端縁に沿うセル列に含まれる非エッジセルがエッジセルに置き換えられる。他方、図5(B)に示すように左上端及び右上端のエッジセルが被処理画像の左右の端にない場合は、左上端及び右上端の各エッジセルの真下に並ぶセル列、及び被処理画像の下の端縁に沿って左右の下端セルの間に並ぶセル列に含まれる非エッジセルがエッジセルに置き換えられる。ちなみに図3に示した例で前記の特殊処理を行わないと、エッジセルの連続領域は図6(A)に示すようになり、この状態のままの連続領域に対して輪郭セルの抽出処理を行うと、図6(B)に示すように主要対象物の画像域内に輪郭セルが現れ、後に無駄な処理を行うことになる。
【0032】
次に、エッジセルの連続領域から輪郭セルを抽出するにあたっては、図7(A)に示すように連続領域の左下端のエッジセルから探索を開始し、連続領域の最も外側に位置するエッジセルを輪郭セルとして抽出する。このとき同時に輪郭セルの配列を生成し、図7(B)に示すように抽出された順に輪郭セルに番号を付ける。
【0033】
この輪郭セルの抽出は、図8に示す探索順序で行う。ここでは、現在のセルの周囲の隣接セル(8隣接条件)の中から時計回りに探索して最初に見つかったエッジセルを輪郭セルとする。この探索順序は、現在のセルと直前のセルとの位置関係の相違で8通りある。なお、ここでは図8に示す各矩形枠がセルに対応しているが、この図8に示す探索順序は後述する輪郭点探索においても採用され、そこでは各矩形枠が点(画素)に相当する。
【0034】
次に、輪郭線の通過点となる接続点の探索要領について説明する。ここでは、図9に示すように、輪郭セル並びにこの輪郭セルにより閉じられた領域内の非輪郭セルを探索対象とし、これらのセルの境界線上を輪郭セルによる閉領域の内側に向けて探索する。この接続点は、輪郭線を構成する輪郭点としての所定の条件、具体的には所定の閾値を超えるエッジ強度を有することを条件に探索され、セルの境界線上で最初に見つかった点を接続点とする。この接続点は、セルに対する輪郭線の入口及び出口となるもので、セルごとに一対抽出される。この接続点探索処理は図1に示した接続点探索部7により行われる。
【0035】
接続点の探索処理を別の例で説明すると、図10に示すように、左下端の探索開始セルから時計回りに探索を進めて抽出された順に輪郭セルに番号が付される。そして輪郭セルによる閉領域の内側に向けて輪郭セルにかかる境界線上で接続点を探索する。
【0036】
この接続点の探索においては、所定の配列にしたがって隣り合う一対の輪郭セルの相対的な位置関係に基づいて場合分けして接続点を探索する。すなわち、輪郭セルは8隣接条件で抽出したため、隣り合う一対の輪郭セルの並び方に上下・左右及び斜めの3通りがあり、探索対象セルの位置関係を判定した上でその位置関係に応じた探索方法にしたがって探索を行う。
【0037】
まず図11に示すように、隣り合う一対の輪郭セルが上下方向に並ぶ場合は、一対の輪郭セルA・B相互の境界線AB上を探索する。このとき輪郭セルにより閉じられた領域の内側に向けて探索し、境界線ABの最も外側の点Pから探索を開始する。これで接続点を抽出不能な場合は、輪郭セルA・Bにそれぞれ接し、かつ輪郭セルによる閉領域の内側に位置する非輪郭セルC・Dとの境界線上AC・BD上を探索する。これで接続点が見つからなければ点Pを接続点とする。
【0038】
非輪郭セルC・Dとの境界線AC・BD上に接続点が見つかった場合は、探索範囲を内側の非輪郭セルC・Dに広げるが、この非輪郭セルC・Dでの輪郭線の通過状態にも種々の態様があり、ここでは、図11(B)・(C)に示すように、輪郭セルA・Bの内側に並んだ合計4つの非輪郭セルC・D・E・Fに限定し、これ以外の非輪郭セルを輪郭線が通過する場合は点Pを接続点とする。ここでは非輪郭セルにかかる接続点数が5を上限とする。なお、隣り合う一対の輪郭セルが左右方向に並ぶ場合は、セルの位置関係を左右に置き換えることで前記と同一の手順で行うことができる。
【0039】
他方、図12に示すように、隣り合う一対の輪郭セルA・Bが斜め方向に並ぶ場合は、一対の輪郭セルA・Bの双方に接し、かつ輪郭セルによる閉領域の内側に位置する非輪郭セルCとの境界線上を探索する。このとき一対の輪郭セルA・Bの交点Pから探索を開始する。ここで接続点を抽出不能な場合は、図12(B)・(C)に示すように一対の輪郭セルA・Bのいずれか一方にのみ接し、かつ輪郭セルによる閉領域の内側に位置する非輪郭セルD・Eとの境界線AD・BE上を探索する。この場合、非輪郭セルC・Dの双方に接する非輪郭セルF及び非輪郭セルC・Eの双方に接する非輪郭セルGに探索対象を制限し、非輪郭セルにかかる接続点数は4を上限とする。
【0040】
次に、接続点を結ぶ輪郭線の抽出要領について説明する。ここでは、図13に示すように、探索の開始点となる接続点(開始接続点)Sから所定の配列にしたがった直近の接続点を目標点(目標接続点)Eとし、この目標接続点Eに向けて開始接続点Sから所定の条件を満足する点を順次抽出して輪郭線を構成する輪郭点とする。このとき、画素ごとのエッジ強度を閾値と比較し、所定の閾値を越えるエッジ強度を有する画素を輪郭点とする。この輪郭点探索処理は、図1に示した輪郭点探索部8により行われる。ここで輪郭線は1つのセルの境界線上に設定された一対の接続点を相互に結ぶように探索されるが、その過程で隣のセルに入り込むことも許容される。なお、図中に示すセル内の方形枠は点(画素)を示す。
【0041】
この輪郭線の抽出においては、図8に示したように現在の点の周囲の隣接点(8隣接条件)のうち、輪郭セルによる閉領域の外側の点を優先的に抽出する。ここでは、輪郭セルの配列にしたがって接続点を時計回りに配列し、その配列にしたがって直近の一対の接続点のうちの前側の点を開始接続点、後側の点を目標接続点として時計回りに探索を進める。これにより進行方向に向かって左側が常に輪郭セルによる閉領域の外側に位置し、ここで接続点の配列と同じ時計回りで現在の点の周囲の隣接点を探索して最初に見つかったものを輪郭点とすることで、隣接点の中から外側の点が優先的に抽出される。
【0042】
この接続点を結ぶ輪郭線の探索では、迷走を回避して確実に目標接続点に到達させるため、以下に示す処理を行う。
【0043】
まず第1に、輪郭点が不必要に増大することを避けるため、抽出点の総数が所定の最大許容値を越えると、その段階で探索を中止し、それまでに抽出された点を全て棄却して、図14に示すように接続点S・Eを結ぶ線分上の点を輪郭点とする。抽出点数の最大許容値は接続点間の距離を基準に設定すれば良く、ここでは最大許容値pmax=d×2、すなわち接続点間の距離の2倍の数とする。図14に示す例では、接続点S・E間の距離d=12(4近傍距離)であるので最大許容値pmax=24となる。
【0044】
第2に、目標接続点の近傍での迷走を避けるため、新たに抽出された点から目標接続点までの距離が所定の値(最小距離)以下になる、すなわち新たに抽出された点が所定の近傍領域の中に入ると、その段階で探索を終了し、最後に抽出された点と目標接続点とを結ぶ線分上の点を輪郭点とする。図15(A)に示す例では、新たに抽出された点Pが目標接続点の近傍領域内に入るため、ここで探索が中止され、図15(B)に示すように点Pと目標接続点Eとを結ぶ線分上の点を輪郭点として補完する。ここでは探索を中止する最小距離を4(4近傍距離)としている。
【0045】
第3に、無駄な輪郭点の抽出を避けるため、既に抽出された点を重ねて抽出する、すなわち新たに抽出された点が既に抽出された点と同一となる場合は、その段階で探索を中止し、二重に抽出された点を前回抽出してから後に抽出された点を全て棄却して、二重抽出点と目標接続点を結ぶ線分上の点を輪郭点とする。図16(A)に示す例では、S、A、B、C、D、F、P、G、H、I、Pの順で抽出され、点Pが重ねて抽出されたため、図16(B)に示すように点G、H、I、Pを削除して目標接続点Eに置き換え、最終的な抽出点は順にS、A、B、C、D、F、P、Eとなり、二重抽出点Pと目標接続点Eとを結ぶ線分上の点を輪郭点として補完する。二重に抽出されたか否かの判定の際の照合対象となる既抽出点の点数は、接続点間の距離に基づいて設定される。
【0046】
第4に、目標接続点から大きく遠ざかることを避けるため、目標接続点に対して連続して後退した回数が所定の値(後退制限回数)に達すると、その段階で探索を中止し、後退を開始した点以降に抽出された点を全て棄却して、後退を開始する直前に抽出された点と目標接続点を結ぶ線分上の点を輪郭点とする。図17(A)に示す例で、後退制限回数を接続点S・E間の距離d=12とすると、点12から点23までで連続して12回後退しているため、ここで探索を中止し、図17(B)に示すように後退を始めた点12から点23までを削除して目標接続点Eに置き換え、最終的な抽出点は順に1、2、3、4、5、6、7、8、9、10、11、Eとなり、後退を開始する直前に抽出された点11と目標接続点Eとを結ぶ線分上の点を輪郭点として補完する。なお図17では後退した点に下線を付して示しており、点4及び点7で1回ずつ後退しているものの、後退制限回数に達していないために探索は中止されない。
【0047】
第5に、輪郭点探索処理が中断することを避けるため、次の点の抽出が不能な場合、現在の点の周囲の隣接点のうち、目標接続点に最も近い点を抽出して輪郭点とする。図18に示す例では、点6の次の候補となる点A〜Gの中に輪郭点条件を満たすものがないため、候補となる点A〜Gの中で目標接続点Eに最も近い点Cを選択する。ここでは、点Cを抽出した後に輪郭点条件を満たす点が順次抽出され、最終的な抽出点は順にS、1、2、3、4、5、6、C、7、8、9、10、11、Eとなる。
【0048】
さらに、実際の輪郭線から大きく外れることを回避するため、以下に示す特殊処理を必要に応じて行う。
【0049】
まず第1に、輪郭線が急角度で折れ曲がることを避けるため、輪郭点を順次探索するにあたり、現在の点の周囲の8隣接点のうち、直前の点とこれに上下・左右に接する点、すなわち直前の点に対して4隣接条件で接する点とを除外した残りの点の中から次の点を抽出する。図19に示す例では、現在の点の周囲の8隣接点のうち、直前に抽出された点とその両側の点1・7とが抽出対象から除外され、残る点2〜6の中から輪郭点を抽出する。これにより輪郭線の折れ曲がり角度を90度以下に抑えることができる。
【0050】
第2に、切れ目への落ち込みを回避するため、現在の点を中心にして各隣接点の方向に並んだ点をその隣接点と同時に探索する、すなわち各隣接点とその方向に並んだ点とが所定の条件を満たすか否かを判定し、そのうちのいずれかが条件を満たせばこれらの点をまとめて輪郭点とする。図20に示す例では、現在の点の周囲の8隣接点のうち、直前に抽出された点を除く点1〜7が候補となり、これらの隣接点1〜7の各々についてその方向に並んだ2つの点を合わせた合計3点で判定を行う。例えば隣接点1とその方向に並んだ2つの点1’・1”とを合わせて判定を行う。これにより条件を満たさない点が介在するために誤った方向に折り返すことを避けることができる。
【0051】
前記の急角度の折れ曲がり及び切れ目への落ち込みの回避処理を同時に行うには、図21に示すように、現在の点の周囲の8隣接点のうち、直前に抽出された点とその両側の点1・7とを抽出対象から除外すると共に、残る点2〜6の各々とその方向に並んだ点とを同時に判定して輪郭点を抽出する。
【0052】
図22・図23は前記の例と現在の点及び直前の点の位置関係が異なる例を示しており、図22では、現在の点の周囲の8隣接点のうち、直前の点とこれに上下・左右に接する点1・7とを除外した残りの点2〜6の中から次の点を抽出する。図23では、図22で示した条件に加えて、現在の点を中心にして各隣接点2〜6の方向に並んだ点をその隣接点と同時に探索して次の点を抽出する。
【0053】
以下に、輪郭線抽出処理全体の手順について、図24に示すフローにしたがって説明する。まず図1に示した画像入力部1から被処理画像データが画像メモリ12の対象画像用メモリ12aに送られた後、ステップ101で被処理画像がカラー画像であれば、図1に示したエッジ強度検出用データ作成部2により輝度レベルに基づいてモノクロ濃淡画像(例えば256階調)に変換し、つづくステップ102で雑音の多い画像であれば平滑化処理を行う。これで得られた被処理画像データは図1に示したエッジ強度検出用メモリ12bに格納される。
【0054】
次にステップ103で、図1に示したエッジ強度検出用メモリ12b内の被処理画像データを用いて全画素ごとのエッジ強度が求められ、図1に示したエッジ強度用メモリ12cに格納される。このエッジ強度の算出では、テンプレート型フィルタ処理を行えば良い。これには局所オペレータ、例えば3×3画素のPrewittのオペレータを用い、隣接画素との間のレベル差からエッジ強度の他にエッジの方向も求めることができる。
【0055】
つづくステップ104では、図1に示したエッジ強度閾値設定部3により被処理画像に適したエッジ強度の閾値を設定する。このエッジ強度の閾値の設定にあたっては、全画素のエッジ強度データからヒストグラムを作成し、最大のエッジ強度から順に度数を加算して得られる度数の累積値が、総画素数に対して所定の割合に達したときのエッジ強度を閾値とする。ここで決定基準となる総画素数に対する割合は、例えば平滑化処理された場合では8.65%、平滑化処理されていない場合では9.40%とする。
【0056】
ついでステップ105において、図1に示したエッジセル抽出部4により被処理画像を格子状に分割し、ステップ106で閾値を超えるエッジ強度を持つ画素を含んでいるか否かでエッジセルと非エッジセルとに区分する。そしてステップ107で図1に示した連続領域作成部5によりセル単位でラベリングを行った後、ステップ108で連続領域が唯一か否かを判定し、連続領域が唯一でなければ、ステップ109で分割数を少なくしてセルを大きくした上でステップ105に戻る。
【0057】
ステップ108で連続領域が唯一と判定されると、ステップ110で図1に示した輪郭セル抽出部6により連続領域から輪郭セルを抽出しながらその配列を求める。そしてステップ111で図1に示した接続点探索部7により接続点を探索し、つづくステップ112で図1に示した輪郭点探索部8により接続点を結ぶ輪郭点を探索する。
【0058】
次に、図24に示したエッジセルの連続領域の作成手順(ステップ103〜109)について図25にしたがって詳しく説明する。まずステップ201でエッジセルの判定基準となるエッジ強度の閾値deを設定する。ついでステップ202で画像分割数dev[i]の配列を設定する。例えば配列を48、36、24、18、12、8、6、4、3、2、1とし、この順で分割数を少なくして唯一の連続領域を得るようにする。
【0059】
ついでステップ203で、セルのラベル番号が唯一である、すなわちエッジセルの連続領域が唯一であることを抜け出し条件として連続領域作成のループを開始し、ステップ204で分割数dev[i]でセルに分割する。そしてステップ205で、全セルが終了することを抜け出し条件としてエッジセル判定のループを開始し、セルごとにエッジ強度に基づいてエッジセルと非エッジセルとに区分する。すなわち、ステップ206でセル内にエッジ強度閾値deを超えるエッジ強度を持つ画素があるか否かを判定し、該当する画素があればステップ207で当該セルをエッジセルとし、該当する画素がなければステップ208で当該セルを非エッジセルとする。そしてステップ209で全てのセルが終了していればエッジセル判定のループから抜け出す。
【0060】
つづくステップ210ではセル単位のラベリング処理を行い、ステップ211で連続するセルを同一のラベル番号に置き換えた後、ステップ212でラベル番号が唯一か否か、すなわち連続領域が唯一か否かを判定し、唯一でなければステップ204に戻り、分割数dev[i]の配列にしたがって次に少ない分割数で処理をやり直し、これを連続領域が唯一となるまで繰り返してステップ213で連続領域作成のループを終了する。これにより被処理画像内に唯一の連続領域が設定される。
【0061】
次に図1に示した顔写真用処理部9による顔写真用の特殊処理(図3・図5参照)の手順について図26に示すフローにしたがって説明する。まずステップ301で左上端エッジセルを検索するループを開始し、ステップ302で被処理画像の左上端のセルを開始位置に設定した後、ステップ303でエッジセルか否かを判定し、エッジセルでなければステップ304で真下のセルに移動する。ここで最下端であれば右隣のセル列の上端のセルに移動する。ステップ303でエッジセルと判定されるとステップ305でループを終了し、つづくステップ306で左上端エッジセルの真下に並ぶセルを全てエッジセルとする。
【0062】
ついでステップ307で右上端エッジセルを検索するループを開始し、ステップ308で右上端のセルを開始位置とし、ステップ309でエッジセルか否かを判定し、エッジセルでなければステップ310で真下のセルに移動し、最下端であれば左隣のセル列の上端に移動する。ステップ309でエッジセルと判定されるとステップ311でループを終了し、ステップ312で右上端エッジセルの真下に並ぶセルを全てエッジセルとする。そしてステップ313で左右の下端セルの間の全てのセルをエッジセルとする。
【0063】
次に、図1に示した接続点探索部7での接続点の探索手順について図27・図28・図29に示すフローにしたがって説明する。まず図27に示すステップ401で探索対象となる1対の輪郭セルA・BのインデクスIDX・IDXを初期化し、ステップ402で輪郭セルAから輪郭セルBへの進行方向を調べる。そしてステップ403でdx=0、すなわち縦に並んでいるか否かが判定され、dx=0であればステップ404に進んで上下接続処理を行う。ステップ403でdx=0でないと判定されるとステップ405に進み、ここでdy=0、すなわち、横に並んでいるか否かが判定され、dy=0であればステップ406に進んで左右接続処理を行う。ステップ405でdy=0でないと判定されるとステップ407に進んで斜め接続処理を行う。
【0064】
つづくステップ408では、輪郭セルA・BのインデクスIDX・IDXをそれぞれ1つずつ増やし、ステップ409で輪郭セルBのインデクスIDXが輪郭セルの総数NUMに等しいか否か、すなわち輪郭セルBが輪郭セルの配列から外れたか否かが判定され、輪郭セルBが配列外であればステップ410でインデクスIDXを0としてステップ402に戻り、最後の輪郭セル(輪郭セルA)と最初の輪郭セル(輪郭セルB)とで接続点の探索処理を行う。輪郭セルBが輪郭セルの配列内にあればステップ411で輪郭セルAのインデクスIDXが総数NUMに等しいか否かが判定され、輪郭セルAが輪郭セルの配列外であれば終了し、輪郭セルAが配列内にあればステップ402に戻る。
【0065】
図27に示したステップ404での上下接続処理では、図28に示すように、まずステップ501で接続点としての条件を満足する点が境界線AB上にあるか否かが判定され、ここに条件を満足する点があればステップ502でその点を接続点とする(図11(A)参照)。該当する点がなければステップ503に進む。ステップ503では、接続点条件を満足する点が境界線AC・BD上にあるか否かが判定され、ここに該当する点があればステップ504に進み、該当する点がなければステップ509で抽出不能として点Pを接続点とする。
【0066】
ステップ504では、接続点条件を満足する点が境界線CD上にあるか否かが判定され、ここに該当する点があればステップ505で境界線AC・CD・BD上の各点を順に接続点とする(図11(B)参照)。境界線CD上に該当する点がなければステップ506に進み、ここで接続点条件を満足する点が境界線CE・DF上にあるか否かが判定され、ここに該当する点があればステップ507に進み、該当する点がなければステップ509で点Pを接続点とする。ステップ507では、接続点条件を満足する点が境界線EF上にあるか否かが判定され、ここに該当する点があればステップ508で境界線AC・CE・EF・DF・BD上の各点を順に接続点とする(図11(C)参照)。境界線EF上に該当する点がなければステップ509で点Pを接続点とする。
【0067】
なお、図27に示したステップ406での左右接続処理の手順は前記の上下接続処理におけるセルの位置関係を左右に置き換えることで同一の手順で行われる。
【0068】
図27に示したステップ407での斜め接続処理では、図29に示すように、まずステップ601で接続点としての条件を満足する点が境界線AC上及びBC上の両方にあるか否かが判定され、ここに該当する点があればステップ602で境界線AC・BC上の2点を順に接続点とする(図12(A)参照)。該当する点がなければステップ603に進み、ここで接続点条件を満足する点が境界線AC上にあるか否かが判定され、ここに該当する点があればステップ604に進み、該当する点がなければステップ605に進む。
【0069】
ステップ604では、接続点条件を満足する点が境界線CG・EG・BE上の全てにあるか否かが判定され、該当する点があればステップ606に進んで境界線AC・CG・EG・BE上の各点を順に接続点とする(図12(B)参照)。該当する点がなければステップ609で抽出不能として、輪郭セルA・B同士が接する点Pを接続点とする。
【0070】
ステップ605では、接続点条件を満足する点が境界線BC上にあるか否かが判定され、該当する点があればステップ607に進み、該当する点がなければステップ609で点Pを接続点とする。ステップ607では、接続点条件を満足する点が境界線AD・DF・CF上の全てにあるか否かが判定され、該当する点があればステップ608で境界線AD・DF・CF・BC上の各点を順に接続点とする(図12(C)参照)。該当する点がなければステップ609で点Pを接続点とする。
【0071】
次に、図1に示した輪郭点探索部8による輪郭点の探索手順について、図30・図31に示すフローにしたがって説明する。まず図30に示すステップ701で開始接続点Sと目標接続点Eとを設定し、ステップ702で両接続点S・E間の距離dを求める。ついでステップ703で、輪郭点が不必要に増大することを避けるために総点数を制限する最大許容値pmaxを設定し、つづくステップ704で目標接続点Eに近づくことによる探索中止の基準となる目標接続点Eまでの最小距離dminを設定する。次にステップ705で抽出点を一時的に格納する履歴バッファのサイズを設定する。この履歴バッファは、二重に抽出されたか否かの判定の対象となるもので、ここでは最大許容値pmax×2とする。つづくステップ706では連続した後退を制限するための後退制限回数Dを設定し、図31に示すステップ707に進む。
【0072】
ステップ707では、目標接続点Eに到達することを抜け出し条件として輪郭点探索のループを開始し、ステップ708で次の候補となる8隣接点の中に輪郭点としての条件、すなわち所定のエッジ強度閾値を超える条件を満たす点を探索し、つづくステップ709で条件を満足する点があるか否かを判定し、ここで該当する点があればステップ711に進み、該当する点がなければステップ710で隣接点の中で目標接続点Eに最も近い点を選択する(図18参照)。
【0073】
ついでステップ711では、抽出点pが目標接続点Eか否かを判定し、目標接続点Eでなければステップ712に進み、目標接続点Eであればステップ721に進み、ここで抽出点pすなわち目標接続点Eを履歴バッファに格納してステップ722でループを終了する。
【0074】
ステップ712では、抽出点pと目標接続点Eとの距離が所定の値(最小距離)dmin以下か否かを判定し(図15参照)、最小距離dminより大きければステップ713に進む。最小距離dmin以下であればステップ712に進み、ここで抽出点pを輪郭点として履歴バッファに格納してステップ722でループを終了し、最終的に開始接続点Sから最後の抽出点pまでに抽出された点、並びに最後の抽出点pと目標接続点Eとを結ぶ線分上の点が輪郭点となる。
【0075】
ステップ713では、これまでに抽出された点の総数が最大許容値pmaxを越えたか否かを判定し、最大許容値pmaxを越えていなければステップ714に進み、最大許容値pmaxを越えていればステップ715に進んでそれまでに抽出された点を全て棄却する、すなわち開始接続点Sより後に抽出されて履歴バッファに格納された点を全て削除する。そして目標接続点Eを選択し、ステップ721で目標接続点Eを履歴バッファに格納してステップ722でループを終了し、最終的に開始接続点Sと目標接続点Eとを結ぶ線分上の点が輪郭点となる(図14参照)。
【0076】
ステップ714では、抽出された点が既に抽出された点と同一か否か、すなわち抽出された点と同じものが履歴バッファに格納されたものの中にあるか否かを判定し(図16参照)、該当する点がなければステップ716に進み、該当する点があればステップ717に進んで二重抽出点を前回抽出してから後に抽出された点を全て棄却する、すなわち履歴バッファに格納された点の中から二重抽出点以降の点を全て削除する。そしてステップ718に進んで目標接続点Eを選択し、つづくステップ721で目標接続点Eを履歴バッファに格納してステップ722でループを終了し、最終的に開始接続点Sから二重抽出点を前回抽出するまでに抽出された点、並びに二重抽出点と目標接続点Eとを結ぶ線分上の点が輪郭点となる。
【0077】
ステップ716では、後退したか否か、すなわち抽出された点と目標接続点Eとの距離が増加したか否かを判定し(図17参照)、後退していればステップ719に進み、後退していなければ抽出点pを輪郭点として履歴バッファに格納した後、ステップ708に戻って次の輪郭点を探索する。
【0078】
ステップ719では、連続して後退した回数が所定の値(後退制限回数)に達したか否かを判定し、後退制限回数に達していればステップ720に進んで後退を開始した点以降に抽出された点を全て棄却する、すなわち履歴バッファに格納された点の中から後退開始点の後に抽出された点を全て削除し、ステップ718に進んで目標接続点Eを選択し、つづくステップ721で目標接続点Eを履歴バッファに格納してステップ722でループを終了し、最終的に開始接続点Sから後退を開始する直前の点までに抽出された点、並びに後退を開始する直前の点と目標接続点Eとを結ぶ線分上の点が輪郭点となる。ステップ719で連続後退回数が後退制限回数に達していないものと判定された場合は、抽出点pを輪郭点として履歴バッファに格納した後、ステップ708に戻って次の輪郭点を探索する。
【0079】
【発明の効果】
このように本発明によれば、主要対象物と背景との境界を表す輪郭線の抽出に適した処理を行うことにより、適切な輪郭線を抽出可能で、かつ処理動作の効率化により計算機の負担を軽減して処理時間の短縮を図ることができる。
【図面の簡単な説明】
【図1】本発明が適用された輪郭線抽出処理装置の概略構成を示すブロック図
【図2】(A)本発明による輪郭線抽出結果を示す模式図
(B)本発明による輪郭線抽出状況を示す模式図
【図3】本発明によるエッジセル抽出状況を示す模式図
【図4】本発明によるエッジセル抽出状況の他の例を示す模式図
【図5】(A)・(B)本発明による顔写真用処理状況の他の例を示す模式図
【図6】(A)・(B)本発明による輪郭セル抽出状況を示す模式図
【図7】(A)・(B)本発明による輪郭セル抽出状況を示す模式図
【図8】本発明による輪郭点及び輪郭セルの探索順序を説明する模式図
【図9】本発明による接続点探索状況を示す模式図
【図10】本発明による接続点探索状況の他の例を示す模式図
【図11】(A)〜(C)本発明による接続点探索状況を示す模式図
【図12】(A)〜(C)本発明による接続点探索状況を示す模式図
【図13】本発明による輪郭点探索状況を示す模式図
【図14】本発明による輪郭点探索方法を説明する模式図
【図15】(A)・(B)本発明による輪郭点探索方法を説明する模式図
【図16】(A)・(B)本発明による輪郭点探索方法を説明する模式図
【図17】(A)・(B)本発明による輪郭点探索方法を説明する模式図
【図18】本発明による輪郭点探索方法を説明する模式図
【図19】本発明による輪郭点探索方法を説明する模式図
【図20】本発明による輪郭点探索方法を説明する模式図
【図21】本発明による輪郭点探索方法を説明する模式図
【図22】本発明による輪郭点探索方法を説明する模式図
【図23】本発明による輪郭点探索方法を説明する模式図
【図24】本発明による輪郭線抽出処理の全体を示すフロー図
【図25】本発明による連続領域作成処理のフロー図
【図26】本発明による顔写真用特殊処理のフロー図
【図27】本発明による接続点探索処理のフロー図
【図28】本発明による接続点探索における上下接続処理のフロー図
【図29】本発明による接続点探索における斜め接続処理のフロー図
【図30】本発明による輪郭点探索処理の一部を示すフロー図
【図31】本発明による輪郭点探索処理の残部を示すフロー図
【符号の説明】
1 画像入力部
2 エッジ強度検出用データ作成部
3 エッジ強度閾値設定部
4 エッジセル抽出部
5 連続領域作成部
6 輪郭セル抽出部
7 接続点探索部
8 輪郭点探索部
9 顔写真用処理部
10 抽出輪郭線出力部
11 抽出輪郭線編集部
12 画像メモリ
12a 対象画像用メモリ、12b エッジ強度検出用メモリ、12c エッジ強度用メモリ
13 演算用メモリ
14 コントローラ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a contour line extraction processing method for extracting a contour line from an image, and in particular, a contour line extraction processing method suitable for extracting a contour line representing a boundary between a main object such as a person in a processed image and a background, and The present invention relates to a contour line extraction processing device.
[0002]
[Prior art]
When a main object such as a person as a subject is cut out from an image to be processed such as a photographic image, it is divided into an image area of the main object and an image area of the background, so that an outline representing the boundary between the main object and the background It is necessary to extract a line from the image to be processed. In such a contour line extraction operation, it is sufficient if one contour line can be accurately extracted for the main object.
[0003]
[Problems to be solved by the invention]
However, when the above contour line extraction operation is performed manually, that is, when the operator performs tracing with a pointing device such as a mouse while looking at the image displayed on the display or the like, the burden on the operator is high and There arises a disadvantage that uniform processing cannot be performed due to a difference in skills. On the other hand, various processing methods for automating the contour line extraction operation are known. However, a large number of contour lines that are not necessary for the general method are extracted, or a continuous contour line cannot be obtained and post-processing is performed. It is hard to say that it is easy to use.
[0004]
The present invention has been devised to solve such problems of the prior art, and its main purpose is to automate the contour line extraction operation in order to reduce the work burden on the operator. It is possible to extract an appropriate contour line by performing processing suitable for extracting the contour line that represents the boundary between the object and the background, and to shorten the processing time by increasing the efficiency of the processing procedure. Another object of the present invention is to provide a contour line extraction processing method and a contour line extraction processing apparatus.
[0005]
[Means for Solving the Problems]
In order to achieve such an object, in the present invention, as described in claim 1, in a contour line extraction processing method for extracting a contour line representing a boundary between a main object in a processed image and its background, Divide the image to be processed into a grid, and from the multiple cells obtained by this, A cell including pixels having edge strength exceeding a predetermined threshold is extracted as an edge cell, and a continuous area in which the edge cells are gathered together is created, and a plurality of continuous areas are created in the image area of the main object. In this case, the number of divisions into the cells of the image to be processed is reduced to one continuous area, and the continuous area Extract the cells located on the outer periphery of as contour cells, After searching for the connection point that is the passing point of the contour line on the boundary line of the contour cell and the non-contour cell in the vicinity, connect the connection points to each other. The contour line was extracted. According to this, since the contour line is extracted using the contour cell as a guideline, the contour line extraction process can be made more efficient. In the case of extracting a contour line in pixel units, “points” shown below correspond to pixels, and “line” represents a continuous pixel row under a predetermined condition (for example, eight adjacent conditions). A “cell” is a collection of pixels partitioned into rectangles, and a “region” represents a collection of cells or pixels. It is desirable that the cells have a substantially square shape with substantially the same number of vertical and horizontal pixels.
[0006]
Also, After searching for the connection points that are the passing points of the contour line on the cell dividing line, the contour line is extracted so as to connect the connection points to each other. So The rough position of the contour line is specified, and the contour line extraction process can be made more efficient. In this case, a connection point may be required in addition to the boundary line between the contour cells and the boundary line between the contour cell and the non-contour cell adjacent thereto, and the boundary between the non-contour cells as necessary. Although it is preferable to add a line to the search target, it is desirable to limit the non-contour cell to be searched to a predetermined neighboring position in order to avoid that the contour line greatly deviates from the contour cell.
[0007]
Also, When extracting a contour cell, a cell including a pixel having an edge intensity exceeding a predetermined threshold is extracted as an edge cell, and a continuous region in which the edge cells are continuous with each other is created, and is positioned on the outer periphery of the continuous region. Cell to be extracted as a contour cell So Contour cells that are substantially continuous along the contour line can be obtained, and the contour line extraction process based on the contour cell becomes efficient. In this case, if the image to be processed is color for detection of edge strength, it is preferable to perform processing after conversion to a monochrome grayscale image based on the luminance level or the like. Note that a constant value may be used as the threshold value of the edge strength, but it may be appropriately set to an appropriate value according to the image to be processed.
[0008]
Also, The number of divisions of the processed image into cells Less To consolidate continuous areas into one So A continuous region of edge cells is formed so as to entirely surround the image area of the main object, and an appropriate cell through which a contour line passes can be reliably extracted as a contour cell. For example, when the main object is unique in the image to be processed, such as a human face photograph, a single continuous region is created in the image to be processed.
[0009]
In the contour line extraction processing method, Claim 2 As shown in the above, when creating a continuous area of edge cells, if the image to be processed is a portrait of a person, the cells lined up directly below each of the edge cells at the top left and top right corners, and the bottom of them. A configuration can be adopted in which a continuous region is created with all cells between the left and right bottom cells positioned as edge cells. According to this, since a contour cell suitable for a human face photograph is extracted, the contour line extraction process can be performed efficiently. In a person's face photo, the upper body of the person as the main object is cut off at the left and right and lower edges, so that it is possible to avoid unnecessary contour extraction processing by uniformly using this as an edge cell. .
[0010]
In the contour line extraction processing method, Claim 3 As shown in Fig. 4, when searching for a connection point, a contour cell and a non-contour cell in a region closed by the contour cell are searched, and the boundary line of these cells is directed to the inside of the closed region by the contour cell. The structure to search can be taken. According to this, it is possible to improve the efficiency of the connection point search process by excluding the outside of the closed region due to the contour cell that is unlikely to pass the contour line and giving priority to the portion where the connection point is highly likely to exist. .
[0011]
In the contour line extraction processing method, Claim 4 As shown in FIG. 5, when searching for connection points, it is possible to adopt a configuration in which connection points are searched for in different cases based on the relative positional relationship between a pair of adjacent contour cells according to a predetermined arrangement. According to this, the efficiency of the connection point search process can be improved. In this case, the arrangement of the contour cells may be set in the order in which cells located on the outer periphery of the continuous region are extracted as contour cells by, for example, clockwise search.
[0012]
In the contour line extraction processing method, Claim 5 As shown in the above, when a pair of adjacent contour cells are arranged in either the top and bottom or left and right directions, search on the boundary line between the pair of contour cells, and if the connection point cannot be extracted with this, A configuration can be adopted in which a search is made on a boundary line with a non-contour cell that is in contact with each contour cell. According to this, it is possible to improve the efficiency of the connection point search process by giving priority to the portion where the connection point is highly likely to exist.
[0013]
In the contour line extraction processing method, Claim 6 As shown in Fig. 2, when a pair of adjacent contour cells are arranged in an oblique direction, a search is made on the boundary line with a non-contour cell that touches both of the pair of contour cells, and if a connection point cannot be extracted with this, It is possible to adopt a configuration in which a search is made on a boundary line with a non-contour cell that is in contact with only one of the contour cells. According to this, it is possible to improve the efficiency of the connection point search process by giving priority to the portion where the connection point is highly likely to exist.
[0014]
In the contour line extraction processing method, Claim 7 As shown in Fig. 5, when extracting the contour line, it is possible to sequentially search for the contour points constituting the contour line by using the nearest connection point according to a predetermined arrangement from the connection point as the start point as a target point. it can. According to this, one contour line can be obtained by connecting the nearest connection points sequentially with the contour points, and the contour line extraction process can be performed efficiently. In this case, a point that satisfies a predetermined condition as a contour point, for example, a point having an edge strength exceeding a predetermined threshold may be extracted from the adjacent points to be a contour point. The array of connection points may be set in the order of extraction according to the array of contour cells.
[0015]
In the contour line extraction processing method, Claim 8 As shown in, when the contour points are searched sequentially from the start point to the target point, if the total number of extracted points exceeds the predetermined value (maximum allowable value), the search is stopped at that stage, It is possible to adopt a configuration in which all points extracted in (1) are rejected and points on the line segment connecting the start point and the target point are used as contour points. According to this, the stray in the contour point search can be avoided by limiting the number of contour points. In this case, the maximum allowable value of the number of contour points may be set based on the distance between the start point and the target point.
[0016]
In the contour line extraction processing method, Claim 9 As shown in the above, when the contour points are sequentially searched from the start point to the target point, if the distance from the newly extracted point to the target point is less than a predetermined value (minimum distance), the search is performed at that stage. It is possible to adopt a configuration in which a point on the line segment that ends and connects the last extracted point and the target point is a contour point. According to this, the stray in the vicinity of the target connection point can be avoided.
[0017]
In the contour line extraction processing method, Claim 10 As shown in Fig. 3, when searching for contour points sequentially from the start point to the target point, if already extracted points are extracted and overlapped, the search is stopped at that stage, and the double extracted points are It is possible to adopt a configuration in which all points extracted after extraction are rejected, and the points on the line segment connecting the double extracted points and the target points are contour points. According to this, it is possible to avoid a stray caused by extracting useless contour points. In this case, it is not necessary to determine whether or not double extraction has been performed for all of the already extracted points, and the range of already extracted points to be retrospectively matched is limited to a predetermined number of points in order to improve the efficiency of processing. It is desirable. The number of already extracted points to be collated may be determined according to the distance between the start point and the target point, for example.
[0018]
In the contour line extraction processing method, Claim 11 As shown in the above, when the contour points are sequentially searched from the start point toward the target point, when the number of times of continuous retreat with respect to the target point reaches a predetermined value (retraction limit number), the search is performed at that stage. Stop and reject all points extracted after the point where the reverse starts, and take the point on the line segment connecting the point extracted just before starting the reverse and the target point as the contour point Can do. According to this, it is possible to avoid straying far away from the target point. In this case, the backward limit frequency may be set based on the distance between the start point and the target point. Here, retreating with respect to the target point means that the distance to the target point is increased.
[0019]
In the contour line extraction processing method, Claim 12 As shown in the above, when searching for contour points sequentially from the start point to the target point, if the next point cannot be extracted, that is, a point that satisfies a predetermined condition in the neighboring points around the current point If there is no point, a point closest to the target point among neighboring points around the current point can be used as a contour point. According to this, it is possible to avoid interruption of the contour point search process.
[0020]
In the contour line extraction processing method, as shown in claim 13, the contour line Extract the next point from the remaining points excluding the previous point and the points on both sides of the neighboring points around the current point And According to this, by suppressing the bending angle of the contour line to 90 degrees or less, it is possible to prevent the contour line from bending at a steep angle and proceeding in a wrong direction greatly deviating from the target point. Here, the eight adjacent points refer to points that are in contact with the current point side by side in any of the vertical, horizontal, and diagonal directions. Further, the points on both sides in contact with the point immediately before being excluded from the search target refer to the four adjacent conditions, that is, the points in contact with the immediately preceding point side by side in either the vertical or horizontal direction.
[0021]
In the contour line extraction processing method, as shown in claim 14, the contour line In order to sequentially search the contour points constituting the, a predetermined number of points arranged in the direction of each adjacent point around the current point are searched simultaneously with the adjacent points to extract the next point. According to this, by increasing the number of points to be searched at the same time, it is possible to avoid the contour line from moving in the wrong direction by falling into a small break.
[0022]
In the present invention, Claim 15 In the contour line extraction processing device that extracts a contour line representing the boundary between the main object in the image to be processed and its background, as shown in Fig. 3, a plurality of cells obtained by dividing the image to be processed in a grid pattern An edge cell extraction unit that extracts cells including pixels having edge strength exceeding a predetermined threshold as edge cells, and a continuous region in which edge cells are gathered together To determine whether or not the continuous area is unique in the image area of the main object, and if not, combine the continuous areas into one by reducing the number of divisions of the processed image into cells. Continuous area creation part and continuous area A contour cell extraction unit that extracts a cell located on the outer periphery of the contour cell as a contour cell, and a connection point search unit that searches for a connection point that is a passing point of the contour line on the boundary line of the contour cell and the neighboring non-contour cell; An outline point search unit that sequentially searches for outline points constituting the outline so as to connect the connection points to each other. According to this, it is possible to increase the efficiency of the contour line extraction process.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the configuration of the present invention will be described in detail with reference to the accompanying drawings.
[0025]
FIG. 1 shows a schematic configuration of an outline extraction processing apparatus to which the present invention is applied. This apparatus includes an image input unit 1 having an external storage device, an edge strength detection data creation unit 2, an edge strength threshold setting unit 3, an edge cell extraction unit 4, a continuous region creation unit 5, and a contour cell extraction. Unit 6, connection point search unit 7, contour point search unit 8, facial photograph processing unit 9, extracted contour line output unit 10, extracted contour line editing unit 11, target image memory 12 a, edge strength The image memory 12 includes a detection memory 12b and an edge strength memory 12c, a calculation memory 13, and a controller 14 that controls the operation of each part. Contour line extraction performed by these parts. The program is composed of an image processing engine operating on a predetermined OS and an outline extraction library. The obtained contour line can be output to a display or the like by the extracted contour line output unit 10 and can be edited by the extracted contour line editing unit 11 via an input device such as a keyboard or a mouse.
[0026]
As shown in FIG. 2 (A), this apparatus extracts a contour line representing the boundary between the main object in the image to be processed and its background. First, as shown in FIG. 2 (B). The image to be processed is divided into a grid pattern, and a cell located on the outer periphery of the image area of the main object is extracted as a contour cell from the plurality of cells obtained thereby. Then, a connection point serving as a passing point of the contour line is searched on a boundary line related to the contour cell and the non-contour cell in the vicinity thereof, and the contour line is extracted so as to connect the connection points obtained thereby. Here, for convenience of drawing, the main object is shown as a line drawing, but only gray scales actually appear.
[0027]
When extracting contour cells from the image to be processed, as shown in FIG. 3, a cell including pixels having edge strength exceeding a predetermined threshold is extracted as an edge cell, and the edge cells are gathered in a continuous state. After creating an area, a cell located on the outer periphery of the continuous area is extracted as a contour cell. These processes are performed by the edge cell extraction unit 4 and the contour cell extraction unit 6 shown in FIG.
[0028]
Here, when creating a continuous region of edge cells, a single continuous region is created in the image area of the main object so that an appropriate contour cell is extracted. When a plurality of continuous regions of edge cells are created in the image region of the main object, the plurality of continuous regions are integrated into one by changing the number of divisions of the image to be processed into cells. As a result, continuous contour cells surrounding the image area of the main object can be extracted. Usually, when the number of divisions is large, that is, the cells are small, the contour line can be easily extracted, but a plurality of edge cell continuous regions are likely to be generated. For this reason, it is preferable to reduce the number of divisions gradually from the condition that the number of divisions is increased so that the continuous region is unique. For example, as shown in FIG. 4, when the continuous area of edge cells is not unique, the number of divisions is reduced and the process is repeated. The continuous area creating process is performed by the continuous area creating unit 5 shown in FIG.
[0029]
The determination of continuity between edge cells is performed under eight adjacent conditions arranged in the up / down / left / right and diagonal directions. Whether or not the continuous area is unique may be determined by the number of label numbers generated in the image area of the main object after labeling in units of cells. Specifically, first, a number 1 is assigned to edge cells that are continuous under 8 adjacent conditions. Next, the same number is assigned to the non-edge cells that are continuous under the four adjacent conditions of only the top, bottom, left and right. Then, the non-edge cells in the non-edge cell area in contact with the outer periphery are renumbered to 0. Further, the same number as the edge cell is assigned to the non-edge cell surrounded by the edge cell. Thus, if the continuous area of the edge cell is unique, the generated label numbers are only 0 and 1. When labeling is performed in the example shown in FIG. 4, three numbers 1, 2, and 3 are generated in the edge cell, and it can be seen that the continuous region is not unique.
[0030]
Further, when creating a continuous region of edge cells, if the image to be processed is a human face photo, special processing is performed by the face photo processing unit 9 shown in FIG. That is, as shown in FIG. 3, a continuous region is created with all the cells arranged directly below each of the edge cells at the upper left end and the upper right end, and the cells between the lower left and right cells positioned at the bottom of the cells, as edge cells. In this case, the upper left edge and upper right edge cells may be set by searching the left edge and right edge cells of the image from the upper edge.
[0031]
This special face photograph processing will be described with another example. When the edge cells at the upper left corner and the upper right corner are at the left and right edges of the image to be processed as shown in FIG. The non-edge cells included in the cell row along the edge are replaced with edge cells. On the other hand, as shown in FIG. 5B, when the edge cells at the upper left corner and the upper right edge are not at the left and right edges of the image to be processed, the cell row aligned immediately below the edge cells at the upper left edge and the upper right edge, and the image to be processed The non-edge cells included in the cell row arranged between the left and right bottom cells along the lower edge are replaced with edge cells. Incidentally, if the special processing is not performed in the example shown in FIG. 3, the continuous region of the edge cell is as shown in FIG. 6A, and the contour cell extraction processing is performed on the continuous region in this state. Then, as shown in FIG. 6B, a contour cell appears in the image area of the main object, and a wasteful process is performed later.
[0032]
Next, in extracting a contour cell from a continuous region of edge cells, a search is started from the edge cell at the lower left corner of the continuous region as shown in FIG. Extract as At this time, an array of contour cells is generated at the same time, and the contour cells are numbered in the order of extraction as shown in FIG.
[0033]
This contour cell extraction is performed in the search order shown in FIG. Here, the edge cell first found by searching clockwise among neighboring cells (eight neighboring conditions) around the current cell is defined as a contour cell. There are eight search orders depending on the positional relationship between the current cell and the previous cell. Here, each rectangular frame shown in FIG. 8 corresponds to a cell, but the search order shown in FIG. 8 is also adopted in contour point search described later, in which each rectangular frame corresponds to a point (pixel). To do.
[0034]
Next, a procedure for searching for a connection point that becomes a passing point of the contour line will be described. Here, as shown in FIG. 9, the contour cell and the non-contour cell in the region closed by the contour cell are set as search targets, and the boundary line of these cells is searched toward the inside of the closed region by the contour cell. . This connection point is searched on the condition that it has an edge strength exceeding a predetermined threshold as a contour point that constitutes the contour line, specifically, the first point found on the cell boundary line is connected Let it be a point. This connection point becomes an entrance and an exit of the contour line with respect to the cell, and a pair is extracted for each cell. This connection point search process is performed by the connection point search unit 7 shown in FIG.
[0035]
The connection point search process will be described using another example. As shown in FIG. 10, the contour cells are numbered in the order in which the search is advanced clockwise from the search start cell at the lower left corner. And a connection point is searched on the boundary line concerning a contour cell toward the inside of the closed region by a contour cell.
[0036]
In this connection point search, a connection point is searched for in each case based on the relative positional relationship between a pair of adjacent contour cells in accordance with a predetermined arrangement. In other words, since the contour cells are extracted under eight adjacent conditions, there are three ways of arranging a pair of adjacent contour cells, up, down, left, and right, and diagonal, and the search according to the positional relationship is made after determining the positional relationship between the search target cells. Search according to the method.
[0037]
First, as shown in FIG. 11, when a pair of adjacent contour cells are arranged in the vertical direction, the boundary line AB between the pair of contour cells A and B is searched. At this time, the search is performed toward the inside of the region closed by the contour cell, and the search is started from the outermost point P of the boundary line AB. If the connection point cannot be extracted, the search is performed on the boundary lines AC and BD on the boundary lines with the non-contour cells C and D that are in contact with the contour cells A and B and are located inside the closed region of the contour cells. If no connection point is found, the point P is set as a connection point.
[0038]
When a connection point is found on the boundary line AC / BD with the non-contour cell C / D, the search range is expanded to the inner non-contour cell C / D. There are various modes in the passing state, and here, as shown in FIGS. 11B and 11C, a total of four non-contour cells C, D, E, and F arranged inside the contour cells A and B, respectively. If the outline passes through other non-contour cells, the point P is set as a connection point. Here, the upper limit is 5 for the number of connection points applied to the non-contour cell. When a pair of adjacent contour cells are arranged in the left-right direction, the same procedure as described above can be performed by replacing the positional relationship of the cells with the left and right.
[0039]
On the other hand, as shown in FIG. 12, when a pair of adjacent contour cells A and B are arranged in an oblique direction, the non-contact region that is in contact with both of the pair of contour cells A and B and is located inside the closed region by the contour cell. The boundary line with the contour cell C is searched. At this time, the search is started from the intersection P of the pair of contour cells A and B. If the connection point cannot be extracted here, as shown in FIGS. 12B and 12C, it is in contact with only one of the pair of contour cells A and B and is located inside the closed region by the contour cell. Search on boundary lines AD and BE with non-contour cells D and E. In this case, the search object is limited to the non-contour cell F and the non-contour cell G that touch both of the non-contour cells C and D, and the number of connection points related to the non-contour cell is limited to four. And
[0040]
Next, the outline extraction procedure for connecting the connecting points will be described. Here, as shown in FIG. 13, the nearest connection point according to a predetermined arrangement from the connection point (start connection point) S that is the starting point of the search is set as a target point (target connection point) E, and this target connection point. A point satisfying a predetermined condition is sequentially extracted from the starting connection point S toward E, and set as a contour point constituting the contour line. At this time, the edge intensity for each pixel is compared with a threshold value, and a pixel having an edge intensity exceeding a predetermined threshold value is set as a contour point. This contour point search process is performed by the contour point search unit 8 shown in FIG. Here, the contour line is searched to connect a pair of connection points set on the boundary line of one cell, but it is allowed to enter the adjacent cell in the process. In addition, the square frame in the cell shown in a figure shows a point (pixel).
[0041]
In the extraction of the contour line, as shown in FIG. 8, the points outside the closed region by the contour cell are preferentially extracted from the adjacent points around the current point (eight adjacent conditions). Here, the connection points are arranged clockwise according to the arrangement of the contour cells, and according to the arrangement, the front point of the pair of nearest connection points is the start connection point, and the rear point is the target connection point. Continue the search. As a result, the left side in the direction of travel is always located outside the closed area of the contour cell, and the first one found by searching for neighboring points around the current point in the same clockwise direction as the array of connection points. By using the contour points, the outer points are preferentially extracted from the adjacent points.
[0042]
In the search for the contour line connecting the connection points, the following processing is performed in order to avoid the stray and reliably reach the target connection point.
[0043]
First of all, if the total number of extracted points exceeds the predetermined maximum allowable value, the search is stopped at that stage and all the points extracted so far are rejected in order to avoid unnecessary increase of contour points. Then, as shown in FIG. 14, points on the line segment connecting the connection points S and E are set as contour points. The maximum allowable value of the number of extraction points may be set based on the distance between the connection points, and here the maximum allowable value p max = D × 2, that is, twice the distance between connection points. In the example shown in FIG. 14, since the distance d = 12 (4 neighboring distances) between the connection points S and E, the maximum allowable value p max = 24.
[0044]
Second, in order to avoid stray in the vicinity of the target connection point, the distance from the newly extracted point to the target connection point is equal to or smaller than a predetermined value (minimum distance), that is, the newly extracted point is predetermined. The search is terminated at that stage, and the point on the line segment connecting the last extracted point and the target connection point is set as the contour point. In the example shown in FIG. 15A, since the newly extracted point P falls within the region near the target connection point, the search is stopped here, and the point P and the target connection are connected as shown in FIG. A point on a line segment connecting point E is complemented as a contour point. Here, the minimum distance for stopping the search is 4 (4 neighborhood distance).
[0045]
Third, in order to avoid useless contour point extraction, already extracted points are extracted by overlapping, that is, when a newly extracted point is the same as an already extracted point, the search is performed at that stage. The process is stopped, and points extracted twice after the previous extraction are rejected, and points on the line segment connecting the double extraction points and the target connection points are set as contour points. In the example shown in FIG. 16 (A), since S, A, B, C, D, F, P, G, H, I, and P are extracted in this order, and the point P is extracted in an overlapping manner, FIG. ), The points G, H, I, and P are deleted and replaced with the target connection point E, and the final extraction points are sequentially S, A, B, C, D, F, P, and E, and double A point on the line segment connecting the extraction point P and the target connection point E is complemented as a contour point. The number of already extracted points to be collated when determining whether or not they have been extracted twice is set based on the distance between connection points.
[0046]
Fourth, in order to avoid moving far away from the target connection point, when the number of continuous retreats to the target connection point reaches a predetermined value (reverse limit number), the search is stopped at that stage, All the points extracted after the starting point are rejected, and the points on the line segment connecting the points extracted immediately before starting the retraction and the target connection points are set as contour points. In the example shown in FIG. 17 (A), if the limit number of retreats is the distance d = 12 between the connection points S and E, since the retreat is continued 12 times from the point 12 to the point 23, the search is performed here. As shown in FIG. 17B, the points 12 to 23 starting to move backward are deleted and replaced with the target connection point E, and the final extracted points are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, E, and the points on the line segment connecting the point 11 extracted immediately before starting the retraction and the target connection point E are complemented as contour points. In FIG. 17, the retracted points are shown with an underline. Although the points are retracted once at points 4 and 7, the search is not stopped because the limit of the number of retreats has not been reached.
[0047]
Fifth, in order to avoid interruption of the contour point search process, when the next point cannot be extracted, a point closest to the target connection point is extracted from the neighboring points around the current point. And In the example shown in FIG. 18, there is no point A to G that is the next candidate for the point 6 that satisfies the contour point condition, and therefore the point that is closest to the target connection point E among the points A to G that are candidates. Select C. Here, after the point C is extracted, points that satisfy the contour point condition are sequentially extracted, and the final extracted points are S, 1, 2, 3, 4, 5, 6, C, 7, 8, 9, 10 in order. , 11, E.
[0048]
Furthermore, the following special processing is performed as necessary in order to avoid large deviation from the actual contour line.
[0049]
First of all, in order to avoid the bending of the contour line at a steep angle, when searching for the contour point sequentially, among the eight adjacent points around the current point, the point immediately before and the point that touches the top, bottom, left and right, That is, the next point is extracted from the remaining points excluding the point that contacts the previous point under the four adjacent conditions. In the example shown in FIG. 19, among the 8 adjacent points around the current point, the point extracted immediately before and the points 1 and 7 on both sides thereof are excluded from the extraction target, and the contour is selected from the remaining points 2 to 6. Extract points. Thereby, the bend angle of the contour line can be suppressed to 90 degrees or less.
[0050]
Secondly, in order to avoid a drop into the break, a search is made simultaneously with the adjacent points for the points aligned in the direction of each adjacent point with the current point as the center, that is, the points aligned in the direction with each adjacent point; Whether or not a predetermined condition is satisfied, and if any of them satisfies the condition, these points are collectively set as a contour point. In the example shown in FIG. 20, among the 8 adjacent points around the current point, points 1 to 7 excluding the point extracted immediately before are candidates, and each of these adjacent points 1 to 7 is arranged in that direction. Judgment is made with a total of three points including the two points. For example, the determination is performed by combining the adjacent point 1 and the two points 1 ′ · 1 ″ arranged in the direction. By this, there is a point that does not satisfy the condition, so that it is possible to avoid folding in the wrong direction.
[0051]
In order to perform the avoiding process of the sharp bend and the drop into the cut at the same time, as shown in FIG. 21, among the 8 adjacent points around the current point, the point extracted immediately before and the points on both sides thereof 1 and 7 are excluded from the extraction target, and each of the remaining points 2 to 6 and a point aligned in the direction are simultaneously determined to extract a contour point.
[0052]
22 and 23 show an example in which the positional relationship between the current point and the previous point is different from the above example. In FIG. 22, the previous point and the adjacent points among the eight neighboring points around the current point are shown in FIG. The next point is extracted from the remaining points 2 to 6 excluding the points 1 and 7 in contact with the top, bottom, left and right. In FIG. 23, in addition to the conditions shown in FIG. 22, a point aligned in the direction of each adjacent point 2-6 around the current point is searched simultaneously with the adjacent point to extract the next point.
[0053]
Below, the procedure of the whole outline extraction process is demonstrated according to the flow shown in FIG. First, after the processed image data is sent from the image input unit 1 shown in FIG. 1 to the target image memory 12a of the image memory 12, if the processed image is a color image in step 101, the edge shown in FIG. The intensity detection data creation unit 2 converts the image into a monochrome grayscale image (for example, 256 gradations) based on the luminance level. If the image is noisy at step 102, smoothing processing is performed. The processed image data obtained in this way is stored in the edge strength detection memory 12b shown in FIG.
[0054]
Next, at step 103, the edge strength for every pixel is obtained using the image data to be processed in the edge strength detection memory 12b shown in FIG. 1, and stored in the edge strength memory 12c shown in FIG. . In calculating the edge strength, template type filter processing may be performed. For this purpose, a local operator, for example, a 3 × 3 pixel Prewitt operator can be used to determine not only the edge strength but also the edge direction from the level difference between adjacent pixels.
[0055]
In the next step 104, the edge strength threshold setting unit 3 shown in FIG. 1 sets an edge strength threshold suitable for the image to be processed. In setting the edge strength threshold, a histogram is created from the edge strength data of all pixels, and the cumulative value of the frequencies obtained by adding the frequencies in order from the maximum edge strength is a predetermined ratio to the total number of pixels. The edge strength when reaching the threshold value is set as a threshold value. Here, the ratio with respect to the total number of pixels serving as a determination criterion is, for example, 8.65% when the smoothing process is performed and 9.40% when the smoothing process is not performed.
[0056]
Next, in step 105, the image to be processed is divided into a grid pattern by the edge cell extraction unit 4 shown in FIG. 1, and is divided into edge cells and non-edge cells depending on whether or not pixels having edge strength exceeding a threshold value are included in step 106. To do. In step 107, the continuous area creation unit 5 shown in FIG. 1 performs labeling in units of cells, and then in step 108, it is determined whether or not the continuous area is unique. After decreasing the number and increasing the cell size, the process returns to step 105.
[0057]
If it is determined in step 108 that the continuous region is unique, in step 110, the contour cell extraction unit 6 shown in FIG. In step 111, the connection point search unit 7 shown in FIG. 1 searches for the connection point, and in step 112, the contour point search unit 8 shown in FIG.
[0058]
Next, a procedure (steps 103 to 109) for creating a continuous region of edge cells shown in FIG. 24 will be described in detail with reference to FIG. First, in step 201, an edge strength threshold de serving as an edge cell criterion is set. In step 202, an array of the number of image divisions dev [i] is set. For example, the arrangement is 48, 36, 24, 18, 12, 8, 6, 4, 3, 2, 1, and the number of divisions is reduced in this order to obtain a single continuous region.
[0059]
Next, in step 203, a loop for creating a continuous area is started on the condition that the cell label number is unique, that is, the continuous area of the edge cell is unique. In step 204, the cell is divided by the division number dev [i]. To do. In step 205, an edge cell determination loop is started under the condition that all cells are completed, and the cells are classified into edge cells and non-edge cells based on the edge strength for each cell. That is, in step 206, it is determined whether or not there is a pixel having an edge strength exceeding the edge strength threshold de in the cell. If there is a corresponding pixel, the cell is set as an edge cell in step 207, and if there is no corresponding pixel, step In 208, the cell is set as a non-edge cell. If all the cells have been completed in step 209, the process exits the edge cell determination loop.
[0060]
In step 210, labeling processing is performed on a cell-by-cell basis. In step 211, consecutive cells are replaced with the same label number, and in step 212, it is determined whether the label number is unique, that is, whether the continuous area is unique. If it is not unique, the process returns to step 204, and the process is repeated with the next smallest number of divisions according to the array of the number of divisions dev [i], and this is repeated until the continuous area becomes unique. finish. As a result, a single continuous area is set in the processed image.
[0061]
Next, the procedure of the special process for face photography (see FIGS. 3 and 5) by the face photograph processing unit 9 shown in FIG. 1 will be described according to the flow shown in FIG. First, in step 301, a loop for searching for the upper left edge cell is started. In step 302, the upper left cell of the image to be processed is set as a start position. Then, in step 303, it is determined whether the cell is an edge cell. In 304, the cell moves to the cell immediately below. If it is the lowest end here, it moves to the uppermost cell of the cell row on the right. If it is determined in step 303 that the cell is an edge cell, the loop is terminated in step 305, and in step 306, all cells arranged immediately below the upper left edge cell are defined as edge cells.
[0062]
Next, in step 307, a loop for searching for the upper right edge cell is started. In step 308, the upper right cell is set as the start position. In step 309, it is determined whether or not the cell is an edge cell. If it is the lowermost end, it moves to the upper end of the left cell row. If it is determined in step 309 that the cell is an edge cell, the loop is terminated in step 311, and in step 312, all cells arranged directly below the upper right edge cell are defined as edge cells. In step 313, all cells between the left and right bottom cells are set as edge cells.
[0063]
Next, the connection point search procedure in the connection point search unit 7 shown in FIG. 1 will be described according to the flow shown in FIG. 27, FIG. 28, and FIG. First, index IDX of a pair of contour cells A and B to be searched in step 401 shown in FIG. A ・ IDX B In step 402, the traveling direction from the contour cell A to the contour cell B is examined. In step 403, it is determined whether dx = 0, that is, whether they are arranged vertically. If dx = 0, the process proceeds to step 404 to perform the up / down connection process. If it is determined in step 403 that dx = 0 is not satisfied, the process proceeds to step 405, where it is determined whether dy = 0, that is, whether they are arranged side by side. I do. If it is determined in step 405 that dy = 0 is not satisfied, the process proceeds to step 407 to perform oblique connection processing.
[0064]
In step 408, the index IDX of the contour cells A and B is displayed. A ・ IDX B , And increment index IDX of contour cell B in step 409. B Is equal to the total number of contour cells NUM, that is, whether contour cell B is out of the array of contour cells. If contour cell B is out of the array, index IDX is determined in step 410. B Is set to 0, and the process returns to step 402, and a connection point search process is performed between the last contour cell (contour cell A) and the first contour cell (contour cell B). If the contour cell B is in the array of contour cells, the index IDX of the contour cell A in step 411 A Is determined to be equal to the total number NUM. If contour cell A is out of the array of contour cells, the process ends. If contour cell A is within the array, the process returns to step 402.
[0065]
In the vertical connection process in step 404 shown in FIG. 27, as shown in FIG. 28, it is first determined in step 501 whether or not a point satisfying the condition as a connection point is on the boundary line AB. If there is a point that satisfies the condition, the point is set as a connection point in step 502 (see FIG. 11A). If there is no corresponding point, the process proceeds to step 503. In step 503, it is determined whether or not a point satisfying the connection point condition is on the boundary line AC / BD. If there is a corresponding point, the process proceeds to step 504, and if there is no corresponding point, extraction is performed in step 509. The point P is regarded as a connection point because it is impossible.
[0066]
In step 504, it is determined whether or not a point satisfying the connection point condition exists on the boundary line CD. If there is a corresponding point, in step 505, each point on the boundary line AC / CD / BD is connected in order. Points (see FIG. 11B). If there is no corresponding point on the boundary line CD, the process proceeds to step 506, where it is determined whether or not a point satisfying the connection point condition is on the boundary line CE / DF. Proceeding to step 507, if there is no corresponding point, in step 509, point P is set as a connection point. In step 507, it is determined whether or not a point satisfying the connection point condition exists on the boundary line EF. If there is a point corresponding to this point, in step 508, each point on the boundary line AC, CE, EF, DF, or BD is displayed. Points are sequentially set as connection points (see FIG. 11C). If there is no corresponding point on the boundary line EF, the point P is set as a connection point in step 509.
[0067]
The procedure of the left / right connection process in step 406 shown in FIG. 27 is performed in the same procedure by replacing the cell positional relationship in the above-described vertical connection process with the left / right.
[0068]
In the oblique connection process in step 407 shown in FIG. 27, as shown in FIG. 29, first, in step 601, it is determined whether there are points on the boundary line AC and BC that satisfy the condition as a connection point. If there is a point corresponding to this point, in step 602, two points on the boundary line AC / BC are sequentially set as connection points (see FIG. 12A). If there is no corresponding point, the process proceeds to step 603, where it is determined whether or not a point that satisfies the connection point condition is on the boundary line AC. If there is a corresponding point, the process proceeds to step 604, and the corresponding point If no, go to step 605.
[0069]
In step 604, it is determined whether or not there are all points on the boundary lines CG, EG, and BE that satisfy the connection point condition. If there are such points, the process proceeds to step 606, where the boundary lines AC, CG, EG, Each point on the BE is set as a connection point in order (see FIG. 12B). If there is no corresponding point, extraction is impossible in step 609, and a point P where the contour cells A and B are in contact with each other is set as a connection point.
[0070]
In step 605, it is determined whether or not a point satisfying the connection point condition is on the boundary line BC. If there is a corresponding point, the process proceeds to step 607. If there is no corresponding point, the point P is connected to the connection point in step 609. And In step 607, it is determined whether or not there are all points on the boundary line AD, DF, CF that satisfy the connection point condition. If there is such a point, in step 608, the boundary line AD, DF, CF, BC is These points are sequentially designated as connection points (see FIG. 12C). If there is no corresponding point, point P is set as a connection point in step 609.
[0071]
Next, the contour point search procedure by the contour point search unit 8 shown in FIG. 1 will be described according to the flow shown in FIGS. First, in step 701 shown in FIG. 30, the start connection point S and the target connection point E are set, and in step 702, the distance d between the connection points S and E is obtained. Then, in step 703, the maximum allowable value p that limits the total number of points to avoid unnecessarily increasing contour points. max And the minimum distance d to the target connection point E, which is a reference for stopping the search by approaching the target connection point E in step 704. min Set. In step 705, the size of the history buffer for temporarily storing the extracted points is set. This history buffer is a target for determining whether or not it has been extracted twice. Here, the maximum allowable value p max X2. In the next step 706, the limit number D of reverse limits for limiting the continuous reverse is set, and the process proceeds to step 707 shown in FIG.
[0072]
In step 707, a contour point search loop is started with the arrival condition of the target connection point E as an exit condition. In step 708, the condition as a contour point among the eight next candidate points, that is, a predetermined edge strength is determined. A point that satisfies the condition exceeding the threshold is searched, and it is determined in step 709 whether there is a point that satisfies the condition. If there is a corresponding point, the process proceeds to step 711. If there is no corresponding point, step 710 is performed. Then, a point closest to the target connection point E is selected from the adjacent points (see FIG. 18).
[0073]
Next, in step 711, it is determined whether or not the extraction point p is the target connection point E. If it is not the target connection point E, the process proceeds to step 712, and if it is the target connection point E, the process proceeds to step 721. The target connection point E is stored in the history buffer, and the loop is terminated at step 722.
[0074]
In step 712, the distance between the extraction point p and the target connection point E is a predetermined value (minimum distance) d. min It is determined whether or not (see FIG. 15), and the minimum distance d min If larger, go to Step 713. Minimum distance d min If it is below, the process proceeds to step 712, where the extracted point p is stored in the history buffer as a contour point, the loop is terminated in step 722, and finally extracted from the start connecting point S to the last extracted point p. A point and a point on a line segment connecting the last extracted point p and the target connection point E are contour points.
[0075]
In step 713, the total number of points extracted so far is the maximum allowable value p. max Whether or not the maximum allowable value p is determined. max If not, the process proceeds to step 714 and the maximum allowable value p is reached. max If it exceeds, the process proceeds to step 715, where all the points extracted so far are rejected, that is, all the points extracted after the start connection point S and stored in the history buffer are deleted. Then, the target connection point E is selected, the target connection point E is stored in the history buffer in step 721, the loop is ended in step 722, and finally on the line segment connecting the start connection point S and the target connection point E. The points become contour points (see FIG. 14).
[0076]
In step 714, it is determined whether or not the extracted point is the same as the already extracted point, that is, whether or not the same as the extracted point is in the one stored in the history buffer (see FIG. 16). If there is no corresponding point, the process proceeds to step 716. If there is a corresponding point, the process proceeds to step 717 to reject all the points extracted after the previous extraction of double extracted points, that is, stored in the history buffer. Delete all the points after the double extraction point from the points. In step 718, the target connection point E is selected. In step 721, the target connection point E is stored in the history buffer. In step 722, the loop is terminated. Finally, the double extraction point is determined from the start connection point S. The points extracted before the previous extraction and the points on the line segment connecting the double extraction point and the target connection point E are contour points.
[0077]
In step 716, it is determined whether or not the vehicle has moved backward, that is, whether or not the distance between the extracted point and the target connection point E has increased (see FIG. 17). If not, the extracted point p is stored in the history buffer as a contour point, and the process returns to step 708 to search for the next contour point.
[0078]
In step 719, it is determined whether or not the number of continuous backward movements has reached a predetermined value (reverse limit number). If the reverse limit number has been reached, the process proceeds to step 720 and extracted after the point where the reverse movement is started. In step 721, all the points extracted after the backward start point are deleted from the points stored in the history buffer, and the target connection point E is selected in step 718. The target connection point E is stored in the history buffer, and the loop is terminated in step 722. Finally, the points extracted from the start connection point S to the point immediately before starting the reverse, and the point immediately before starting the reverse, A point on a line segment connecting the target connection point E is a contour point. If it is determined in step 719 that the number of continuous retreats has not reached the retreat limit number, the extracted point p is stored as a contour point in the history buffer, and then the process returns to step 708 to search for the next contour point.
[0079]
【The invention's effect】
As described above, according to the present invention, it is possible to extract an appropriate contour line by performing a process suitable for extracting the contour line representing the boundary between the main object and the background, and to improve the efficiency of the processing operation. The processing time can be shortened by reducing the burden.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of an outline extraction processing apparatus to which the present invention is applied.
FIG. 2A is a schematic diagram showing a contour extraction result according to the present invention.
(B) Schematic diagram showing the contour extraction situation according to the present invention
FIG. 3 is a schematic diagram showing an edge cell extraction situation according to the present invention.
FIG. 4 is a schematic diagram showing another example of edge cell extraction status according to the present invention.
FIGS. 5A and 5B are schematic views showing another example of the processing state for a face photograph according to the present invention.
FIGS. 6A and 6B are schematic diagrams showing the contour cell extraction status according to the present invention.
FIGS. 7A and 7B are schematic diagrams showing a contour cell extraction situation according to the present invention.
FIG. 8 is a schematic diagram illustrating the search order of contour points and contour cells according to the present invention.
FIG. 9 is a schematic diagram showing a connection point search situation according to the present invention.
FIG. 10 is a schematic diagram showing another example of a connection point search situation according to the present invention.
FIGS. 11A to 11C are schematic diagrams showing connection point search situations according to the present invention.
FIGS. 12A to 12C are schematic diagrams showing connection point search situations according to the present invention.
FIG. 13 is a schematic diagram showing a contour point search situation according to the present invention.
FIG. 14 is a schematic diagram illustrating a contour point searching method according to the present invention.
FIGS. 15A and 15B are schematic diagrams for explaining a contour point searching method according to the present invention.
FIGS. 16A and 16B are schematic diagrams for explaining a contour point searching method according to the present invention.
FIGS. 17A and 17B are schematic diagrams for explaining a contour point searching method according to the present invention.
FIG. 18 is a schematic diagram illustrating a contour point searching method according to the present invention.
FIG. 19 is a schematic diagram illustrating a contour point searching method according to the present invention.
FIG. 20 is a schematic diagram for explaining a contour point searching method according to the present invention.
FIG. 21 is a schematic diagram for explaining a contour point searching method according to the present invention.
FIG. 22 is a schematic diagram illustrating a contour point searching method according to the present invention.
FIG. 23 is a schematic diagram for explaining a contour point searching method according to the present invention.
FIG. 24 is a flowchart showing the entire outline extraction process according to the present invention.
FIG. 25 is a flowchart of continuous area creation processing according to the present invention.
FIG. 26 is a flowchart of special processing for facial photographs according to the present invention.
FIG. 27 is a flowchart of connection point search processing according to the present invention.
FIG. 28 is a flowchart of upper and lower connection processing in connection point search according to the present invention.
FIG. 29 is a flowchart of oblique connection processing in connection point search according to the present invention.
FIG. 30 is a flowchart showing a part of contour point search processing according to the present invention.
FIG. 31 is a flowchart showing the remainder of contour point search processing according to the present invention.
[Explanation of symbols]
1 Image input section
2 Edge strength detection data generator
3 Edge strength threshold setting part
4 Edge cell extraction unit
5 Continuous area creation part
6 Contour cell extraction unit
7 Connection point search unit
8 Contour point search unit
9 Face photo processing section
10 Extracted contour line output section
11 Extracted contour editing section
12 Image memory
12a Memory for target image, 12b Memory for edge strength detection, Memory for 12c edge strength
13 Operation memory
14 Controller

Claims (15)

被処理画像内の主要対象物とその背景との境界を表す輪郭線を抽出する輪郭線抽出処理方法であって、
前記被処理画像を格子状に分割し、これにより得られた複数のセルの中から、所定の閾値を超えるエッジ強度を有する画素を含むセルをエッジセルとして抽出して、該エッジセルが互いに連続した状態で集合した連続領域を作成し、前記連続領域が前記主要対象物の画像域において複数作成される場合に、前記被処理画像の前記セルへの分割数を少なくすることによって前記連続領域を1つとし、該連続領域の外周に位置するセルを輪郭セルとして抽出し、前記輪郭セル及びその近傍の非輪郭セルにかかる境界線上において前記輪郭線の通過点となる接続点を探索した上で、該接続点を相互に結ぶように前記輪郭線を抽出することを特徴とする輪郭線抽出処理方法。
A contour line extraction processing method for extracting a contour line representing a boundary between a main object in a processed image and its background,
A state in which the processing target image is divided into a lattice shape, and a cell including pixels having edge strength exceeding a predetermined threshold is extracted as an edge cell from the plurality of cells obtained thereby, and the edge cells are continuous with each other. When a plurality of continuous areas are created in the image area of the main object, the continuous area is reduced to one by reducing the number of divisions of the processed image into the cells. Then, a cell located on the outer periphery of the continuous region is extracted as a contour cell, and after searching for a connection point that is a passing point of the contour line on a boundary line of the contour cell and its neighboring non-contour cell, A contour line extraction processing method , wherein the contour line is extracted so as to connect connection points to each other .
前記エッジセルの連続領域を作成するにあたり、前記被処理画像が人物の顔写真である場合には、左上端及び右上端の各エッジセルの真下に並ぶセル、並びにその中の最も下に位置する左右の下端セルの間のセルを全てエッジセルとして前記連続領域を作成することを特徴とする請求項1に記載の輪郭線抽出処理方法。In creating the continuous region of the edge cells, if the image to be processed is a human face photo, the cells lined directly under the edge cells at the upper left corner and the upper right corner, and the left and right leftmost cells among them. The contour line extraction processing method according to claim 1 , wherein the continuous region is created by setting all cells between the lower end cells as edge cells. 前記接続点を探索するにあたり、前記輪郭セル並びにこの輪郭セルにより閉じられた領域内の非輪郭セルを探索対象とし、当該セルの境界線上を前記輪郭セルによる閉領域の内側に向けて探索することを特徴とする請求項1に記載の輪郭線抽出処理方法。When searching for the connection point, search for the contour cell and the non-contour cell in the region closed by the contour cell, and search the boundary line of the cell toward the inside of the closed region by the contour cell. The contour line extraction processing method according to claim 1 . 前記接続点を探索するにあたり、所定の配列にしたがって隣り合う一対の輪郭セルの相対的な位置関係に基づいて場合分けして前記接続点を探索することを特徴とする請求項1に記載の輪郭線抽出処理方法。2. The contour according to claim 1 , wherein when searching for the connection point, the connection point is searched in a case-by-case manner based on a relative positional relationship between a pair of adjacent contour cells according to a predetermined arrangement. Line extraction processing method. 前記隣り合う一対の輪郭セルが上下及び左右のいずれかの方向に並ぶ場合、当該一対の輪郭セル相互の境界線上を探索し、これで接続点を抽出不能な場合は、前記一対の輪郭セルにそれぞれ接する非輪郭セルとの境界線上を探索することを特徴とする請求項4に記載の輪郭線抽出処理方法。When the adjacent pair of contour cells are arranged in either the top and bottom or left and right directions, search for the boundary line between the pair of contour cells, and if it is impossible to extract the connection point, the pair of contour cells 5. The contour line extraction processing method according to claim 4 , wherein a search is performed on a boundary line with each non-contour cell in contact therewith. 前記隣り合う一対の輪郭セルが斜め方向に並ぶ場合、当該一対の輪郭セルの双方に接する非輪郭セルとの境界線上を探索し、これで接続点を抽出不能な場合は、前記一対の輪郭セルのいずれか一方にのみ接する非輪郭セルとの境界線上を探索することを特徴とする請求項4に記載の輪郭線抽出処理方法。When the pair of adjacent contour cells are arranged in an oblique direction, a search is performed on a boundary line with a non-contour cell that is in contact with both of the pair of contour cells. 5. The contour line extraction processing method according to claim 4 , wherein a search is made on a boundary line with a non-contour cell that contacts only one of the two. 前記輪郭線を抽出するにあたり、開始点となる前記接続点から所定の配列にしたがった直近の接続点を目標点として、前記輪郭線を構成する輪郭点を順次探索することを特徴とする請求項1に記載の輪郭線抽出処理方法。 Claims Upon extracting the contour line, as the target point nearest connection point from the connection point as a starting point in accordance with a predetermined sequence, characterized by sequentially searching for a contour points constituting the contour line 1. A contour line extraction processing method according to 1. 前記開始点から目標点に向けて前記輪郭点を順次探索するにあたり、
抽出された点の総数が所定の値を越えると、その段階で探索を中止し、それまでに抽出された点を全て棄却して、前記開始点と目標点とを結ぶ線分上の点を前記輪郭点とすることを特徴とする請求項7に記載の輪郭線抽出処理方法。
In sequentially searching the contour points from the start point to the target point,
When the total number of extracted points exceeds a predetermined value, the search is stopped at that stage, all the points extracted so far are rejected, and points on the line segment connecting the start point and the target point are determined. The contour line extraction processing method according to claim 7 , wherein the contour point is the contour point.
前記開始点から目標点に向けて前記輪郭点を順次探索するにあたり、
新たに抽出された点から前記目標点までの距離が所定の値以下になると、その段階で探索を終了し、最後に抽出された点と前記目標点とを結ぶ線分上の点を前記輪郭点とすることを特徴とする請求項7に記載の輪郭線抽出処理方法。
In sequentially searching the contour points from the start point to the target point,
When the distance from the newly extracted point to the target point is less than or equal to a predetermined value, the search is terminated at that stage, and the point on the line segment connecting the last extracted point and the target point is the contour. The contour line extraction processing method according to claim 7 , wherein the contour line extraction processing method is a point.
前記開始点から目標点に向けて前記輪郭点を順次探索するにあたり、
既に抽出された点を重ねて抽出すると、その段階で探索を中止し、該二重に抽出された点を前回抽出してから後に抽出された点を全て棄却して、前記二重に抽出された点と前記目標点とを結ぶ線分上の点を前記輪郭点とすることを特徴とする請求項7に記載の輪郭線抽出処理方法。
In sequentially searching the contour points from the start point to the target point,
If already extracted points are extracted and extracted, the search is stopped at that stage, all the points extracted after the previous extraction of the double extracted points are rejected and the double extracted. The contour line extraction processing method according to claim 7 , wherein a point on a line segment connecting the point and the target point is set as the contour point.
前記開始点から目標点に向けて前記輪郭点を順次探索するにあたり、
前記目標点に対して連続して後退した回数が所定の値に達すると、その段階で探索を中止し、後退を開始した点以降に抽出された点を全て棄却して、後退を開始する直前に抽出された点と前記目標点とを結ぶ線分上の点を前記輪郭点とすることを特徴とする請求項7に記載の輪郭線抽出処理方法。
In sequentially searching the contour points from the start point to the target point,
When the number of consecutive backward movements with respect to the target point reaches a predetermined value, the search is stopped at that stage, all points extracted after the point where the backward movement is started are rejected, and immediately before the backward movement is started. The contour line extraction processing method according to claim 7 , wherein a point on a line segment connecting the point extracted to the target point and the target point is set as the contour point.
前記開始点から目標点に向けて前記輪郭点を順次抽出するにあたり、
次の点の抽出が不能な場合、現在の点の周囲の隣接点のうち、前記目標点に最も近い点を前記輪郭点とすることを特徴とする請求項7に記載の輪郭線抽出処理方法。
In sequentially extracting the contour points from the start point toward the target point,
8. The contour line extraction processing method according to claim 7 , wherein when the next point cannot be extracted, a point closest to the target point among neighboring points around the current point is set as the contour point. .
前記輪郭点を順次探索するにあたり、現在の点の周囲の8隣接点のうち、直前の点とこれに接する両側の点とを除外した残りの点の中から次の点を抽出することを特徴とする請求項7に記載の輪郭線抽出処理方法。 In order to sequentially search for the contour point , the next point is extracted from the remaining points excluding the immediately preceding point and the points on both sides in contact with the adjacent points around the current point. The contour line extraction processing method according to claim 7 . 前記輪郭点を順次探索するにあたり、現在の点を中心にして各隣接点の方向に並んだ点を当該隣接点と同時に探索して次の点を抽出することを特徴とする請求項7に記載の輪郭線抽出処理方法。Upon sequentially searches the contour points, the points arranged in the center in the direction of each adjacent point the current point to search concurrently with said adjacent points claim 7, characterized in that to extract the following: contour extraction method. 被処理画像内の主要対象物とその背景との境界を表す輪郭線を抽出する輪郭線抽出処理装置であって、
前記被処理画像を格子状に分割して得られた複数のセルの中から、所定の閾値を超えるエッジ強度を有する画素を含むセルをエッジセルとして抽出するエッジセル抽出部と、
前記エッジセルが互いに連続した状態で集合した連続領域を作成し、前記連続領域が前記主要対象物の画像域において唯一か否かを判定して、唯一でない場合には前記被処理画像の前記セルへの分割数を少なくすることによって前記連続領域を1つに統合する連続領域作成部と、
前記連続領域の外周に位置するセルを輪郭セルとして抽出する輪郭セル抽出部と、
前記輪郭セル及びその近傍の非輪郭セルにかかる境界線上において前記輪郭線の通過点となる接続点を探索する接続点探索部と、
前記接続点を相互に結ぶように前記輪郭線を構成する輪郭点を順次探索する輪郭点探索部とを有することを特徴とする輪郭線抽出処理装置。
A contour line extraction processing device for extracting a contour line representing a boundary between a main object in a processed image and its background,
An edge cell extraction unit that extracts a cell including a pixel having an edge intensity exceeding a predetermined threshold as an edge cell from a plurality of cells obtained by dividing the image to be processed in a grid pattern;
Create a continuous region in which the edge cells are continuous with each other, determine whether the continuous region is unique in the image area of the main object, and if not, go to the cell of the processed image A continuous region creating unit that integrates the continuous regions into one by reducing the number of divisions of
A contour cell extraction unit that extracts cells located on the outer periphery of the continuous region as contour cells;
A connection point search unit for searching for a connection point that is a passing point of the contour line on a boundary line of the contour cell and the non-contour cell in the vicinity thereof;
An outline extraction processing apparatus comprising: an outline point search unit that sequentially searches for outline points constituting the outline so as to connect the connection points to each other.
JP2001031133A 2001-02-07 2001-02-07 Image outline extraction processing method and outline extraction processing apparatus Expired - Fee Related JP4624487B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001031133A JP4624487B2 (en) 2001-02-07 2001-02-07 Image outline extraction processing method and outline extraction processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001031133A JP4624487B2 (en) 2001-02-07 2001-02-07 Image outline extraction processing method and outline extraction processing apparatus

Publications (2)

Publication Number Publication Date
JP2002236929A JP2002236929A (en) 2002-08-23
JP4624487B2 true JP4624487B2 (en) 2011-02-02

Family

ID=18895262

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001031133A Expired - Fee Related JP4624487B2 (en) 2001-02-07 2001-02-07 Image outline extraction processing method and outline extraction processing apparatus

Country Status (1)

Country Link
JP (1) JP4624487B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4712659B2 (en) 2006-09-22 2011-06-29 富士フイルム株式会社 Image evaluation apparatus and program thereof
WO2010021527A2 (en) 2008-08-22 2010-02-25 Jung Tae Woo System and method for indexing object in image
JP6590653B2 (en) * 2014-11-19 2019-10-16 首都高技術株式会社 Point cloud data utilization system
KR102858214B1 (en) 2022-05-02 2025-09-11 서울대학교산학협력단 Device and Method for detecting object in video

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0254267A (en) * 1988-08-19 1990-02-23 Dainippon Printing Co Ltd automatic clipping system
JPH04299473A (en) * 1991-03-27 1992-10-22 Nec Corp Method and device for contour information extraction
JPH06195461A (en) * 1992-12-25 1994-07-15 Sony Corp Image processor

Also Published As

Publication number Publication date
JP2002236929A (en) 2002-08-23

Similar Documents

Publication Publication Date Title
CN106326854B (en) A kind of format document paragraph recognition methods
CN109934110B (en) Method for identifying illegal buildings near river channel
CN111260675B (en) High-precision extraction method and system for image real boundary
US20070003154A1 (en) Video object cut and paste
US20160012312A1 (en) Image processing method, image processing apparatus, program, and recording medium
WO2020107326A1 (en) Lane line detection method, device and computer readale storage medium
CN106056648A (en) Intelligent robot image drawing method and system
KR20150024719A (en) Method and appratus for segmenting an object in an image
CN111161288A (en) Image processing method and device
CN105069766A (en) Inscription restoration method based on contour feature description of Chinese character image
CN115861609B (en) Remote sensing image segmentation and annotation methods, electronic devices and storage media
US9454831B2 (en) Information processing device, information processing method, and computer-readable recording medium to prscribe an area in an image
CN107678551A (en) Gesture identification method and device, electronic equipment
JP4624487B2 (en) Image outline extraction processing method and outline extraction processing apparatus
CN117745719B (en) A method for extracting robot weld milling trajectory
KR100267262B1 (en) Method for extracting fingerprint features
CN117611839B (en) Method for calculating convex hull based on sub-quadrilateral structure in image processing
CN113158950B (en) Automatic segmentation method for overlapped chromosomes
JP4584567B2 (en) Feature edge extraction method
CN112085726A (en) Cladding identification method, device and system and computer readable storage medium
JP2000048212A (en) Image processing method and apparatus, recording medium
RU2470368C2 (en) Image processing method
JP2007156741A (en) Character extraction method, character extraction device, and program
CN118072048A (en) Template image matching method, device, computer equipment, storage medium and product
CN114387292A (en) Image edge pixel optimization method, device and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100708

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100713

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100908

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101103

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131112

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees