JP5791475B2 - Image processing apparatus, image processing method, and image processing program - Google Patents
Image processing apparatus, image processing method, and image processing program Download PDFInfo
- Publication number
- JP5791475B2 JP5791475B2 JP2011255928A JP2011255928A JP5791475B2 JP 5791475 B2 JP5791475 B2 JP 5791475B2 JP 2011255928 A JP2011255928 A JP 2011255928A JP 2011255928 A JP2011255928 A JP 2011255928A JP 5791475 B2 JP5791475 B2 JP 5791475B2
- Authority
- JP
- Japan
- Prior art keywords
- workpiece
- edge
- image processing
- unit
- original 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
Links
Images
Landscapes
- Manipulator (AREA)
- Image Analysis (AREA)
Description
本発明は、ワークが撮像された画像からワークの輪郭線を抽出する画像処理装置、画像処理方法及び画像処理プログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and an image processing program that extract a contour line of a workpiece from an image obtained by imaging the workpiece.
一般に、マシンビジョンの分野においては、エッジ検出フィルタを用いて検出対象となるワークの輪郭線を抽出し、抽出された輪郭線でワークの位置姿勢や寸法等の計測を行うことが実施されている。 In general, in the field of machine vision, an outline of a workpiece to be detected is extracted using an edge detection filter, and the position, orientation, dimensions, and the like of the workpiece are measured using the extracted outline. .
ここで、検出対象となるワークは、樹脂成型や金属プレス等により形成された部品であることが多く、成型ムラや表面処理のバラつき、傷、汚れ等により表面に微小な凹凸が存在する。そのため、撮像したワークの画像から輪郭線を抽出しようとすると、輪郭線以外のエッジ(以下、「ノイズエッジ」という)が数多く検出され、ノイズエッジによりワークの輪郭線を誤検知してしまう場合がある。 Here, the workpiece to be detected is often a part formed by resin molding, metal press, or the like, and there are minute irregularities on the surface due to molding unevenness, surface treatment variations, scratches, dirt, and the like. For this reason, when trying to extract a contour line from an image of a captured workpiece, many edges (hereinafter referred to as “noise edges”) other than the contour line are detected, and the contour line of the workpiece may be erroneously detected due to the noise edge. is there.
これに対しては、輪郭線を含む最小の範囲にエッジ検出フィルタの検出範囲を限定し、輪郭線に相当するエッジのみを抽出するように調整することで、ノイズエッジの抽出を抑制することができる。更に、エッジの形状の特徴や長さからノイズエッジを特定する幾何学的手法やロバスト推定などの統計的手法を用いてノイズエッジを特定し、除去することで、ノイズエッジの抽出を抑制することができる。 For this, the detection range of the edge detection filter is limited to the minimum range including the contour line, and the adjustment of extracting only the edge corresponding to the contour line can suppress the extraction of the noise edge. it can. In addition, the noise edge is identified and removed using a geometric method that identifies the noise edge from the feature and length of the edge and statistical methods such as robust estimation, thereby suppressing noise edge extraction. Can do.
しかしながら、エッジ検出フィルタの検出範囲に制限を設ける場合、ワークの位置や姿勢の変動を考慮した範囲を設定しなければならず、輪郭線に相当するエッジのみを検出するための範囲設定は困難である。また、幾何学的手法や統計的手法においては、輪郭線に酷似したノイズエッジを検出する場合があり、この場合、ノイズエッジを含む輪郭線情報に基づいた計測になり、精密に輪郭線を抽出できない場合が生じ得る。 However, when limiting the detection range of the edge detection filter, it is necessary to set a range that takes into account variations in the position and orientation of the workpiece, and it is difficult to set a range for detecting only edges corresponding to contour lines. is there. In geometric and statistical methods, noise edges that closely resemble contour lines may be detected. In this case, measurement is based on contour information that includes noise edges, and the contour lines are extracted accurately. There may be cases where it cannot be done.
これに対しては、様々な形状に対応させた複数のテンプレートを揃え、複数のテンプレートをワークの輪郭にマッチングさせながら輪郭を抽出することにより、容易にワークの輪郭を抽出可能な輪郭の抽出方法が提案されている(特許文献1参照)。 For this, a contour extraction method that can easily extract the contour of a workpiece by aligning a plurality of templates corresponding to various shapes and extracting the contour while matching the plurality of templates with the contour of the workpiece. Has been proposed (see Patent Document 1).
しかしながら、特許文献1に記載の抽出方法においては、対応するテンプレートを有する既知の形状のワークに対しては有効であるが、検出対象の形状がテンプレートに対応しないものや柔軟物等の輪郭線の抽出には用いることができない。 However, the extraction method described in Patent Document 1 is effective for a workpiece having a known shape and having a corresponding template. However, the shape of the object to be detected does not correspond to the template or the outline of a flexible object or the like. It cannot be used for extraction.
そこで、本発明は、様々な位置姿勢や形状のワークの輪郭線を、精度良く抽出可能な画像処理装置及び画像処理方法並びに画像処理プログラムを提供することを目的とする。 Therefore, an object of the present invention is to provide an image processing apparatus, an image processing method, and an image processing program capable of accurately extracting contour lines of workpieces having various positions and orientations and shapes.
本発明は、撮像部により撮像されたワークの元画像を取得する元画像取得手段と、該元画像取得手段により取得された前記元画像を2値化して、該元画像からワークの概略領域を特定する領域特定手段と、該領域特定手段により特定された前記概略領域を膨張処理する膨張処理手段と、前記膨張処理手段により抽出された概略領域の境界線上に、複数の基準点を設定する基準点設定手段と、前記元画像からコントラスト差に基づき、ワークの輪郭に重なるエッジを含む複数のエッジを抽出するエッジ抽出手段と、該エッジ抽出手段により抽出された複数のエッジと前記基準点設定手段により設定された前記複数の基準点とを合成し、前記エッジ抽出手段により抽出された前記複数のエッジの中から前記複数の基準点のそれぞれに対して予め定められた位置にあるエッジを選択するエッジ選択手段と、該エッジ選択手段により選択された複数のエッジから連続したワークの輪郭線を抽出する輪郭線抽出手段と、を備えた、ことを特徴とする。 The present invention provides an original image acquisition unit that acquires an original image of a work imaged by an imaging unit, and binarizes the original image acquired by the original image acquisition unit, so that an approximate area of the workpiece is obtained from the original image. A region specifying unit to be specified, an expansion processing unit for expanding the approximate region specified by the region specifying unit, and a reference for setting a plurality of reference points on the boundary line of the approximate region extracted by the expansion processing unit Point setting means, edge extraction means for extracting a plurality of edges including edges overlapping with the contour of the workpiece based on the contrast difference from the original image, the plurality of edges extracted by the edge extraction means, and the reference point setting means Are combined with the plurality of reference points set in advance, and predetermined for each of the plurality of reference points from among the plurality of edges extracted by the edge extraction means. Edge selection means for selecting an edge at a specified position; and contour line extraction means for extracting a contour line of a continuous workpiece from a plurality of edges selected by the edge selection means. .
本発明によれば、2値化して得られるワークの概略領域を膨張処理して設定する複数の基準点のそれぞれに対して予め定められた位置にあるエッジを選択することで、様々な位置姿勢や形状のワークの輪郭線を精度よく抽出することができる。 According to the present invention, various positions and orientations can be obtained by selecting an edge at a predetermined position with respect to each of a plurality of reference points set by performing an expansion process on a schematic area of a workpiece obtained by binarization. It is possible to accurately extract a contour line of a workpiece having a shape.
以下、本発明の実施形態に係る画像処理装置を有するロボットシステムとしてのロボットステーション1について、図面を参照しながら説明する。まず、本実施形態に係るロボットステーション1の概略構成について、図1から図3を参照しながら説明する。図1は、本発明の実施形態に係るロボットステーション1を示す斜視図である。図2は、本実施形態に係る画像処理装置3のハード構成を示すブロック図である。図3は、本実施形態に係る画像処理装置3の内部構成を示すブロック図である。
Hereinafter, a robot station 1 as a robot system having an image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings. First, a schematic configuration of the robot station 1 according to the present embodiment will be described with reference to FIGS. 1 to 3. FIG. 1 is a perspective view showing a robot station 1 according to an embodiment of the present invention. FIG. 2 is a block diagram showing a hardware configuration of the
図1から図3に示すように、ロボットステーション1は、ワークWを撮像する撮像部2と、撮像部2により撮像された元画像からワークWの位置姿勢を計測する画像処理装置3と、ワークWを把持するロボットアーム4,5と、を備えている。本実施形態においては、ロボットアーム4,5は、剛性を持つ支柱により形成されたブース6の架台7の上に配設されており、ロボットアーム4,5の上方に配設された照明8,8の間に撮像部2が配設されている。
As shown in FIGS. 1 to 3, the robot station 1 includes an
撮像部2は、架台7の上に搬送あるいは載置された検査対象となるワークWの全体を撮像する。撮像部2は、デジタルカメラ等により構成されており、デジタルカメラの場合には、CCDイメージセンサあるいはCMOSイメージセンサ等の固体撮像素子と、撮像レンズと、を備えて構成され、撮像によって画像データを取得することができる。
The
図2に示すように、画像処理装置3は、制御部としてのCPU3aを備えており、CPU3aには、バス10に接続されたインターフェイス11を介して、撮像部2、キーボード12及びマウス13が接続されている。キーボード12及びマウス13は、ワークWの輪郭線の抽出や位置姿勢の計測に必要な指定情報、あるいはその他の指示等の入力を可能としている。画像データは、固体撮像素子のピクセル毎に生成された点の集合の情報として取得される。ワークWの輪郭を含む領域を撮像することにより生成された点の集合を認識し、取得した画像データからワークWの輪郭に対応した輪郭線を抽出することができる。輪郭線は点の集合として処理してもよいし、各点同士を連結して、「線」情報に変換して処理したり、後述の複数のエッジから生成される線情報にして処理することもできる。したがって、以下では「輪郭線」の語を点の集合もしくは線情報のいずれの場合も含むものとして説明する。
As illustrated in FIG. 2, the
また、CPU3aには、画像を表示するディスプレイ14及び音声を出力するスピーカ15がバスを介して接続されている。ディスプレイ14は、撮像部2により撮像され、CPU3aで所定の処理が行われたワークW等を表示可能としている。スピーカ15は、CPU3aで生成された音声等を出力可能としている。
Further, a
更に、CPU3aには、ROM17及びRAM16がバス10を介して接続されている。ROM16には、画像処理装置3の基本制御に必要なプログラムやワークWの3次元モデル情報等が格納されている。RAM16には、後述する輪郭抽出処理等の作業領域が確保されている。また、バス10には、記録媒体読取部18が接続されており、ワークWの輪郭を抽出する画像処理プログラムやワークWの3次元モデル情報等を記録した記録媒体Dを読み込み、例えばROM17に格納できるようになっている。
Further, a
また、バス10には、通信装置19が接続されており、上述したような記録媒体Dを使用せずに、通信装置19を介してインターネット等から配信される画像処理プログラムやワークWの3次元モデル情報等をダウンロード可能に構成されている。なお、画像処理装置3は、通信装置19を介して端末機からの入力を受信し、この端末機からの要求に基づいて画像処理プログラムを実行(演算)し、実行(演算)結果を端末機に送信するサ−バー機として機能するように構成されてもよい。
A
図3に示すように、画像処理装置3のCPU3aは、元画像取得手段としての元画像取得部31と、領域特定手段としての領域特定部32と、エッジ抽出手段としてのエッジ抽出部33と、膨張処理手段としての領域膨張処理部34と、を備えている。また、画像処理装置3のCPU3aは、基準点設定手段としての基準点設定部35と、エッジ選択手段としての輪郭エッジ選択部36と、輪郭線抽出手段としての輪郭線抽出部37と、位置姿勢計測部38と、を備えている。
As shown in FIG. 3, the
元画像取得部31は、撮像部2によりワークWが撮像された元画像を取得し、領域特定部32及びエッジ抽出部33に元画像を出力する。領域特定部32は、元画像取得部31から出力された元画像を2値化して、ワークWの概略を構成する概略領域を特定し、特定した概略領域の領域情報を領域膨張処理部34に出力する。エッジ抽出部33は、元画像取得部31から出力された元画像のエッジを抽出する。
The original
なお、ここでいうエッジは、ワークW表面に現れるコントラスト差に基づいてこれを繋げてなるコントラスト線として現れるものであり、例えば、ワークWの輪郭に重なるエッジの他に、これ以外を示すエッジ(以下、「偽エッジ」という)を含んでいる。つまり、ここでいうエッジとは、ワークWの輪郭に重なるエッジや偽エッジを含む、元画像に現れる全エッジをいう。 Note that the edge here appears as a contrast line that is connected based on the contrast difference that appears on the surface of the workpiece W. For example, in addition to the edge that overlaps the contour of the workpiece W, the edge ( Hereinafter, it is referred to as “false edge”. That is, the edge here means all edges appearing in the original image including edges and false edges that overlap the outline of the workpiece W.
領域膨張処理部34は、領域特定部32から出力された領域情報から特定した概略領域を所定量膨張させる膨張処理を行う。なお、所定量膨張させるための膨張処理の回数は、特に決められているものではなく、2値化した概略領域の状態により異なる。基準点設定部35は、膨張処理した概略領域の境界線上に、エッジ検索の起点となる複数の基準点を設定する。
The region
輪郭エッジ選択部36は、エッジ抽出部33により抽出された複数のエッジと、基準点設定部35により設定された複数の基準点を合成し、複数の基準点それぞれと最短距離にあるエッジを検索し、これを選択する。輪郭線抽出部37は、輪郭エッジ選択部36により選択された複数のエッジから連続したワークWの輪郭線を抽出する。なお、輪郭エッジ選択部36は、基準点に対して所定の検索範囲内にエッジが存在しない場合には、エッジの検索を終了するように構成されている。
The contour
位置姿勢計測部38は、ROM16に記憶されたワークWの三次元モデル情報と、輪郭線抽出部37により抽出されたワークWの輪郭線とをフィッティング(照合)させて、ワークWの位置姿勢を計測する(三次元モデルフィッティング処理)。なお、ここでいうワークWの位置姿勢とは、ワークWの位置及びワークWの姿勢を示すものである。
The position / orientation measurement unit 38 fits (collates) the three-dimensional model information of the workpiece W stored in the
ロボットアーム4,5は、6軸制御可能なロボットアームであり、先端部には、各種作業に応じて様々なエンドエフェクタを取り付け可能に形成されている。エンドエフェクタは、人間の手、指に相当する部分である。本実施形態においては、ロボットアーム4,5の一方のロボットアーム4には細かい作業を可能にする小型のエンドエフェクタが装着され、他方のロボットアーム5には比較的大きな部材を扱うエンドエフェクタが装着されている。また、ロボットステーション1内で使用されるコントローラや電源等は、架台7の下部から引き出し可能に収納された電源コントローラボックス9に収納されている。
The
次に、本実施形態に係る画像処理装置3によるワークWの位置姿勢計測処理(位置姿勢計測方法)について、図4から図7(b)を参照しながら説明する。なお、以下においては、撮像部2によりグレースケールにて撮像されたワークWの元画像(以下、「元グレイ画像」という)から位置姿勢を計測する位置姿勢計測処理を用いて説明する。
Next, the position / orientation measurement process (position / orientation measurement method) of the workpiece W by the
まず、円環形状のワーク(以下、「円環部品」という)の輪郭線を抽出して、円環部品の位置姿勢を計測する位置姿勢計測処理について、図4から図6(b)を参照しながら説明する。図4は、本実施形態に係る画像処理装置3による位置姿勢計測処理を示すフローチャートである。図5は、本実施形態に係る画像処理装置3の輪郭エッジ選択部36による輪郭エッジ選択処理を示すフローチャートである。図6(a)は、本実施形態における画像処理装置3による円環部品の輪郭線抽出処理を説明するための図である。図6(b)は、図6(a)における(F)の状態を説明するための部分拡大図である。
First, refer to FIGS. 4 to 6B for position and orientation measurement processing for extracting the contour line of an annular workpiece (hereinafter referred to as “annular part”) and measuring the position and orientation of the annular part. While explaining. FIG. 4 is a flowchart showing position and orientation measurement processing by the
まず、元画像取得部31により、撮像部2により円環部品を撮像して得られた8bitの元グレイ画像40a(図6(a)に示す(A)参照)を取得する元画像取得処理(元画像取得工程)が行われる(ステップST10)。次に、領域特定部32により、元グレイ画像40aの背景領域と検出対象(円環部品)の領域とを分離している輝度値の差を閾値として、元グレイ画像40aを2値化する領域特定処理(領域特定工程)が行われる。この領域特定処理により、円環部品の概略領域41a(図6(a)に示す(B)参照)が特定される(ステップST20)。このとき、元グレイ画像40aの有するノイズにより生成された孤立点としての空胞領域が存在する場合には、2値化した後に、例えば、モルフォロジー処理等により、空胞領域を消失させておいてもよい。
First, the original
領域特定部32により概略領域41aが特定されると、領域膨張処理部34により概略領域41aの膨張処理(膨張処理工程)が行われる(ステップST30)。領域膨張処理部34は、概略領域41aを所定回数(所定量)膨張処理し、膨張領域42a(図6(a)に示す(C)参照)を生成する。なお、膨張処理は、元グレイ画像40aを2値化した際に概略領域41aに孤立点が発生した場合に、孤立点を消失させて、概略領域41aを平滑化させるのにも有効となる。
When the
次に、基準点設定部35により、膨張領域42aの境界線43a,44a上に基準点としての局所エッジの探索点100〜102、200〜202(図6(a)に示す(D)参照)を設定する基準点設定処理(基準点設定工程)が行われる(ステップST40)。探索点100〜102、200〜202は、1隣接画素毎、若しくは所定の間隔で設定される。
Next, the reference point setting unit 35 causes the search points 100 to 102 and 200 to 202 for local edges as reference points on the
ここで、元画像取得部31により取得された元グレイ画像40aに対し、エッジ抽出部33により、元グレイ画像40aからエッジ(図6(a)に示す(E)参照)を抽出するエッジ抽出処理(エッジ抽出工程)が行われる(ステップST50)。エッジ抽出処理は、ケニーフィルタやソーベルフィルタ等のエッジ検出により行われる。エッジ抽出処理は、例えば、円環部品の表面上に現れるコントラスト差に基づいて、複数の閾値を設定し、複数の閾値のそれぞれに基づいて仕切られるコントラスト線により現れる線を抽出する。そのため、このエッジには、偽エッジが含まれている。
Here, with respect to the original
エッジ抽出処理により偽エッジを含む複数のエッジが抽出されると、輪郭エッジ選択部36により、輪郭エッジ選択処理(輪郭エッジ選択工程)が行われる(ステップST60)。輪郭エッジ選択部36は、まず、エッジ抽出部33により抽出された複数のエッジと基準点設定部35により設定された複数の探索点100〜102、200〜202とを合成する(図6(a)に示す(F)参照)。そして、図5に示すように、エッジ抽出部33により抽出された複数のエッジの中から基準点設定部35により設定された複数の探索点100〜102、200〜202のそれぞれと例えば最短距離にあるエッジを探索する(ステップST61)。ここで、図6(b)に示すように、複数の探索点100〜102、200〜202のそれぞれと最短距離にあるエッジがあれば、これを選択し、エッジ情報として登録する(ステップST62、ステップST63)。エッジの選択は、全基準点の探索が終了するまで繰り返し行われる(ステップST64)。なお、エッジを探索するにあたり最短距離にあるエッジを探索する場合を説明したが、ワークの形状によっては基準点に対して予め定められた位置にあるエッジを選択すればよい。例えば、最短距離、基準点からの距離等、エッジの選択の規則を定めて探索の仕方を変えてもよい。以下、他の実施例の場合でも同様である。
When a plurality of edges including false edges are extracted by the edge extraction process, the contour
全基準点のエッジの探索が終了すると、輪郭線抽出部37により、選択された複数の基準点から連続した円環部材の輪郭線を抽出する輪郭線抽出処理(図6(a)に示す(G)参照)が行われる(ステップST70)。例えば、輪郭線抽出部37は、選択されたエッジの端部同士を所定の補正処理により繋げて、連続した輪郭線とする。これにより、円環部材の輪郭線が特定される。
When the search for the edges of all the reference points is completed, the
輪郭線抽出部37により円環部材の輪郭線が特定されると、次に、位置姿勢計測部38により、円環部材の位置姿勢が計測される(ステップST80)。円環部材の位置姿勢は、ROM16に記憶された円環部材の三次元モデル情報と、輪郭線抽出部37により抽出された円環部材の輪郭線とをフィッティング(三次元モデルフィッティング処理)させることにより行われる。円環部材の三次元モデル情報と円環部材の輪郭線との三次元モデルフィッティング処理により、円環部材の位置姿勢が精密に計測される。なお、ここでは、三次元モデルフィッティング処理の具体的な説明は省略する。
If the contour line of the annular member is specified by the contour
次に、非対称形状のワーク(以下、「非対称部品」という)の輪郭線を抽出して、非対称部品の位置姿勢を計測する位置姿勢計測処理について、図4及び図5を援用すると共に、図7(a)及び図7(b)を参照しながら説明する。図7(a)は、本実施形態における画像処理装置3による非対称部品の輪郭エッジ選択処理を説明するための図である。図7(b)は、図7(a)における(F)の状態を説明するための部分拡大図である。なお、ここでいう非対称部品には、例えば、歪形状や不定型部品等も含むものとする。
Next, a position and orientation measurement process for extracting the outline of an asymmetrical workpiece (hereinafter referred to as “asymmetric part”) and measuring the position and orientation of the asymmetric part will be described with reference to FIGS. This will be described with reference to (a) and FIG. FIG. 7A is a diagram for explaining a contour edge selection process of an asymmetric part by the
まず、元画像取得部31により、撮像部2により非対称部品を撮像して得られた8bitの元グレイ画像40b(図7(a)に示す(A)参照)を取得する元画像取得処理(元画像取得工程)が行われる(ステップST10)。次に、領域特定部32により、元グレイ画像40bの背景領域と検出対象(非対称部品)の領域とを分離している輝度値の差を閾値として、元グレイ画像40bを2値化する領域特定処理(領域特定工程)が行われる。この領域特定処理により、非対称部品の概略領域41b(図7(a)に示す(B)参照)が特定される(ステップST20)。このとき、元グレイ画像40bの有するノイズにより生成された孤立点としての空胞領域が存在する場合には、2値化した後に、例えば、モルフォロジー処理等により空胞領域を消失させておいてもよい。
First, the original
領域特定部32により概略領域41bが特定されると、領域膨張処理部34により概略領域41bの膨張処理(膨張処理工程)が行われる(ステップST30)。領域膨張処理部34は、概略領域41bを所定回数(所定量)膨張処理し、膨張領域42b(図7(a)に示す(C)参照)を生成する。なお、膨張処理は、元グレイ画像40bを2値化した際に概略領域41bに孤立点が発生した場合に、孤立点を消失させて、概略領域41bを平滑化させるのにも有効となる。
When the
次に、基準点設定部35により、膨張領域42bの境界線43b上に基準点としての局所エッジの探索点300〜302(図7(a)に示す(D)参照)を設定する基準点設定処理(基準点設定工程)が行われる(ステップST40)。探索点300〜302は、1隣接画素毎、若しくは所定の間隔で設定される。
Next, a reference point setting for setting local edge search points 300 to 302 (see (D) shown in FIG. 7A) as reference points on the
ここで、元画像取得部31により取得された元グレイ画像40bに対し、エッジ抽出部33により、元グレイ画像40bからエッジ(図7(a)に示す(E)参照)を抽出するエッジ抽出処理(エッジ抽出工程)が行われる(ステップST50)。エッジ抽出処理は、ケニーフィルタやソーベルフィルタ等のエッジ検出により行われる。エッジ抽出処理は、例えば、非対称部品の表面上に現れるコントラスト差に基づいて、複数の閾値を設定し、複数の閾値のそれぞれに基づいて仕切られるコントラスト線により現れる線を抽出する。そのため、このエッジには、偽エッジが含まれている。
Here, with respect to the original
エッジ抽出処理により偽エッジを含む複数のエッジが抽出されると、輪郭エッジ選択部36により、輪郭エッジ選択処理(輪郭エッジ選択工程)が行われる(ステップST60)。輪郭エッジ選択部36は、まず、エッジ抽出部33により抽出された複数のエッジと基準点設定部35により設定された複数の探索点300〜302とを合成する(図7(a)に示す(F)参照)。そして、図5に示すように、エッジ抽出部33により抽出された複数のエッジの中から基準点設定部35により設定された複数の探索点300〜302のそれぞれと最短距離にあるエッジを探索する(ステップST61)。ここで、図7(b)に示すように、複数の探索点300〜302のそれぞれと最短距離にあるエッジがあれば、これを選択し、エッジ情報として登録する(ステップST62、ステップST63)。エッジの選択は、全基準点の探索が終了するまで繰り返し行われる(ステップST64)。
When a plurality of edges including false edges are extracted by the edge extraction process, the contour
全基準点のエッジの探索が終了すると、輪郭線抽出部37により、選択された複数の基準点から連続した非対称部品の輪郭線を抽出する輪郭線抽出処理(図7(a)に示す(G)参照)が行われる(ステップST70)。例えば、輪郭線抽出部37は、選択されたエッジの端部同士を所定の補正処理により繋げて、連続した輪郭線とする。これにより、非対称部品の輪郭線が特定される。
When the search for the edges of all the reference points is completed, the
輪郭線抽出部37により非対称部品の輪郭線が特定されると、次に、位置姿勢計測部38により、非対称部品の位置姿勢が計測される(ステップST80)。非対称部品の位置姿勢は、ROM16に記憶された非対称部品の三次元モデル情報と、輪郭線抽出部37により抽出された非対称部品の輪郭線とをフィッティング(三次元モデルフィッティング処理)させることにより行われる。非対称部品の三次元モデル情報と非対称部品の輪郭線との三次元モデルフィッティング処理により、非対称部品の位置姿勢が精密に計測される。なお、ここでは、三次元モデルフィッティング処理の具体的な説明は省略する。
When the contour line of the asymmetric part is specified by the contour
以上説明した位置姿勢計測処理(位置姿勢計測方法)は、上記手順に応じたプログラムとして形成し、CPU等のコンピュータで実行するように構成することも可能である。また、このようなプログラムは、半導体メモリ、磁気ディスク、光ディスク、フロッピー(登録商標)ディスク等の記録媒体、この記録媒体をセットしたコンピュータによりアクセスし、上記プログラムを実行するように構成することも可能である。 The position / orientation measurement processing (position / orientation measurement method) described above can be formed as a program corresponding to the above-described procedure and executed by a computer such as a CPU. In addition, such a program can be configured to be accessed by a recording medium such as a semiconductor memory, a magnetic disk, an optical disk, a floppy (registered trademark) disk, or a computer in which the recording medium is set and to execute the program. It is.
上述したように、実際のワークの表面は、一見フラットな表面状態であっても、微小な凹凸形状が存在し、照明との相乗作用により、急しゅんな輝度変動が現れ、エッジとして検出される場合がある。そのため、画像のエッジ抽出処理を行うと、輪郭を構成するエッジ以外のノイズエッジが検出される。そして、ノイズエッジを含むエッジ情報を元に、三次元モデルフィッティング処理などの演算を行うと、誤差を含む計測結果となり、正確な位置姿勢の検出ができない場合がある。 As described above, even if the surface of the actual work is a flat surface at first glance, there is a minute uneven shape, and sudden brightness fluctuations appear due to synergistic effects with illumination, and are detected as edges. There is a case. For this reason, when the edge extraction process of the image is performed, noise edges other than the edges constituting the contour are detected. If a calculation such as a three-dimensional model fitting process is performed based on edge information including a noise edge, a measurement result including an error may be obtained, and an accurate position and orientation may not be detected.
これに対し、本実施形態に係る画像処理装置3は、2値化などの領域特定処理によりワークの概略領域を特定し、これを膨張処理してワークの輪郭線と膨張処理した概略領域の境界線との間にギャップを与える。そして、膨張処理した概略領域の境界線上に、所定の間隔でエッジの探索点(基準点)を設定し、この探索点から最少距離にあるエッジを、ワークの輪郭を構成するエッジとして選択する。そのため、ノイズエッジの影響を少なくした輪郭線の抽出が可能となる。これにより、輪郭線を精度よく抽出することができる。
On the other hand, the
また、膨張処理した概略領域の境界線上にエッジの探索点を設定し、探索点から最少距離にあるエッジをワークの輪郭を構成するエッジとして選択することで、様々な形状のワークに対応させることができる。 Also, by setting a search point for the edge on the boundary line of the expanded approximate area, and selecting the edge that is the minimum distance from the search point as the edge constituting the contour of the work, it is possible to correspond to workpieces of various shapes Can do.
更に、ノイズエッジが除去された精度の高いエッジ情報を元に、三次元モデルフィッティング処理などの演算が可能になり、ワークの正確な位置姿勢の検出を行うことができる。 Furthermore, calculation such as a three-dimensional model fitting process can be performed based on highly accurate edge information from which noise edges have been removed, and the accurate position and orientation of the workpiece can be detected.
以上、本発明の実施形態について説明したが、本発明は上述した実施形態に限定されるものではない。また、本発明の実施形態に記載された効果は、本発明から生じる最も好適な効果を列挙したに過ぎず、本発明による効果は、本発明の実施形態に記載されたものに限定されない。 As mentioned above, although embodiment of this invention was described, this invention is not limited to embodiment mentioned above. In addition, the effects described in the embodiments of the present invention only list the most preferable effects resulting from the present invention, and the effects of the present invention are not limited to those described in the embodiments of the present invention.
例えば、本実施形態においては、ワークを概略領域として特定し、膨張処理した概略領域との境界に基準点を設定したが、本発明においてはこれに限定されない。例えば、背景を背景領域として特定し、背景領域を収縮させて背景領域との境界に基準点を設けるようにしてもよい。 For example, in the present embodiment, the workpiece is specified as the approximate area, and the reference point is set at the boundary with the expanded approximate area. However, the present invention is not limited to this. For example, the background may be specified as the background region, and the reference region may be provided at the boundary with the background region by contracting the background region.
また、本実施形態においては、概略領域41aを所定回数膨張処理して、膨張領域42aを生成したが、本発明においてはこれに限定されない。例えば、膨張処理と収縮処理とを繰り返し行いながら膨張領域42aを生成してもよい。
In the present embodiment, the
1 ロボットステーション(ロボットシステム)
2 撮像部
3 画像処理装置
3a CPU(制御部)
4 ロボットアーム
5 ロボットアーム
31 元画像取得部(元画像取得手段)
32 領域特定部(領域特定手段)
33 エッジ抽出部(エッジ抽出手段)
34 領域膨張処理部(膨張処理手段)
35 基準点設定部(基準点設定手段)
36 輪郭エッジ選択部(エッジ選択手段)
37 輪郭線抽出部(輪郭線抽出手段)
38 位置姿勢計測部(位置姿勢計測手段)
D 記録媒体
W ワーク
1 Robot station (robot system)
2
4
32 area specifying part (area specifying means)
33 Edge extraction unit (edge extraction means)
34 Region expansion processing unit (expansion processing means)
35 Reference point setting section (reference point setting means)
36 Contour edge selection unit (edge selection means)
37 Outline extraction unit (contour extraction means)
38 Position and orientation measurement unit (position and orientation measurement means)
D Recording medium W Work
Claims (7)
該元画像取得手段により取得された前記元画像を2値化して、該元画像からワークの概略領域を特定する領域特定手段と、
該領域特定手段により特定された前記概略領域を膨張処理する膨張処理手段と、
前記膨張処理手段により抽出された概略領域の境界線上に、複数の基準点を設定する基準点設定手段と、
前記元画像からコントラスト差に基づき、ワークの輪郭に重なるエッジを含む複数のエッジを抽出するエッジ抽出手段と、
該エッジ抽出手段により抽出された複数のエッジと前記基準点設定手段により設定された前記複数の基準点とを合成し、前記エッジ抽出手段により抽出された前記複数のエッジの中から前記複数の基準点のそれぞれに対して予め定められた位置にあるエッジを選択するエッジ選択手段と、
該エッジ選択手段により選択された複数のエッジから連続したワークの輪郭線を抽出する輪郭線抽出手段と、を備えた、
ことを特徴とする画像処理装置。 Original image acquisition means for acquiring an original image of the work imaged by the imaging unit;
Area specifying means for binarizing the original image acquired by the original image acquiring means and specifying an approximate area of the workpiece from the original image;
Expansion processing means for expanding the approximate area specified by the area specifying means;
A reference point setting means for setting a plurality of reference points on the boundary line of the approximate area extracted by the expansion processing means;
Edge extraction means for extracting a plurality of edges including edges overlapping the outline of the workpiece based on the contrast difference from the original image;
The plurality of edges extracted by the edge extraction unit and the plurality of reference points set by the reference point setting unit are combined, and the plurality of reference points are extracted from the plurality of edges extracted by the edge extraction unit. Edge selection means for selecting an edge at a predetermined position for each of the points;
Contour line extracting means for extracting a contour line of a continuous workpiece from a plurality of edges selected by the edge selecting means,
An image processing apparatus.
ことを特徴とする請求項1に記載の画像処理装置。 The expansion processing means smoothes and eliminates isolated points generated when binarization is performed when expanding the approximate region.
The image processing apparatus according to claim 1.
ことを特徴とする請求項1又は2に記載の画像処理装置。 A position / orientation measuring unit that measures the position / orientation of the workpiece by comparing the three-dimensional model information of the workpiece stored in advance with the outline of the workpiece extracted by the contour extracting unit;
The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
該撮像部により撮像されたワークの位置姿勢を計測する請求項3に記載の画像処理装置と、
前記画像処理装置により計測されたワークの位置姿勢に基づいて、ワークを把持するロボットアームと、を備えた、
ことを特徴とするロボットシステム。 An imaging unit for imaging the workpiece being conveyed;
The image processing apparatus according to claim 3, which measures the position and orientation of a workpiece imaged by the imaging unit;
A robot arm for gripping the workpiece based on the position and orientation of the workpiece measured by the image processing apparatus,
A robot system characterized by this.
前記制御部が前記元画像取得工程により取得された前記元画像を2値化して、該元画像からワークの概略領域を特定する領域特定工程と、
前記制御部が前記領域特定工程により特定された前記概略領域を膨張処理する膨張処理工程と、
前記制御部が前記膨張処理工程により膨張処理された概略領域の境界線上に、複数の基準点を設定する基準点設定工程と、
前記制御部が前記元画像からコントラスト差に基づき、ワークの輪郭に重なるエッジを含む複数のエッジを抽出するエッジ抽出工程と、
前記制御部が前記エッジ抽出工程により抽出された複数のエッジと前記基準点設定工程により設定された前記複数の基準点とを合成し、前記エッジ抽出工程により抽出された前記複数のエッジの中から前記複数の基準点のそれぞれに対して予め定められた位置にあるエッジを選択するエッジ選択工程と、
前記制御部が前記エッジ選択工程により選択された複数のエッジから連続したワークの輪郭線を抽出する輪郭線抽出工程と、を備えた、
ことを特徴とする画像処理方法。 An original image acquisition step in which the control unit acquires an original image of the workpiece imaged by the imaging unit;
A region specifying step in which the control unit binarizes the original image acquired by the original image acquisition step, and specifies a schematic region of a workpiece from the original image;
An expansion processing step in which the control unit expands the schematic region identified by the region identification step;
A reference point setting step in which the control unit sets a plurality of reference points on the boundary line of the approximate region expanded by the expansion processing step;
An edge extraction step in which the control unit extracts a plurality of edges including edges overlapping with a contour of a workpiece based on a contrast difference from the original image;
The control unit synthesizes the plurality of edges extracted by the edge extraction step and the plurality of reference points set by the reference point setting step, and from among the plurality of edges extracted by the edge extraction step An edge selection step of selecting an edge at a predetermined position with respect to each of the plurality of reference points;
An outline extraction step in which the control unit extracts an outline of a continuous workpiece from a plurality of edges selected in the edge selection step, and
An image processing method.
A computer-readable recording medium on which the image processing program according to claim 6 is recorded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011255928A JP5791475B2 (en) | 2011-11-24 | 2011-11-24 | Image processing apparatus, image processing method, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011255928A JP5791475B2 (en) | 2011-11-24 | 2011-11-24 | Image processing apparatus, image processing method, and image processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013109691A JP2013109691A (en) | 2013-06-06 |
JP5791475B2 true JP5791475B2 (en) | 2015-10-07 |
Family
ID=48706354
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011255928A Expired - Fee Related JP5791475B2 (en) | 2011-11-24 | 2011-11-24 | Image processing apparatus, image processing method, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5791475B2 (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6415026B2 (en) * | 2013-06-28 | 2018-10-31 | キヤノン株式会社 | Interference determination apparatus, interference determination method, and computer program |
JP6099686B2 (en) * | 2015-03-20 | 2017-03-22 | 株式会社Pfu | Image processing apparatus, region detection method, and computer program |
JP2016192138A (en) * | 2015-03-31 | 2016-11-10 | 株式会社オートネットワーク技術研究所 | Manufacturing method of wire harness and image processing method |
US20180282681A1 (en) * | 2015-10-20 | 2018-10-04 | Rohto Pharmaceutical Co., Ltd. | Cell treatment apparatus |
JP6632656B2 (en) * | 2018-05-14 | 2020-01-22 | キヤノン株式会社 | Interference determination device, interference determination method, and computer program |
JP7271685B2 (en) * | 2019-03-21 | 2023-05-11 | ザ プロクター アンド ギャンブル カンパニー | Method for automatically transferring pouches with spouts and automatic pouch transfer assembly |
JP7066671B2 (en) * | 2019-12-11 | 2022-05-13 | キヤノン株式会社 | Interference determination device, interference determination method, program and system |
JP7470427B2 (en) | 2021-08-25 | 2024-04-18 | 株式会社ノート | GOODS ORDER SUPPORT DEVICE, GOODS ORDER SUPPORT SYSTEM, GOODS ORDER SUPPORT METHOD, AND COMPUTER PROGRAM |
CN115661437B (en) * | 2022-10-20 | 2024-01-26 | 陕西学前师范学院 | Image processing system and method |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04308981A (en) * | 1991-04-05 | 1992-10-30 | Sony Corp | Shape recognizing method |
JPH07225848A (en) * | 1994-02-10 | 1995-08-22 | Fujitsu General Ltd | Image extracting method |
JPH08322913A (en) * | 1995-05-30 | 1996-12-10 | Sanyo Electric Co Ltd | Tablet inspection system |
JP2000216979A (en) * | 1999-01-22 | 2000-08-04 | Canon Inc | Image extraction method and device and storage medium |
JP2002269539A (en) * | 2000-12-01 | 2002-09-20 | Shigehiro Masui | Image processor, image processing method, and computer- readable storage medium with image processing program stored therein, and diagnosis support system using them |
JP4044059B2 (en) * | 2004-02-25 | 2008-02-06 | 株式会社東芝 | Separation edge detection apparatus and method |
JP4715539B2 (en) * | 2006-02-15 | 2011-07-06 | トヨタ自動車株式会社 | Image processing apparatus, method thereof, and image processing program |
US8374892B2 (en) * | 2010-01-25 | 2013-02-12 | Amcad Biomed Corporation | Method for retrieving a tumor contour of an image processing system |
CN102236784A (en) * | 2010-05-07 | 2011-11-09 | 株式会社理光 | Screen area detection method and system |
-
2011
- 2011-11-24 JP JP2011255928A patent/JP5791475B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2013109691A (en) | 2013-06-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5791475B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP6125188B2 (en) | Video processing method and apparatus | |
US9330325B2 (en) | Apparatus and method for reducing noise in fingerprint images | |
CN110926330B (en) | Image processing apparatus, image processing method, and program | |
JP6483168B2 (en) | System and method for efficiently scoring a probe in an image with a vision system | |
JP6570370B2 (en) | Image processing method, image processing apparatus, program, and recording medium | |
JP6197340B2 (en) | Image processing apparatus, image processing method, and program | |
JP2010082245A (en) | Hair information measuring method | |
JP6659098B2 (en) | Image processing method, image processing apparatus, program, and recording medium | |
JP2017117341A (en) | Object detection method, device and program | |
JP2017173142A (en) | Image processing device, image processing method and micro joint cutting system | |
US9305235B1 (en) | System and method for identifying and locating instances of a shape under large variations in linear degrees of freedom and/or stroke widths | |
JP6863946B2 (en) | Image processing device | |
JP5160366B2 (en) | Pattern matching method for electronic parts | |
JP5217917B2 (en) | Object detection and tracking device, object detection and tracking method, and object detection and tracking program | |
JP2017102061A (en) | Measurement device, measurement method, and manufacturing method of article | |
JP2013109692A (en) | Image processing device, image processing method, and image processing program | |
JP5545564B2 (en) | Cloth product gripping system | |
JP2005078445A (en) | Image processing system | |
JP2009236550A (en) | Flaw detection method | |
JP2008146132A (en) | Image detection device, program, and image detection method | |
JP2013019845A (en) | Image processing device, method and program for calculating shape of spiral spring | |
JP2005332229A (en) | Attitude detector, attitude detection method, and program for the method | |
JP2021140405A (en) | Image search device, image search method and image search program | |
JP4458210B2 (en) | Object detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20130228 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141113 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150702 |
|
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: 20150707 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150804 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5791475 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |