JP3593885B2 - Image analysis apparatus and method - Google Patents
Image analysis apparatus and method Download PDFInfo
- Publication number
- JP3593885B2 JP3593885B2 JP15086598A JP15086598A JP3593885B2 JP 3593885 B2 JP3593885 B2 JP 3593885B2 JP 15086598 A JP15086598 A JP 15086598A JP 15086598 A JP15086598 A JP 15086598A JP 3593885 B2 JP3593885 B2 JP 3593885B2
- Authority
- JP
- Japan
- Prior art keywords
- ellipse
- image
- center
- circle
- calculating
- 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
Links
- 238000000034 method Methods 0.000 title claims description 88
- 238000010191 image analysis Methods 0.000 title claims description 12
- 238000004364 calculation method Methods 0.000 claims description 56
- 230000005484 gravity Effects 0.000 claims description 2
- 238000003703 image analysis method Methods 0.000 claims 4
- 239000000872 buffer Substances 0.000 description 18
- 238000011156 evaluation Methods 0.000 description 14
- 238000012545 processing Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 9
- 238000004422 calculation algorithm Methods 0.000 description 7
- 238000007781 pre-processing Methods 0.000 description 7
- 238000012937 correction Methods 0.000 description 4
- 238000000605 extraction Methods 0.000 description 4
- 238000005259 measurement Methods 0.000 description 2
- NCGICGYLBXGBGN-UHFFFAOYSA-N 3-morpholin-4-yl-1-oxa-3-azonia-2-azanidacyclopent-3-en-5-imine;hydrochloride Chemical compound Cl.[N-]1OC(=N)C=[N+]1N1CCOCC1 NCGICGYLBXGBGN-UHFFFAOYSA-N 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000003909 pattern recognition Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、デジタル画像から円の3つのパラメータまたは楕円の5つのパラメータを抽出する技術に関するものである。応用例の1つとして、人間の調音器官の微妙な動きを非接触計測する発話認識システム及び三次元形状計測装置などが考えられる。
【0002】
【従来の技術】
与えられた画素群に最も適合する直線を求める手法として最小2乗法がある。この手法では、三元の連立一次方程式を解くことにより容易に未知の3つのパラメータを決定することができる。ところが、最小2乗法を円や楕円に適用することは容易でない。円の場合、決定すべきパラメータは中心座標と半径の計3つであるが、これを最小2乗法で求める場合、非線形連立方程式となり、解を求めるためにGauss−Newton法などの最適化計算を行う必要があり複雑となる。また円以外の楕円になると、決定すべきパラメータは中心座標、長径、半径、傾きの5つとなりさらに複雑となる。
これを解決するために円の場合、画素群を特定点に対して反転させることにより、直線の最小2乗法に置き換える手法(信学論,J75−DII,1338−1345,1992)などが提案された。しかしながら楕円の場合はこのように簡単にはいかない。楕円の場合、円よりもさらに余計に2つ未知のパラメータを決定せねばならないからである。楕円を効率よくかつ素早く切り出すためにはパラメータ次元数の削減が必要となる。
従来の楕円抽出技術は、おおむね中心座標を算出し、その後に長径、短径、及び傾きを算出する手法をとる。例えばTsujiらはエッジ画像から単純な勾配オペレータによって各エッジにおける傾きを計算し、その傾きが等しいエッジの中点が楕円の中心であるという性質を用いて楕円の中心を算出した(IEEE Trans.Comp.,27,777−781,1978)。さらにNairらはハフ変換を用いることにより高速化を行った(Pattern Recognition Let.,17,777−784,1996)。Tsujiらの手法では最終的には2パラメータの最小2乗法に落ち着くが、やはり最後に非線形な形が残る。またこれらの手法は画像にノイズが含まれていない場合威力を発揮するが、画像にノイズが存在し、中心座標の算出に失敗した場合には楕円を正しく抽出することができない。
【0003】
他の中心算出手法としては特開平8−210811号公報がある。この手法においては、走査線を一定方向に移動させ、走査線と画像との交点の中点を算出し、それらの交点の距離を投票値とすることにより、最大の投票値を得るものを楕円の中心とした。
【0004】
また特開平7−311847号公報では領域抽出枠を設けて、画像との接点の座標から中心座標を含めた楕円の5つのパラメータを求める手法を提案した。
【0005】
しかしながらこれらの手法でも楕円に切れ目があったり、ノイズがあったりした場合には正しく抽出するのが困難である。特開昭59−123981号公報では切れ目が画像の縦軸もしくは横軸に平行になるように画像を回転させ、切れ目に平行に走査線を動かし、画像を切り取る長さが最大である走査線の中点を中心とする手法を提案した。しかし切れ目が複数ある場合には適応できない。
【0006】
【発明が解決しようとする課題】
本発明は、円または楕円の図形的性質を用いることにより、画像にノイズや切れ目が含まれていても、円または楕円のパラメータが算出可能な画像解析技術を提供することを目的としている。
【0007】
【課題を解決するための手段】
まず、本発明の一側面を、図1を用いて説明する。本発明の画像解析装置は、図1で示すように、前処理部11、仮中心算出部12、長径・短径算出部13、傾き算出部14、および評価部15を含んで構成される。図1において、前処理部11は細線化等を行いエッジ画像を生成する。仮中心算出部12は、ノイズに応じて種々の算出方法を選択して適用する。処理が、長径・短径算出部13を初めて通過した時、抽出対象が円の場合は、半径、中心のX座標、Y座標の計3つのパラメータを算出することができる。他方、抽出対象が楕円の場合は、長径、短径、中心のX座標、Y座標の4つのパラメータが算出される。さらに楕円の場合は続く傾き算出部14で傾きが算出され、それに続く評価部15では仮中心算出部12で決定した中心座標とは異なる中心座標値が新たに決定される。これはノイズを含む画像から円・楕円を抽出する過程において、中心座標の精度が他のパラメータ算出に大きな影響を与えるからであり、一度中心座標を決定しても、理想的な座標とは大きく隔たる可能性があるからである。この結果を、再び長径・短径算出部13に返すことにより、新たに長径および短径の長さが算出可能である。これらのパラメータ算出を評価部15が満たす条件を満足できるまで繰り返し行うことにより、精度よくパラメータを算出することが可能である。
【0008】
以上の構成においては、エッジ画像がノイズを含んでいる場合でも、切れ目が生じている場合でも、その状態によって場合分けすることにより、中心を算出することができる。また楕円の図形的性質を用いることにより、二次方程式の形式で長径及び短径の長さを算出することができる。さらにここで算出された長径と短径の比の値によってエッジ画像を円とそれ以外の楕円に振り分けることができる。
【0009】
楕円と判定した場合、その傾きを求めると同時に、その図形的特徴から新たにエッジ画像の中心を算出することができる。本発明によればエッジ画像の状態によることなく楕円の傾きが算出可能であり、新たに中心座標を算出することができる。よって仮中心算出部12において求めた中心座標の精度がたとえ悪くても、これらの操作を繰り返すことにより、より精度のよいパラメータを後に算出することができる。
【0010】
さらに、本発明について説明する。
【0011】
本発明によれば、上述の目的を達成するために、数値化された被解析画像に含まれる円および楕円を解析する画像解析装置に、上記被解析画像から中心座標を算出する中心座標算出手段と、上記中心座標に基づいて円の半径または楕円の長径および短径を算出する径算出手段とを設け、上記径算出手段が、(1)楕円の中心を点Oとし、その周上に角AOBが90度になるように点A,点Bをとれば、線分OA,線分OBの長さの2乗の逆数の和は一定であるという性質、および、(2)楕円の周上に点Aをとり、中心Oを通り点Aにおける楕円の接線に平行な直線と楕円との交点を点B,点Cとすれば三角形ABCの面積は一定であるという性質を利用して円の半径または楕円の長径および短径を算出するようにしている。
【0012】
この構成においては、また楕円の図形的性質を用いることにより、二次方程式の形式で長径及び短径の長さを算出することができる。さらにここで算出された長径と短径の比の値によってエッジ画像を円とそれ以外の楕円に振り分けることができる。
【0013】
この構成において、上記長径および短径の比の値を所定の閾値に比較して上記被解析画像が円であるか楕円であるかを判定するようにできる。たとえば、長径と短径の比の値が閾値以上である時、被解析画像を楕円と判定する。あるいは、長径と短径の比の値が閾値以下である時、被解析画像を円と判定する。
【0014】
また、上記被解析画像が円と判定されたときに上記長径を上記円の半径として出力してもよい。また、上記短径を上記円の半径として出力してもよい。
【0015】
また、被解析画像が円と判定された場合に、算出された上記中心座標および半径を、上記被解析画像により適合するように補正するようにしてもよい。たとえば、最小2乗法で補正する。
【0016】
また、上記中心座標算出手段および径算出手段で算出された楕円の中心座標、長径および短径をパラメータに持ち、座標軸に平行な軸を有する楕円と、上記被対象画像のエッジ画像との交点を算出し、これら交点に基づいて上記被解析画像の傾きを算出する傾き算出手段をさらに設けるようにしてもよい。たとえば、算出した楕円の中心及び長径、短径をパラメータに持ち、座標軸に平行な軸を有する楕円と、もとのエッジ画像との交点を、反時計周りに順に点A,点B,点C,点Dとした時、直線ACまたは直線BDの傾きの2倍をもとの被解析画像の傾きとする。
【0017】
また、上記傾き算出手段は、上記交点および上記中心座標に基づいて上記被解析画像の傾きを算出するようにしてもよい。たとえば、楕円の傾きを求める際に楕円の中心Oと4つの交点A,B,C,Dとを結ぶ直線の傾きの2倍を楕円の傾きとする。
【0018】
また、上記交点に基づいて新たな中心座標を算出するようにしてもよい。たとえば、線分ACまたは線分BDの中点を新たな被解析画像の中心座標とする。あるいは、直線ACと直線BDの交点を新たな被解析画像の中心座標とする。あるいは、点Bまたは点Dから直線ACに、点Aまたは点Cから直線BDに下した垂線の足を新たな被解析画像の中心座標とする。あるいは、点A,点O,点Cに対する最小2乗直線と、点B,点O,点Dに対する最小2乗直線の交点を新たな被解析画像の中心座標とする。
【0019】
また、上記新たな中心座標に基づいて楕円の5つのパラメータを算出する操作を、規定回数だけ繰り返すようにしてもよい。
【0020】
また、上記新たな中心座標に基づいて楕円の5つのパラメータを算出する操作を、上記パラメータの変化量が既定値以下になるまで繰り返すようにしてもよい。
【0021】
さらに、本発明は、方法の態様あるいはコンピュータソフトウェアの態様で実現することも可能である。
【0022】
【発明の実施の態様】
以下、本発明の実施例について図2以降の図面を参照して説明する。この実施例においては、例えば、コンピュータシステムを用いて画像の本発明の画像解析を行なう。コンピュータシステム自体は周知であるので説明を行なわない。なお、この実施例に関連する説明においては、動作のステップをブロックにより示しているが、このブロックの1つ1つあるいは複数のブロックを一まとめにあるいは1つのステップを複数のハードウェア要素で構成し、ハードウェアの態様で実装してもよいことはもちろんである。
【0023】
図2に本実施例のパラメータ抽出動作の概要を示す。本発明の中心部はこの部分である。図2において、被解析静止画像は前処理ステップS1で前処理された後、仮中心算出ステップS2、長径・短径算出ステップS3、傾き算出ステップS4、および評価ステップS5でそれぞれ処理される。前処理ステップS1は、画像を細線化したり、ノイズ除去等、誤認識を将来するファクタを除去ないし低減したりするものである。仮中心算出ステップS2は画像の質に応じて種々の態様で中心座標を算出するものである。長径・短径算出ステップS3は楕円の複数の性質を利用して長径および短径を算出する。傾き算出ステップS4は、算出した中心座標、長径、短径等から画像の傾きを算出する。評価ステップS5は得られたパラメータ(円で3つ、楕円で5つ)を評価し、評価が否定的であれば、中心座標を再設定して再度パラメータの算出を行なう。評価が肯定的になるまで同様のルーチンが繰り返される。
【0024】
つぎに、上述のステップS1〜S5について詳細に説明する。前処理ステップS1の詳細を図3に示す。まず被解析画像甲はステップS11において白黒画像かフルカラー画像かを判定される。白黒画像だった場合、ステップS12においてそれが1ビット画像かどうかが判定される。ステップS11またはS12の判定でいずれかが「No」だった場合、ステップS13において閾値処理を含むフィルタ処理によって2値化される。よって次ステップS14に通される被解析画像甲は白黒2値化被解析画像乙となる。ステップS14ではラプラシアンを含む局所型オペレータによってエッジ部が抽出される。さらにステップS15では、ステップS14で算出したエッジ強度に対してある適切な閾値を設定し、再び2値化被解析エッジ画像丙とする。エッジ画像の座標値はバッファ1(図示しない)に貯えられる。画像丙は仮中心算出ステップS2に送られる。
【0025】
仮中心算出ステップS2の詳細を図4に示す。図4ではエッジ画像の状態によって中心座標算出方法を変えている。まず図5のようにエッジ画像に一定長以上の直線成分が含まれている場合、ステップS201にてこれを除去する。次に図6に示すように画像のX軸及びY軸に平行に走査線を移動させ、エッジ画像がこれらの走査線を切り取る場合のみ、つまりエッジ画像との交点のうち隣り合わないものが2組ある場合のみ、それらの中点を各々バッファ2,3(図示しない)に貯える(ステップS205,S213)。交点が1組以下だったり、3組以上ある場合には、中点を計算しない。例えば図7のようにエッジ画像がかすれており、交点が1組しかない場合や、図8のようにノイズがあり交点が3組以上存在する場合などである。走査線を両軸に対して平行に移動し、バッファ2,3に貯えられた中点の個数が共に閾値(本実施例では5)以上の場合、各々の中点を通る直線の式を最小2乗法により算出し(ステップS209,S217)、ステップS218にてこれら2直線の交点を求め、それを仮中心算出ステップS2の出力とする。一方バッファ2,3に溜まる中点のいずれかの個数が閾値未満だった場合、ステップS219に移る。ステップS219の処理の流れを図9に示す。この部分は前記のTsujiらによる手法と同様である。処理の内容自体は図9の記載から明らかであるので説明を省略する。ステップS219をもってしても、中心を求めることができない場合は、エッジ画素の重心をもって中心としたり、非線形最小2乗法などによって楕円の5つのパラメータを求めることにする。
【0026】
図4の動作の詳細は以下のとおりである。
[ステップS200] エッジ画像に一定長以上の線分があるかどうかを判別する。このような線分はノイズである。このような線分がある場合にはステップS201に進む。なければ、ステップS202に進む。
[ステップS201] 線分をエッジ画像から除去する。
[ステップS202] 垂直な直線を引くためのインデックスiを0に初期設定する。
[ステップS203] 直線X=iをひく。
[ステップS204] エッジ画像との間に隣り合わない交点の組が2個かどうかを判別する。そうであれば、有効なデータであるのでステップS205に進み、そうでなければ、ステップ206に進む。
[ステップS205] 交点の中点を算出してバッファ2に格納する。この後ステップS206に進む。
[ステップS206] インデックスiを1だけ増分する。
[ステップS207] インデックスが所定値wより小さいかどうか判別する。
wは対象領域の水平方向の幅である。小さければ、ステップ203に戻り処理を繰り返す。小さくなければ、ステップS208に進む。
[ステップS208] バッファ2内の中点の個数が閾値以上であれば中心算出の直線を求めるために、ステップS209へ進む。閾値未満であれば、正確な直線算出が困難なので、ステップ219(図9)へ進む。
[ステップS209] 最小2乗法により中点から中線を算出する。
[ステップS210] 水平な直線を引くためのインデックスjを0に初期設定する。
[ステップS211] 直線Y=jをひく。
[ステップS212] エッジ画像との間に隣り合わない交点の組が2個かどうかを判別する。そうであれば、有効なデータであるのでステップS213に進み、そうでなければ、ステップ214に進む。
[ステップS213] 交点の中点を算出してバッファ3に格納する。
[ステップS214] インデックスjを1だけ増分する。
[ステップS215] インデックスが所定値hより小さいかどうか判別する。
hは対象領域の垂直方向の高さである。小さければ、ステップ211に戻り処理を繰り返す。小さくなければ、ステップS216に進む。
[ステップS216] バッファ2内の中点の個数が閾値以上であれば中心算出の直線を求めるために、ステップS217へ進む。閾値未満であれば、正確な直線算出が困難なので、ステップ219(図9)へ進む。
[ステップS217] 最小2乗法により中点から中線を算出する。
[ステップS218] 2本の中線の交点を求め出力する。
[ステップS219] 同じ傾きのエッジの中点から中心を求める(図9)。
【0027】
以上のような処理を仮中心算出ステップS2にて行い、長径・短径算出ステップS3に進む。
【0028】
ここでは、長径・短径算出ステップS3の詳細な手順を説明する前に、長径・短径算出のベースについてまず説明する。すなわち長径・短径算出ステップS3において楕円の図形的性質を用いて長径及び短径の長さを算出する方法を示す。
【0029】
仮中心算出ステップS2の出力値を楕円画像の仮の中心Oの座標値とし、角AOBが90度となるように楕円周上に点A,点Bを定めると以下のような関係式を持つ。ただしa,bは楕円の長径及び短径の長さである。
【0030】
【数1】
仮中心算出ステップS2の出力値をO(X,Y)とし、値90に対して十分に小さい値Φをパラメータとして設定し(本実施例ではΦ=sin−11/10)、バッファ1に貯えられたエッジ画像座標値のうち角AOBが(90−Φ)以上、(90+Φ)以下であるような座標の組(A,B)をすべて決定する。これら決定した組に対して1/OA2+1/OB2を計算し、その値の度数分布を求める。最も大きい度数を持つカテゴリをpとすれば、これが1/a2+1/b2となっているはずである。次にa,bに関するもう一つの関係式を用いる。楕円周上の任意の1点をAとし、点Aにおける楕円の接線の傾きと平行で楕円の中心Oを通る直線を引き、楕円周との交点を点B,点Cとすれば、
【0031】
【数2】
なる関係式を持つ。デジタル画像の場合、点B,点Cが存在しない場合があるが、バッファ1に貯えられた座標の中で楕円の中心Oに関して互いに反対位置にあり、上記直線との距離が最短である2組の座標を算出し、それらエッジから直線に下した垂線の足を点B,点Cと定める。再びすべてのエッジ座標Aに対して三角形ABCの面積を求め、その値の度数分布を求める。最も大きい度数を持つカテゴリをqとすれば、これがabとなっているはずである。以上の二つの図形的性質を示す図を図13(a)(b)に示す。この時a,bはtに関する二次方程式
【0032】
【数3】
の2解となる。これを解いて、
【0033】
【数4】
を得る。
【0034】
つぎに、長径・短径算出ステップS3の詳細を説明する。長径・短径算出ステップS3は、さらにステップS31、S32、S33に分けることができる。ステップS31は上述のp=1/a2+1/b2を求めるものである。ステップS32は、上述のq=abを求めるものである。ステップS33は、pおよびqから長径aおよび短径bを求め、さらにエッジ画像が円か楕円かを判定するものである。ステップS31、S32およびS33の処理の流れをそれぞれ図10、図11および図12に示す。これらは並列に処理しても直列に処理してもよい。
【0035】
図10のステップ31の処理は以下のとおりである。
[ステップS311] インデックスi,jを1に初期設定する。
[ステップS312] バッファ1のi個目の座標Aiを抽出する。
[ステップS313] バッファ1のj個目の座標Bjを抽出する。
[ステップS314] 角AiOBjが(90−Φ)度以上、(90+Φ)度以下かどうかを判別する。そうであれば考慮対象であるのでステップS315に進み、そうでなければ考慮対象外であるのでステップS316に進む。
[ステップS315] ヒストグラムに(OAi)−2+(OBj)−2の値を蓄える。
[ステップS316] インデックスjを1だけ増分する。
[ステップS317] バッファ1のj個目のデータが空かどうかを判別する。
空でなければステップS313に戻り処理を繰り返す。空であればステップS318に進む。
[ステップS318] i=i+1、j=1に設定する。
[ステップS319] バッファ1のi個目のデータが空かどうか判別する。空でなければ、ステップS312に戻り処理を繰り返す。空であればステップS320に進む。
[ステップS320] 最大度数のカテゴリをpに代入する。
【0036】
図11のステップ32の処理は以下のとおりである。
[ステップS321] インデックスをi=j=k=l=0に初期設定する
[ステップS322] バッファ1のi個目の座標Aiを抽出する。
[ステップS323] 座標Aiにおけるエッジの傾きを計算する。
[ステップS324] OAiを通る直線l1:f(x,y)=0を算出する。
[ステップS325] 座標Oを通り、傾きSの直線l2:g(x,y)=0を算出する。
[ステップS326] バッファ1のj個目の座標Bjを抽出する。
[ステップS327] 直線l2と座標Bjの距離Ljおよび座標Bjから下ろした垂線の足B’jを算出する。
[ステップS328] f(B’j)>=0かどうか判別する。そうであればステップS329に進む。そうでなければ、ステップS334へ進む。
[ステップS329] k=0かどうかを判別する。そうであればステップS330へ進む。そうでなければ、ステップS332へ進む。
[ステップS330] Lb=Lj、B=B’jとする。
[ステップS331] k=1とする。
[ステップS332] Lb>Ljを判別する。そうであればステップS333へ進む。そうでなければステップS334へ進む。
[ステップS333] Lb=Lj、B=B’jとする。
[ステップS334] l=0かどうかを判別する。そうであればステップS335へ進む。そうでなければステップS337へ進む。
[ステップS335] Lc=Lj、C=B’jとする。
[ステップS336] l=1とする。
[ステップS337] Lc>Ljを判別する。そうであればステップS338へ進む。そうでなければステップS339へ進む。
[ステップS338] Lc=Lj、C=B’jとする。
[ステップS339] j=j+1とする。
[ステップS340] バッファ1のj個目のデータが空かどうか判別する。空でなければステップS326に戻り処理を繰り返す。空であればステップS341へ進む。
[ステップS341] 三角形AiBCの面積を求め、ヒストグラム2に蓄える。
[ステップS342] j=1、i=i+1とする。
[ステップS343] バッファ1のi個目のデータが空かどうか判別する。空でなければステップS322に戻り処理を繰り返す。空であればステップS344へ進む。
[ステップS344] 最大度数のカテゴリをqに代入する。
【0037】
以上の長径aおよび短径bを求めるために必要なpおよびqが求まった。そして図12のステップS33で長径aおよび短径bを求め、さらに円/楕円の判別を行なう。すなわち、aとbとの比の値が閾値(本実施例では1.05)以下の場合、与えられたエッジ画像を中心がO(X,Y),半径がaまたはbの円と判定し、補正ステップに渡す。この補正ステップではステップS33の出力値を初期値とする最小2乗法などで、より適合度の高いパラメータを算出する。もちろん初期値のまま出力してもよい。一方、ステップS33においてエッジ画像を楕円と判定した場合、残りの1つのパラメータである傾きを決定するために傾き算出ステップS4に移行する。
【0038】
なお、図12のステップS33の処理は以下のとおりである。
[ステップS345] p、qから長径aおよび短径bを求める。
[ステップS346] a/b<=Tかどうかを判別する。そうであればステップS347へ進む。そうでなければステップS348へ進む。
[ステップS347] エッジ画像を円と判断し所望の補正ステップへ進む。
[ステップS348] エッジ画像を楕円と判断しステップS4へ進む。
【0039】
つぎに、傾き算出ステップS4の処理について説明する。図14は傾き算出ステップS4での処理の流れを示す。まず中心がO、長径がaで短径がbのX軸Y軸に平行な軸を持つ楕円Uを描く(ステップS401)。この楕円とエッジ画像との交点を図15に示すように点A,点B,点C,点Dとすれば、線分ACと線分BDは直交し、その交点は楕円の中心と一致する。エッジ画像上の点Pに対して、直線OPと楕円Uの交点をP’とし、線分PP’の長さを持って楕円とエッジ画像上の画素との距離と定義する。今座標平面を以下の4つの領域に分ける(ステップS402)。それらを領域1(x>=Xかつy>Y)、領域2(x<Xかつy>=Y)、領域3(x<=Xかつy<Y)、領域4(x>Xかつy<=Y)とする。各領域内において楕円Uの外部にあって楕円Uとの距離が最小であるエッジ上の画素と、楕円Uの内部にあって楕円Uとの距離が最小であるエッジ上の画素とを選択し、それらを結ぶ線分と楕円Uとの交点を算出し、順に点A,点B,点C,点Dとする(ステップS403)。この時点Oと4つの交点のうちいずれか(本実施例では点A)を結ぶ直線の傾きをθとすれば、2θが求める楕円の傾きである(ステップS404)。こうしてこの時点で楕円の5つのパラメータがすべて算出できる。
【0040】
線分ACと線分BDとの交点をとれば、これは理想的には楕円の中心座標と一致するはずであるが、実際には一致していない。そこで評価ステップS5が満足しないパラメータを傾き算出ステップS4が算出した場合、この新たに求めた中心を仮中心算出ステップS2の出力値とし、再び長径・短径算出ステップS3に戻す処理を行う。この操作を評価ステップS5が満足するまで繰り返す。評価ステップS5では線分ACと線分BDの角度が基準値内であるという条件にしてもよいし、線分ACと線分BDの交点と、直前に算出された楕円の中心座標との距離が基準値以内であるとしてもよいし、線分ACと線分BDの中点の距離が基準値以内であるとしてもよいし、線分ACまたは線分BDの中点が一方の線分の上にどの程度乗っているかを基準にしてもよい。また必要回数だけ評価ステップS5から長径・短径算出ステップS3に戻すループを回し、必要回数ループを回した後に得られるパラメータを評価ステップS5の出力としてもよい。ただしこのようなループを回すためにはエッジ画像と楕円Uとの間に最低でも対応する1組の交点(例えば点Aと点C)が求まっている必要がある。この場合線分ACの中点を新たな中心座標と置換することが可能である。対応する1組の交点が求まっていない場合は、求められた交点の一つと中心座標とを結んでできる直線の傾きをもってθとし、ループは回さない。また交点を1点も求めることができない場合は、本手法によっては傾きを算出することができず、最小2乗法などの手段により傾きを求める。ただし、本実施例で用いた画像では交点が1点も求めることができない程のノイズを持つものは存在しなかった。
【0041】
【発明の効果】
本発明によれば、円を含む楕円の5つのパラメータを複雑な計算をすることなしに算出することが可能となる。またエッジ画像にノイズが含まれていたり、切れ目が生じている場合でもパラメータの算出が可能である。
【図面の簡単な説明】
【図1】本発明を説明するためのブロック図である。
【図2】本発明の実施例を全体的に示すフローチャートである。
【図3】図2のステップS1の詳細なアルゴリズムを示す図である。
【図4】図2におけるステップS2の詳細なアルゴリズムを示す図である。
【図5】図4におけるステップS201を説明する図である。
【図6】図4における中点算出手法を説明する図である。
【図7】図4においてエッジ画像と直線との交点が1点のみである具体例を示す図である。
【図8】図4においてエッジ画像と直線との交点が3点以上ある場合の具体例を示す図である。
【図9】図4におけるステップS219の詳細なアルゴリズムを示すフローチャートである。
【図10】図2におけるステップS3の一部(ステップS31)の詳細なアルゴリズムを示すフローチャートである。
【図11】図2におけるステップS3の一部(ステップS32)の詳細なアルゴリズムを示すフローチャートである。
【図12】図2におけるステップS3の一部(ステップS33)の詳細なアルゴリズムを示すフローチャートである。
【図13】楕円の図形的性質を示す図である。
【図14】図2におけるステップS4の詳細なアルゴリズムを示すフローチャートである。
【図15】図14における傾き算出手法を説明する図である。
【符号の説明】
11 前処理部
12 仮中心算出部
13 長径・短径算出部
14 傾き算出部
15 評価部
S1 前処理ステップ
S2 仮中心算出ステップ
S3 長径・短径算出ステップ
S4 傾き算出ステップ
S5 評価ステップ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technique for extracting three parameters of a circle or five parameters of an ellipse from a digital image. As one of the application examples, an utterance recognition system for non-contact measurement of a subtle movement of a human articulator, a three-dimensional shape measurement device, and the like are considered.
[0002]
[Prior art]
There is a least-squares method as a method of obtaining a straight line that best fits a given pixel group. In this method, three unknown parameters can be easily determined by solving a ternary simultaneous linear equation. However, it is not easy to apply the least squares method to a circle or an ellipse. In the case of a circle, the three parameters to be determined are a total of the center coordinates and the radius. However, when these are determined by the least square method, a non-linear simultaneous equation is obtained, and optimization calculation such as Gauss-Newton method is performed in order to obtain a solution. It must be done and becomes complicated. Further, if the shape is an ellipse other than a circle, the parameters to be determined are five, that is, the center coordinate, the major axis, the radius, and the inclination, which is further complicated.
In order to solve this, in the case of a circle, a method of inverting a pixel group with respect to a specific point to replace the method with a straight line least squares method (IEICE, J75-DII, 1338-1345, 1992) has been proposed. Was. However, this is not easy in the case of an ellipse. This is because in the case of an ellipse, two more unknown parameters must be determined more than a circle. In order to cut out an ellipse efficiently and quickly, it is necessary to reduce the number of parameter dimensions.
The conventional ellipse extraction technique employs a method of calculating center coordinates, and then calculating a major axis, a minor axis, and an inclination. For example, Tsuji et al. Calculated the slope of each edge from an edge image by a simple gradient operator, and calculated the center of the ellipse using the property that the midpoint of the edge having the same slope is the center of the ellipse (IEEE Trans. Comp. , 27, 777-781, 1978). Further, Nair et al. Increased the speed by using the Hough transform (Pattern Recognition Let., 17, 777-784, 1996). Although the method of Tsuji et al. Eventually settles in a two-parameter least squares method, a non-linear shape remains at the end. These methods are effective when the image does not contain noise, but cannot extract the ellipse correctly when the image has noise and the calculation of the center coordinates fails.
[0003]
As another center calculation method, there is JP-A-8-210811. In this method, the scanning line is moved in a certain direction, the midpoint of the intersection between the scanning line and the image is calculated, and the distance between those intersections is used as the voting value, so that the one that obtains the largest voting value is an ellipse. The center of.
[0004]
Also, Japanese Patent Application Laid-Open No. 7-311847 has proposed a method in which an area extraction frame is provided and five parameters of an ellipse including a center coordinate are obtained from coordinates of a contact point with an image.
[0005]
However, even with these methods, it is difficult to extract correctly if the ellipse has a cut or noise. In JP-A-59-123981, the image is rotated so that the cut is parallel to the vertical or horizontal axis of the image, the scanning line is moved in parallel with the cut, and the length of the scanning line that cuts the image is the maximum. A method centered on the midpoint was proposed. However, it cannot be applied when there are multiple breaks.
[0006]
[Problems to be solved by the invention]
SUMMARY OF THE INVENTION It is an object of the present invention to provide an image analysis technique capable of calculating a parameter of a circle or an ellipse by using a graphic property of a circle or an ellipse even if the image includes noise or a break.
[0007]
[Means for Solving the Problems]
First, one aspect of the present invention will be described with reference to FIG. As shown in FIG. 1, the image analysis device of the present invention includes a preprocessing
[0008]
In the above configuration, the center can be calculated by dividing the case depending on the state, whether the edge image includes noise or a break. In addition, the length of the major axis and the minor axis can be calculated in the form of a quadratic equation by using the graphic properties of the ellipse. Further, the edge image can be sorted into a circle and other ellipses based on the value of the ratio of the major axis to the minor axis calculated here.
[0009]
When it is determined that the ellipse is an ellipse, the center of the edge image can be newly calculated from the graphic feature at the same time when the inclination is obtained. According to the present invention, the inclination of the ellipse can be calculated without depending on the state of the edge image, and the center coordinates can be newly calculated. Therefore, even if the accuracy of the center coordinates obtained by the temporary
[0010]
Further, the present invention will be described.
[0011]
According to the present invention, in order to achieve the above-described object, a central coordinate calculating means for calculating central coordinates from the analyzed image is provided to an image analyzing apparatus for analyzing a circle and an ellipse included in the digitized analyzed image. And, provided with a diameter calculating means for calculating the radius of the circle or the major axis and the minor axis of the ellipse based on the center coordinates, the diameter calculating means, (1) Let the center of the ellipse be point O, and So that the angle AOB is 90 degrees Taking the points A and B, the property that the sum of the reciprocals of the squares of the lengths of the line segments OA and OB is constant, and (2) If the point A is set on the circumference of the ellipse and the intersection of the ellipse with a straight line passing through the center O and parallel to the tangent of the ellipse at the point A is point B and point C, the property that the area of the triangle ABC is constant is used. Then, the radius of the circle or the major axis and the minor axis of the ellipse are calculated.
[0012]
In this configuration, the length of the major axis and the minor axis can be calculated in the form of a quadratic equation by using the graphic properties of the ellipse. Further, the edge image can be sorted into a circle and other ellipses based on the value of the ratio of the major axis to the minor axis calculated here.
[0013]
In this configuration, it is possible to determine whether the analyzed image is a circle or an ellipse by comparing the value of the ratio between the major axis and the minor axis to a predetermined threshold value. For example, when the value of the ratio between the major axis and the minor axis is equal to or greater than the threshold, the analyzed image is determined to be an ellipse. Alternatively, when the value of the ratio between the major axis and the minor axis is equal to or less than the threshold, the analyzed image is determined to be a circle.
[0014]
Further, when the analyzed image is determined to be a circle, the major axis may be output as the radius of the circle. Further, the minor axis may be output as the radius of the circle.
[0015]
Further, when the analyzed image is determined to be a circle, the calculated center coordinates and radius may be corrected so as to be more suitable for the analyzed image. For example, the correction is performed by the least square method.
[0016]
Further, the center coordinates of the ellipse calculated by the center coordinate calculation means and the diameter calculation means, having a major axis and a minor axis as parameters, the intersection of the ellipse having an axis parallel to the coordinate axis and the edge image of the target image. An inclination calculating means for calculating and calculating the inclination of the analyzed image based on these intersections may be further provided. For example, the intersection of the ellipse having the axis, the major axis, and the minor axis of the calculated ellipse as parameters, and having an axis parallel to the coordinate axis, and the original edge image are defined in the order of points A, B, and C in a counterclockwise direction. , Point D, the slope of the original analyzed image is twice the slope of the straight line AC or the straight line BD.
[0017]
The inclination calculating means may calculate an inclination of the analyzed image based on the intersection and the center coordinates. For example, when obtaining the inclination of the ellipse, the inclination of the ellipse is twice the inclination of the straight line connecting the center O of the ellipse and the four intersections A, B, C, and D.
[0018]
Further, a new center coordinate may be calculated based on the intersection. For example, the midpoint of the line segment AC or the line segment BD is set as the center coordinate of the new analyzed image. Alternatively, the intersection of the straight line AC and the straight line BD is set as the center coordinate of the new analyzed image. Alternatively, the foot of the perpendicular drawn from the point B or D to the straight line AC and from the point A or C to the straight line BD is set as the center coordinate of the new analyzed image. Alternatively, the intersection of the least-squares straight line for points A, O, and C and the least-squares straight line for points B, O, and D is set as the center coordinate of the new analyzed image.
[0019]
The operation of calculating the five parameters of the ellipse based on the new center coordinates may be repeated a specified number of times.
[0020]
The operation of calculating the five parameters of the ellipse based on the new center coordinates may be repeated until the amount of change of the parameter becomes equal to or less than a predetermined value.
[0021]
Furthermore, the present invention can be realized in the form of a method or computer software.
[0022]
DESCRIPTION OF THE PREFERRED EMBODIMENTS
Hereinafter, embodiments of the present invention will be described with reference to FIGS. In this embodiment, for example, the image analysis of the present invention is performed on an image using a computer system. The computer system itself is well known and will not be described. In the description related to this embodiment, the operation steps are indicated by blocks, but one or more of the blocks are collectively or one step is constituted by a plurality of hardware elements. However, it is needless to say that it may be implemented in the form of hardware.
[0023]
FIG. 2 shows an outline of the parameter extracting operation of the present embodiment. This is the central part of the present invention. In FIG. 2, the analyzed still image is preprocessed in a preprocessing step S1, and then processed in a provisional center calculation step S2, a major axis / minor axis calculation step S3, an inclination calculation step S4, and an evaluation step S5. The pre-processing step S1 is to remove or reduce factors that may cause erroneous recognition in the future, such as thinning an image or removing noise. The provisional center calculation step S2 is for calculating the center coordinates in various modes according to the quality of the image. The major axis / minor axis calculation step S3 calculates the major axis and the minor axis using a plurality of properties of the ellipse. In the inclination calculation step S4, the inclination of the image is calculated from the calculated center coordinates, major axis, minor axis, and the like. The evaluation step S5 evaluates the obtained parameters (three circles and five ellipses). If the evaluation is negative, the center coordinates are reset and the parameters are calculated again. The same routine is repeated until the evaluation becomes positive.
[0024]
Next, the above-described steps S1 to S5 will be described in detail. FIG. 3 shows details of the preprocessing step S1. First, the image to be analyzed is determined in step S11 as a black-and-white image or a full-color image. If it is a monochrome image, it is determined in step S12 whether or not it is a 1-bit image. If either is “No” in the determination at step S11 or S12, binarization is performed by filter processing including threshold processing at step S13. Therefore, the analyzed image A passed to the next step S14 is a black and white binary analyzed image B. In step S14, an edge portion is extracted by a local operator including Laplacian. Further, in step S15, an appropriate threshold value is set for the edge strength calculated in step S14, and the binarized analyzed edge image C is again set. The coordinate values of the edge image are stored in a buffer 1 (not shown). Image C is sent to provisional center calculation step S2.
[0025]
FIG. 4 shows details of the provisional center calculation step S2. In FIG. 4, the method of calculating the center coordinates is changed depending on the state of the edge image. First, when the edge image includes a straight line component having a certain length or more as shown in FIG. 5, this is removed in step S201. Next, as shown in FIG. 6, the scanning lines are moved in parallel with the X-axis and the Y-axis of the image, and only when the edge image cuts out these scanning lines, that is, two of the intersections with the edge image that do not adjoin are two. Only when there are pairs, the midpoints are stored in
[0026]
The details of the operation in FIG. 4 are as follows.
[Step S200] It is determined whether there is a line segment having a certain length or more in the edge image. Such line segments are noise. If there is such a line segment, the process proceeds to step S201. If not, the process proceeds to step S202.
[Step S201] Line segments are removed from the edge image.
[Step S202] An index i for drawing a vertical straight line is initialized to 0.
[Step S203] A straight line X = i is drawn.
[Step S204] It is determined whether there are two sets of intersections that are not adjacent to the edge image. If so, the process proceeds to step S205 because the data is valid. Otherwise, the process proceeds to step 206.
[Step S205] The midpoint of the intersection is calculated and stored in the
[Step S206] Increment the index i by one.
[Step S207] It is determined whether or not the index is smaller than a predetermined value w.
w is the horizontal width of the target area. If it is smaller, the process returns to step 203 and the process is repeated. If not, the process proceeds to step S208.
[Step S208] If the number of middle points in the
[Step S209] A midline is calculated from the midpoint by the least squares method.
[Step S210] An index j for drawing a horizontal straight line is initialized to 0.
[Step S211] A straight line Y = j is drawn.
[Step S212] It is determined whether there are two sets of intersections that are not adjacent to the edge image. If so, the process proceeds to step S213 because the data is valid. Otherwise, the process proceeds to step 214.
[Step S213] The midpoint of the intersection is calculated and stored in the
[Step S214] The index j is incremented by one.
[Step S215] It is determined whether or not the index is smaller than a predetermined value h.
h is the vertical height of the target area. If it is smaller, the process returns to step 211 and the process is repeated. If not, the process proceeds to step S216.
[Step S216] If the number of middle points in the
[Step S217] A midline is calculated from the midpoint by the least squares method.
[Step S218] The intersection of the two middle lines is obtained and output.
[Step S219] The center is determined from the midpoint of the edge having the same inclination (FIG. 9).
[0027]
The above processing is performed in the provisional center calculation step S2, and the process proceeds to the major axis / minor axis calculation step S3.
[0028]
Here, before describing the detailed procedure of the major axis / minor axis calculation step S3, the base of the major axis / minor axis calculation will be described first. That is, a method of calculating the lengths of the major axis and the minor axis using the graphic properties of the ellipse in the major axis / minor axis calculation step S3 will be described.
[0029]
The output value of the provisional center calculation step S2 is used as the coordinate value of the provisional center O of the ellipse image, and the points A and B are defined on the circumference of the ellipse so that the angle AOB becomes 90 degrees. . Here, a and b are the length of the major axis and the minor axis of the ellipse.
[0030]
(Equation 1)
The output value of the provisional center calculation step S2 is O (X, Y), and a value Φ sufficiently smaller than the value 90 is set as a parameter (in this embodiment, Φ =
[0031]
(Equation 2)
Has the relational expression In the case of a digital image, the points B and C may not exist, but two sets of coordinates stored in the
[0032]
(Equation 3)
It becomes two solutions of. Solve this,
[0033]
(Equation 4)
Get.
[0034]
Next, details of the major axis / minor axis calculation step S3 will be described. The major axis / minor axis calculation step S3 can be further divided into steps S31, S32, and S33. Step S31 is the above-mentioned p = 1 / a 2 + 1 / b 2 Is what you want. Step S32 is for obtaining the above-mentioned q = ab. In step S33, the major axis a and the minor axis b are obtained from p and q, and further, it is determined whether the edge image is a circle or an ellipse. FIGS. 10, 11, and 12 show the flow of the processes in steps S31, S32, and S33, respectively. These may be processed in parallel or in series.
[0035]
The process of step 31 in FIG. 10 is as follows.
[Step S311] The index i, j is initialized to 1.
[Step S312] The i-th coordinate Ai of the
[Step S313] The j-th coordinate Bj of the
[Step S314] It is determined whether or not the angle AiOBj is equal to or more than (90−Φ) degrees and equal to or less than (90 + Φ) degrees. If so, the process proceeds to step S315 because it is not considered, and if not, the process proceeds to step S316.
[Step S315] (OAi) is added to the histogram. -2 + (OBj) -2 Store the value of.
[Step S316] Increment the index j by one.
[Step S317] It is determined whether the j-th data in the
If not empty, the process returns to step S313 to repeat the processing. If empty, the process proceeds to step S318.
[Step S318] i = i + 1 and j = 1 are set.
[Step S319] It is determined whether the i-th data in the
[Step S320] The category of the maximum frequency is substituted for p.
[0036]
The processing in step 32 in FIG. 11 is as follows.
[Step S321] Initialize an index to i = j = k = 1 / = 0.
[Step S322] The i-th coordinate Ai of the
[Step S323] The inclination of the edge at the coordinates Ai is calculated.
[Step S324]
[Step S325] A straight line l passing through the coordinates O and having a slope S 2 : G (x, y) = 0 is calculated.
[Step S326] The j-th coordinate Bj of the
[Step S327] Straight line l 2 And the distance L between the coordinates Bj j And coordinates B j Foot B ' j Is calculated.
[Step S328] f (B ′ j )> = 0. If so, the process proceeds to step S329. Otherwise, the process proceeds to step S334.
[Step S329] It is determined whether or not k = 0. If so, the process proceeds to step S330. If not, the process proceeds to step S332.
[Step S330] L b = L j , B = B ' j And
[Step S331] Let k = 1.
[Step S332] L b > L j Is determined. If so, the process proceeds to step S333. Otherwise, the process proceeds to step S334.
[Step S333] L b = L j , B = B ' j And
[Step S334] It is determined whether l = 0. If so, the process proceeds to step S335. Otherwise, the process proceeds to step S337.
[Step S335] L c = L j , C = B ' j And
[Step S336] Let l = 1.
[Step S337] L c > L j Is determined. If so, the process proceeds to step S338. Otherwise, the process proceeds to step S339.
[Step S338] L c = L j , C = B ' j And
[Step S339] j = j + 1 is set.
[Step S340] It is determined whether the j-th data in the
[Step S341] The area of the triangle AiBC is obtained and stored in the
[Step S342] j = 1 and i = i + 1.
[Step S343] It is determined whether the i-th data in the
[Step S344] The category of the maximum frequency is substituted for q.
[0037]
P and q necessary for obtaining the major axis a and the minor axis b were determined. Then, in step S33 of FIG. 12, the major axis a and the minor axis b are obtained, and a circle / ellipse discrimination is performed. That is, when the value of the ratio between a and b is equal to or less than the threshold value (1.05 in this embodiment), it is determined that the given edge image is a circle whose center is O (X, Y) and whose radius is a or b. Pass to the correction step. In this correction step, a parameter having a higher degree of conformity is calculated by a least square method or the like using the output value of step S33 as an initial value. Of course, the output may be performed with the initial value. On the other hand, if it is determined in step S33 that the edge image is an ellipse, the process proceeds to a tilt calculation step S4 to determine the remaining one parameter, the tilt.
[0038]
The processing in step S33 in FIG. 12 is as follows.
[Step S345] The major axis a and the minor axis b are obtained from p and q.
[Step S346] It is determined whether a / b <= T. If so, the process proceeds to step S347. Otherwise, the process proceeds to step S348.
[Step S347] The edge image is determined to be a circle, and the process proceeds to a desired correction step.
[Step S348] The edge image is determined to be an ellipse, and the flow advances to step S4.
[0039]
Next, the processing of the inclination calculation step S4 will be described. FIG. 14 shows the flow of the process in the inclination calculation step S4. First, an ellipse U having an axis parallel to the X-axis and Y-axis having a center O, a major axis a, and a minor axis b is drawn (step S401). If the intersection of the ellipse and the edge image is point A, point B, point C, and point D as shown in FIG. 15, the line segment AC and the line segment BD are orthogonal, and the intersection point coincides with the center of the ellipse. . The point of intersection of the straight line OP and the ellipse U with respect to the point P on the edge image is defined as P ′, and the length of the line segment PP ′ is defined as the distance between the ellipse and the pixel on the edge image. Now, the coordinate plane is divided into the following four areas (step S402). These are defined as area 1 (x> = X and y> Y), area 2 (x <X and y> = Y), area 3 (x <= X and y <Y), and area 4 (x> X and y < = Y). In each area, a pixel on the edge outside the ellipse U and having the minimum distance to the ellipse U and a pixel on the edge inside the ellipse U and the minimum distance to the ellipse U are selected. Then, the intersection of the line segment connecting them and the ellipse U is calculated, and the points are set to point A, point B, point C, and point D in order (step S403). Assuming that the inclination of the straight line connecting the time point O and any one of the four intersections (point A in the present embodiment) is θ, 2θ is the inclination of the ellipse to be obtained (step S404). Thus, at this point, all five parameters of the ellipse can be calculated.
[0040]
If the intersection between the line segment AC and the line segment BD is taken, this should ideally coincide with the center coordinate of the ellipse, but does not actually coincide. Therefore, when the inclination calculation step S4 calculates a parameter that is not satisfied by the evaluation step S5, the newly calculated center is used as the output value of the temporary center calculation step S2, and the process returns to the major axis / minor axis calculation step S3 again. This operation is repeated until the evaluation step S5 is satisfied. In the evaluation step S5, the condition may be such that the angle between the line segment AC and the line segment BD is within the reference value, or the distance between the intersection of the line segment AC and the line segment BD and the center coordinate of the ellipse calculated immediately before. May be within the reference value, the distance between the line segment AC and the midpoint of the line segment BD may be within the reference value, or the midpoint of the line segment AC or the line segment BD may be one of the line segments. The degree of riding on the top may be used as a reference. Alternatively, a loop that returns from the evaluation step S5 to the major axis / minor axis calculation step S3 by the required number of times may be rotated, and a parameter obtained after the required number of loops may be used as the output of the evaluation step S5. However, in order to rotate such a loop, it is necessary that at least one set of intersection points (for example, point A and point C) corresponding between the edge image and the ellipse U has been obtained. In this case, it is possible to replace the midpoint of the line segment AC with the new center coordinates. If a corresponding set of intersections has not been determined, the inclination of a straight line connecting one of the determined intersections and the center coordinates is defined as θ, and the loop is not performed. If no intersection can be obtained, the inclination cannot be calculated by this method, and the inclination is obtained by means such as the least square method. However, none of the images used in this example had such noise that no intersection could be found.
[0041]
【The invention's effect】
According to the present invention, it is possible to calculate five parameters of an ellipse including a circle without performing complicated calculations. Also, parameters can be calculated even when the edge image contains noise or a break occurs.
[Brief description of the drawings]
FIG. 1 is a block diagram for explaining the present invention.
FIG. 2 is a flowchart generally showing an embodiment of the present invention.
FIG. 3 is a diagram showing a detailed algorithm of step S1 in FIG. 2;
FIG. 4 is a diagram showing a detailed algorithm of step S2 in FIG. 2;
FIG. 5 is a diagram illustrating step S201 in FIG.
FIG. 6 is a diagram illustrating a midpoint calculation method in FIG.
FIG. 7 is a diagram showing a specific example in which the intersection between an edge image and a straight line is only one point in FIG.
FIG. 8 is a diagram showing a specific example in a case where there are three or more intersections between an edge image and a straight line in FIG.
FIG. 9 is a flowchart showing a detailed algorithm of step S219 in FIG. 4;
FIG. 10 is a flowchart showing a detailed algorithm of a part of step S3 (step S31) in FIG. 2;
FIG. 11 is a flowchart showing a detailed algorithm of part of step S3 (step S32) in FIG. 2;
FIG. 12 is a flowchart showing a detailed algorithm of a part of step S3 (step S33) in FIG. 2;
FIG. 13 is a diagram showing the graphic properties of an ellipse.
FIG. 14 is a flowchart showing a detailed algorithm of step S4 in FIG. 2;
FIG. 15 is a diagram illustrating a slope calculation method in FIG.
[Explanation of symbols]
11 Preprocessing unit
12 Temporary center calculation unit
13 Long and short diameter calculator
14 Slope calculation unit
15 Evaluation section
S1 Pre-processing step
S2 Temporary center calculation step
S3 major axis / minor axis calculation step
S4 Slope calculation step
S5 Evaluation step
Claims (12)
上記被解析画像から中心座標を算出する中心座標算出手段と、
上記中心座標に基づいて円の半径または楕円の長径および短径を算出する径算出手段とを有し、
上記径算出手段は、
(1)楕円の中心を点Oとし、その周上に角AOBが90度になるように点A,点Bをとれば、線分OA,線分OBの長さの2乗の逆数の和は一定である
(2)楕円の周上に点Aをとり、中心Oを通り点Aにおける楕円の接線に平行な直線と楕円との交点を点B,点Cとすれば三角形ABCの面積は一定である
という性質を利用して円の半径または楕円の長径および短径を算出することを特徴とする画像解析装置。In an image analysis device that analyzes a circle and an ellipse included in a numerically analyzed image,
Center coordinate calculating means for calculating center coordinates from the analyzed image;
Diameter calculating means for calculating the radius of the circle or the major axis and the minor axis of the ellipse based on the center coordinates,
The diameter calculating means is:
(1) If the center of the ellipse is point O and points A and B are set on the circumference so that the angle AOB is 90 degrees, the sum of the reciprocals of the squares of the lengths of the line segments OA and OB is obtained. (2) Take point A on the circumference of the ellipse, and if the intersection of the ellipse with a straight line passing through the center O and parallel to the tangent to the ellipse at point A is point B and point C, the area of triangle ABC is An image analyzing apparatus for calculating a radius of a circle or a major axis and a minor axis of an ellipse using the property of being constant.
上記被解析画像から中心座標を算出する中心座標算出ステップと、
上記中心座標に基づいて円の半径または楕円の長径および短径を算出する径算出ステップとを有し、
上記径算出ステップは、
(1)楕円の中心を点Oとし、その周上に角AOBが90度になるように点A,点Bをとれば、線分OA,線分OBの長さの2乗の逆数の和は一定である
(2)楕円の周上に点Aをとり、中心Oを通り点Aにおける楕円の接線に平行な直線と楕円との交点を点B,点Cとすれば三角形ABCの面積は一定である
という性質を利用して円の半径または楕円の長径および短径を算出することを特徴とする画像解析方法。In an image analysis method for analyzing a circle and an ellipse included in a numerically analyzed image,
A center coordinate calculation step of calculating center coordinates from the analyzed image;
A diameter calculation step of calculating a radius of a circle or a major axis and a minor axis of an ellipse based on the center coordinates,
The diameter calculating step includes:
(1) If the center of the ellipse is point O and points A and B are set on the circumference so that the angle AOB is 90 degrees, the sum of the reciprocals of the squares of the lengths of the line segments OA and OB is obtained. (2) Take point A on the circumference of the ellipse, and if the intersection of the ellipse with a straight line passing through the center O and parallel to the tangent to the ellipse at point A is point B and point C, the area of triangle ABC is An image analysis method comprising calculating a radius of a circle or a major axis and a minor axis of an ellipse using the property of being constant.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15086598A JP3593885B2 (en) | 1998-06-01 | 1998-06-01 | Image analysis apparatus and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15086598A JP3593885B2 (en) | 1998-06-01 | 1998-06-01 | Image analysis apparatus and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH11344310A JPH11344310A (en) | 1999-12-14 |
| JP3593885B2 true JP3593885B2 (en) | 2004-11-24 |
Family
ID=15506076
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP15086598A Expired - Fee Related JP3593885B2 (en) | 1998-06-01 | 1998-06-01 | Image analysis apparatus and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3593885B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| DE10045052A1 (en) * | 2000-09-12 | 2002-03-28 | Nat Rejectors Gmbh | Coin recognizing method involves comparing profile of coin with profile of reference coin, specifying maximum similarity between coins and generating signal indicating if coin is acceptable or not |
| JP2010205067A (en) | 2009-03-04 | 2010-09-16 | Fujifilm Corp | Device, method and program for extracting area |
| CN104613869B (en) * | 2015-01-28 | 2017-05-10 | 南京信息工程大学 | Method and system for detecting elliptical hole group based on maximum inscribed circle |
| CN115824047B (en) * | 2022-12-06 | 2023-12-08 | 国网四川省电力公司映秀湾水力发电总厂 | Alignment method for geometrical center position of unit component |
-
1998
- 1998-06-01 JP JP15086598A patent/JP3593885B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH11344310A (en) | 1999-12-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114119488B (en) | Intelligent detection method for dimension quality of prefabricated laminated slab for factory | |
| US6941016B1 (en) | Method for finding contours in an image of an object | |
| CN114648445A (en) | Multi-view high-resolution point cloud splicing method based on feature point extraction and fine registration optimization | |
| CN103020626A (en) | Method and system for detecting elliptical target in image | |
| CN112907601A (en) | Automatic extraction method and device for tunnel arch point cloud based on feature transformation | |
| CN113096121A (en) | Pavement crack detection method and system based on cross fracture mechanics and image processing | |
| US7274820B2 (en) | Pattern evaluation system, pattern evaluation method and program | |
| CN121305229A (en) | A Visual Inspection Method for Standardized Rebar Binding on Construction Sites | |
| CN114998096A (en) | Method and system for detecting crack proportion in pavement image | |
| CN113837995B (en) | Human body limb circumference measuring method and device, intelligent terminal and storage medium | |
| JP3593885B2 (en) | Image analysis apparatus and method | |
| CN117746055A (en) | Algorithm for extracting stereo feature based on 3D point cloud data | |
| JPH07210655A (en) | Ophthalmic image processing device | |
| CN119205859A (en) | An improved point cloud registration method for complex curved surface components | |
| JP4139664B2 (en) | Roundness automatic measuring method, mask pattern quality measuring device | |
| CN119006384A (en) | Method and system for detecting surface shape difference of workpiece | |
| CN111612083A (en) | Finger vein identification method, device and equipment | |
| Dion et al. | Generalized cylinders extraction in a range image | |
| CN112133366B (en) | Facial shape prediction method based on genetic data and generative adversarial convolutional neural network | |
| US8068653B2 (en) | Method and system for second bend plane detection of ear canal surfaces | |
| CN116188761B (en) | An automatic identification and positioning method and device for regular shape arrays | |
| JP4164166B2 (en) | Irradiation area extraction apparatus, irradiation area extraction method, and computer-readable storage medium | |
| JP3595393B2 (en) | Construction drawing recognition method and recognition device | |
| JP3678523B2 (en) | Construction drawing recognition method and construction drawing recognition apparatus | |
| Mara | Pottery plotted by laser–3D acquisition for documentation and analysis of symmetry of ancient ceramics |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040427 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040511 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040709 |
|
| 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: 20040810 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040823 |
|
| 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: 20070910 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080910 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090910 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100910 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |