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

JP3562871B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP3562871B2
JP3562871B2 JP14426695A JP14426695A JP3562871B2 JP 3562871 B2 JP3562871 B2 JP 3562871B2 JP 14426695 A JP14426695 A JP 14426695A JP 14426695 A JP14426695 A JP 14426695A JP 3562871 B2 JP3562871 B2 JP 3562871B2
Authority
JP
Japan
Prior art keywords
image
image data
projection
data
object image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP14426695A
Other languages
Japanese (ja)
Other versions
JPH08313210A (en
Inventor
道夫 石井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus 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 Olympus Corp filed Critical Olympus Corp
Priority to JP14426695A priority Critical patent/JP3562871B2/en
Publication of JPH08313210A publication Critical patent/JPH08313210A/en
Application granted granted Critical
Publication of JP3562871B2 publication Critical patent/JP3562871B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Description

【0001】
【産業上の利用分野】
この発明は、2次元画像中に含まれた対象物の重心等の特徴量を算出処理する画像処理装置に関する。
【0002】
【従来の技術】
従来、2次元画像中に含まれた対象物の重心点を検出する方法としては、次に示す方法が知られている。すなわち、まず対象物画像を各ライン毎に取り込む際に、上記対象物体が占める部分の距離及び前記対象物体の中心までの基準座標からの距離により、対象物体の基準座標からのモーメントを求める。この操作を対象物が存在する各ラインに対して行い、全モーメントの総和を求める。更に、前記対象物体の占める距離について各ラインの総和を求めた後に、全モーメントの総和を全ランレングスの総和で除算した結果より、基準座標に対する対象物体の重心位置を検出する方法である。
【0003】
この重心点位置検出方法については、例えば、特公昭56−30802号公報に開示されているが、次に図11に基づいて、上記従来の重心点位置検出方法を具体的に説明する。図11において、斜線で示された対象物画像の重心(x,y)は、次式(1)の演算によって求められる。
x=Σ{l×(a+l/2)}/Σl
y=Σ(l×p)/Σl ・・・・・・・・(1)
ここで、lは各ラインで対象物が占める部分のランレングス、aはy基準座標軸から対象物が検出されるまでのランレングス、pはx基準座標軸から対象物が検出されるまでのランレングスであり、i=1〜nである。
【0004】
したがって、図11に示した対象画像においては、上記(1)式より次式(2)に示すように重心(x,y)を算出することができる。
x=〔{3×(2+3/2)}+{5×(1+5/2)}+{3×(2+3/2)}〕/(3+5+3)=3.5
y={(3×1)+(5×2)+(3×3)}/(3+5+3)=2 ・・・・・(2)
【0005】
【発明が解決しようとする課題】
撮像装置(CCDカメラ等)を用いた情報処理装置、画像検査装置等においては、撮像された対象物の重心位置を、いかに高速且つ正確に演算するかが課題となっている。
【0006】
ところで、上記従来の重心点検出方法では、図12に示すように、対象物に対応する画像に傷などの欠陥が混入した場合には、正確な重心位置を算出するためには、演算処理のコントロールが複雑になり、これを実現するためのハードウェアが大規模になるという問題点があった。また、撮像装置の視野内に複数の対象物が存在し、これらの対象物毎に重心位置等を演算する必要がある場合、各ライン毎に複数の対象物に対するモーメントを求め、これを対象物毎にソーティングして、複数の対象物を分離して行くことは非常に困難であった。
【0007】
本発明は、従来の画像処理装置における上記問題点を解消するためになされたもので、請求項1記載の発明は、撮像装置が扱う画像の特定のフォーマットより予め設定される先見情報により、入力画像から対象物画像のみを抽出し、対象物画像の特徴量を正確且つ高速に求めることを可能とすると共に、入力画像から切り出した画像データより対象物画像データ以外の画像データを比較的簡単に判定できるようにした画像処理装置を提供することを目的とする。また請求項記載の発明は、対象物画像データ以外の画像データを不要データとして簡単に処理できるようにした画像処理装置を提供することを目的とし、また請求項記載の発明は、対象物画像の重心位置を求めることが可能な画像処理装置を提供することを目的とし、また請求項4記載の発明は、対象物画像データ以外の画像データを不要データとして、より一層容易に処理できるようにした画像処理装置を提供することを目的とする。
【0008】
【課題を解決するための手段及び作用】
上記問題点を解決するため、請求項1記載の発明は、撮像手段によって入力された画像中の特徴量を算出処理しようとする対象物画像を含むm×nの画像領域を2次元的に記憶する手段と、予め設定された先見情報により前記記憶手段に含まれる対象物画像データ以外の画像データの存在を検出・判定する手段と、該検出・判定手段の結果に応じて対象物画像データ以外の画像データを不要データとして処理する手段とを有し、対象物画像データの抽出を行ってから該対象物画像の特徴量の算出処理を行うようにした画像処理装置において、前記対象物画像データ以外の画像データの存在を検出・判定する手段は、対象物画像を含むm×nの画像領域に含まれる画像データのX投影及びY投影を行う手段と、m×nの画像領域の基準画素から外側に向かって前記X投影及びY投影を検査し、投影データが存在しない座標軸を不連続点とみなし、この座標軸より外側の画像データを対象物画像データ以外の画像データと判定する手段とで構成されていることを特徴とするものである。
【0009】
このように構成した画像処理装置においては、予め設定された情報により対象物画像データ以外の隣接する画像データや傷あるいは汚れなどによる誤った画像データを除去でき、対象物画像データの正確な特徴量を高速に算出処理することができる。また、m×nの画像領域中の対象物画像データ以外の画像データの存在を検出・判定する手段を簡単な構成で実現することができる。
【0010】
また請求項記載の発明は、請求項1記載の画像処理装置において、前記対象物画像データ以外の画像データを不要データとして処理する手段は、前記判定手段で判定された対象物画像データ以外の画像データをマスクする手段で構成するものである。これにより、対象物画像データ以外の画像データを不要データとして処理する手段を、簡単な構成で実現することができる。また請求項記載の発明は、請求項1又は2記載の画像処理装置において、前記対象物画像の特徴量の算出処理は、対象物画像の重心算出処理とするものである。このように、対象物画像の特徴量を重心とすることにより、複数の対象物画像の重心演算を高速且つ正確に算出することが可能となる。また請求項4記載の発明は、請求項2記載の画像処理装置において、前記マスク手段は、前記X投影あるいはY投影の一方の投影に係る前記判定手段の判定結果に基づき、他方の投影に係る、対象物画像データ以外の画像データをマスクすることを特徴とするものである。このように、一方の投影に係る判定手段の判定結果に基づき他方の投影に係る対象物画像データ以外の画像データをマスクすることにより、不要データをより一層容易に処理することができる。
【0011】
【実施例】
次に実施例について説明する。本発明による対象物画像における特徴抽出を行う画像処理装置は、比較的簡単なハードウェアあるいはソフトウェアのいずれによっても実現可能であるが、ここではハードウェアによって実現する実施例について具体的に説明する。
【0012】
まず、本発明に係る画像処理装置が対象とする画像フォーマット例を図1に基づいて説明する。この画像フォーマット例は、図1に示すように、基準画像1A,1B間に、複数のコードデータ群2が存在し、基準画像1A,1Bからコードデータまでの距離L1及びコードデータ間の距離L2は、予め定まった値(先見情報)をもったものとする。本実施例においては、全てのコードデータの中心座標及び前記先見情報(L1,L2)より推測される基準画像の中心位置を真の中心座標とし、以降の処理を行うものとする。
【0013】
図2は図1において楕円で囲まれた部分を拡大した画像を示している。図2においては、画像入力装置から入力された2次元画像から、少なくとも1つのコードデータを切出し、この画像信号をマトリックス的に記憶するm×n領域として、m=5,n=7の場合を示している。図2に示した例においては、重心を求めたい対象コードデータ(B)の他に、隣接するコードデータ(A)及びコードデータ(C)が、m×nの画像領域に混在している。
【0014】
ここで、画像フォーマットにより決定される先見情報として、各コードデータは前記5×7のマトリックス画像領域に少なくとも1つは含まれていること、及び隣接するコードデータ間には少なくとも1画素以上のデータの存在しない領域が与えられているものとする。
【0015】
図3は、本発明の第1実施例を示すブロック構成図である。図3において、11は入力画像信号から、先見情報保持手段18により与えられる先見情報にしたがって、対象物画像を含むm×nのマトリックス画像領域を切り出す手段及び記憶する手段であり、その構成を図9に示す。本実施例では、m×nのマトリックス画像領域として、m方向に5画素、n方向に7画素の5×7のマトリックス構成とし、更にこの5×7のマトリックス画像領域の中心を基準画素Aijとする(この実施例では、Aij=a34)。したがって、上記先見情報保持手段18には、前記先見情報L1,L2,Aij=a34,m=5,n=7が保持されているものとする。
【0016】
また図3において、12は上記m×nのマトリックス画像領域中の対象物画像に対してY投影を行う第1の演算手段であり、13はY方向への基準座標からのモーメントを求める第2の演算手段である。更に同様に、14は上記m×nのマトリックス画像領域中の対象物画像に対してX投影を行う第3の演算手段であり、15はX方向への基準座標からのモーメントを求める第4の演算手段である。また、16はm×nのマトリックス画像領域の記憶手段11に含まれる基準座標からの対象物画像の中心位置のY方向における補正量を、前記第1及び第2の演算手段12,13の出力結果より算出する第5の演算手段であり、17はm×nのマトリックス画像領域の記憶手段11に含まれる基準座標からの対象物画像の中心位置のX方向における補正量を、前記第3及び第4の演算手段14,15の出力結果より算出する第6の演算手段である。
【0017】
次に、第1の演算手段12の構成例を図4に基づいて説明する。この演算手段12は、次式(3)で示すY方向における列ベクトルの和(Y投影)を求める第7の演算手段12−1と、この結果より対象物画像のY方向への不連続点の検出及び後述のX方向の不連続点から列ベクトルの要素をマスクするマスク回路からなる第8の演算手段12−2と、この第8の演算手段12−2のm個の演算結果の総和(ΣYs=ΣYs〔i〕)を求める加算器からなる第9の演算手段12−3とで構成されている。
Ys〔1〜5〕′=(a11+a12・・・+a17,a21+a22・・・+a27,・・・・・a51+a52・・・+a57) ・・・・・(3)
【0018】
図5は、第2の演算手段13の構成例を示す図で、この第2の演算手段13は、Y方向において、重み付け係数の演算を行うもので、重み付け係数Cy〔1〜5〕は、基準画素を中心に設定される。本実施例では、Cy〔1〕=−2,Cy〔2〕=−1、Cy〔3〕=0,Cy〔4〕=1,Cy〔5〕=2に設定する。そして各行の行ベクトルの和に、この重み付け係数の演算を求める第10の演算手段13−1と、この第10の演算手段13−1のm個の演算結果の総和(ΣYp=ΣYp〔i〕)を求める第11の演算手段13−2とで第2の演算手段を構成している。
【0019】
次に、第3の演算手段14の構成例を図6に基づいて説明する。この演算手段14は、次式(4)で示すX方向における行ベクトルの和(X投影)を求める第12の演算手段14−1と、この結果から対象画像のX方向への不連続点の検出及び前述のY方向の不連続点から行ベクトルの要素をマスクするマスク回路からなる第13の演算手段14−2と、この第13の演算手段14−2のn個の演算結果の総和(ΣXs=ΣXs〔i〕)を求める加算器からなる第14の演算手段14−3とで構成されている。。
Xs〔1〜7〕′=(a11+a21・・・+a51,a12+a22・・・+a52,・・・・・a17+a27・・・+a57) ・・・・(4)
【0020】
図7は、第4の演算手段15の構成例を示す図で、この第4の演算手段15はX方向において、重み付け係数の演算を行うもので、重み付け係数Cx〔1〜7〕は、基準画素を中心に設定される。本実施例では、Cx〔1〕=−3,Cx〔2〕=−2,Cx〔3〕=−1,Cx〔4〕=0,Cx〔5〕=1,Cx〔6〕=2,Cx〔7〕=3に設定する。そして各列のベクトルの和に、この重み付け係数の演算を求める第15の演算手段15−1と、この第15の演算手段15−1のn個の演算結果の総和(ΣXp=ΣXp〔i〕)を求める第16の演算手段15−2とで第4の演算手段15を構成している。
【0021】
図8の(A)は、Y方向において基準画素からの重心位置の補正量ΔYを求める第5の演算手段16の構成例を示す図で、第1の演算手段12の出力結果ΣYsを第2の演算手段13の出力結果ΣYpで除算する除算器16−1で構成されている。また図8の(B)は、X方向において基準画素からの重心位置の補正量ΔXを求める第6の演算手段17の構成例を示す図で、第3の演算手段14の出力結果ΣXsを第4の演算手段15の出力結果ΣXpで除算する除算器17−1で構成されている。
【0022】
次に、対象物画像データの不連続点の検出手段について説明する。図2において、図中のAijを基準画素とする5×7のマトリックス画像領域を切り出し、記憶手段11に格納された画像を図9に示す。この中で左斜線で示す部分を対象物画像(黒画像)に、右斜線で示す部分を隣接するコードデータあるいは傷や汚れによる非対象画像とする。本実施例において、記憶手段11に格納された画像の不連続点の検出は、投影結果によって“0”を検出することによって行われる。この実施例においては、Y投影において、次式(5)で示すように、不連続点は検出されない。
Ys〔1〜5〕′=(1,2,3,3,1) ・・・・・・・(5)
X投影においては、次式(6)で示されるように、不連続点Xs〔2〕′及びXs〔6〕′が検出される。
Xs〔1〜7〕=(1,0,3,3,2,0,1) ・・・・(6)
【0023】
したがって、この結果、画素(a11,a21,a31,a41,a51)及び(a17,a27,a37,a47,a57)の画像信号をマスクするためのコントロール信号が発生する。すなわち、X投影及びY投影の結果が“0”である部分を検出することによって、対象物画像の不連続点を検出し、前記第1及び第3の演算手段12,14に含まれるマスク回路からなる第8及び第13の演算手段12−2,14−2に、上記コントロール信号を印加し、次式(7),(8)で示す第8及び第13の演算手段の演算結果が得られる。
Ys〔1〜5〕=(0,2,3,3,0) ・・・・・・・・(7)
Xs〔1〜7〕=(0,0,3,3,2,0,0,) ・・・(8)
なお、図9において、Yp(=Cy×Ys),Xp(=Cx×Xs)は、それぞれ第2,第4の演算手段13,15の演算結果を示す。
【0024】
この結果に対して、重み付け係数の演算結果の総和をΣXp,ΣYpとして、基準画素Aijからの補正量ΔY,ΔXを求めると、次式(9),(10)のように表される。
ΔY=ΣYp/ΣYs=1/8=0.125 ・・・・・・・・・(9)
ΔX=ΣXp/ΣXs=−1/8=−0.125 ・・・・・・・(10)
この補正量ΔY,ΔXを基準画素Aijの座標値に加算することにより、対象物画像の正確な中心座標(重心)を算出することができる。
【0025】
次に、第2実施例を図10に基づいて説明する。本実施例における入力対象2次元画像及び基本構成は前述の第1実施例と殆ど同一であり、図4及び図6におけるマスク回路からなる第8及び第13の演算手段12−2,14−2の処理を若干変更することで対応できるようにしたものである。この実施例におけるAijを基準画素とする5×7のマトリックス画像領域を切り出した部分を図10に示す。この中で左斜線で示す部分を対象物画像(黒画像)に、右斜線で示す部分を隣接するコードデータあるいは傷や汚れによる非対象画像とする。
【0026】
この実施例においては、Y投影において、次式(11)で示すように、不連続点Ys〔2〕′が検出される。
Ys〔1〜5〕′=(3,0,3,4,2) ・・・・・・・(11)
またX投影においては、次式(12)で示されるように、不連続点Xs〔6〕′が検出される。
Xs〔1〜7〕′=(1,1,3,3,2,0,2) ・・・(12)
したがって、この結果、画素(a11,a12,a13,a14,a15,a16,a17)及び(a17,a27,a37,a47,a57)の画像信号をマスクするためのコントロール信号が発生する。すなわち、X投影及びY投影の結果が“0”である部分を検出することによって、対象物画像の不連続点を検出し、前記第1及び第3の演算手段12,14に含まれるマスク回路からなる第8及び第13の演算手段12−2,14−2に、上記コントロール信号を印加し、次式(13),(14)で示す第8及び第13の演算手段の演算結果が得られる。
Ys〔1〜5〕=(0,0,3,3,1) ・・・・・・・・(13)
Xs〔1〜7〕=(0,0,2,3,2,0,0,) ・・・(14)
【0027】
この結果に対して、重み付け係数の演算結果の総和をΣXp,ΣYpとして、基準画素Aijからの補正量ΔY,ΔXを求めると、次式(15),(16)のように表される。
ΔY=ΣYp/ΣYs=4/7=0.57 ・・・・・・・・・・(15)
ΔX=ΣXp/ΣXs=0/7=0 ・・・・・・・・・・・(16)
この補正量ΔY,ΔXを基準画素Aijの座標値に加算することにより、対象物画像の正確な中心座標(重心)を算出することができる。
【0028】
以上の処理は、前記第1及び第3の演算手段における不連続点検出手段の算出結果を一旦記憶し、マスク信号としてX及びY方向のマスク回路からなる第8及び第13の演算手段に、図3に示すようにたすき掛けで与えることによって実現できる。
【0029】
ところで、上記各実施例では、m×nのマトリックス画像領域の記憶手段は、基準画素Aijをマトリックスの中心に配置しているものを示したが、基準画素はマトリックス上のどこに設定しても構わない。また、上記各実施例では、記憶手段はm×nの画像信号をマトリックス的に記憶するものであり、m=5,n=7の場合について示したが、m×nの記憶手段は重心を計算したい対象物画像を含む必要があり、例えば、m=7,n=9の場合についても、本実施例と殆ど同一の構成で、図3における各演算手段のビット長を変更することによって、容易に実現することができる。
【0030】
以上のように、対象物画像の大きさに合わせて、m×nのマトリックス記憶手段及び撮像手段から入力される2次元画像記憶手段からm×nマトリックス記憶手段にデータを読み込むコントロール回路を若干変更することによって、基準画素からの対象物画像の重心補正量を容易に算出することができる。
【0031】
【発明の効果】
以上実施例に基づいて説明したように、請求項1記載の発明によれば、対象物画像の特徴量を高速に且つ正確に算出することが可能となると共に、対象物画像データ以外の画像データの存在を検出・判定する手段を、簡単な構成で実現することが可能となる。また請求項記載の発明によれば、対象物画像データ以外の画像データを不要データとして処理する手段を、簡単な構成で実現することができる。また請求項記載の発明によれば、複数の対象物画像の重心演算を高速且つ正確に行うことが可能となる。また請求項4記載の発明によれば、対象物画像データ以外の画像データを不要データとして処理するマスク手段を、より簡単な構成で実現することができる。
【図面の簡単な説明】
【図1】本発明にかかる画像処理装置が対象とする画像フォーマット例を示す図である。
【図2】図1に示した画像フォーマット例の一部を拡大して示す図である。
【図3】本発明の第1実施例を示すブロック構成図である。
【図4】図3に示した第1実施例における第1の演算手段の構成例を示す図である。
【図5】図3に示した第1実施例における第2の演算手段の構成例を示す図である。
【図6】図3に示した第1実施例における第3の演算手段の構成例を示す図である。
【図7】図3に示した第1実施例における第4の演算手段の構成例を示す図である。
【図8】図3に示した第1実施例における第5及び第6の演算手段の構成例を示す図である。
【図9】図3に示した第1実施例の動作を説明するための説明図である。
【図10】本発明の第2実施例及びその動作を説明する図である。
【図11】従来の重心点検出方法を説明するための説明図である。
【図12】従来の重心点検出方法を説明するための説明図である。
【符号の説明】
1A,1B 基準画像
2 コードデータ群
A,C 隣接コードデータ
B 対象コードデータ
11 記憶手段
12 第1の演算手段
13 第2の演算手段
14 第3の演算手段
15 第4の演算手段
16 第5の演算手段
17 第6の演算手段
18 先見情報保持手段
12−1 第7の演算手段
12−2 第8の演算手段
12−3 第9の演算手段
13−1 第10の演算手段
13−2 第11の演算手段
14−1 第12の演算手段
14−2 第13の演算手段
14−3 第14の演算手段
15−1 第15の演算手段
15−2 第16の演算手段
16−1,16−2 除算器
[0001]
[Industrial applications]
The present invention relates to an image processing apparatus that calculates a feature amount such as a center of gravity of an object included in a two-dimensional image.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, the following method is known as a method of detecting the center of gravity of an object included in a two-dimensional image. That is, when capturing the target object image for each line, the moment from the reference coordinates of the target object is obtained from the distance of the portion occupied by the target object and the distance from the reference coordinates to the center of the target object. This operation is performed for each line where the object exists, and the sum of all moments is obtained. Further, a method of calculating the sum of all the lines for the distance occupied by the target object and then dividing the sum of all moments by the sum of all run lengths to detect the position of the center of gravity of the target object with respect to the reference coordinates.
[0003]
The method of detecting the position of the center of gravity is disclosed in, for example, Japanese Patent Publication No. 56-30802, and the method of detecting the position of the center of gravity of the related art will be specifically described with reference to FIG. In FIG. 11, the center of gravity (x, y) of the object image indicated by oblique lines is calculated by the following equation (1).
x = Σ {l i × ( a i + l i / 2)} / Σl i
y = Σ (l i × p i) / Σl i ········ (1)
Here, l i is the run length of the portion occupied by the object in each line, a i is the run length from the y reference coordinate axis until the object is detected, and p i is the run length from the x reference coordinate axis until the object is detected. , And i = 1 to n.
[0004]
Therefore, in the target image shown in FIG. 11, the center of gravity (x, y) can be calculated from the above equation (1) as shown in the following equation (2).
x = [{3 × (2 + 3/2)} + {5 × (1 + 5/2)} + {3 × (2 + 3/2)}] / (3 + 5 + 3) = 3.5
y = {(3 × 1) + (5 × 2) + (3 × 3)} / (3 + 5 + 3) = 2 (2)
[0005]
[Problems to be solved by the invention]
In an information processing apparatus, an image inspection apparatus, and the like using an imaging device (CCD camera or the like), how to calculate the position of the center of gravity of the imaged object at high speed and accurately is an issue.
[0006]
By the way, in the above-described conventional center-of-gravity point detection method, as shown in FIG. 12, when a defect such as a scratch is mixed in an image corresponding to an object, an arithmetic processing is required to calculate an accurate center-of-gravity position. There was a problem that control became complicated and hardware for realizing this became large-scale. Also, when there are a plurality of objects in the field of view of the imaging apparatus and it is necessary to calculate the position of the center of gravity or the like for each of these objects, the moment for the plurality of objects is obtained for each line, and this is calculated as the object. It has been very difficult to sort a plurality of objects by sorting each time.
[0007]
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems in the conventional image processing apparatus, and the invention according to claim 1 uses input information based on foresight information set in advance from a specific format of an image handled by an imaging apparatus. extracts only the object image from the image, thereby enabling the determination of the characteristic quantity of the object image accurately and at high speed, the image data other than the object image data from the image data cut out from the input image relatively easily It is an object of the present invention to provide an image processing device capable of making a determination . The invention according to claim 2, intended to provide an image processing apparatus that the image data other than the object image data can be easily processed as unnecessary data and invention according to claim 3, the object It is an object of the present invention to provide an image processing apparatus capable of determining the position of the center of gravity of an image , and the invention according to claim 4 can more easily process image data other than target object image data as unnecessary data. It is an object of the present invention to provide an image processing apparatus as described above .
[0008]
Means and Action for Solving the Problems
In order to solve the above problem, the invention according to claim 1 two-dimensionally stores an m × n image area including an object image for which a feature amount in an image input by an imaging unit is to be calculated and processed. Means for detecting and determining the presence of image data other than the object image data included in the storage means based on preset foresight information; and means for detecting and detecting the image data other than the object image data in accordance with the result of the detection / determination means. and means for processing the image data as unnecessary data, in the image processing apparatus after performing the extraction of the object image data to perform the calculation processing of the feature amount of the object image, the object image data Means for detecting and determining the presence of image data other than the image data include means for performing X projection and Y projection of image data included in the m × n image area including the target object image, and reference pixels for the m × n image area. Out of Means for examining the X projection and the Y projection toward, determining a coordinate axis having no projection data as a discontinuous point, and determining image data outside the coordinate axis as image data other than the object image data. It is characterized by having.
[0009]
In the image processing apparatus configured as described above, it is possible to remove adjacent image data other than the target object image data or erroneous image data due to scratches or dirt by using preset information, and to obtain an accurate feature amount of the target object image data. Can be calculated at high speed. Further , a means for detecting and determining the presence of image data other than the target object image data in the mxn image area can be realized with a simple configuration.
[0010]
According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the means for processing the image data other than the target object image data as unnecessary data includes a unit other than the target object image data determined by the determination unit. It is constituted by means for masking image data. Thus, a means for processing image data other than target object image data as unnecessary data can be realized with a simple configuration. According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect, the calculation of the feature amount of the target image is a center of gravity calculation of the target image. As described above, by setting the feature amount of the object image as the center of gravity, it is possible to calculate the center of gravity of a plurality of object images at high speed and accurately. According to a fourth aspect of the present invention, in the image processing apparatus according to the second aspect, the mask unit is configured to control the other projection based on a determination result of the determination unit regarding one of the X projection and the Y projection. And masking image data other than the target object image data. As described above, unnecessary data can be more easily processed by masking image data other than the target object image data related to the other projection based on the determination result of the determination unit related to one projection.
[0011]
【Example】
Next, examples will be described. The image processing apparatus for extracting features from an object image according to the present invention can be realized by relatively simple hardware or software. Here, an embodiment realized by hardware will be specifically described.
[0012]
First, an example of an image format targeted by the image processing apparatus according to the present invention will be described with reference to FIG. In this example of the image format, as shown in FIG. 1, a plurality of code data groups 2 exist between the reference images 1A and 1B, a distance L1 from the reference images 1A and 1B to the code data, and a distance L2 between the code data. Has a predetermined value (foresight information). In this embodiment, the center coordinates of all the code data and the center position of the reference image estimated from the foresight information (L1, L2) are set as true center coordinates, and the subsequent processing is performed.
[0013]
FIG. 2 shows an enlarged image of a portion surrounded by an ellipse in FIG. In FIG. 2, at least one code data is cut out from a two-dimensional image input from the image input device, and this image signal is set as an m × n area for storing in a matrix, where m = 5 and n = 7. Is shown. In the example shown in FIG. 2, adjacent code data (A) and code data (C) are mixed in the m × n image area in addition to the target code data (B) for which the center of gravity is to be obtained.
[0014]
Here, as foresight information determined by an image format, at least one of each code data is included in the 5 × 7 matrix image area, and data of at least one pixel or more is provided between adjacent code data. Is given.
[0015]
FIG. 3 is a block diagram showing a first embodiment of the present invention. In FIG. 3, reference numeral 11 denotes a unit for cutting out and storing an m × n matrix image area including an object image from an input image signal in accordance with the foresight information provided by the foresight information holding unit 18. It is shown in FIG. In this embodiment, an m × n matrix image area has a 5 × 7 matrix configuration of 5 pixels in the m direction and 7 pixels in the n direction, and the center of the 5 × 7 matrix image area is a reference pixel A ij. (In this example, A ij = a 34 ). Therefore, it is assumed that the look-ahead information holding means 18 holds the look-ahead information L1, L2, A ij = a 34 , m = 5, and n = 7.
[0016]
In FIG. 3, reference numeral 12 denotes first calculating means for performing Y projection on the object image in the m × n matrix image area, and reference numeral 13 denotes a second calculating means for obtaining a moment from the reference coordinates in the Y direction. Calculation means. Similarly, reference numeral 14 denotes a third calculating means for performing X projection on the object image in the mxn matrix image area, and 15 denotes a fourth calculating means for obtaining a moment from the reference coordinates in the X direction. It is an operation means. Reference numeral 16 denotes the correction amount in the Y direction of the center position of the object image from the reference coordinates included in the storage unit 11 of the mxn matrix image area, and the output of the first and second calculation units 12 and 13. Fifth calculating means for calculating from the result, reference numeral 17 denotes a correction amount in the X direction of the center position of the object image from the reference coordinates contained in the storage means 11 of the mxn matrix image area, and This is a sixth calculating means that calculates from the output results of the fourth calculating means 14 and 15.
[0017]
Next, a configuration example of the first calculating means 12 will be described with reference to FIG. The calculating means 12 includes a seventh calculating means 12-1 for calculating a sum (Y projection) of column vectors in the Y direction represented by the following equation (3), and a discontinuous point in the Y direction of the object image from the result. Calculating means 12-2 comprising a masking circuit for detecting a column pattern and masking a column vector element from a discontinuous point in the X direction, which will be described later, and the sum of m calculation results of the eighth calculating means 12-2 And ninth operation means 12-3 comprising an adder for obtaining (ΣYs = ΣYs [i]).
Ys [1-5] '= (a 11 + a 12 ··· + a 17, a 21 + a 22 ··· + a 27, ····· a 51 + a 52 ··· + a 57) ····· ( 3)
[0018]
FIG. 5 is a diagram showing a configuration example of the second calculating means 13. The second calculating means 13 calculates a weighting coefficient in the Y direction, and the weighting coefficient Cy [1-5] It is set around the reference pixel. In this embodiment, Cy [1] = − 2, Cy [2] = − 1, Cy [3] = 0, Cy [4] = 1, and Cy [5] = 2. Then, a tenth calculating means 13-1 for obtaining the calculation of the weighting coefficient is added to the sum of the row vectors of each row, and the sum of m calculation results of the tenth calculating means 13-1 (ΣYp = ΣYp [i]) ) Constitutes a second calculating means.
[0019]
Next, a configuration example of the third calculating means 14 will be described with reference to FIG. The calculating means 14 includes a twelfth calculating means 14-1 for calculating a sum (X projection) of row vectors in the X direction represented by the following equation (4), and calculating a discontinuous point in the X direction of the target image from the result. A thirteenth operation means 14-2 comprising a mask circuit for detecting and masking the elements of the row vector from the above-mentioned discontinuous point in the Y direction, and a sum of n operation results of the thirteenth operation means 14-2 ( (Xs = 演算 Xs [i])). .
Xs [1-7] '= (a 11 + a 21 ··· + a 51, a 12 + a 22 ··· + a 52, ····· a 17 + a 27 ··· + a 57) ···· (4 )
[0020]
FIG. 7 is a diagram showing a configuration example of the fourth calculating means 15. The fourth calculating means 15 calculates a weighting coefficient in the X direction. The weighting coefficient Cx [1-7] It is set around the pixel. In the present embodiment, Cx [1] =-3, Cx [2] =-2, Cx [3] =-1, Cx [4] = 0, Cx [5] = 1, Cx [6] = 2 Set Cx [7] = 3. Then, a fifteenth calculating means 15-1 for calculating the weighting coefficient is added to the sum of the vectors in each column, and a total sum (ΣXp = ΣXp [i]) of n calculation results of the fifteenth calculating means 15-1 ) To form a fourth calculating means 15.
[0021]
FIG. 8A is a diagram showing a configuration example of the fifth calculating means 16 for obtaining the correction amount ΔY of the position of the center of gravity from the reference pixel in the Y direction. The output result ΔYs of the first calculating means 12 is represented by the second And a divider 16-1 for dividing by the output result ΣYp of the calculating means 13. FIG. 8B is a diagram showing a configuration example of the sixth calculating means 17 for obtaining the correction amount ΔX of the position of the center of gravity from the reference pixel in the X direction, and the output result ΣXs of the third calculating means 14 is shown in FIG. 4 is composed of a divider 17-1 for dividing by the output result ΣXp of the operation means 15 of FIG.
[0022]
Next, a description will be given of a means for detecting a discontinuous point of the target object image data. In FIG. 2, a 5 × 7 matrix image area using A ij as a reference pixel in the figure is cut out, and an image stored in the storage unit 11 is shown in FIG. Among these, the portion shown by the diagonal left is the target image (black image), and the portion shown by the diagonal right is the adjacent code data or the non-target image due to scratches or dirt. In the present embodiment, the detection of the discontinuous point of the image stored in the storage unit 11 is performed by detecting “0” based on the projection result. In this embodiment, no discontinuous point is detected in the Y projection as shown by the following equation (5).
Ys [1-5] '= (1,2,3,3,1) (5)
In the X projection, discontinuous points Xs [2] 'and Xs [6]' are detected as shown by the following equation (6).
Xs [1-7] = (1,0,3,3,2,0,1) (6)
[0023]
Therefore, as a result, the control signals for masking the image signals of the pixels (a 11 , a 21 , a 31 , a 41 , a 51 ) and (a 17 , a 27 , a 37 , a 47 , a 57 ) are changed. appear. That is, by detecting a portion where the result of the X projection and the Y projection is “0”, a discontinuous point of the object image is detected, and the mask circuit included in the first and third arithmetic means 12 and 14 is detected. The control signal is applied to the eighth and thirteenth operation means 12-2 and 14-2, which are composed of the following, and the operation results of the eighth and thirteenth operation means expressed by the following equations (7) and (8) are obtained. Can be
Ys [1-5] = (0,2,3,3,0) (7)
Xs [1-7] = (0,0,3,3,2,0,0,) (8)
In FIG. 9, Yp (= Cy × Ys) and Xp (= Cx × Xs) indicate calculation results of the second and fourth calculation means 13 and 15, respectively.
[0024]
With respect to this result, the correction amounts ΔY and ΔX from the reference pixel A ij are obtained assuming that the sum of the calculation results of the weighting coefficients is ΣXp and ΣYp, and are expressed by the following equations (9) and (10).
ΔY = ΣYp / ΣYs = 1/8 = 0.125 (9)
ΔX = ΣXp / ΣXs = − / = − 0.125 (10)
By adding the correction amounts ΔY and ΔX to the coordinate value of the reference pixel A ij , it is possible to calculate the accurate center coordinates (centroid) of the target image.
[0025]
Next, a second embodiment will be described with reference to FIG. The two-dimensional image to be input and the basic configuration in this embodiment are almost the same as those in the first embodiment, and the eighth and thirteenth operation means 12-2 and 14-2 each comprising a mask circuit shown in FIGS. Can be dealt with by slightly changing the processing of FIG. FIG. 10 shows a portion obtained by cutting out a 5 × 7 matrix image area using A ij as a reference pixel in this embodiment. Among these, the portion shown by the diagonal left is the target image (black image), and the portion shown by the diagonal right is the adjacent code data or the non-target image due to scratches or dirt.
[0026]
In this embodiment, a discontinuous point Ys [2] ′ is detected in the Y projection as shown by the following equation (11).
Ys [1-5] '= (3,0,3,4,2) (11)
In the X projection, a discontinuous point Xs [6] 'is detected as shown by the following equation (12).
Xs [1-7] '= (1,1,3,3,2,0,2) (12)
Therefore, this result, the mask image signals of the pixels (a 11, a 12, a 13, a 14, a 15, a 16, a 17) and (a 17, a 27, a 37, a 47, a 57) A control signal is generated. That is, by detecting a portion where the result of the X projection and the Y projection is “0”, a discontinuous point of the object image is detected, and the mask circuit included in the first and third arithmetic means 12 and 14 is detected. The control signal is applied to the eighth and thirteenth operation means 12-2 and 14-2, which are composed of the following, and the operation results of the eighth and thirteenth operation means expressed by the following equations (13) and (14) are obtained. Can be
Ys [1-5] = (0,0,3,3,1) (13)
Xs [1-7] = (0,0,2,3,2,0,0,) (14)
[0027]
With respect to this result, the correction amounts ΔY and ΔX from the reference pixel A ij are obtained assuming that the sum of the calculation results of the weighting coefficients is ΣXp and ΣYp, and are expressed by the following equations (15) and (16).
ΔY = ΣYp / ΣYs = 4/7 = 0.57 (15)
ΔX = ΣXp / ΣXs = 0/7 = 0 (16)
By adding the correction amounts ΔY and ΔX to the coordinate value of the reference pixel A ij , it is possible to calculate the accurate center coordinates (centroid) of the target image.
[0028]
The above processing is to temporarily store the calculation result of the discontinuous point detecting means in the first and third calculating means, and to provide the eighth and thirteenth calculating means comprising mask circuits in the X and Y directions as a mask signal, As shown in FIG. 3, it can be realized by giving by crossing.
[0029]
By the way, in each of the above embodiments, the storage means of the m × n matrix image area has the reference pixel A ij arranged at the center of the matrix. However, the reference pixel may be set anywhere on the matrix. I do not care. Further, in each of the above embodiments, the storage means stores m × n image signals in a matrix, and the case where m = 5, n = 7 has been described. It is necessary to include an object image to be calculated. For example, when m = 7 and n = 9, the configuration is almost the same as that of the present embodiment, and by changing the bit length of each arithmetic unit in FIG. It can be easily realized.
[0030]
As described above, the control circuit for reading data from the m × n matrix storage means and the two-dimensional image storage means input from the imaging means to the m × n matrix storage means is slightly changed in accordance with the size of the object image. By doing so, it is possible to easily calculate the center-of-gravity correction amount of the target object image from the reference pixel.
[0031]
【The invention's effect】
As described based on the above embodiments, according to the first aspect of the invention, along with the feature amount of an object image can be and accurately calculated at high speed, the image data other than the object image data Can be realized with a simple configuration. According to the second aspect of the present invention, a means for processing image data other than the target object image data as unnecessary data can be realized with a simple configuration. According to the third aspect of the present invention, it is possible to quickly and accurately calculate the center of gravity of a plurality of target object images. According to the fourth aspect of the present invention, a masking means for processing image data other than target object image data as unnecessary data can be realized with a simpler configuration.
[Brief description of the drawings]
FIG. 1 is a diagram showing an example of an image format targeted by an image processing apparatus according to the present invention.
FIG. 2 is an enlarged view showing a part of the image format example shown in FIG. 1;
FIG. 3 is a block diagram showing a first embodiment of the present invention.
FIG. 4 is a diagram showing a configuration example of a first calculating means in the first embodiment shown in FIG. 3;
FIG. 5 is a diagram showing a configuration example of a second calculating means in the first embodiment shown in FIG. 3;
FIG. 6 is a diagram showing a configuration example of a third calculating means in the first embodiment shown in FIG. 3;
FIG. 7 is a diagram showing a configuration example of a fourth calculating means in the first embodiment shown in FIG. 3;
FIG. 8 is a diagram showing a configuration example of fifth and sixth calculation means in the first embodiment shown in FIG. 3;
FIG. 9 is an explanatory diagram for explaining the operation of the first embodiment shown in FIG. 3;
FIG. 10 is a diagram illustrating a second embodiment of the present invention and its operation.
FIG. 11 is an explanatory diagram for explaining a conventional center-of-gravity point detection method.
FIG. 12 is an explanatory diagram for explaining a conventional center-of-gravity point detection method.
[Explanation of symbols]
1A, 1B Reference image 2 Code data group A, C Adjacent code data B Target code data 11 Storage means 12 First calculation means 13 Second calculation means 14 Third calculation means 15 Fourth calculation means 16 Fifth Arithmetic means 17 Sixth arithmetic means 18 Foresight information holding means 12-1 Seventh arithmetic means 12-2 Eighth arithmetic means 12-3 Ninth arithmetic means 13-1 Tenth arithmetic means 13-2 Eleventh Calculation means 14-1 twelfth calculation means 14-2 thirteenth calculation means 14-3 fourteenth calculation means 15-1 fifteenth calculation means 15-2 sixteenth calculation means 16-1, 16-2 Divider

