JP2004362381A - Image processor and image processing method - Google Patents

Image processor and image processing method Download PDF

Info

Publication number
JP2004362381A
JP2004362381A JP2003161622A JP2003161622A JP2004362381A JP 2004362381 A JP2004362381 A JP 2004362381A JP 2003161622 A JP2003161622 A JP 2003161622A JP 2003161622 A JP2003161622 A JP 2003161622A JP 2004362381 A JP2004362381 A JP 2004362381A
Authority
JP
Japan
Prior art keywords
color
similarity
histogram
image
region
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.)
Pending
Application number
JP2003161622A
Other languages
Japanese (ja)
Inventor
Hiromasa Tanaka
宏征 田中
Masaomi Nakajima
正臣 中嶋
Kutics Andrea
クティチ アンドレア
Akihiko Nakagawa
明彦 中川
Kiyotaka Tanaka
清隆 田中
Minoru Yamada
実 山田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JAPAN SYSTEMS CO Ltd
NTT Data Group Corp
Original Assignee
JAPAN SYSTEMS CO Ltd
NTT Data Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by JAPAN SYSTEMS CO Ltd, NTT Data Corp filed Critical JAPAN SYSTEMS CO Ltd
Priority to JP2003161622A priority Critical patent/JP2004362381A/en
Publication of JP2004362381A publication Critical patent/JP2004362381A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing method for performing efficient image comparison. <P>SOLUTION: The roughness of image data to be processed in the vicinity of each pixel is found and whether the roughness is a prescribed threshold or more is evaluated. When the evaluated roughness is the prescribed threshold or more, a texture gradient is found, or when the evaluated roughness is less than the prescribed threshold, a color gradient is found. Then a diffusion parameter is determined on the basis of the found texture gradient or color gradient and a diffusion processing rate is controlled by the diffusion parameter to remove the texture by diffusing pixels while storing a boundary on a rough part. Then a characteristic object area is extracted by applying the enlargement and merging of processing areas. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
この発明は、画像処理技術に関するものであって、特に、画像成分から所定領域を抽出する技術として好適なものに関する。
【0002】
【従来の技術】
従来から画像成分からオブジェクト領域などの所定の領域を抽出する画像処理の技術が数多く提案されている。その一例として、例えば、画像を色情報に基づいて複数の領域に分割する工程と、分割された複数の領域をその隣接関係に基づいて統合する工程と、画像に関する所定の分類情報に基づいて画像の背景情報を生成する工程と、背景情報に基づいて統合された領域から背景領域を検出する工程と、統合領域から背景領域を除去することによってオブジェクトを抽出する工程を有し、抽出されたオブジェクトから輪郭情報を抽出する技術が知られている(参考文献1)。
【0003】
【特許文献1】
特開2002−117409号公報
【0004】
【発明が解決しようとする課題】
しかしながら、従来画像からオブジェクトなどの所定領域を抽出する場合、多くは画像の明るさに基づいてオブジェクト領域を抽出していた。そのため、画像における明るさの違いにより、異なる領域同士であっても区分が出来ず同一領域と判断してしまうという問題があった。具体的には、画像に影がかかった場合には、この影により異なる領域と認識してしまったり、また画像が明る過ぎる場合には領域の輪郭がとんでしまったり、画像が暗過ぎる場合は領域の輪郭が潰れてしまうといった問題があった。このようなことから、オブジェクトの輪郭部分がかすれたものとなったり、また、輪郭が歪んだものとなったりする問題があった。
【0005】
本発明は、上記事情に鑑みてなされたものであり、画像成分の領域境界を正確に抽出することができる画像処理方法を提供することを目的とする。
【0006】
【課題を解決するための手段】
本発明は、上記目的を達成するため、本発明の第1の観点にかかる画像処理装置は、所定のオブジェクトを含む画像中の所定領域及びその近傍領域を抽出する領域抽出手段と、抽出された各領域のテクスチャ特徴から画素におけるエッジのアングルを検出するアングル検出手段と、上記各領域ごとのアングルヒストグラムを生成する第1のヒストグラム生成手段と、アングルヒストグラムの差分に応じたヒストグラムの類似度を記憶する類似度記憶手段と、上記類似度記憶手段を参照して、生成された各領域のヒストグラムの差分から各領域間のアングルの類似度を算出する第1の類似度算出手段と、上記抽出された所定領域及びその近傍領域の色を検出する色検出手段と、予め所定数に分けられた色の区分に基づいて上記検出された各領域の色ヒストグラムを作成する第2のヒストグラム作成手段と、上記第2のヒストグラム作成手段により作成した各領域の色ヒストグラムの差分から各領域間の色の類似度を算出する第2の類似度算出手段と、上記第1及び第2の類似度算出手段により算出された類似度を加算して、上記各領域の類似度を算出する第3の類似度算出手段と、上記算出された各領域の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する拡散処理パラメータ算出手段と、算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する拡散処理手段とを有することを特徴とする。
【0007】
上記色検出手段は、各領域中の各画素の色をHSV色空間に基づいて検出し、上記第2のヒストグラム作成手段は、HSV色空間により検出された各画素の色に基づいて、上記各領域中の色ヒストグラムを作成し、上記第2の類似度算出手段は、上記作成した各領域の色ヒストグラムの差分から各領域の色類似度を算出するようにしてもよい。
【0008】
また、上記画像中の処理対象領域内のきめの粗さ(texturedness)を検出するきめ検出手段と、検出したきめの粗さが予め定められている閾値以上か否か判別することによりきめの粗さを判別するきめ粗さ判別手段とを更に有し、上記きめの粗さが閾値以上にきめが粗くないと判別された場合に上記画像中の処理対象領域内について上記各手段が処理を実行するようにしてもよい。
【0009】
本発明の第2の観点にかかる画像処理装置は、画像中の所定の画素及びその近傍の画素の色を検出する色検出手段と、検出した各画素の色の色相、彩度、明度の各パラメータの差分を算出することにより、各画素の類似度を算出する第4の類似度算出手段と、上記算出された各画素の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する拡散処理パラメータ算出手段と、算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する拡散処理手段とを有することを特徴とする。
【0010】
また、上記画像中の処理対象領域内のきめの粗さを検出するきめ検出手段と、検出したきめの粗さが予め定められている閾値以上か否か判別することによりきめの粗さを判別するきめ粗さ判別手段とを更に有し、上記きめの粗さが所定の閾値よりもきめが粗いと判別された場合に、上記画像中の処理対象領域内について上記各手段が処理を実行するようにしてもよい。
【0011】
また、上記抽出した領域境界に基づいて画像中のオブジェクトを抽出するオブジェクト抽出手段を更に有するようにしてもよい。
【0012】
本発明にかかる第1の観点にかかる画像処理方法は、画像中のテクスチャ特徴から画素におけるエッジのアングルのヒストグラムの差分に応じたヒストグラムの類似度を記憶する類似度記憶手段を有するコンピュータにより実行される方法であって、コンピュータが、所定のオブジェクトを含む画像中の所定領域及びその近傍領域を抽出する処理と、抽出された各領域のテクスチャ特徴から画素におけるエッジのアングルを検出する処理と、上記各領域ごとのアングルヒストグラムを生成する処理と、上記類似度記憶手段を参照して、生成された各領域のヒストグラムの差分から各領域間のアングルの類似度を算出する処理と、上記画像中の所定領域及びその近傍領域の色を検出する処理と、予め所定数に分けられた色の区分に基づいて上記検出された各領域の色ヒストグラムを作成する処理と、上記作成された各領域の色ヒストグラムの差分から各領域間の色の類似度を算出する処理と、上記アングルヒストグラムの類似度と色ヒストグラム類似度を加算して、上記各領域の類似度を算出する処理と、上記算出された各領域の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する処理と、算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する処理とを有することを特徴とする。
【0013】
また、コンピュータが、画像中の所定の画素及びその近傍の画素の色を検出する処理と、検出した各画素の色の色相、彩度、明度の各パラメータの差分を算出することにより各画素の類似度を算出する処理と、上記算出された各画素の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する処理と、算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する処理とを行うようにしてもよい。
【0014】
また、画像中のテクスチャ特徴から画素におけるエッジのアングルのヒストグラムの差分に応じたヒストグラムの類似度を記憶する類似度記憶手段を有するコンピュータにより実行される方法であって、コンピュータが、画像中の処理対象領域内についてきめの粗さを検出する処理と、検出したきめの粗さが予め定められた閾値以上か否か判別することによりきめの粗さを判別する処理と、上記きめ粗さ判別手段によりきめが粗くないと判別された場合に、所定のオブジェクトを含む画像中の所定領域及びその近傍領域を抽出する処理と、抽出された各領域のテクスチャ特徴から画素におけるエッジのアングルを検出する処理と、上記各領域ごとのアングルヒストグラムを生成する処理と、上記類似度記憶手段を参照して、生成された各領域のヒストグラムの差分から各領域間のアングルの類似度を算出する処理と、上記画像中の所定領域及びその近傍領域の色を検出する処理と、予め所定数に分けられた色の区分に基づいて上記検出された各領域の色ヒストグラムを作成する処理と、上記作成された各領域の色ヒストグラムの差分から各領域間の色の類似度を算出する処理と、上記アングルヒストグラムの類似度と色ヒストグラム類似度を加算して、上記各領域の類似度を算出する処理と、上記算出された各領域の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する処理と、算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する処理とを行い、上記きめ粗さ判別手段によりきめが粗いと判別された場合に、画像中の処理対象領域内にある所定の画素及びその近傍の画素の色をHSV色空間に基づいて検出する処理と、検出した各画素のHSV空間に基づく色の色相、彩度、明度の各パラメータの差分を算出することにより各画素の類似度を算出する処理と、上記算出された各画素の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する処理と、算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する処理とを行うようにしてもよい。
【0015】
また、上記画像処理方法の各処理をコンピュータに実行させるためのコンピュータプログラムとしてもよい。
【0016】
【発明の実施の形態】
以下、本発明の一実施の形態について図面を参照して説明する。
図1は、本発明にかかる画像処理装置を適用した画像処理装置の一実施形態を示した図である。
図1において、本発明の画像処理装置1は、コンピュータにより構成されており、CPU(Central Processing Unit)と、CPUが実行するコンピュータプログラムと、コンピュータプログラムやその他のデータを記憶することができるRAM、ROMなどの内部メモリ及びハードディスクドライブなどの外部記憶装置により図1に示した機能ブロックを構成することができる。
図1に示した機能ブロックは、画像データベース(DB)2、アングルヒストグラム類似度テーブル3、画像データ入力部11、きめ検出部12、粗さ判定部13、領域抽出部14、アングル検出部15、アングルヒストグラム作成部16、アングル差検出部17、色変換部18、色ヒストグラム作成部19、色検出部20、類似度算出部21、拡散パラメータ算出部22、色差判別部23、色拡散パラメータ算出部24、拡散処理部25、オブジェクト領域抽出部26から構成されている。
【0017】
画像データベース2は、所定のオブジェクトを含む画像をデータベース化したものである。オブジェクトは、画像中の特徴的な構造や一つのまとまりをもったものである。なお、この画像データベース2は、画像処理装置1が保持していなくともよく、LANなどの所定のネットワークを介して接続可能に構成されたコンピュータが保持するようにしてもよく任意である。
【0018】
アングルヒストグラム類似度テーブル3は、アングルヒストグラム値が類似するか否かの基準を記憶したテーブルである。アングルヒストグラム値が類似するか否かは、予め実験により求めておき定義したものである。
【0019】
画像データ入力部11は、ユーザからの指示等により、画像データベース2から対象画像データを抽出する処理を行う。
【0020】
きめ検出部12は、画像データ入力部11より入力された画像データ中の処理対処領域内におけるきめの粗さ(texturedness)を検出する処理を行う。このきめの粗さは、例えば、きめ検出部12が、一次微分法、zero−cross法、スーベル法、キャニー法などのアルゴリズムを用いて輪郭抽出した画像データ上の処理対象領域内における輪郭となる画素の比率を算出することにより求めることができる。
【0021】
粗さ判定部13は、算出された画像データ中の処理対象領域内におけるきめの粗さが所定の閾値以上であるか否か判別する処理を行う。この閾値は予め実験的結果などに基づいて設定することができ、本実施形態では20%の閾値を設定している。
【0022】
領域抽出部14は、画像中の処理対象領域及びその近傍領域を抽出する処理を行う。近傍領域としては、例えば、処理対象領域の4近傍周辺領域でもよいし、8近傍領域でもよく任意である。
【0023】
アングル検出部15は、処理対象領域とそれに対する近傍領域を抽出し、処理対象領域及び近傍領域内のテクスチャ特徴を構成する画素のアングル検出処理を行うようになっている。このアングルとは、テクスチャ特徴から画素におけるエッジ(輪郭)の角度に関するものであり、このテクスチャ特徴は、ウェーブレット・フィルターやガボールフィルターにより求めることができる。
【0024】
アングルヒストグラム作成部16は、アングル検出部15で検出された各領域のアングル値のヒストグラム(度数分布)データを作成する。また、このアングルヒストグラムは、例えば、アングルを10°刻みに36に分割し、それぞれ分割した範囲内に入る度数をヒストグラムとして算出する。
【0025】
アングル差検出部17は、アングルヒストグラム値に基づいて、処理対象領域内とその近傍領域とのアングルのヒストグラム値に基づく類似度を判定する処理を行う。この判定は、それぞれの領域のアングルヒストグラム値の差分を取って、その差分がアングルヒストグラム類似度テーブル3を参照して、類似しているか否か判定することにより行うことができる。
【0026】
色変換部18は、対象領域内の画素の色値を検出処理する。例えば、本実施形態では、色変換部18がRGBにより表現されている値を非線形の変換処理を施し、HSVチャネル値を求め、適当な係数を掛けて0〜255の範囲内に納まるように変換処理することができる。このHSV色空間は、色を色相(H:hue)、彩 度(S:saturation)、明 度(V:value)の3パラメータで示したもので、色相(H)を角度、彩度(S)を直径、明度(V)を高さとして円筒座標系の空間で表現することができる。
【0027】
色ヒストグラム作成部19は、所定領域内の画素の色のヒストグラム(度数分布)データを作成する。この色ヒストグラムは、HSV色空間を所定の区分、例えば72に分類して、分類ごとの度数分布を求めることができる。
【0028】
色差検出部20は、色ヒストグラム作成部19で作成された色ヒストグラムに基づいて、一の検索対象領域内から近傍領域内に対する色ヒストグラムと、近傍領域内から検索対象領域内に対する色ヒストグラムとの差分を検出する処理を行う。これにより、処理対象領域と近傍領域との差分、即ち色の類似度合いを算定することができる。
【0029】
類似度算出部21は、アングル差検出部17及び色差検出部20により算出された類似度を加算して、各領域の類似度を算出する処理を行う。
なお、この類似度を算出する場合、アングル差検出部17及び色差検出部20により算出された類似度のそれぞれに対して、人間の視覚を考慮した所定の重み付けを行って計算処理をしてもよい。この重み付けの値は、例えば、実験により得られた結果を参照して設定することができる。
【0030】
拡散パラメータ算出部22は、求めたアングルと色の類似度から当該画素の拡散量(ぼかし速度)を決定する処理を行う。
この拡散パラメータを求めるには、拡散パラメータ算出部22が、各対象領域及び近傍領域間でのテクスチャ特性を構成する画素間のアングル差、色差に基づいて適応型拡散パラメータ値Kを求めることができる。
また、拡散パラメータ検出部21は、求めた適応型拡散パラメータ値Kを用いて拡散率cを求める処理を行う。
【0031】
色差判別部23は、処理対象画像内の画素及びその近傍画素を抽出し、当該画素と近傍画素との色差、即ち画素間の類似度を求める処理を行う。
【0032】
色拡散パラメータ算出部24は、求められた画素間の色差に基づいて適応型伝導パラメータKを算出する処理を行う。
【0033】
拡散処理部25は、拡散パラメータ算出部22又は色拡散パラメータ算出部24により求めた拡散率cを用いて画像データの拡散処理を行う。
【0034】
オブジェクト領域抽出部26は、拡散処理された画像データにおける特徴的なオブジェクト領域を抽出する処理を行う。オブジェクト領域抽出部26は、拡散処理された画像から境界領域を抽出して当該境界領域に基づいてオブジェクトを抽出する処理を行うことができる。
【0035】
次に、本発明の画像処理方法の一実施形態を図2に基づき説明する。
図2において、まず、ユーザによる選択入力要求等に基づいて、画像データ入力部11が画像データベース2から所定の画像を処理対象画像として受け付ける(S1)。なお、画像データ入力部11は、量子化されていない画像に対して量子化処理を行うようにしてもよい。
【0036】
画像が入力されると、きめ検出部12が画像の処理対象領域内についてきめの粗さ(texturedness)を検出する(S2)。この処理は、例えば、きめ検出部12が、入力された画像を輪郭抽出して得た画像データ上の処理対象領域内において輪郭をなしている画素の比率を検出する。なお輪郭抽出は、きめ検出部12が、一次微分法、zero−cross法、スーベル法、キャニー法などのアルゴリズムを用いて処理することができる。
【0037】
きめの粗さが検出されると、粗さ判定部13が、求めたきめの粗さが設定されている閾値以上か否か判別する(S3)。この閾値自体は、予め実験などにより設定することができ、本実施形態では20%としている。これによりきめが細かい画像と粗い画像との処理を振り分けることができる。
【0038】
きめの粗さが閾値以上である場合、領域抽出部14が、画像中から所定の処理対象領域およびその近傍周辺領域を抽出しメモリ等に記憶する(S4)。この処理は、例えば、領域抽出部14が、図4に示すように、処理対象領域(I領域)32と、これに対する4近傍周辺領域(J領域)33(5×5、7×7、n×nといったある領域)を抽出する。
【0039】
アングル検出部15が、抽出された処理対象領域内及び近傍領域内のアングルの抽出を行う(S5)。
この処理は、例えば、ウェーブレット・フィルターやガボールフィルターなどにより当該処理対象領域32及び4近傍領域33内のテクスチャ特徴から画素におけるエッジのアングルを検出することにより行う。
【0040】
アングルが抽出されると、アングルヒストグラム作成部16が処理対象領域及び近傍領域ごとに、抽出したアングル値のヒストグラム(度数分布)データを作成してメモリに記憶する(S6)。
このヒストグラムは、例えば、図5に示すように横軸に72に分割したHSV色空間上の色の区分を、縦軸にそれぞれの区間の度数を表すことができる。
【0041】
そして、アングル差検出部17が、アングルのヒストグラム値に基づいて、処理対象領域内のアングルヒストグラム値と近傍領域のアングルのヒストグラム値との差分から、アングルヒストグラム類似度テーブル3を参照してI領域32、J領域33間の類似度を計算する(S7)。
このアングルヒストグラムの類似度の計算は、例えば、アングル差検出部17が以下の数式1に基づいて計算することができる。なお、この数式1でJiが処理対象領域内のアングルのヒストグラム値、Ijが近傍領域内のアングルヒストグラム値をそれぞれ示しており、Nはアングルヒストグラムの分割総数(本例では36分割)を表している。またAはアングルヒストグラム類似を表した行列であって、アングルヒストグラム類似度テーブル3に定義されている値である。
【0042】
【数1】

Figure 2004362381
【0043】
また、アングルヒストグラムの差分検出処理と同時に、色変換部18が、画像を構成する画素の色値をHSV色空間に変換してこれをメモリ等に記憶する(S8)。これにより、例えば、RGBにより表現されていた画像の色が、H、S、Vの HSV色空間に基づいて表される。
【0044】
HSV色空間に変換した色値に基づいて、色ヒストグラム作成部19が、各領域内の画素の色ヒストグラム(度数分布)データを作成してメモリに記憶する(S9)。
この色ヒストグラムは、HSV色空間を72に分割して、それぞれ分割された区分ごとに入る度数(画素数)に基づいて色ヒストグラムを作成する。
【0045】
色ヒストグラムが作成されると、色差検出部20が処理対象領域の色ヒストグラムと近傍領域の色ヒストグラムとの差分を求め、処理対象領域と近傍領域との色の類似度を算出する(S10)。
この差分は、例えば、色差検出部20が以下の式に基づいて計算することができる。なお、以下の数式2において、gは図4の一の検索対象領域32内の色ヒストグラムを示し、hが近傍領域33内の色ヒストグラムをそれぞれ示しており、この式によりhとgの共通部分dの検出ができる。
【0046】
【数2】
Figure 2004362381
【0047】
アングル及び色の類似度が検出されると、類似度算出部21が、求めたアングルの差分(類似度)と色の差分(類似度)から適応型伝導パラメータ値Kを算出する(S11)。
この適応型伝導パラメータ値Kは、処理対象領域ごとに求めたアングル差、色差に基づいて以下の数式3により求めることができる。
【0048】
【数式3】
Figure 2004362381
【0049】
ここで、GTextureはテクスチャ勾配を表しており、この式中W、Wは重み定数であり、これらは実験により予め求めることができる。Dはアングル差検出部17により求めたアングル差、dは色差検出部20により求めた色差である。また、関数fは実験により求めることができる。またパラメータKは減少関数となる。
【0050】
そして、拡散パラメータ算出部22は、求めた適応型拡散パラメータ値Kを用いて拡散率cを求める(S12)。
この拡散率cは、拡散パラメータ算出部22が以下の数式4により計算することにより求めることができる。
【0051】
【数式4】
Figure 2004362381
【0052】
なお、数式4でx,yは処理対象領域内の画素の位置を表し、tは拡散回数(計算の繰り返し数)であり、その設定値は画像の種類等に応じて実験的に求めて設定しておくことができる。また、Iは色特徴ベクトルであり、たとえば、色相(H:hue )、彩度(S:saturation)、明度(V:value )で表現されるHSV色データのベクトルを表すことができる。gradはガウス関数との畳み込みによる平滑化演算子を表す。
【0053】
拡散率cが求められると、拡散処理部25は、求められた拡散率cを用いて画像の対象領域及び近傍領域の拡散処理を行い、領域の拡大と併合を行い、そのデータをメモリ等に記憶する(S13)。
この拡散処理により、きめの粗い部分を「不要な(noisy)」領域とみなし、境界を保存したまま拡散させることにより、不要なテクスチャを除去して領域の拡大と併合を行うことができる。
拡散処理は、拡散処理部25が、拡散アルゴリズムの数式(5)を用いて、求められた拡散率c、色特徴ベクトルIに基づいて拡散処理を行う。なお、tは拡散回数(計算の繰り返し数)を表しており、予め実験等により定められた値である。
【0054】
【数5】
Figure 2004362381
【0055】
そして、拡散処理部25は、拡散処理回数がt回になるまで拡散処理を繰り返して行う(S14)。この際拡散処理回数は、拡散処理部25がメモリに一時的に記憶しておき、処理回数に達したか否か判別することができる。
これにより、図7に示すように、拡散処理回数を行っていない画像から、拡散処理回数を多くする毎に図8となり、さらに拡散処理を行うことにより図9のように画像内の特徴オブジェクトの境界が現れるようになる。
【0056】
そして、拡散処理回数がt回となったところで、オブジェクト領域抽出部26が抽出された境界に基づいて画像内の特徴オブジェクトを抽出して(S15)、処理を終了する。
【0057】
また、上述のS3の処理で、きめの粗さが所定閾値以上ではないと判別された場合の処理を図3を参照して説明する。
きめの粗さが所定閾値以上ではないと判別された場合には、色変換部18が画像内の一の画素と、その近傍の画素を抽出してその色値の検出を行う(S21)。本実施形態では、図6に示すように、色変換部18が、画像内のある1画素と、当該画素の上下左右の4近傍連続画素を抽出し、各画素の色をHSV空間に基づいて検出処理する。
【0058】
色差検出部20は、処理対象画素に対する4近傍画素との色差、即ち画素間の色の類似度に基づいく類似度を算出する(S22)。
この算出は、例えば、隣接する画素i、j間では、HSV色空間を構成する各構成要素H、S、Vごとに独立であるとして、その差分、即ちHi,j−Hi+n,j+n, Si,j−Si+n,j+n, Vi,j−Vi+n,j+n,に基づいて、以下の数式6により計算することができる。なお、添え字のm、nは4方向の隣接画素を表し、また、関数fは実験により求められる関数である。また、ω 、ω 、ω は各々の特徴ベクトル情報(色特徴量)の類似度の算出に用いられる重み定数であり、これにより人間が感じる色の違いを精度よく反映できるよう設定されている。
【0059】
【数6】
Figure 2004362381
【0060】
色拡散パラメータ算出部24は、求めた色差に基づいて適応型伝導性パラメータKを算出する(S23)。この処理は、(d)に基づいて、拡散パラメータ算出部22が以下の数式7によりを算出することができる。なお、関数fは実験により求めることができる。
【0061】
【数7】
Figure 2004362381
【0062】
色拡散パラメータ算出部24は、求めた適応型伝導性パラメータKから上述の拡散パラメータ算出部22と同様にc(x,y,t)=1/{1+(‖grad{I}‖/K) }により拡散率cを求める(S24)。
そして、拡散処理部25により上述のS11以下の処理と同様な処理を行い、処理を終了する。
【0063】
このように、本実施形態によれば、アングル検出部15により処理対象領域及び近傍領域のテクスチャ特徴から画素におけるエッジのアングルを検出し、アングルヒストグラム作成部16により各領域ごとに作成したアングルヒストグラムの差分から、アングル差分検出部17が各領域間のアングルの類似度を算出すると共に、色検出手段により処理対象領域及びその近傍領域の色を検出して、色ヒストグラム作成部19が予め所定数に分けられた色の区分に基づいて作成した各領域の色ヒストグラム差分から、色差検出部20が各領域間の色の類似度を算出し、類似度算出部21がアングル類似度及び色類似度を加算して算出した各領域の類似度に基づいて、拡散パラメータ算出部22が所定の拡散関数により拡散処理パラメータ値を算出し、算出したパラメータ値に基づいて拡散処理部25が各領域の拡散処理を行ってオブジェクトの領域境界を抽出するようにしたことから、画像中のオブジェクト領域境界を正確に抽出できる。
これにより、画像における明るさが違っていても、異なる領域同士を区分したり、また、画像に影がかかった場合であってもその境界を認識することが可能となり、オブジェクトの輪郭を正確に抽出できる。
【0064】
また、色検出部18がHSV色空間に基づいて処理を行うことにより、人間の視覚を基準とするほぼ一様な色表現が可能となる。
【0065】
また、アングルヒストグラム作成部16により、検出したアングルに基づいて各領域のアングルヒストグラムを作成し、アングルヒストグラム類似度テーブル3に、アングルヒストグラムの差分に応じたアングルヒストグラムの類似度を記憶しておき、アングル差検出部17が、これを参照して作成された各領域のアングルヒストグラムの差分に基づいて各領域のアングル類似度を算出するようにしたことから、各領域間のアングルの類似を定量化して算定することができる。
また、例えば、アングルヒストグラム類似度テーブル3に実験的に求めたアングルヒストグラムの類似度を記憶しておくことで、人間の視覚に応じた類似度を設定しておき、これに基づいて類似度を算定することができる。
【0066】
また、色ヒストグラム作成部19が各画素の色に基づいて処理対象領域及び近傍領域の中の色ヒストグラムを作成し、色差検出部20が作成した各領域の色ヒストグラムの差分から各領域の色類似度を算出するようにしたことから、領域間での色の差分、即ち色勾配を定量化して表すことができる。
【0067】
また、きめ検出部12により画像の処理対象領域についてきめの粗さを検出し、粗さ判定部13により検出したきめの粗さが予め定められている閾値以上か否か判別することによりきめの粗さを判別するようにし、きめが粗くないと判別された画像に対してアングル検出部15及び色ヒストグラム作成部19による処理を施すようにすれば、特にきめが細かい領域であっても正確に画像境界を抽出することができる。
【0068】
また、きめが粗いと判別された場合には、色差判別部23により、上述の数式6により各画素のHSV空間に基づく色の色相、彩度、明度の各パラメータの差分を算出し、色拡散パラメータ算出部24により各画素の類似度を算出するようにしたことから、きめが粗い領域に対しても過度に画像が細分化されることなく正確にオブジェクト境界を抽出することができる。
【0069】
なお、上述した実施形態においては、画像データのきめの粗さを処理条件とし、このきめの粗さに関係してテクスチャの特徴量を利用して処理する場合について説明したが、本実施形態のように入力された画像データのきめの粗さに関係なく、テクスチャの特徴量として検索対象画素領域のアングル値及び色値を検出するようにしてもよい。したがって、その場合は、きめ検出部12及び粗さ判定部13、色差検出部20、色拡散パラメータ算出部24は不要である。
【0070】
本実施形態にかかる画像処理装置1用のコンピュータプログラムは、それだけで取引することも可能である。その場合、当該コンピュータプログラムをネットワークを介して配信したり、又CD−ROM、MOなどの所定の媒体にコンピュータ読取可能に記憶して取引してもよい。
【0071】
【発明の効果】
本発明によれば、画像成分の領域境界を正確に抽出することができる。
【図面の簡単な説明】
【図1】本発明の実施形態における画像処理装置の構成を示すブロック図である。
【図2】本実施形態における画像処理の流れの一例を示すフローチャート図である。
【図3】図2に引き続き本実施形態における画像処理の流れの一例を示すフローチャート図である。
【図4】本実施形態においてテクスチャ勾配の角差及び色差を求める対象画素領域の四方向周辺画素領域を説明する概念図である。
【図5】本実施形態におけるアングルヒストグラムを説明する概念図。
【図6】本実施形態において色勾配の色差を求める対象画素の四方向連接画素を説明する概念図である。
【図7】本実施形態における処理前の画像の状態を説明した図。
【図8】本実施形態における拡散処理中の画像の状態を説明した図。
【図9】本実施形態における拡散処理後の画像の状態を説明した図。
【符号の説明】
1 画像処理装置
2 画像データベース
3 アングルヒストグラム類似度テーブル
11 画像データ入力部
12 きめ検出部
13 粗さ判定部
14 領域抽出部
15 アングル検出部
16 アングルヒストグラム作成部
17 アングル差検出部
18 色変換部
19 色ヒストグラム作成部
20 色差検出部
21 類似度算出部
22 拡散パラメータ算出部
23 色差判別部
24 色拡散パラメータ算出部
25 拡散処理部
26 オブジェクト領域抽出部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing technique, and more particularly to a technique suitable for extracting a predetermined area from an image component.
[0002]
[Prior art]
Conventionally, many image processing techniques for extracting a predetermined area such as an object area from an image component have been proposed. As an example, for example, a step of dividing an image into a plurality of regions based on color information, a step of integrating the plurality of divided regions based on their adjacency, and an image based on predetermined classification information related to the image Generating background information, detecting a background area from an integrated area based on the background information, and extracting an object by removing the background area from the integrated area, wherein the extracted object A technique for extracting contour information from a document is known (Reference Document 1).
[0003]
[Patent Document 1]
JP 2002-117409 A
[0004]
[Problems to be solved by the invention]
However, when extracting a predetermined area such as an object from an image in the related art, the object area is often extracted based on the brightness of the image. For this reason, there is a problem that, due to a difference in brightness in an image, it is not possible to classify even different regions, and the regions are determined to be the same region. Specifically, if the image has a shadow, it will be recognized as a different area due to this shadow, or if the image is too bright, the outline of the area will be cut off, if the image is too dark, There is a problem that the outline of the region is crushed. For this reason, there has been a problem that the outline of the object is blurred or the outline is distorted.
[0005]
The present invention has been made in view of the above circumstances, and it is an object of the present invention to provide an image processing method capable of accurately extracting a region boundary of an image component.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides an image processing apparatus according to a first aspect of the present invention, comprising: an area extracting unit configured to extract a predetermined area in an image including a predetermined object and a neighboring area thereof; Angle detecting means for detecting an angle of an edge in a pixel from a texture feature of each area, first histogram generating means for generating an angle histogram for each of the areas, and storing a similarity of a histogram according to a difference between the angle histograms A first similarity calculating unit that calculates an angle similarity between the regions from the generated difference between the histograms of the regions with reference to the similarity storing unit; Color detecting means for detecting the color of the predetermined area and its neighboring areas, and each of the detected areas based on the predetermined number of color divisions. A second histogram creating means for creating a color histogram, and a second similarity calculating means for calculating a color similarity between the respective areas from a difference between the color histograms of the respective areas created by the second histogram creating means. A third similarity calculating unit that calculates the similarity of each of the regions by adding the similarities calculated by the first and second similarity calculating units; and a similarity of each of the calculated regions. A diffusion processing parameter calculating means for calculating a diffusion processing parameter value by a predetermined diffusion function based on the parameter, and a diffusion processing means for performing a diffusion processing of each of the areas based on the calculated parameter value to extract a region boundary of the object. And characterized in that:
[0007]
The color detecting means detects the color of each pixel in each area based on the HSV color space, and the second histogram creating means detects the color of each pixel based on the color of each pixel detected in the HSV color space. A color histogram in an area may be created, and the second similarity calculating means may calculate a color similarity of each area from a difference between the created color histograms of each area.
[0008]
A texture detecting means for detecting a texture roughness (textureness) in the processing target area in the image; and a texture roughness by determining whether or not the detected texture roughness is equal to or greater than a predetermined threshold value. Texture determination means for determining the texture, wherein each of the means executes processing on the processing target area in the image when it is determined that the texture is not coarser than the threshold. You may make it.
[0009]
An image processing apparatus according to a second aspect of the present invention includes: a color detection unit configured to detect a color of a predetermined pixel in an image and a pixel in the vicinity thereof; and a hue, a saturation, and a brightness of each of the detected pixels. Fourth similarity calculating means for calculating the similarity of each pixel by calculating the parameter difference, and calculating a diffusion processing parameter value by a predetermined diffusion function based on the calculated similarity of each pixel. And a diffusion processing unit that performs a diffusion process on each of the regions based on the calculated parameter values to extract a region boundary of the object.
[0010]
A texture detecting means for detecting the roughness of the texture in the processing target area in the image; and determining the roughness of the texture by determining whether or not the detected roughness is equal to or greater than a predetermined threshold. Further comprising a texture roughness determining means, and when the texture is determined to be coarser than a predetermined threshold value, each of the means executes processing on the processing target area in the image. You may do so.
[0011]
The image processing apparatus may further include an object extracting unit that extracts an object in the image based on the extracted region boundary.
[0012]
An image processing method according to a first aspect of the present invention is executed by a computer having a similarity storage unit that stores a histogram similarity corresponding to a difference between histograms of edge angles of pixels from texture features in an image. A process in which a computer extracts a predetermined region and an adjacent region in an image including a predetermined object, a process of detecting an edge angle of a pixel from a texture feature of each extracted region, and A process of generating an angle histogram for each region; a process of calculating an angle similarity between the regions from the difference between the generated histograms of the regions with reference to the similarity storage unit; Based on the process of detecting the color of the predetermined area and its neighboring area, A process of creating a color histogram of each region output, a process of calculating a color similarity between the regions from a difference between the created color histograms of each region, a similarity of the angle histogram and a color histogram similarity Adding a degree, calculating a similarity of each area, calculating a diffusion processing parameter value by a predetermined diffusion function based on the calculated similarity of each area, and calculating the calculated parameter value. And a process of extracting the region boundary of the object by performing the diffusion process of each of the regions based on.
[0013]
Further, the computer detects a color of a predetermined pixel in the image and a pixel in the vicinity of the pixel, and calculates a difference between parameters of hue, saturation, and brightness of the detected color of each pixel, thereby calculating a difference between each parameter of each pixel. A process of calculating a similarity, a process of calculating a diffusion parameter value by a predetermined diffusion function based on the calculated similarity of each pixel, and a diffusion process of each region based on the calculated parameter value. To extract the area boundary of the object.
[0014]
A method executed by a computer having a similarity storage unit that stores a similarity of a histogram according to a difference of a histogram of an angle of an edge of a pixel from a texture feature in an image, wherein the computer performs processing in the image. Processing for detecting the roughness of the texture in the target area; processing for determining the roughness of the texture by determining whether the detected roughness is equal to or greater than a predetermined threshold; When it is determined that the texture is not rough, a process of extracting a predetermined region and a nearby region in an image including a predetermined object, and a process of detecting an edge angle of a pixel from a texture feature of each extracted region And processing for generating an angle histogram for each of the regions, and referring to the similarity storage means, for each of the generated regions. A process of calculating an angle similarity between the respective regions from the difference between the histograms, a process of detecting a color of a predetermined region in the image and a region in the vicinity thereof, and a process of detecting a color in a predetermined number in advance. A process of creating a color histogram of each detected region, a process of calculating a color similarity between the regions from the difference between the created color histograms of each region, a similarity of the angle histogram and a color histogram similarity Adding a degree, calculating a similarity of each area, calculating a diffusion processing parameter value by a predetermined diffusion function based on the calculated similarity of each area, and calculating the calculated parameter value. Based on the above, performing a diffusion process of each of the above regions and extracting a region boundary of the object, and when the texture is determined to be coarse by the texture roughness determination unit, A process of detecting a color of a predetermined pixel and a pixel in the vicinity thereof in a processing target region in an image based on the HSV color space; and a process of detecting hue, saturation, and brightness of each detected pixel based on the HSV space. A process of calculating the similarity of each pixel by calculating a parameter difference; a process of calculating a diffusion processing parameter value by a predetermined diffusion function based on the calculated similarity of each pixel; Based on the value, a process of extracting the region boundary of the object by performing the diffusion process of each region may be performed.
[0015]
Further, the present invention may be a computer program for causing a computer to execute each process of the image processing method.
[0016]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing an embodiment of an image processing apparatus to which the image processing apparatus according to the present invention is applied.
In FIG. 1, an image processing apparatus 1 of the present invention is configured by a computer, and includes a CPU (Central Processing Unit), a computer program executed by the CPU, a RAM capable of storing the computer program and other data, The functional blocks shown in FIG. 1 can be configured by an internal memory such as a ROM and an external storage device such as a hard disk drive.
The functional blocks shown in FIG. 1 include an image database (DB) 2, an angle histogram similarity table 3, an image data input unit 11, a texture detection unit 12, a roughness determination unit 13, an area extraction unit 14, an angle detection unit 15, Angle histogram creation unit 16, angle difference detection unit 17, color conversion unit 18, color histogram creation unit 19, color detection unit 20, similarity calculation unit 21, diffusion parameter calculation unit 22, color difference determination unit 23, color diffusion parameter calculation unit 24, a diffusion processing unit 25, and an object area extraction unit 26.
[0017]
The image database 2 is a database of images including predetermined objects. An object has a characteristic structure or a single unit in an image. Note that the image database 2 need not be held by the image processing apparatus 1 and may be held by a computer that is connectable via a predetermined network such as a LAN.
[0018]
The angle histogram similarity table 3 is a table that stores criteria for determining whether or not the angle histogram values are similar. Whether or not the angle histogram values are similar is determined in advance by an experiment and defined.
[0019]
The image data input unit 11 performs a process of extracting target image data from the image database 2 according to an instruction from a user or the like.
[0020]
The texture detection unit 12 performs a process of detecting texture roughness in a processing area in the image data input from the image data input unit 11. The roughness of the texture is, for example, a contour in a processing target area on image data obtained by the texture detection unit 12 extracting a contour using an algorithm such as a first-order differentiation method, a zero-cross method, a Sobel method, or a Canny method. It can be obtained by calculating the ratio of pixels.
[0021]
The roughness determination unit 13 performs a process of determining whether or not the roughness of the texture in the processing target area in the calculated image data is equal to or greater than a predetermined threshold. This threshold can be set in advance based on experimental results and the like. In the present embodiment, a threshold of 20% is set.
[0022]
The region extracting unit 14 performs a process of extracting a processing target region in an image and a nearby region. The neighborhood area may be, for example, four neighborhood areas or eight neighborhood areas of the processing target area, and is arbitrary.
[0023]
The angle detection unit 15 extracts a processing target region and a neighboring region with respect to the processing target region, and performs an angle detection process of a pixel constituting a texture feature in the processing target region and the neighboring region. The angle relates to the angle of an edge (contour) in a pixel from a texture feature, and the texture feature can be obtained by a wavelet filter or a Gabor filter.
[0024]
The angle histogram creating unit 16 creates histogram (frequency distribution) data of the angle value of each area detected by the angle detecting unit 15. In addition, the angle histogram divides the angle into 36 at intervals of 10 °, and calculates a frequency falling within each divided range as a histogram.
[0025]
The angle difference detection unit 17 performs a process of determining the similarity based on the histogram value of the angle between the inside of the processing target area and the neighboring area based on the angle histogram value. This determination can be made by taking the difference between the angle histogram values of the respective regions and determining whether or not the difference is similar with reference to the angle histogram similarity table 3.
[0026]
The color conversion unit 18 performs a detection process for detecting a color value of a pixel in the target area. For example, in the present embodiment, the color conversion unit 18 performs a non-linear conversion process on the values represented by RGB to obtain an HSV channel value, multiplies it by an appropriate coefficient, and converts the value to fall within the range of 0 to 255. Can be processed. In the HSV color space, a color is represented by three parameters of hue (H: hue), saturation (S: saturation), and lightness (V: value), and hue (H) is represented by an angle and saturation (S: ) Can be expressed in the space of a cylindrical coordinate system by using the diameter and the brightness (V) as the height.
[0027]
The color histogram creation unit 19 creates histogram (frequency distribution) data of the colors of the pixels in the predetermined area. In this color histogram, the HSV color space is classified into predetermined sections, for example, 72, and a frequency distribution for each classification can be obtained.
[0028]
Based on the color histogram created by the color histogram creating unit 19, the color difference detecting unit 20 calculates a difference between the color histogram from the inside of one search target area to the inside of the neighborhood and the color histogram from the neighborhood to the inside of the search area. Is performed. This makes it possible to calculate the difference between the processing target area and the neighboring area, that is, the degree of color similarity.
[0029]
The similarity calculation unit 21 performs a process of calculating the similarity of each region by adding the similarities calculated by the angle difference detection unit 17 and the color difference detection unit 20.
When calculating the similarity, the similarity calculated by the angle difference detection unit 17 and the color difference detection unit 20 may be calculated by performing a predetermined weighting in consideration of human vision. Good. The value of the weight can be set, for example, with reference to a result obtained by an experiment.
[0030]
The diffusion parameter calculation unit 22 performs a process of determining the diffusion amount (blur speed) of the pixel from the obtained angle and color similarity.
In order to determine the diffusion parameter, the diffusion parameter calculation unit 22 can determine the adaptive diffusion parameter value K based on the angle difference and the color difference between pixels constituting the texture characteristic between each target region and the neighboring regions. .
Further, the diffusion parameter detection unit 21 performs a process of calculating the spreading factor c using the obtained adaptive diffusion parameter value K.
[0031]
The color difference determination unit 23 performs a process of extracting a pixel in the image to be processed and its neighboring pixels, and obtaining a color difference between the pixel and the neighboring pixels, that is, a similarity between pixels.
[0032]
The color diffusion parameter calculation unit 24 performs a process of calculating an adaptive conduction parameter K based on the obtained color difference between pixels.
[0033]
The diffusion processing unit 25 performs image data diffusion processing using the diffusion rate c obtained by the diffusion parameter calculation unit 22 or the color diffusion parameter calculation unit 24.
[0034]
The object area extraction unit 26 performs a process of extracting a characteristic object area in the image data subjected to the diffusion processing. The object area extracting unit 26 can perform processing of extracting a boundary area from the image subjected to the diffusion processing and extracting an object based on the boundary area.
[0035]
Next, an embodiment of the image processing method of the present invention will be described with reference to FIG.
In FIG. 2, first, based on a selection input request or the like by the user, the image data input unit 11 receives a predetermined image from the image database 2 as a processing target image (S1). Note that the image data input unit 11 may perform a quantization process on an image that has not been quantized.
[0036]
When an image is input, the texture detection unit 12 detects texture roughness within a processing target area of the image (S2). In this process, for example, the texture detection unit 12 detects a ratio of pixels forming an outline in a processing target area on image data obtained by extracting an outline of an input image. The contour detection can be performed by the texture detection unit 12 using an algorithm such as a first-order differentiation method, a zero-cross method, a Sobel method, or a Canny method.
[0037]
When the roughness of the texture is detected, the roughness determination unit 13 determines whether or not the obtained roughness is equal to or larger than a set threshold (S3). This threshold value itself can be set in advance by an experiment or the like, and is set to 20% in the present embodiment. As a result, it is possible to sort the processing between a fine-grained image and a coarse-grained image.
[0038]
If the roughness is equal to or larger than the threshold value, the area extracting unit 14 extracts a predetermined processing target area and its surrounding area from the image and stores them in a memory or the like (S4). In this process, for example, as shown in FIG. 4, the region extracting unit 14 performs processing on the processing target region (I region) 32 and the four neighboring peripheral regions (J region) 33 (5 × 5, 7 × 7, n Xn).
[0039]
The angle detection unit 15 extracts angles in the extracted processing target region and the neighboring region (S5).
This processing is performed, for example, by detecting an angle of an edge of a pixel from a texture feature in the processing target area 32 and the 4-neighboring area 33 using a wavelet filter, a Gabor filter, or the like.
[0040]
When the angle is extracted, the angle histogram creating unit 16 creates histogram (frequency distribution) data of the extracted angle value for each of the processing target area and the neighboring area, and stores it in the memory (S6).
In this histogram, for example, as shown in FIG. 5, the horizontal axis represents the color division in the HSV color space divided into 72, and the vertical axis represents the frequency of each section.
[0041]
Then, based on the histogram value of the angle, the angle difference detection unit 17 refers to the angle histogram similarity table 3 based on the difference between the angle histogram value in the processing target area and the histogram value of the angle in the neighboring area to determine the I area. 32, the similarity between the J regions 33 is calculated (S7).
The angle histogram similarity can be calculated by, for example, the angle difference detection unit 17 based on Equation 1 below. In Expression 1, Ji indicates the histogram value of the angle in the processing target area, Ij indicates the angle histogram value in the neighboring area, and N indicates the total number of angle histogram divisions (36 divisions in this example). I have. A is a matrix representing the angle histogram similarity, and is a value defined in the angle histogram similarity table 3.
[0042]
(Equation 1)
Figure 2004362381
[0043]
At the same time as the angle histogram difference detection process, the color conversion unit 18 converts the color values of the pixels forming the image into the HSV color space and stores the converted values in a memory or the like (S8). Thereby, for example, the colors of the image represented by RGB are represented based on the HSV color space of H, S, and V.
[0044]
Based on the color values converted into the HSV color space, the color histogram creating unit 19 creates color histogram (frequency distribution) data of the pixels in each area and stores the data in the memory (S9).
This color histogram divides the HSV color space into 72, and creates a color histogram based on the frequency (the number of pixels) included in each divided section.
[0045]
When the color histogram is created, the color difference detection unit 20 calculates the difference between the color histogram of the processing target area and the color histogram of the neighboring area, and calculates the color similarity between the processing target area and the neighboring area (S10).
This difference can be calculated by the color difference detection unit 20 based on the following equation, for example. In the following equation 2, g indicates a color histogram in one search target area 32 in FIG. 4, and h indicates a color histogram in the neighborhood area 33. d 1 Can be detected.
[0046]
(Equation 2)
Figure 2004362381
[0047]
When the similarity between the angle and the color is detected, the similarity calculator 21 calculates the adaptive conduction parameter value K from the obtained angle difference (similarity) and the color difference (similarity) (S11).
The adaptive conduction parameter value K can be obtained by the following equation 3 based on the angle difference and color difference obtained for each processing target area.
[0048]
(Equation 3)
Figure 2004362381
[0049]
Where G Texture Represents the texture gradient, where W 1 , W 2 Are weight constants, which can be obtained in advance by experiments. D is the angle difference obtained by the angle difference detection unit 17, d 1 Is a color difference obtained by the color difference detection unit 20. Also, the function f 1 Can be determined by experiment. The parameter K is a decreasing function.
[0050]
Then, the diffusion parameter calculation unit 22 calculates the spreading factor c using the obtained adaptive diffusion parameter value K (S12).
The spreading factor c can be obtained by the spreading parameter calculating unit 22 calculating the following formula 4.
[0051]
(Equation 4)
Figure 2004362381
[0052]
In Expression 4, x and y represent the positions of the pixels in the processing target area, t is the number of times of diffusion (the number of repetitions of calculation), and the set value is set experimentally according to the type of image and the like. You can keep. I is a color feature vector, and can represent, for example, a vector of HSV color data expressed by hue (H: hue), saturation (S: saturation), and lightness (V: value). grad represents a smoothing operator by convolution with a Gaussian function.
[0053]
When the diffusion rate c is determined, the diffusion processing unit 25 performs diffusion processing of the target area and the neighboring area of the image using the determined diffusion rate c, enlarges and merges the area, and stores the data in a memory or the like. It is stored (S13).
By this diffusion process, a coarse-grained portion is regarded as an “unnecessary (noisy)” region, and the boundary is preserved and diffused, whereby unnecessary texture can be removed and the region can be enlarged and merged.
In the diffusion processing, the diffusion processing unit 25 performs the diffusion processing based on the obtained diffusion rate c and color feature vector I using Expression (5) of the diffusion algorithm. Note that t represents the number of diffusions (the number of repetitions of calculation), and is a value determined in advance by experiments or the like.
[0054]
(Equation 5)
Figure 2004362381
[0055]
Then, the diffusion processing unit 25 repeats the diffusion processing until the number of times of the diffusion processing reaches t (S14). At this time, the number of times of diffusion processing is temporarily stored in the memory by the diffusion processing unit 25, and it can be determined whether or not the number of times of processing has been reached.
As a result, as shown in FIG. 7, each time the number of times of diffusion processing is increased from an image in which the number of times of diffusion processing has not been performed, FIG. 8 is obtained. Borders appear.
[0056]
Then, when the number of times of the diffusion processing reaches t, the object area extracting unit 26 extracts the characteristic object in the image based on the extracted boundary (S15), and ends the processing.
[0057]
Further, a process in the case where it is determined in the above-described process of S3 that the roughness is not equal to or larger than the predetermined threshold will be described with reference to FIG.
If it is determined that the texture is not greater than or equal to the predetermined threshold value, the color conversion unit 18 extracts one pixel in the image and its neighboring pixels and detects the color value (S21). In the present embodiment, as shown in FIG. 6, the color conversion unit 18 extracts a certain pixel in the image and four neighboring pixels on the upper, lower, left, and right sides of the pixel, and colors the respective pixels based on the HSV space. Perform detection processing.
[0058]
The color difference detection unit 20 calculates the similarity based on the color difference between the processing target pixel and the four neighboring pixels, that is, the color similarity between the pixels (S22).
This calculation is performed, for example, assuming that each of the constituent elements H, S, and V constituting the HSV color space is independent between the adjacent pixels i and j, and the difference, that is, H i, j -H i + n, j + n , S i, j -S i + n, j + n , V i, j -V i + n, j + n , Can be calculated by the following equation (6). The subscripts m and n represent adjacent pixels in four directions, and the function f 2 Is a function obtained by experiment. Also, ω 1 , Ω 2 , Ω 3 Is a weight constant used for calculating the similarity of each feature vector information (color feature amount), and is set so as to accurately reflect a difference in color perceived by a human.
[0059]
(Equation 6)
Figure 2004362381
[0060]
The color diffusion parameter calculator 24 calculates the adaptive conductivity parameter K based on the obtained color difference (S23). In this process, the diffusion parameter calculation unit 22 can calculate the following Expression 7 based on (d). Note that the function f 2 Can be determined by experiment.
[0061]
(Equation 7)
Figure 2004362381
[0062]
The color diffusion parameter calculation unit 24 calculates c (x, y, t) = 1 / {1 + ({grad {I} / K) from the obtained adaptive conductivity parameter K, similarly to the above-described diffusion parameter calculation unit 22. 2 The diffusion rate c is determined by} (S24).
Then, the same processing as the above-described processing of S11 and thereafter is performed by the diffusion processing unit 25, and the processing ends.
[0063]
As described above, according to the present embodiment, the angle detection unit 15 detects the angle of the edge of the pixel from the texture feature of the processing target region and the neighboring region, and the angle histogram generation unit 16 generates the angle histogram of each region. From the difference, the angle difference detection unit 17 calculates the degree of angle similarity between the regions, and the color detection unit detects the colors of the processing target region and its neighboring regions. The color difference detection unit 20 calculates the color similarity between the regions from the color histogram difference of each region created based on the divided color segments, and the similarity calculation unit 21 calculates the angle similarity and the color similarity. The diffusion parameter calculation unit 22 calculates a diffusion processing parameter value by a predetermined diffusion function based on the similarity of each region calculated by the addition. , Since the spreading process unit 25 based on the calculated parameter values so as to extract the region boundary of the object by performing the diffusion process of each region, the object region boundary in the image can be accurately extracted.
As a result, even if the brightness in the image is different, it is possible to distinguish between different areas, and even if the image is shaded, it is possible to recognize the boundary, and to accurately outline the object. Can be extracted.
[0064]
In addition, since the color detection unit 18 performs the processing based on the HSV color space, it is possible to achieve a substantially uniform color expression based on human vision.
[0065]
Further, the angle histogram creating unit 16 creates an angle histogram of each area based on the detected angle, and stores the similarity of the angle histogram according to the difference of the angle histogram in the angle histogram similarity table 3, Since the angle difference detection unit 17 calculates the angle similarity of each area based on the difference of the angle histogram of each area created with reference to this, the angle similarity of each area is quantified. Can be calculated.
Further, for example, by storing the similarity of an angle histogram experimentally obtained in the angle histogram similarity table 3, a similarity corresponding to human vision is set, and the similarity is set based on this. Can be calculated.
[0066]
Further, the color histogram creation unit 19 creates a color histogram in the processing target area and the neighboring area based on the color of each pixel, and calculates the color similarity of each area from the difference between the color histograms of each area created by the color difference detection unit 20. Since the degree is calculated, the color difference between the regions, that is, the color gradient can be quantified and represented.
[0067]
In addition, the texture detection unit 12 detects the roughness of the texture in the processing target area of the image, and the roughness determination unit 13 determines whether the detected roughness is equal to or greater than a predetermined threshold. If the roughness is determined and the image determined to be non-coarse is subjected to the processing by the angle detection unit 15 and the color histogram creation unit 19, even if the area is particularly fine, it can be accurately determined. Image boundaries can be extracted.
[0068]
When it is determined that the texture is coarse, the color difference determination unit 23 calculates the difference between the parameters of the hue, saturation, and brightness of the color based on the HSV space of each pixel by using the above-described Expression 6, and performs color diffusion. Since the similarity of each pixel is calculated by the parameter calculation unit 24, an object boundary can be accurately extracted without excessively segmenting an image even in a coarse-grained area.
[0069]
Note that, in the above-described embodiment, a case has been described in which processing is performed using the texture feature amount in relation to the texture roughness, with the texture roughness of the image data as the processing condition. Regardless of the roughness of the input image data, the angle value and the color value of the search target pixel area may be detected as the texture feature amount. Therefore, in that case, the texture detection unit 12, the roughness determination unit 13, the color difference detection unit 20, and the color diffusion parameter calculation unit 24 are unnecessary.
[0070]
The computer program for the image processing apparatus 1 according to the present embodiment can be traded by itself. In this case, the computer program may be distributed via a network, or may be stored in a predetermined medium such as a CD-ROM or an MO so as to be computer-readable, and may be traded.
[0071]
【The invention's effect】
According to the present invention, it is possible to accurately extract a region boundary of an image component.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention.
FIG. 2 is a flowchart illustrating an example of a flow of image processing according to the embodiment.
FIG. 3 is a flowchart illustrating an example of the flow of image processing according to the present embodiment, following FIG. 2;
FIG. 4 is a conceptual diagram illustrating a four-direction peripheral pixel area of a target pixel area for calculating an angle difference and a color difference of a texture gradient in the present embodiment.
FIG. 5 is a conceptual diagram illustrating an angle histogram according to the embodiment.
FIG. 6 is a conceptual diagram illustrating four-direction connected pixels of a target pixel for which a color difference of a color gradient is calculated in the present embodiment.
FIG. 7 is a view for explaining a state of an image before processing in the embodiment.
FIG. 8 is a view for explaining a state of an image during diffusion processing according to the embodiment;
FIG. 9 is a view for explaining a state of an image after diffusion processing in the embodiment.
[Explanation of symbols]
1 Image processing device
2 Image database
3 Angle histogram similarity table
11 Image data input section
12 Texture detector
13 Roughness judgment unit
14 area extraction unit
15 Angle detector
16 Angle histogram creation unit
17 Angle difference detector
18 color converter
19 Color histogram creation unit
20 Color difference detector
21 Similarity calculator
22 Diffusion parameter calculator
23 Color difference discriminator
24 Color Diffusion Parameter Calculation Unit
25 Diffusion processing unit
26 Object area extraction unit

Claims (6)

所定のオブジェクトを含む画像中の所定領域及びその近傍領域を抽出する領域抽出手段と、
抽出された各領域のテクスチャ特徴から画素におけるエッジのアングルを検出するアングル検出手段と、
上記各領域ごとのアングルヒストグラムを生成する第1のヒストグラム生成手段と、
アングルヒストグラムの差分に応じたヒストグラムの類似度を記憶する類似度記憶手段と、
上記類似度記憶手段を参照して、生成された各領域のヒストグラムの差分から各領域間のアングルの類似度を算出する第1の類似度算出手段と、
上記抽出された所定領域及びその近傍領域の色を検出する色検出手段と、
予め所定数に分けられた色の区分に基づいて上記検出された各領域の色ヒストグラムを作成する第2のヒストグラム作成手段と、
上記第2のヒストグラム作成手段により作成した各領域の色ヒストグラムの差分から各領域間の色の類似度を算出する第2の類似度算出手段と、
上記第1及び第2の類似度算出手段により算出された類似度を加算して、上記各領域の類似度を算出する第3の類似度算出手段と、
上記算出された各領域の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する拡散処理パラメータ算出手段と、
算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する拡散処理手段と、
を有することを特徴とする画像処理装置。
Region extraction means for extracting a predetermined region in an image including a predetermined object and a nearby region thereof,
Angle detection means for detecting an angle of an edge in a pixel from the extracted texture feature of each region,
First histogram generating means for generating an angle histogram for each of the regions,
Similarity storage means for storing the similarity of the histogram according to the difference of the angle histogram,
A first similarity calculating unit that calculates the angle similarity between the regions from the generated difference between the histograms of the regions with reference to the similarity storage unit;
Color detection means for detecting the color of the extracted predetermined area and the area in the vicinity thereof,
Second histogram creating means for creating a color histogram of each of the detected areas based on a predetermined number of color segments;
A second similarity calculating unit that calculates a similarity of a color between the regions from a difference between the color histograms of the regions created by the second histogram creating unit;
Third similarity calculating means for adding the similarities calculated by the first and second similarity calculating means and calculating the similarity of each of the regions;
A diffusion processing parameter calculation unit configured to calculate a diffusion processing parameter value by a predetermined diffusion function based on the calculated similarity of each area;
Based on the calculated parameter values, a diffusion processing unit that performs a diffusion process on each of the regions to extract a region boundary of the object,
An image processing apparatus comprising:
上記色検出手段は、各領域中の画素をHSV色空間に基づいて検出し、
上記第2のヒストグラム作成手段は、HSV色空間により検出された各画素の色に基づいて、上記各領域中の色ヒストグラムを作成し、
上記第2の類似度算出手段は、上記作成した各領域の色ヒストグラムの差分から各領域の色類似度を算出する、
請求項1記載の画像処理装置。
The color detecting means detects pixels in each area based on the HSV color space,
The second histogram creating means creates a color histogram in each of the regions based on the color of each pixel detected in the HSV color space,
The second similarity calculating means calculates the color similarity of each area from the difference between the created color histograms of each area,
The image processing device according to claim 1.
上記画像のきめの粗さを検出するきめ検出手段と、
検出したきめの粗さが予め定められている閾値以上か否か判別することによりきめの粗さを判別するきめ粗さ判別手段とを更に有し、
上記きめの粗さが上記閾値よりきめが粗くないと判別された場合に、上記各手段が処理を実行する、
請求項1又は2記載の画像処理装置。
Texture detection means for detecting the roughness of the image,
Texture roughness determining means for determining the roughness of the texture by determining whether the detected roughness is equal to or greater than a predetermined threshold,
When it is determined that the roughness of the texture is not coarser than the threshold value, each of the units executes processing.
The image processing device according to claim 1.
画像中の所定の画素及びその近傍の画素の色を検出する色検出手段と、
検出した各画素の色の色相、彩度、明度の各パラメータの差分を算出することにより、各画素の類似度を算出する第4の類似度算出手段と、
上記算出された各画素の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する拡散処理パラメータ算出手段と、
算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する拡散処理手段と、
を有することを特徴とする画像処理装置。
Color detection means for detecting the color of a predetermined pixel in the image and pixels in the vicinity thereof,
Fourth similarity calculating means for calculating the similarity of each pixel by calculating a difference between each parameter of the detected hue, saturation, and brightness of the color of each pixel;
A diffusion processing parameter calculation unit configured to calculate a diffusion processing parameter value by a predetermined diffusion function based on the calculated similarity between the pixels;
Based on the calculated parameter values, a diffusion processing unit that performs a diffusion process on each of the regions to extract a region boundary of the object,
An image processing apparatus comprising:
上記画像のきめの粗さを検出するきめ検出手段と、
検出したきめの粗さが予め定められている閾値以上か否か判別することによりきめの粗さを判別するきめ粗さ判別手段と、を更に有し、
上記きめの粗さが上記閾値よりきめが粗いと判別された場合に、上記各手段が処理を実行する、
請求項4記載の画像処理装置。
Texture detection means for detecting the roughness of the image,
Texture roughness determination means for determining the roughness of the texture by determining whether the detected roughness is equal to or greater than a predetermined threshold,
When it is determined that the roughness of the texture is coarser than the threshold value, each of the units performs processing.
The image processing device according to claim 4.
画像中のテクスチャ特徴から画素におけるエッジのアングルのヒストグラムの差分に応じたヒストグラムの類似度を記憶する類似度記憶手段を有するコンピュータにより実行される方法であって、
コンピュータが、
所定のオブジェクトを含む画像中の所定領域及びその近傍領域を抽出する処理と、
抽出された各領域のテクスチャ特徴から画素におけるエッジのアングルを検出する処理と、
上記各領域ごとのアングルヒストグラムを生成する処理と、
上記類似度記憶手段を参照して、生成された各領域のヒストグラムの差分から各領域間のアングルの類似度を算出する処理と、
上記画像中の所定領域及びその近傍領域の色を検出する処理と、
予め所定数に分けられた色の区分に基づいて上記検出された各領域の色ヒストグラムを作成する処理と、
上記作成された各領域の色ヒストグラムの差分から各領域間の色の類似度を算出する処理と、
上記アングルヒストグラムの類似度と色ヒストグラム類似度を加算して、上記各領域の類似度を算出する処理と、
上記算出された各領域の類似度に基づいて、所定の拡散関数により拡散処理パラメータ値を算出する処理と、
算出したパラメータ値に基づいて、上記各領域の拡散処理を行ってオブジェクトの領域境界を抽出する処理と、
を有することを特徴とする画像処理方法。
A method executed by a computer having similarity storage means for storing a similarity of a histogram according to a difference between histograms of edge angles of pixels from a texture feature in an image,
Computer
A process of extracting a predetermined region in an image including a predetermined object and a nearby region thereof,
A process of detecting an angle of an edge in a pixel from a texture feature of each extracted region;
A process of generating an angle histogram for each of the regions,
A process of calculating the angle similarity between the regions from the difference between the generated histograms of the regions with reference to the similarity storage unit;
A process of detecting the color of the predetermined region and its neighboring region in the image,
A process of creating a color histogram of each of the detected areas based on a predetermined number of color segments;
A process of calculating the degree of color similarity between the regions from the difference between the color histograms of the regions created above,
A process of adding the similarity of the angle histogram and the color histogram similarity to calculate the similarity of each region;
A process of calculating a diffusion processing parameter value by a predetermined diffusion function based on the calculated similarity of each region;
Based on the calculated parameter value, a process of extracting the region boundary of the object by performing a diffusion process of each region,
An image processing method comprising:
JP2003161622A 2003-06-06 2003-06-06 Image processor and image processing method Pending JP2004362381A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003161622A JP2004362381A (en) 2003-06-06 2003-06-06 Image processor and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003161622A JP2004362381A (en) 2003-06-06 2003-06-06 Image processor and image processing method

Publications (1)

Publication Number Publication Date
JP2004362381A true JP2004362381A (en) 2004-12-24

Family

ID=34053984

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003161622A Pending JP2004362381A (en) 2003-06-06 2003-06-06 Image processor and image processing method

Country Status (1)

Country Link
JP (1) JP2004362381A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007110638A (en) * 2005-10-17 2007-04-26 Nikon Corp Object analyzing apparatus, imaging apparatus, and image processing program
CN107636589A (en) * 2015-05-08 2018-01-26 高通股份有限公司 System and method for reducing multiple gauge areas
US10620826B2 (en) 2014-08-28 2020-04-14 Qualcomm Incorporated Object selection based on region of interest fusion
CN112184670A (en) * 2020-09-29 2021-01-05 上海飞机制造有限公司 Method for detecting shot peening surface coverage rate

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007110638A (en) * 2005-10-17 2007-04-26 Nikon Corp Object analyzing apparatus, imaging apparatus, and image processing program
JP4654874B2 (en) * 2005-10-17 2011-03-23 株式会社ニコン Subject analysis device, imaging device, and image processing program
US10620826B2 (en) 2014-08-28 2020-04-14 Qualcomm Incorporated Object selection based on region of interest fusion
CN107636589A (en) * 2015-05-08 2018-01-26 高通股份有限公司 System and method for reducing multiple gauge areas
JP2018517972A (en) * 2015-05-08 2018-07-05 クゥアルコム・インコーポレイテッドQualcomm Incorporated System and method for reducing multiple boundary regions
CN107636589B (en) * 2015-05-08 2019-03-15 高通股份有限公司 System and method for reducing multiple limit areas
CN112184670A (en) * 2020-09-29 2021-01-05 上海飞机制造有限公司 Method for detecting shot peening surface coverage rate
CN112184670B (en) * 2020-09-29 2023-11-17 上海飞机制造有限公司 Detection method for shot peening strengthening surface coverage rate

Similar Documents

Publication Publication Date Title
CN114418957B (en) Global and local binary pattern image crack segmentation method based on robot vision
US9569827B2 (en) Image processing apparatus and method, and program
JP6719457B2 (en) Method and system for extracting main subject of image
US9779491B2 (en) Algorithm and device for image processing
US9483835B2 (en) Depth value restoration method and system
EP2176830B1 (en) Face and skin sensitive image enhancement
JP3964327B2 (en) Method and apparatus for determining a region of interest in an image and image transmission method and apparatus
AU2016101504A4 (en) Method for edge detection
CN105184763B (en) Image processing method and device
JP6547386B2 (en) Image processing apparatus and method
WO2013168618A1 (en) Image processing device and image processing method
US20140079319A1 (en) Methods for enhancing images and apparatuses using the same
JP4480958B2 (en) Digital image creation method
JP5093083B2 (en) Image processing apparatus and method, and program
JP4098021B2 (en) Scene identification method, apparatus, and program
CN109544583B (en) Method, device and equipment for extracting interested area of leather image
JP2010205067A (en) Device, method and program for extracting area
CN110268442B (en) Computer-implemented method of detecting a foreign object on a background object in an image, device for detecting a foreign object on a background object in an image, and computer program product
Samanta et al. Development of edge detection technique for images using adaptive thresholding
JP2010147937A (en) Image processing apparatus
JP2004362381A (en) Image processor and image processing method
JP2005141523A (en) Image processing method
Senturk et al. A performance analysis for seam carving algorithm
JP2004152087A (en) Method and apparatus for extracting feature vector of image
CN111091526A (en) Video blur detection method and system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060314

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090303

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090313

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090630