Claims (4)

撮像手段によって入力された画像中の特徴量を算出処理しようとする対象物画像を含むm×nの画像領域を2次元的に記憶する手段と、予め設定された先見情報により前記記憶手段に含まれる対象物画像データ以外の画像データの存在を検出・判定する手段と、該検出・判定手段の結果に応じて対象物画像データ以外の画像データを不要データとして処理する手段とを有し、対象物画像データの抽出を行ってから該対象物画像の特徴量の算出処理を行うようにした画像処理装置において、前記対象物画像データ以外の画像データの存在を検出・判定する手段は、対象物画像を含むm×nの画像領域に含まれる画像データのX投影及びY投影を行う手段と、m×nの画像領域の基準画素から外側に向かって前記X投影及びY投影を検査し、投影データが存在しない座標軸を不連続点とみなし、この座標軸より外側の画像データを対象物画像データ以外の画像データと判定する手段とで構成されていることを特徴とする画像処理装置。Means for two-dimensionally storing an m × n image area including an object image whose feature amount in an image input by the imaging means is to be calculated, and which is included in the storage means based on preset look-ahead information Means for detecting and determining the presence of image data other than the object image data to be detected, and means for processing image data other than the object image data as unnecessary data according to the result of the detection / determination means. In an image processing apparatus configured to perform a process of calculating a feature amount of the target image after extracting the target image data, the unit that detects and determines the presence of image data other than the target image data includes: Means for performing X-projection and Y-projection of image data included in an m × n image area including an image, and inspecting the X-projection and Y-projection outward from a reference pixel of the m × n image area; De It regarded coordinate axes data does not exist a discontinuity, an image processing apparatus characterized by being composed of the image data and determining means other than the object image data outside the image data from the coordinate axes. 前記対象物画像データ以外の画像データを不要データとして処理する手段は、前記判定手段で判定された対象物画像データ以外の画像データをマスクする手段で構成されていることを特徴とする請求項記載の画像処理装置。Means for processing the image data other than the object image data as unnecessary data, according to claim 1, characterized in that it is constituted by a means for masking the image data other than the object image data determined by said determining means An image processing apparatus as described in the above. 前記対象物画像の特徴量の算出処理は、対象物画像の重心算出処理であることを特徴とする請求項1又は2記載の画像処理装置。The process of calculating the feature quantity of the object image, the image processing apparatus according to claim 1 or 2, wherein the a centroid calculation process of the object image. 前記マスク手段は、前記X投影あるいはY投影の一方の投影に係る前記判定手段の判定結果に基づき、他方の投影に係る、対象物画像データ以外の画像データをマスクすることを特徴とする請求項2記載の画像処理装置。2. The image processing apparatus according to claim 1, wherein the masking unit masks image data other than the target object image data according to the other projection based on a determination result of the determining unit regarding one of the X projection and the Y projection. 2. The image processing device according to 2.
JP14426695A 1995-05-19 1995-05-19 Image processing device Expired - Fee Related JP3562871B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14426695A JP3562871B2 (en) 1995-05-19 1995-05-19 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14426695A JP3562871B2 (en) 1995-05-19 1995-05-19 Image processing device

Publications (2)

Publication Number Publication Date
JPH08313210A JPH08313210A (en) 1996-11-29
JP3562871B2 true JP3562871B2 (en) 2004-09-08

Family

ID=15358098

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14426695A Expired - Fee Related JP3562871B2 (en) 1995-05-19 1995-05-19 Image processing device

Country Status (1)

Country Link
JP (1) JP3562871B2 (en)

Also Published As

Publication number Publication date
JPH08313210A (en) 1996-11-29

Similar Documents

Publication Publication Date Title
US7889887B2 (en) Lane recognition apparatus
JP4002919B2 (en) Moving body height discrimination device
CN112270719B (en) Camera calibration method, device and system
US20020029127A1 (en) Method and apparatus for measuring 3-D information
JPH1137756A (en) Camera calibration device
CN115345946A (en) External parameter calibration method and device of automobile panoramic image system based on deep learning
CN112146834A (en) Method and device for measuring structural vibration displacement
CN108242044A (en) Image processing apparatus and image processing method
JP3562871B2 (en) Image processing device
JPH0775633A (en) Image processing device
CN115578438B (en) Size estimation method, apparatus, equipment, and storage medium based on multiple cameras
JPH076777B2 (en) Pattern contour detection method and length measuring apparatus using this method
JP2000180138A (en) Calibration plate and calibration device for visual sensor using the same
JPS59108907A (en) 3D object position detection device
JPH08313211A (en) Image processing equipment
JPH0715647A (en) Correcting method for lens distortional aberration of two-dimensional image pickup device
JP2001052167A (en) Image processing method
US20220366593A1 (en) Electronic apparatus and object detection method
JPH08171627A (en) Calibration pattern centroid detection method
JP2606409B2 (en) Vehicle monitoring method and device
JP3077265B2 (en) Shading image processing device
JP3080097B2 (en) Parallel line figure extraction method
JPH06241749A (en) Visual line intersection extracting device
JP2516587B2 (en) Shape identification method
CN119810791A (en) Image processing method and device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040210

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040409

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040601

R154 Certificate of patent or utility model (reissue)

Free format text: JAPANESE INTERMEDIATE CODE: R154

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

Free format text: PAYMENT UNTIL: 20080611

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080611

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090611

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090611

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100611

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees