JP2015114875A - Image processor, image processing method and image processing program - Google Patents

Image processor, image processing method and image processing program Download PDF

Info

Publication number
JP2015114875A
JP2015114875A JP2013256903A JP2013256903A JP2015114875A JP 2015114875 A JP2015114875 A JP 2015114875A JP 2013256903 A JP2013256903 A JP 2013256903A JP 2013256903 A JP2013256903 A JP 2013256903A JP 2015114875 A JP2015114875 A JP 2015114875A
Authority
JP
Japan
Prior art keywords
graphic element
image
graphic
image processing
processing apparatus
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.)
Granted
Application number
JP2013256903A
Other languages
Japanese (ja)
Other versions
JP6314464B2 (en
Inventor
善久 湊
Yoshihisa Minato
善久 湊
祐己 赤塚
Yuki Akatsuka
祐己 赤塚
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2013256903A priority Critical patent/JP6314464B2/en
Publication of JP2015114875A publication Critical patent/JP2015114875A/en
Application granted granted Critical
Publication of JP6314464B2 publication Critical patent/JP6314464B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To provide an image processor for providing an algorithm for estimating a graphic element with a simpler setting method for extracting the performance, and to provide an image processing method and an image processing program.SOLUTION: The image processor includes selection means for receiving the selection of a graphic element from a user to a setting image, setting value acquisition means for acquiring and storing a feature amount of the selected graphic element, and estimation means for specifying a graphic element of an estimation object included in a measuring image on the basis of the stored feature amount to output a parameter showing the specified graphic element.

Description

本発明は、入力画像に含まれる図形要素を推定する画像処理装置、画像処理方法および画像処理プログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program for estimating a graphic element included in an input image.

従来からFA(Factory Automation)分野などでは、測定対象物であるワークの欠陥検査、ワークの大きさや形状の計測、ワーク上の文字や図形などの認識といった処理を行う各種の画像処理装置が実用化されている。例として、ワーク上に予め印字された位置決め用マークなどの位置をパターンマッチングにより計測したり、ワークの輪郭線やワーク内のエッジの位置を計測したりすることにより、位置決めをするようなアプリケーションが知られている。   Conventionally, in the FA (Factory Automation) field, various image processing devices that perform processing such as defect inspection of workpieces to be measured, measurement of workpiece size and shape, and recognition of characters and figures on workpieces have been put into practical use. Has been. As an example, there are applications that perform positioning by measuring the position of positioning marks, etc., printed on the workpiece in advance by pattern matching, or measuring the position of the workpiece outline or edge in the workpiece. Are known.

画像処理結果を位置決めアプリケーションに適用するためには、予め何らかの設定を行っておく必要がある。このような設定に関して、位置決めマークのパターンマッチングにより位置決めする方法において、登録用パターンを生成するために、特開2006−252400号公報(特許文献1)は、二段階のフィッティング方法を開示する。このアルゴリズムは、第一のフィッティングプロセスから、一定の幅をもたせた領域に存在する点を全部用いて第二のフィッティングを行うため、結果的に第一のフィッティングと結果があまり変わらず、ほぼ第一のフィッティングが支配的である。これでは一般に知られるロバスト最小二乗法などにおいて問題点として指摘されている課題が残る。   In order to apply the image processing result to the positioning application, it is necessary to make some settings in advance. Regarding such setting, in order to generate a registration pattern in a method of positioning by pattern matching of positioning marks, Japanese Patent Laid-Open No. 2006-252400 (Patent Document 1) discloses a two-stage fitting method. Since this algorithm performs the second fitting using all the points existing in the region with a certain width from the first fitting process, the result is not much different from the first fitting. One fitting is dominant. This remains a problem that has been pointed out as a problem in the generally known robust least squares method.

また、一般にこのような画像処理では、各種の外乱によるノイズの混入は避けられない。このようなノイズを除去して計測精度を高めるアルゴリズムとして、特開2007−249555号公報(特許文献2)および特開2009−186338号公報(特許文献3)が知られている。   In general, in such image processing, noise is inevitably mixed due to various disturbances. As algorithms for removing such noise and improving measurement accuracy, Japanese Patent Application Laid-Open No. 2007-249555 (Patent Document 2) and Japanese Patent Application Laid-Open No. 2009-186338 (Patent Document 3) are known.

特開2007−249555号公報(特許文献2)は、座標群に含まれる座標から外れ値を効率的に取除いて、精度の高い近似直線を実現する技術を開示する。また、特開2009−186338号公報(特許文献3)は、複雑な形状を有する物体であっても、複数のエッジ点に対して適切な基準線を設定し、該基準線からの各エッジ点の差異に基づいてバリ、欠け等の欠陥を正確に検出することができる技術を開示する。すなわち、これらの先行技術文献には、エッジ位置などから測定対象物の外形などを示す直線要素を決定する方法を開示する。   Japanese Patent Laying-Open No. 2007-249555 (Patent Document 2) discloses a technique for efficiently removing an outlier from coordinates included in a coordinate group to realize an accurate straight line. Further, JP 2009-186338 A (Patent Document 3) sets an appropriate reference line for a plurality of edge points even for an object having a complicated shape, and sets each edge point from the reference line. Disclosed is a technology that can accurately detect defects such as burrs and chips on the basis of the difference. That is, these prior art documents disclose a method for determining a linear element indicating the outer shape of a measurement object from an edge position or the like.

特開2006−252400号公報JP 2006-252400 A 特開2007−249555号公報JP 2007-249555 A 特開2009−186338号公報JP 2009-186338 A

一般的に、図形要素の推定結果を用いるアプリケーションは多種多様であり、アプリケーションごとに推定の精度が最も高くなるように設定することは容易ではない。特に、処理対象の入力画像に複数の図形要素が含まれるような場合には、予め意図された図形要素を選択し、その選択された図形要素に応じた画像処理を自動的に行うことは容易ではなかった。   In general, there are a wide variety of applications that use graphic element estimation results, and it is not easy to set the estimation accuracy to be highest for each application. In particular, when a plurality of graphic elements are included in the input image to be processed, it is easy to select a graphic element intended in advance and automatically perform image processing according to the selected graphic element. It wasn't.

そのため、図形要素を推定するアルゴリズムに対して、その性能を引出すためのより簡便な設定方法を提供する、画像処理装置、画像処理方法および画像処理プログラムが要望されている。   Therefore, there is a demand for an image processing apparatus, an image processing method, and an image processing program that provide a simpler setting method for extracting the performance of an algorithm for estimating graphic elements.

本発明のある局面の画像処理装置は、設定用画像に対するユーザからの図形要素の選択を受付ける選択手段と、選択された図形要素の特徴量を取得し格納する設定値取得手段と、格納された特徴量に基づいて、計測用画像に含まれる推定対象の図形要素を特定し当該特定した図形要素を示すパラメータを出力する推定手段とを含む。   An image processing apparatus according to an aspect of the present invention includes: a selection unit that accepts selection of a graphic element from a user for a setting image; a setting value acquisition unit that acquires and stores a feature amount of the selected graphic element; Estimation means for specifying a graphic element to be estimated included in the measurement image based on the feature quantity and outputting a parameter indicating the specified graphic element.

本発明の別の局面の画像処理方法は、設定用画像に対するユーザからの図形要素の選択を受付けるステップと、選択された図形要素の特徴量を取得し格納するステップと、格納された特徴量に基づいて、計測用画像に含まれる推定対象の図形要素を特定し当該特定した図形要素を示すパラメータを出力するステップとを含む。   An image processing method according to another aspect of the present invention includes a step of accepting a selection of a graphic element from a user for a setting image, a step of acquiring and storing a feature amount of the selected graphic element, and a stored feature amount. And a step of specifying an estimation target graphic element included in the measurement image and outputting a parameter indicating the specified graphic element.

本発明の別の局面の画像処理プログラムは、コンピュータに、設定用画像に対するユーザからの図形要素の選択を受付けるステップと、選択された図形要素の特徴量を取得し格納するステップと、格納された特徴量に基づいて、計測用画像に含まれる推定対象の図形要素を特定し当該特定した図形要素を示すパラメータを出力するステップとを実行させる。   An image processing program according to another aspect of the present invention includes: a step of accepting a selection of a graphic element from a user for a setting image; a step of acquiring and storing a feature amount of the selected graphic element; A step of specifying a graphic element to be estimated included in the measurement image based on the feature amount and outputting a parameter indicating the specified graphic element is executed.

本発明によれば、図形要素を推定するアルゴリズムに対して、その性能を引出すためのより簡便な設定方法を提供できる。   ADVANTAGE OF THE INVENTION According to this invention, the simpler setting method for extracting the performance can be provided with respect to the algorithm which estimates a graphic element.

本実施の形態の画像処理装置を含む画像処理システムの全体構成を示す概略図である。1 is a schematic diagram illustrating an overall configuration of an image processing system including an image processing apparatus according to an embodiment. 画像処理結果の一例を示す図である。It is a figure which shows an example of an image processing result. 入力画像から抽出されたエッジ点の一例を示す図である。It is a figure which shows an example of the edge point extracted from the input image. 図3に示すエッジ点から決定される直線要素の一例を示す図である。It is a figure which shows an example of the linear element determined from the edge point shown in FIG. 本実施の形態の画像処理装置の基本的な処理手順を示す模式図である。It is a schematic diagram which shows the basic process sequence of the image processing apparatus of this Embodiment. 本実施の形態の画像処理装置の図形要素への分解処理を説明するための図である。It is a figure for demonstrating the decomposition | disassembly process to the graphic element of the image processing apparatus of this Embodiment. 図6に示す分解処理によって生成される各図形要素の図形パラメータの一例を示す図である。It is a figure which shows an example of the figure parameter of each figure element produced | generated by the decomposition | disassembly process shown in FIG. 本実施の形態の画像処理装置によって提供される図形要素を選択するための表示画面の一例を示す図である。It is a figure which shows an example of the display screen for selecting the graphic element provided by the image processing apparatus of this Embodiment. 図8に示す表示画面において直線要素をユーザが選択する場合の処理例を示す図である。It is a figure which shows the process example in case a user selects a linear element in the display screen shown in FIG. 図8に示す表示画面において円要素をユーザが選択する場合の処理例を示す図である。It is a figure which shows the process example in case a user selects a circle element in the display screen shown in FIG. 本実施の形態の画像処理装置によって提供される図形パラメータの利用例を説明するための図である。It is a figure for demonstrating the usage example of the graphic parameter provided by the image processing apparatus of this Embodiment. 本実施の形態の画像処理装置において計測処理を実現するための機能構成を示す模式図である。It is a schematic diagram which shows the function structure for implement | achieving a measurement process in the image processing apparatus of this Embodiment. 本実施の形態の画像処理装置における処理手順を説明するためのフローチャートである。It is a flowchart for demonstrating the process sequence in the image processing apparatus of this Embodiment.

本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。   Embodiments of the present invention will be described in detail with reference to the drawings. Note that the same or corresponding parts in the drawings are denoted by the same reference numerals and description thereof will not be repeated.

<A.画像処理システムの構成>
図1は、本実施の形態の画像処理装置100を含む画像処理システム1の全体構成を示す概略図である。画像処理装置100は、表面にマークが付与された測定対象物2(以下「ワーク2」とも称す。)を撮像し、撮像によって得られた画像に対する画像処理結果に基づいて、ワーク2を位置決めする。
<A. Configuration of image processing system>
FIG. 1 is a schematic diagram illustrating an overall configuration of an image processing system 1 including an image processing apparatus 100 according to the present embodiment. The image processing apparatus 100 images the measurement object 2 (hereinafter also referred to as “work 2”) having a mark on the surface, and positions the work 2 based on the image processing result for the image obtained by the imaging. .

図1を参照して、画像処理システム1は、主要なコンポーネントとして、視覚センサとも称される画像処理装置100と、画像処理装置100に接続された撮像部8と、画像処理装置100と通信可能なPLC(Programmable Logic Controller)5と、可動ステージ6とを含む。図1には、一例として、表示部102と一体的に構成された画像処理装置100を示す。   Referring to FIG. 1, the image processing system 1 can communicate with an image processing apparatus 100, which is also called a visual sensor, an imaging unit 8 connected to the image processing apparatus 100, and the image processing apparatus 100 as main components. A PLC (Programmable Logic Controller) 5 and a movable stage 6 are included. FIG. 1 shows an image processing apparatus 100 configured integrally with the display unit 102 as an example.

画像処理装置100は、生産ラインなどに組み込まれ、撮像部8がワーク2を撮像して生成される撮像画像に対して、後述のような画像処理を行うことでワーク2の位置などを特定する。以下の説明においては、撮像部8が撮像することで生成される画像を「入力画像」とも称す。後述するように、本実施の形態においては、画像処理の設定を予め決定する処理(以下「設定処理」とも称す。)と、測定対象物を実際に撮像して画像処理を実行する処理(以下「計測処理」とも称す。)が実行される。設定処理に用いられる画像を「設定用画像」、および、計測処理に用いられる画像を「計測用画像」と称し、単に「入力画像」と記載する場合には両方を意味する。   The image processing apparatus 100 is incorporated in a production line or the like, and specifies the position of the workpiece 2 by performing image processing as described later on a captured image generated by the imaging unit 8 imaging the workpiece 2. . In the following description, an image generated by imaging by the imaging unit 8 is also referred to as an “input image”. As will be described later, in the present embodiment, processing for determining image processing settings in advance (hereinafter also referred to as “setting processing”), and processing for actually imaging a measurement object and executing image processing (hereinafter referred to as “processing processing”). (Also referred to as “measurement process”). An image used for the setting process is referred to as a “setting image”, and an image used for the measurement process is referred to as a “measurement image”.

ここで、「計測用画像」とは、典型的には、画像処理の対象となるワーク2を撮像等することで生成される画像を意味する。すなわち、「計測用画像」は、処理対象となるワーク2を被写体とする入力画像である。「設定用画像」とは、「計測用画像」に含まれると推定されている図形要素と同じ図形要素を含む画像を意味し、典型的には、画像処理におけるレファレンスとなる基準ワークを撮像等することで生成される画像を意味する。すなわち、「設定用画像」は、基準となるワークを被写体とする入力画像である。なお、推定されている図形要素と完全に同じ図形要素を含む画像でなくともよく、実質的に同じ図形要素を含む画像であればよい。   Here, the “measurement image” typically means an image generated by imaging the workpiece 2 to be subjected to image processing. That is, the “measurement image” is an input image having the work 2 to be processed as a subject. “Setting image” means an image that includes the same graphic element as the graphic element estimated to be included in the “measurement image”, and typically captures a reference workpiece as a reference in image processing, etc. This means an image that is generated. That is, the “setting image” is an input image having a reference work as a subject. It should be noted that the image does not have to include the same graphic element as the estimated graphic element, and may be an image including substantially the same graphic element.

なお、画像処理装置100において処理可能な入力画像としては、撮像部8の撮像によって生成される画像に限られることなく、例えば、何らかの撮像装置などによって予め取得された画像であってもよい。特に、設定用画像は、ワーク2の設計図面などから合成された画像であってもよい。   The input image that can be processed by the image processing apparatus 100 is not limited to an image generated by imaging by the imaging unit 8, and may be an image acquired in advance by some imaging apparatus, for example. In particular, the setting image may be an image synthesized from a design drawing of the work 2 or the like.

画像処理装置100は、特定したワーク2の位置情報をPLC5へ出力する。PLC5は、位置情報に基づいて、可動ステージ6へ指令を出力する。このように、画像処理装置100は、対象の図形要素を示す推定されたパラメータに基づいて、被写体であるワーク2の位置を変化させる駆動装置へ指示を出力する手段を有していてもよい。   The image processing apparatus 100 outputs the specified position information of the workpiece 2 to the PLC 5. The PLC 5 outputs a command to the movable stage 6 based on the position information. As described above, the image processing apparatus 100 may include a unit that outputs an instruction to the drive device that changes the position of the work 2 that is the subject based on the estimated parameter indicating the target graphic element.

撮像部8は、被写体を撮像することで入力画像を生成する手段であり、一例として、レンズなどの光学系に加えて、CCD(Coupled Charged Device)やCMOS(Complementary Metal Oxide Semiconductor)センサといった、複数の画素に区画された撮像素子を含んで構成される。撮像部8による撮像によって生成された入力画像は、画像処理装置100へ伝送される。撮像部8によって撮像されるワーク2に対して光を照射する照明装置をさらに設けてもよい。また、複数の撮像部8を接続できるように画像処理装置100を構成してもよい。   The imaging unit 8 is means for generating an input image by imaging a subject. As an example, in addition to an optical system such as a lens, a plurality of devices such as a CCD (Coupled Charged Device) and a CMOS (Complementary Metal Oxide Semiconductor) sensor are used. The image sensor is divided into pixels. An input image generated by imaging by the imaging unit 8 is transmitted to the image processing apparatus 100. You may further provide the illuminating device which irradiates light with respect to the workpiece | work 2 imaged by the imaging part 8. FIG. Further, the image processing apparatus 100 may be configured so that a plurality of imaging units 8 can be connected.

画像処理装置100として汎用的なコンピュータアーキテクチャに従う構造を有するコンピュータを利用する場合には、本実施の形態の機能を提供するためのアプリケーションに加えて、コンピュータの基本的な機能を提供するためのOS(Operating System)がインストールされていてもよい。この場合には、本実施の形態の制御プログラムは、OSの一部として提供されるプログラムモジュールのうち、必要なモジュールを所定の順序および/またはタイミングで呼出して処理を実行するものであってもよい。すなわち、本実施の形態のプログラム自体は、上記のようなモジュールを含んでおらず、OSと協働して処理が実行される場合もある。したがって、本実施の形態の制御プログラムとしては、このような一部のモジュールを含まない形態であってもよい。   When a computer having a structure according to a general-purpose computer architecture is used as the image processing apparatus 100, an OS for providing basic functions of the computer in addition to an application for providing the functions of the present embodiment. (Operating System) may be installed. In this case, the control program according to the present embodiment may execute processing by calling necessary modules out of program modules provided as a part of the OS in a predetermined order and / or timing. Good. That is, the program itself according to the present embodiment does not include the module as described above, and the process may be executed in cooperation with the OS. Accordingly, the control program according to the present embodiment may not include such a part of modules.

本実施の形態の制御プログラムは、他のプログラムの一部に組み込まれて提供されるものであってもよい。その場合にも、プログラム自体には、上記のような組合せられる他のプログラムに含まれるモジュールを含んでおらず、当該他のプログラムと協働して処理が実行される。すなわち、本実施の形態の制御プログラムとしては、このような他のプログラムに組み込まれた形態であってもよい。   The control program of the present embodiment may be provided by being incorporated in a part of another program. Even in that case, the program itself does not include the modules included in the other programs to be combined as described above, and the processing is executed in cooperation with the other programs. That is, the control program of the present embodiment may be in a form incorporated in such another program.

代替的に、制御プログラムの実行により提供される機能の一部もしくは全部を専用のハードウェア回路として実装してもよい。   Alternatively, part or all of the functions provided by executing the control program may be implemented as a dedicated hardware circuit.

<B.課題および背景技術>
本実施の形態の画像処理装置、画像処理方法および画像処理プログラムにおける処理や機能を説明する前提として、本画像処理にて対処しようとする課題および背景技術について説明する。
<B. Issues and Background Technology>
As a premise for explaining the processing and functions in the image processing apparatus, the image processing method, and the image processing program of the present embodiment, a problem to be addressed in the image processing and a background art will be described.

図2は、画像処理結果の一例を示す図である。図2に示す画像処理結果は、ワーク上に予め付加された位置決めマークを示す図である。この位置決めマークは、紙面縦方向および紙面横方向にそれぞれ平行な直線要素と、これらの直線要素間を結ぶ別の直線要素を含む。つまり、撮像部8によってワークを撮像することで生成される入力画像には、主として、3つの直線要素が含まれる。   FIG. 2 is a diagram illustrating an example of the image processing result. The image processing result shown in FIG. 2 is a diagram showing positioning marks added in advance on the workpiece. This positioning mark includes a linear element parallel to the vertical direction and the horizontal direction of the paper, and another linear element connecting these linear elements. That is, the input image generated by imaging the workpiece by the imaging unit 8 mainly includes three linear elements.

典型的なアプリケーションとしては、このような位置決めマークの紙面縦方向および紙面横方向にそれぞれ平行な2つの直線要素の近似直線22および24の交点25を決定し、この交点25の座標値を用いて、位置決め制御がなされる。具体的な処理手順としては、入力画像に対して、近似直線22を決定するために、計測対象領域であるエッジ探索領域21が設定されるとともに、近似直線24を決定するためにエッジ探索領域23が設定される。このエッジ探索領域21および23の設定位置および大きさは、予め登録されている。エッジ探索領域21および23の各領域内において、エッジ点が抽出される。そして、エッジ探索領域21および23の各領域内において抽出されたエッジ点群から各直線要素を示す近似直線が決定される。図2の「+」マークは、抽出されたエッジ点に基づく近似直線の交点25を示す。   As a typical application, an intersection 25 of approximate lines 22 and 24 of two linear elements parallel to the longitudinal direction and the lateral direction of the positioning mark is determined, and the coordinate value of the intersection 25 is used. Positioning control is performed. As a specific processing procedure, an edge search area 21 which is a measurement target area is set for determining an approximate line 22 for an input image, and an edge search area 23 for determining an approximate line 24 is set. Is set. The set positions and sizes of the edge search areas 21 and 23 are registered in advance. Edge points are extracted in each of the edge search areas 21 and 23. Then, an approximate straight line indicating each straight line element is determined from the edge point group extracted in each of the edge search areas 21 and 23. The “+” mark in FIG. 2 indicates the intersection 25 of the approximate straight line based on the extracted edge point.

図2に示す画像処理では、エッジ探索領域21および23には、推定対象として意図された直線要素以外に、推定対象ではない直線要素26が含まれていることがわかる。すなわち、直線要素26について抽出されたエッジ点が近似直線22および24を決定する際に、用いられることになる。このように、計測対象領域内に、推定対象として意図された図形要素に加えて推定対象ではない図形要素が混入すると、推定精度が低下し得る。つまり、計測対象領域内に複数の図形要素が混入してしまうと精度が簡単に低下してしまう。このように、単一のエッジ探索領域内に複数の図形要素が存在することで、近似直線および交点の位置を正しく決定することができず、その位置ずれを修正できないこともある。   In the image processing shown in FIG. 2, it is understood that the edge search areas 21 and 23 include a linear element 26 that is not the estimation target in addition to the linear element intended as the estimation target. That is, the edge points extracted for the straight line element 26 are used when determining the approximate straight lines 22 and 24. As described above, when a graphic element that is not the estimation target is mixed in the measurement target area in addition to the graphic element intended as the estimation target, the estimation accuracy may be reduced. That is, if a plurality of graphic elements are mixed in the measurement target region, the accuracy is easily lowered. As described above, since there are a plurality of graphic elements in a single edge search region, the positions of the approximate line and the intersection cannot be determined correctly, and the positional deviation may not be corrected.

図3は、入力画像から抽出されたエッジ点の一例を示す図である。図4は、図3に示すエッジ点から決定される直線要素の一例を示す図である。   FIG. 3 is a diagram illustrating an example of edge points extracted from the input image. FIG. 4 is a diagram illustrating an example of a linear element determined from the edge points illustrated in FIG.

図3には、主として3つの図形要素が含まれている入力画像に対するエッジ点の抽出結果を示す。すなわち、図4に示すように、入力画像は図形要素1,2,3を含む。例えば、これらの図形要素のうち図形要素1を推定対象としている場合を考える。この場合には、図4に示す近似直線1を決定する必要がある。しかしながら、図形要素1,2,3のそれぞれから抽出されたエッジ点のすべてを用いると、近似直線2が決定されてしまう。そのため、図3および図4に示すようなエッジ点の抽出結果のうち、推定対象の図形要素についてのエッジ点に限定して近似直線を決定する必要がある。言い換えれば、複数の図形要素の成分を分離することができなければ、抽出されたすべてのエッジ点に対して平均的な直線近似とならざるを得ず、本来的に推定したい直線とは全く異なる直線が出力されてしまうという課題がある。   FIG. 3 shows edge point extraction results for an input image that mainly includes three graphic elements. That is, as shown in FIG. 4, the input image includes graphic elements 1, 2, and 3. For example, let us consider a case in which the graphic element 1 is an estimation target among these graphic elements. In this case, it is necessary to determine the approximate straight line 1 shown in FIG. However, if all the edge points extracted from each of the graphic elements 1, 2, and 3 are used, the approximate straight line 2 is determined. Therefore, it is necessary to determine an approximate straight line limited to the edge points for the graphic element to be estimated among the edge point extraction results as shown in FIGS. In other words, if the components of a plurality of graphic elements cannot be separated, it must be an average linear approximation for all extracted edge points, which is completely different from the line that is originally supposed to be estimated. There is a problem that a straight line is output.

図3および図4に示すような、図形要素の推定結果を用いるアプリケーションは多種多様であり、アプリケーションごとに推定の精度が最も高くなるように設定することは容易ではない。特に、処理対象の入力画像に複数の図形要素が含まれるような場合には、予め意図された図形要素を選択し、その選択された図形要素に応じた画像処理を自動的に行うことは容易ではないという課題がある。   There are a wide variety of applications that use graphic element estimation results as shown in FIGS. 3 and 4, and it is not easy to set each application to have the highest estimation accuracy. In particular, when a plurality of graphic elements are included in the input image to be processed, it is easy to select a graphic element intended in advance and automatically perform image processing according to the selected graphic element. There is a problem that is not.

<C.概要>
上述のような課題に対して、本実施の形態の画像処理方法では、図形フィッティング(Shape Fitting)処理の対象となる図形要素をユーザに選択させるとともに、当該選択された図形要素を抽出および処理するために適した設定を自動的に学習する。
<C. Overview>
In response to the above-described problems, in the image processing method of the present embodiment, the user selects a graphic element to be subjected to graphic fitting processing, and extracts and processes the selected graphic element. To automatically learn the appropriate settings.

図5は、本実施の形態の画像処理装置100の基本的な処理手順を示す模式図である。図5を参照して、画像処理装置100では、各種のパラメータを決定するための設定処理200と、実際に入力画像に対して画像処理を実行する計測処理300が実行される。   FIG. 5 is a schematic diagram illustrating a basic processing procedure of the image processing apparatus 100 according to the present embodiment. With reference to FIG. 5, in the image processing apparatus 100, a setting process 200 for determining various parameters and a measurement process 300 for actually executing image processing on an input image are executed.

まず、設定処理200の内容について説明する。設定処理200は、前処理210と、チューニング処理220と、設定格納処理230を含む。   First, the contents of the setting process 200 will be described. The setting process 200 includes a pre-process 210, a tuning process 220, and a setting storage process 230.

前処理210では、入力画像として設定用画像20を受付けるとともに、当該設定用画像20から図形要素の推定に必要な画像特徴を抽出する。チューニング処理220では、設定用画像20を1または複数の図形要素に分解し、ユーザが指定した図形要素と対応する図形要素を示すパラメータ(以下「図形パラメータ」とも称す。)を出力する。設定格納処理230では、チューニング処理220で出力された図形パラメータが順次格納される。   In the preprocessing 210, the setting image 20 is received as an input image, and image features necessary for estimating the graphic elements are extracted from the setting image 20. In the tuning process 220, the setting image 20 is decomposed into one or a plurality of graphic elements, and parameters (hereinafter also referred to as “graphic parameters”) indicating graphic elements corresponding to the graphic elements designated by the user are output. In the setting storage process 230, the graphic parameters output in the tuning process 220 are sequentially stored.

前処理210は、入力された設定用画像20に含まれる画像特徴を抽出する画像特徴抽出モジュール212を含む。抽出する画像特徴としては、どのような種別の情報を用いてもよいが、本実施の形態においては、エッジ点を画像特徴として抽出する。エッジ点を抽出する構成として、画像特徴抽出モジュール212は、勾配算出モジュール214およびエッジピーク点算出モジュール216を含む。   The pre-processing 210 includes an image feature extraction module 212 that extracts image features included in the input setting image 20. As the image feature to be extracted, any type of information may be used, but in the present embodiment, edge points are extracted as image features. As a configuration for extracting edge points, the image feature extraction module 212 includes a gradient calculation module 214 and an edge peak point calculation module 216.

勾配算出モジュール214は、設定用画像20に対して任意に設定される探索方向に沿って、画素値の勾配を算出する。より具体的には、勾配算出モジュール214は、隣接した画素間の画素値の変化を順次算出する。エッジピーク点算出モジュール216は、勾配算出モジュール214によって算出された画素値の勾配からエッジ点を算出する。より具体的には、エッジピーク点算出モジュール216は、算出された勾配のある探索方向に沿ったプロファイルからピーク点を抽出し、その抽出したピーク点からエッジ点を決定する。前処理210によって抽出された画像特徴を含むエッジ画像218がチューニング処理220の処理対象となる。   The gradient calculation module 214 calculates the gradient of the pixel value along the search direction arbitrarily set for the setting image 20. More specifically, the gradient calculation module 214 sequentially calculates changes in pixel values between adjacent pixels. The edge peak point calculation module 216 calculates an edge point from the gradient of the pixel value calculated by the gradient calculation module 214. More specifically, the edge peak point calculation module 216 extracts a peak point from a profile along a calculated search direction having a gradient, and determines an edge point from the extracted peak point. The edge image 218 including the image feature extracted by the preprocessing 210 is a processing target of the tuning processing 220.

チューニング処理220の機能として、図形認識モジュール222と、図形選択モジュール224とを含む。   The functions of the tuning process 220 include a graphic recognition module 222 and a graphic selection module 224.

図形認識モジュール222は、設定用画像20を1または複数の図形要素に分解し、それぞれの図形要素および大まかに推定した図形パラメータを出力する。そして、図形認識モジュール222は、選択手段に相当し、計測用画像30に含まれると推定される図形要素、または、所望の図形要素と同じ図形要素を含む設定用画像20に対する、ユーザからの図形要素の選択を受付ける。このユーザによる図形要素の選択方法としては、設定用画像20を表示し設定用画像20に含まれる図形要素をユーザが直接的に選択してもよいし、あるいは、設定用画像20に含まれる1つ以上の図形要素を推定し、この推定した図形要素を候補としてユーザが選択するようにしてもよい。ユーザによる図形要素の選択処理の詳細については後述する。   The graphic recognition module 222 decomposes the setting image 20 into one or more graphic elements, and outputs each graphic element and roughly estimated graphic parameters. Then, the graphic recognition module 222 corresponds to a selection unit, and a graphic from the user with respect to the graphic element estimated to be included in the measurement image 30 or the setting image 20 including the same graphic element as the desired graphic element. Accept element selection. As a method for selecting a graphic element by the user, the setting image 20 may be displayed and the user may directly select a graphic element included in the setting image 20 or may be included in the setting image 20 1. Two or more graphic elements may be estimated and the user may select the estimated graphic elements as candidates. Details of the graphic element selection processing by the user will be described later.

図形選択モジュール224は、設定値取得手段に相当し、複数の図形要素のうち選択された図形要素に対応する図形パラメータを設定記憶部232に格納する。決定される図形パラメータの詳細については後述する。図形選択モジュール224により決定された図形パラメータは、設定格納処理230において、設定記憶部232に格納される。   The graphic selection module 224 corresponds to a setting value acquisition unit, and stores graphic parameters corresponding to a graphic element selected from a plurality of graphic elements in the setting storage unit 232. Details of the graphic parameters to be determined will be described later. The graphic parameters determined by the graphic selection module 224 are stored in the setting storage unit 232 in the setting storage process 230.

設定記憶部232に格納された図形パラメータは、計測処理300において、計測用画像30に対して画像処理を実行する際に利用される。   The graphic parameters stored in the setting storage unit 232 are used when performing image processing on the measurement image 30 in the measurement processing 300.

このような一連の処理によって、図形要素を推定するアルゴリズムに対して、その性能を引出すための図形パラメータをより簡便に決定できる。   Through such a series of processes, it is possible to more easily determine graphic parameters for extracting the performance of an algorithm for estimating graphic elements.

計測処理300の機能として、図形フィッティングモジュール310を含む。図形フィッティングモジュール310は、推定手段に相当し、設定記憶部232に格納された特徴量に基づいて、計測用画像30に含まれる推定対象の図形要素を特定し、当該特定した図形要素を示す推定結果を出力する。図形フィッティングモジュール310における機能および処理の詳細については、後述する。   A graphic fitting module 310 is included as a function of the measurement process 300. The figure fitting module 310 corresponds to an estimation unit, specifies a figure element to be estimated included in the measurement image 30 based on a feature amount stored in the setting storage unit 232, and indicates an estimation indicating the specified figure element Output the result. Details of functions and processing in the figure fitting module 310 will be described later.

<D.図形認識モジュール>
次に、図5に示すチューニング処理220に含まれる図形認識モジュール222での図形要素の分解処理および選択処理についてより詳細に説明する。
<D. Figure Recognition Module>
Next, the graphic element disassembly process and selection process in the graphic recognition module 222 included in the tuning process 220 shown in FIG. 5 will be described in more detail.

図形認識モジュール222は、設定用画像20を1または複数の図形要素に分解する。図6は、本実施の形態の画像処理装置の図形要素への分解処理を説明するための図である。図7は、図6に示す分解処理によって生成される各図形要素の図形パラメータの一例を示す図である。   The graphic recognition module 222 decomposes the setting image 20 into one or a plurality of graphic elements. FIG. 6 is a diagram for explaining a decomposition process into graphic elements of the image processing apparatus according to the present embodiment. FIG. 7 is a diagram illustrating an example of a graphic parameter of each graphic element generated by the disassembly process illustrated in FIG.

一例として、設定用画像20が図6(a)に示すような画像を含んでいるとする。図形認識モジュール222は、図6(b)に示すように、この設定用画像20を複数の図形要素31〜34に分解する。すなわち、図形要素31は円要素であり、図形要素32〜34は直線要素である。以下の説明では、ユーザが認識したい図形要素は図形要素34であるとする。ここで、図形要素34の真の図形パラメータは、傾き=−1.0,切片=15.0であるとする。   As an example, it is assumed that the setting image 20 includes an image as shown in FIG. The graphic recognition module 222 decomposes the setting image 20 into a plurality of graphic elements 31 to 34 as shown in FIG. That is, the graphic element 31 is a circular element, and the graphic elements 32 to 34 are linear elements. In the following description, it is assumed that the graphic element that the user wants to recognize is the graphic element 34. Here, it is assumed that the true graphic parameters of the graphic element 34 are inclination = −1.0 and intercept = 15.0.

図形認識モジュール222は、分解した各図形要素の図形パラメータをそれぞれ算出する。算出されるそれぞれの図形パラメータを図7(a)に示す。そして、ユーザが図形要素34を選択すると、それに対応する図形パラメータが選択される。つまり、計測用画像30に含まれると推定される図形要素の選択、または、所望の図形要素と同じ図形要素を含む設定用画像20に対する、ユーザからの図形要素の選択によって、対応する図形パラメータが決定される。すなわち、ユーザが所望する図形要素および大まかに推定された図形パラメータが決定される。   The graphic recognition module 222 calculates the graphic parameters of each decomposed graphic element. Each figure parameter calculated is shown in FIG. When the user selects the graphic element 34, a graphic parameter corresponding to the graphic element 34 is selected. That is, by selecting a graphic element estimated to be included in the measurement image 30 or selecting a graphic element from the user for the setting image 20 including the same graphic element as the desired graphic element, the corresponding graphic parameter is set. It is determined. That is, a graphic element desired by the user and a roughly estimated graphic parameter are determined.

このユーザによる図形要素の選択は、以下に説明するように、分解処理によって得られた図形要素を選択候補として表示し、ユーザが明示的に選択するようにしてもよい。あるいは、分解処理によって得られた図形要素のうち、予め定められた選択基準に合致するものが選択されるようにしてもよい。例えば、選択基準が「直線要素」であって、かつ、「傾き<0」であるならば、図形要素34の直線要素が選択される。   As described below, the user may select a graphic element by displaying a graphic element obtained by the disassembly process as a selection candidate and explicitly selecting it by the user. Alternatively, among the graphic elements obtained by the decomposition process, a graphic element that matches a predetermined selection criterion may be selected. For example, if the selection criterion is “linear element” and “slope <0”, the linear element of the graphic element 34 is selected.

以下、ユーザが所望する図形要素を選択するための指示を与える処理について図8〜図10を参照しつつ説明する。   Hereinafter, a process for giving an instruction for selecting a desired graphic element by the user will be described with reference to FIGS.

図8は、本実施の形態の画像処理装置100によって提供される図形要素を選択するための表示画面250の一例を示す図である。図9は、図8に示す表示画面250において直線要素をユーザが選択する場合の処理例を示す図である。図10は、図8に示す表示画面250において円要素をユーザが選択する場合の処理例を示す図である。   FIG. 8 is a diagram illustrating an example of a display screen 250 for selecting a graphic element provided by the image processing apparatus 100 according to the present embodiment. FIG. 9 is a diagram illustrating a processing example when the user selects a linear element on the display screen 250 illustrated in FIG. 8. FIG. 10 is a diagram showing a processing example when the user selects a circle element on the display screen 250 shown in FIG.

図8に示す表示画面250には、入力された設定用画像20が表示される(画像表示エリア252)とともに、選択する図形要素の種別を選択するためのボタンが表示される(直線要素選択ボタン254および円要素選択ボタン256)。ユーザが直線要素選択ボタン254を選択すると、図9に示すような直線要素を選択するための表示画面へ遷移し、ユーザが円要素選択ボタン256を選択すると、図10に示すような円要素を選択するための表示画面へ遷移する。   In the display screen 250 shown in FIG. 8, the input setting image 20 is displayed (image display area 252), and a button for selecting the type of graphic element to be selected is displayed (straight element selection button). 254 and a circle element selection button 256). When the user selects the linear element selection button 254, the screen transitions to a display screen for selecting a linear element as shown in FIG. 9, and when the user selects the circular element selection button 256, the circular element as shown in FIG. Transitions to the display screen for selection.

なお、図形要素の種別を選択するためのボタン(直線要素選択ボタン254および円要素選択ボタン256)を選択可能に表示する必要は必ずしもなく、ユーザが選択した図形要素からその種別を自動的に判定してもよい。   It is not always necessary to display buttons for selecting the type of graphic element (straight element selection button 254 and circle element selection button 256) so that the type is automatically determined from the graphic element selected by the user. May be.

直線要素が選択されると、図9(a)に示すような表示画面260が表示される。表示画面260は、入力された設定用画像20を表示するための画像表示エリア252と、選択された直線要素の情報を表示するための座標値設定エリア266とを含む。図9(a)に示すように、ユーザは、画像表示エリア252に表示されている設定用画像20に対して選択すべき図形要素を指定する。例えば、図9(a)に示すように、マウスを操作して対象の図形要素の始点262および終点264を指定する。この始点および終点の指定によって、それぞれの点の座標値が設定される。すなわち、座標値設定エリア266には、指定された始点および終点の座標値が設定・表示される。   When the linear element is selected, a display screen 260 as shown in FIG. 9A is displayed. The display screen 260 includes an image display area 252 for displaying the input setting image 20 and a coordinate value setting area 266 for displaying information of the selected straight line element. As shown in FIG. 9A, the user designates a graphic element to be selected for the setting image 20 displayed in the image display area 252. For example, as shown in FIG. 9A, the start point 262 and the end point 264 of the target graphic element are designated by operating the mouse. By specifying the start point and end point, the coordinate value of each point is set. That is, in the coordinate value setting area 266, the coordinate values of the designated start point and end point are set and displayed.

なお、図9(a)には、図形要素の始点および終点をマウスでドラッグすることで指定する操作例を示すが、これに限られることなく、指定対象の図形要素の周辺をマウスでなぞる操作や、指定対象の図形要素を代表するいくつかの点を含む領域を点・線・楕円などで囲む操作で、指定するようにしてもよい。   FIG. 9A shows an example of an operation of specifying the start point and end point of a graphic element by dragging with the mouse. However, the operation is not limited to this, and the operation of tracing the periphery of the specified graphic element with the mouse is shown. Alternatively, it may be specified by an operation of enclosing an area including several points representing the graphic element to be specified with dots, lines, ellipses, or the like.

一方、円要素が選択されると、図10(a)に示すような表示画面280が表示される。表示画面280は、入力された設定用画像20を表示するための画像表示エリア252と、選択された円要素の情報を表示するための座標値設定エリア288とを含む。図10(a)に示すように、ユーザは、画像表示エリア252に表示されている設定用画像20に対して選択すべき図形要素を指定する。例えば、図10(a)に示すように、マウスを操作して対象の図形要素の中心点282、中心点282からX方向の半径284、中心点282からY方向の半径286をそれぞれ指定する。この中心点および各軸方向の半径の指定によって、中心点の座標および各軸方向における半径が設定される(座標値設定エリア288)。   On the other hand, when a circle element is selected, a display screen 280 as shown in FIG. 10A is displayed. Display screen 280 includes an image display area 252 for displaying input setting image 20 and a coordinate value setting area 288 for displaying information on the selected circle element. As shown in FIG. 10A, the user designates a graphic element to be selected for the setting image 20 displayed in the image display area 252. For example, as shown in FIG. 10A, the center point 282, the radius 284 in the X direction from the center point 282, and the radius 286 in the Y direction from the center point 282 are specified by operating the mouse. By specifying the center point and the radius in each axis direction, the coordinates of the center point and the radius in each axis direction are set (coordinate value setting area 288).

なお、図10(a)には、図形要素の中心点および半径をマウスでドラッグすることで指定する操作例を示すが、これに限られることなく、指定対象の図形要素の周辺をマウスでなぞる操作や、指定対象の図形要素を代表するいくつかの点を含む領域を点・線・楕円などで囲む操作で、指定するようにしてもよい。   FIG. 10A shows an example of an operation for specifying the center point and radius of a graphic element by dragging with the mouse. However, the present invention is not limited to this, and the periphery of the graphic element to be specified is traced with the mouse. It may be specified by an operation or an operation that encloses an area including some points representing the graphic element to be specified by a point, a line, an ellipse, or the like.

図9(a)および図10(a)に示すように、ユーザは、取得したい図形要素を入力装置により直接指定することができる。つまり、図形認識モジュール222(図5)は、ユーザの取得したい図形要素を入力装置を介して直接指定可能に構成される。   As shown in FIGS. 9A and 10A, the user can directly specify a graphic element desired to be acquired by the input device. That is, the graphic recognition module 222 (FIG. 5) is configured so that the graphic element that the user wants to acquire can be directly specified via the input device.

このユーザによる選択可能な図形要素を予め設定用画像20から推定しておくことが好ましい。すなわち、図形認識モジュール222(図5)は、計測用画像30に含まれる特徴量から計測用画像30に含まれる1つ以上の図形要素を選択候補として推定する機能を有することが好ましい。計測用画像30から図形要素を推定する機能および処理は、後述の図形要素推定モジュール314(図12)が提供する機能および処理と同様であるので、ここでは詳述しない。   It is preferable that the graphic elements that can be selected by the user are estimated in advance from the setting image 20. That is, the graphic recognition module 222 (FIG. 5) preferably has a function of estimating one or more graphic elements included in the measurement image 30 as selection candidates from the feature amounts included in the measurement image 30. The function and process for estimating the graphic element from the measurement image 30 are the same as the function and process provided by the graphic element estimation module 314 (FIG. 12), which will be described later, and will not be described in detail here.

また、図9および図10においては、一例として、直線要素および円要素を選択する場合の表示画面を例示したが、これらに限らず任意の形状の図形要素を選択可能に構成してもよい。   9 and 10 exemplify display screens when selecting a linear element and a circular element as an example, the present invention is not limited thereto, and a graphic element having an arbitrary shape may be selected.

このように、本実施の形態の画像処理装置100では、設定用画像20を用いて、ユーザが推定したい図形要素を選択できるようにしている。すなわち、図形認識モジュール222(図5)は、計測用画像30を表示し、表示された計測用画像30上に対するユーザ操作を受付ける機能を有している。   As described above, the image processing apparatus 100 according to the present embodiment uses the setting image 20 so that the user can select a graphic element that the user wants to estimate. That is, the figure recognition module 222 (FIG. 5) has a function of displaying the measurement image 30 and receiving a user operation on the displayed measurement image 30.

<E.図形選択モジュール>
次に、図5に示すチューニング処理220に含まれる図形選択モジュール224による図形パラメータの出力処理について説明する。図形パラメータは、計測処理300において、(1)図形フィッティング処理の対象となる図形要素(以下、「代表図形要素」とも称す。)の選択、(2)異常点の除去、(3)平滑化、(4)図形要素のパラメータ決定などの処理を最適化するための情報として用いられる。
<E. Figure selection module>
Next, graphic parameter output processing by the graphic selection module 224 included in the tuning processing 220 shown in FIG. 5 will be described. In the measurement process 300, the graphic parameters are (1) selection of graphic elements (hereinafter also referred to as “representative graphic elements”) to be subjected to graphic fitting processing, (2) removal of abnormal points, (3) smoothing, (4) Used as information for optimizing processing such as parameter determination of graphic elements.

より具体的には、図形選択モジュール224は、ユーザが選択した図形要素の特徴量として、例えば、図形要素の角度、図形要素の長さ、図形要素の大きさ、図形要素の面積、図形要素のノイズの標準偏差、外れ値の多さ、図形要素を構成する線の強度、図形要素の画像内の相対位置、図形要素の色などの情報を取得する。そして、これらの図形要素の特徴量に基づいて、代表図形要素が選択される。   More specifically, the graphic selection module 224 uses, as the feature amount of the graphic element selected by the user, for example, the angle of the graphic element, the length of the graphic element, the size of the graphic element, the area of the graphic element, the area of the graphic element, Information such as the standard deviation of noise, the number of outliers, the strength of lines constituting the graphic element, the relative position of the graphic element in the image, and the color of the graphic element are acquired. Then, based on the feature amounts of these graphic elements, representative graphic elements are selected.

また、計測処理300において実行される、異常点の除去、平滑化、図形要素のパラメータ決定などに用いられるパラメータを、選択された図形要素の特徴量に関連付けて動的に決定するための設定も行われる。例えば、上述の図9(b)および図10(b)においては、ユーザが選択した図形要素に応じて、異常点の除去に用いられるパラメータをどのような特徴量に基づいて決定するのかを設定する表示画面を示す。   Also, there are settings for dynamically determining parameters used in the measurement processing 300, such as abnormal point removal, smoothing, and graphic element parameter determination, in association with the feature amount of the selected graphic element. Done. For example, in FIG. 9 (b) and FIG. 10 (b) described above, it is set based on what feature amount the parameter used for removing the abnormal point is determined according to the graphic element selected by the user. The display screen to be displayed is shown.

図9(b)に示す表示画面270は、直線要素が選択された場合における、異常点の除去に用いられるパラメータを設定するための異常点除去設定エリア276を含む。異常点除去設定エリア276には、優先度付けされた3つの特徴量を設定することができるようになっている。   The display screen 270 shown in FIG. 9B includes an abnormal point removal setting area 276 for setting parameters used for removing abnormal points when a linear element is selected. In the abnormal point removal setting area 276, three prioritized feature quantities can be set.

同様に、図10(b)に示す表示画面290は、円要素が選択された場合における、異常点の除去に用いられるパラメータを設定するための異常点除去設定エリア296を含む。異常点除去設定エリア296には、優先度付けされた3つの特徴量を設定することができるようになっている。   Similarly, the display screen 290 shown in FIG. 10B includes an abnormal point removal setting area 296 for setting parameters used for removing abnormal points when a circular element is selected. In the abnormal point removal setting area 296, three feature values with priorities can be set.

計測処理300の実行時には、選択された代表図形要素の特徴量のうち、異常点除去設定エリア276または296において選択された特徴量を用いて、異常点の除去に用いられるパラメータが動的に決定される。このとき、3つの特徴量が優先度付けされており、この優先度に従って特徴量ごとに異常点として除去される対象が決定される。すなわち、図形認識モジュール222は、除去手段の動作のパラメータの決定に用いる特徴量の種別についてユーザからの指定を受付ける。   When the measurement process 300 is executed, parameters used for removing abnormal points are dynamically determined using the feature values selected in the abnormal point removal setting area 276 or 296 among the feature values of the selected representative graphic element. Is done. At this time, three feature amounts are prioritized, and an object to be removed as an abnormal point is determined for each feature amount according to the priorities. That is, the graphic recognition module 222 accepts a designation from the user regarding the type of feature amount used to determine the parameter of the operation of the removing means.

図9(b)および図10(b)に示すように、ユーザは、取得したい図形要素の特徴量を指定することができる。つまり、図形認識モジュール222(図5)は、ユーザの取得したい図形要素の特徴量の指定を受付ける。   As shown in FIG. 9B and FIG. 10B, the user can specify the feature amount of the graphic element to be acquired. That is, the graphic recognition module 222 (FIG. 5) accepts the designation of the feature amount of the graphic element that the user wants to acquire.

<F.計測処理>
次に、図11を参照して、図形選択モジュール224から出力される図形パラメータの計測処理における使用例について説明する。図11は、本実施の形態の画像処理装置によって提供される図形パラメータの利用例を説明するための図である。つまり、図11には、選択処理で選択した図形要素について、その周囲のデータ点を利用して精密推定を行った図形パラメータの精密推定結果を示す。
<F. Measurement processing>
Next, with reference to FIG. 11, a usage example in the measurement process of the graphic parameter output from the graphic selection module 224 will be described. FIG. 11 is a diagram for explaining an example of using graphic parameters provided by the image processing apparatus according to the present embodiment. That is, FIG. 11 shows the result of precise estimation of the figure parameters obtained by performing the precision estimation using the surrounding data points for the figure element selected by the selection process.

図6に示す図形要素34の図形パラメータの精密推定を行う場合を考える。図形要素34の真の図形パラメータは、傾き=−1.0,切片=15.0であるとする。   Let us consider a case where the precise estimation of the graphic parameters of the graphic element 34 shown in FIG. 6 is performed. It is assumed that the true graphic parameters of the graphic element 34 are inclination = −1.0 and intercept = 15.0.

図11(a)を参照して、上述したような図形パラメータを用いなければ、推定したい図形要素34(直線要素)と推定対象外の図形要素とが混在しているため推定誤差が大きくなる。この場合の図形パラメータは、傾き=−1.2,切片=15.8であったとする。これは、真の図形パラメータに対して誤差を有する値になっている。   Referring to FIG. 11A, if the graphic parameters as described above are not used, the graphic element 34 (straight line element) to be estimated and graphic elements that are not to be estimated are mixed, and the estimation error becomes large. It is assumed that the graphic parameters in this case are slope = −1.2 and intercept = 15.8. This is a value having an error with respect to a true graphic parameter.

これに対して、図11(b)を参照して、図形要素34の周辺は、図形要素34(直線要素)以外の他の図形要素である可能性が高いので、低い重みをつけたりデータ取得範囲を狭めることで推定精度を向上させる。このように、チューニング処理220によって出力される図形パラメータが計測処理に利用される。   On the other hand, referring to FIG. 11 (b), the periphery of the graphic element 34 is likely to be a graphic element other than the graphic element 34 (straight line element). The estimation accuracy is improved by narrowing. As described above, the graphic parameter output by the tuning process 220 is used for the measurement process.

図12は、本実施の形態の画像処理装置100において計測処理300を実現するための機能構成を示す模式図である。図12を参照して、計測処理300の図形フィッティングモジュール310(図5)は、画像特徴抽出モジュール311と、図形要素推定モジュール314と、代表図形選択モジュール315と、ノイズ除去モジュール316と、図形パラメータ推定モジュール320とを含む。   FIG. 12 is a schematic diagram illustrating a functional configuration for realizing the measurement process 300 in the image processing apparatus 100 according to the present embodiment. 12, the figure fitting module 310 (FIG. 5) of the measurement process 300 includes an image feature extraction module 311, a figure element estimation module 314, a representative figure selection module 315, a noise removal module 316, and a figure parameter. And an estimation module 320.

画像特徴抽出モジュール311は、計測用画像30に対する前処理を実行する。より具体的には、画像特徴抽出モジュール311は、入力された計測用画像30に対して、それに含まれる画像特徴を抽出する。抽出する画像特徴としては、どのような種別の情報を用いてもよいが、本実施の形態においては、エッジ点を画像特徴として抽出する。エッジ点を抽出する構成として、画像特徴抽出モジュール311は、勾配算出モジュール312およびエッジピーク点算出モジュール313を含む。画像特徴抽出モジュール311における機能は、勾配算出モジュール214およびエッジピーク点算出モジュール216を含む画像特徴抽出モジュール212と同様であるので、詳細な説明は繰返さない。   The image feature extraction module 311 executes preprocessing for the measurement image 30. More specifically, the image feature extraction module 311 extracts image features included in the input measurement image 30. As the image feature to be extracted, any type of information may be used, but in the present embodiment, edge points are extracted as image features. As a configuration for extracting edge points, the image feature extraction module 311 includes a gradient calculation module 312 and an edge peak point calculation module 313. Functions in image feature extraction module 311 are similar to those in image feature extraction module 212 including gradient calculation module 214 and edge peak point calculation module 216, and thus detailed description will not be repeated.

図形要素推定モジュール314は、計測用画像30に含まれる特徴量から計測用画像30に含まれる1つ以上の図形要素を推定する。より具体的には、図形要素推定モジュール314は、画像特徴抽出モジュール311によって生成された計測用画像30のエッジ画像を処理して、そのエッジ画像に含まれる図形要素を推定する。   The graphic element estimation module 314 estimates one or more graphic elements included in the measurement image 30 from the feature amounts included in the measurement image 30. More specifically, the graphic element estimation module 314 processes the edge image of the measurement image 30 generated by the image feature extraction module 311 and estimates the graphic element included in the edge image.

代表図形選択モジュール315は、図形要素推定モジュール314において推定された1つ以上の図形要素から、上述の設定処理200において設定された図形パラメータ(ユーザが選択した図形要素の特徴量)に基づいて、代表図形要素を選択する。   The representative graphic selection module 315 is based on the graphic parameters (feature amount of the graphic element selected by the user) set in the setting process 200 from one or more graphic elements estimated by the graphic element estimation module 314. Select a representative graphic element.

ノイズ除去モジュール316は、ノイズ除去手段に相当し、推定対象の図形要素(選択された代表図形要素)に応じて外乱となる情報を計測用画像30から除去する。ノイズ除去モジュール316は、典型的には、異常点除去モジュール317およびデータ平滑化モジュール318を含む。ここで、ノイズ除去モジュール316は、推定対象の図形要素(選択された代表図形要素)に関連付けられた特徴量に基づいて決定されるパラメータに従って動作する。異常点除去モジュール317およびデータ平滑化モジュール318のいずれもが、特徴量に基づいて決定されるパラメータに従って動作するが、この処理例については後述する。   The noise removal module 316 corresponds to a noise removal unit, and removes disturbance information from the measurement image 30 in accordance with the graphic element to be estimated (selected representative graphic element). The noise removal module 316 typically includes an abnormal point removal module 317 and a data smoothing module 318. Here, the noise removal module 316 operates according to a parameter determined based on a feature amount associated with a graphic element to be estimated (selected representative graphic element). Both the abnormal point removal module 317 and the data smoothing module 318 operate according to parameters determined based on the feature amount, and an example of this processing will be described later.

異常点除去モジュール317は、選択された代表図形要素には該当しない異常点を除去する。典型的には、異常点除去モジュール317は、計測用画像30のエッジ画像に対して、代表図形要素には関連しないと判断されるエッジ点を異常点と判断し、当該異常点と判断されたエッジ点を除去する。   The abnormal point removal module 317 removes abnormal points that do not correspond to the selected representative graphic element. Typically, the abnormal point removal module 317 determines an edge point that is determined not to be related to the representative graphic element as an abnormal point with respect to the edge image of the measurement image 30, and is determined to be the abnormal point. Remove edge points.

データ平滑化モジュール318は、選択された代表図形要素に応じてフィルタリングを実行する。典型的には、データ平滑化モジュール318は、各種の平滑化処理を適用して、計測用画像30のエッジ画像に含まれるランダムなノイズなどを除去・低減する。   The data smoothing module 318 performs filtering according to the selected representative graphic element. Typically, the data smoothing module 318 applies various smoothing processes to remove / reduce random noise included in the edge image of the measurement image 30.

後述するように、異常点除去モジュール317およびデータ平滑化モジュール318は、選択された代表図形要素に応じて決定される図形パラメータに従って、処理を実行する。すなわち、選択された代表図形要素に応じて、それぞれの処理が最適化される。   As will be described later, the abnormal point removal module 317 and the data smoothing module 318 execute processing according to the graphic parameters determined according to the selected representative graphic element. That is, each process is optimized according to the selected representative graphic element.

図形パラメータ推定モジュール320は、選択された代表図形要素に対応する計測用画像30内の領域の情報から、対象の図形要素を示すパラメータを推定する。より具体的には、図形パラメータ推定モジュール320は、代表図形選択モジュール315において選択された代表図形要素の情報から、ノイズ除去後のエッジ画像に対して図形フィッティングを行って、図形要素のパラメータを決定する。   The graphic parameter estimation module 320 estimates a parameter indicating a target graphic element from information on a region in the measurement image 30 corresponding to the selected representative graphic element. More specifically, the graphic parameter estimation module 320 determines graphic element parameters by performing graphic fitting on the edge image after noise removal from information on the representative graphic element selected by the representative graphic selection module 315. To do.

図形パラメータ推定モジュール320による図形フィッティング処理としては、推定対象のパラメータ数が比較的少ない場合には、ハフ変換が有効である。但し、これらに限られることなく、最小二乗法を用いて決定してもよいし、推定対象の図形が線形性を有している場合には、主成分分析などのアルゴリズムを採用できる。図形パラメータ推定モジュール320による図形フィッティング処理においても、実行されるアルゴリズム特有のパラメータ設定が選択された代表図形要素に応じて決定される。すなわち、選択された代表図形要素に応じて、図形要素を示すパラメータの推定処理が最適化される。   As the figure fitting process by the figure parameter estimation module 320, the Hough transform is effective when the number of parameters to be estimated is relatively small. However, the present invention is not limited to these, and it may be determined using the least square method, and when the figure to be estimated has linearity, an algorithm such as principal component analysis can be adopted. Also in the graphic fitting process by the graphic parameter estimation module 320, the algorithm-specific parameter setting to be executed is determined according to the selected representative graphic element. In other words, the parameter estimation process indicating the graphic element is optimized according to the selected representative graphic element.

図形パラメータ推定モジュール320による図形フィッティング処理の結果、推定結果が出力される。   As a result of the figure fitting process by the figure parameter estimation module 320, an estimation result is output.

<G.図形パラメータ用いた処理の最適化>
次に、設定処理200において設定された図形パラメータを用いた処理の最適化の一例について説明する。
<G. Optimization of processing using graphic parameters>
Next, an example of process optimization using the graphic parameters set in the setting process 200 will be described.

(g1:代表図形要素の選択処理)
上述したように、計測処理300の前処理とも言える設定処理200において、ユーザが選択した代表図形要素の特徴量が格納される。この特徴量としては、図形要素の角度、図形要素の長さ、図形要素の大きさ、図形要素の面積、図形要素のノイズの標準偏差、外れ値の多さ、図形要素を構成する線の強度、図形要素の画像内の相対位置、図形要素の色などを含む。これらの各図形要素の特徴量を基準として、計測用画像30に含まれる代表図形要素が選択される。
(G1: representative graphic element selection process)
As described above, the feature amount of the representative graphic element selected by the user is stored in the setting process 200 which can be said to be a pre-process of the measurement process 300. This feature amount includes the angle of the graphic element, the length of the graphic element, the size of the graphic element, the area of the graphic element, the standard deviation of the noise of the graphic element, the number of outliers, and the strength of the lines that make up the graphic element , The relative position of the graphic element in the image, the color of the graphic element, and the like. A representative graphic element included in the measurement image 30 is selected on the basis of the feature amount of each graphic element.

一例として、代表図形選択モジュール315は、図形要素推定モジュール314により推定された図形要素のうち、1または複数の基準(ここでは、各図形要素の特徴量)に最も適したものを選択するようにしてもよい。なお、複数の図形要素が代表図形要素として選択されてもよい。この場合、2つの直線といった同一種別の図形要素を複数選択するようにしてもよいし、1つの直線と1つの円といった異なる種別の図形要素をそれぞれ選択するようにしてもよいし、両者を混合したような選択方法を採用してもよい。基本的には、ユーザが選択した図形要素の別に特徴量が学習されるので、複数の図形要素を代表図形要素として選択することができる。また、予め定められた基準に対する適合度合いに応じて、1つ以上の図形要素のうち対象の図形要素を選択するようにしてもよい。例えば、特定の図形要素を1つだけ選択するような場合には、推定された複数の図形要素のうち、基準に最も適合しているものを選択すればよいし、単一種別の図形要素を複数選択する場合には基準への適合度合いが上位にあるものを必要な数だけ選択すればよい。   As an example, the representative graphic selection module 315 selects one of the graphic elements estimated by the graphic element estimation module 314 that is most suitable for one or a plurality of criteria (here, feature amounts of each graphic element). May be. A plurality of graphic elements may be selected as representative graphic elements. In this case, a plurality of graphic elements of the same type such as two straight lines may be selected, or different types of graphic elements such as one straight line and one circle may be selected, or both may be mixed. The selection method as described above may be adopted. Basically, feature quantities are learned separately from the graphic elements selected by the user, so that a plurality of graphic elements can be selected as representative graphic elements. Further, a target graphic element may be selected from one or more graphic elements according to the degree of conformity with a predetermined standard. For example, when only one specific graphic element is selected, it is only necessary to select the most suitable graphic element among the estimated graphic elements, or to select a single type of graphic element. When selecting a plurality, it is sufficient to select as many as necessary that have the highest degree of conformity to the reference.

一方、異なる種別の図形要素をそれぞれ選択する場合には、第1の種別の図形要素の第1の基準と、第2の種別の図形要素の第2の基準とをそれぞれ用意しておき、第1の基準および第2の基準にそれぞれ最も適合している図形要素を選択するようにしてもよい。   On the other hand, when selecting different types of graphic elements, a first reference for the first type of graphic element and a second reference for the second type of graphic element are prepared. The graphic element that best matches each of the first criterion and the second criterion may be selected.

代表図形要素の選択に用いられる基準としては、例えば、ユーザが予め選択した図形要素についての、長さ、大きさ、面積、構成する線の強度、フィッティング誤差、予め指定された角度/位置/大きさ/半径/中心位置に対する類似度や相違度、色などの特徴量が用いられる。   The criteria used for selecting the representative graphic element include, for example, the length, size, area, line strength, fitting error, and predesignated angle / position / size for the graphic element selected in advance by the user. A feature amount such as similarity, dissimilarity, and color with respect to the height / radius / center position is used.

複数種別の特徴量(図形パラメータ)を設定した場合には、特徴量間の優先度をさらに設定してもよい。あるいは、複数種別の特徴量を組合せてもよいし、各特徴量に対してそれぞれ重み係数を与えて、これらの重み係数を反映して算出される適合度などに応じて、選択対象を決定してもよい。   When a plurality of types of feature amounts (graphic parameters) are set, priorities between feature amounts may be further set. Alternatively, a plurality of types of feature amounts may be combined, and a weighting factor is given to each feature amount, and a selection target is determined according to a fitness degree calculated by reflecting these weighting factors. May be.

(g2:異常点除去のパラメータの最適化)
図12に示す異常点除去モジュール317は、異常点として除去する対象を判断するためのパラメータを選択された代表図形要素に応じて決定する。
(G2: Optimization of abnormal point removal parameters)
The abnormal point removal module 317 shown in FIG. 12 determines a parameter for determining a target to be removed as an abnormal point according to the selected representative graphic element.

一例として、図9(b)および図10(b)に示すように、異常点除去のパラメータを決定する図形要素の特徴量の種別が予め設定されており、この設定された特徴量を用いて、異常点として判断される基準を動的に決定してもよい。   As an example, as shown in FIGS. 9B and 10B, the types of feature amounts of graphic elements for determining parameters for removing abnormal points are set in advance, and the set feature amounts are used. The criterion for determining an abnormal point may be dynamically determined.

この基準に代えて、あるいは、それに加えて、選択された代表図形要素に対応する図形要素についての設定処理200においてユーザが選択した際の基準の距離からのずれの大きさに依存して、異常点として除去する点数を決定してもよい。つまり、設定処理200においてユーザが選択した図形要素の位置を基準とし、この基準からのユーザ入力の距離に応じて、異常判定基準を決定してもよい。典型的には、設定処理200においてユーザが選択した図形要素の基準位置から遠い位置にあるエッジ点ほど異常点として判断される可能性が高くなる。   Instead of or in addition to this reference, an abnormality occurs depending on the amount of deviation from the reference distance when the user selects in the setting process 200 for the graphic element corresponding to the selected representative graphic element. The number of points to be removed as points may be determined. That is, with reference to the position of the graphic element selected by the user in the setting process 200, the abnormality determination criterion may be determined according to the distance of the user input from this criterion. Typically, an edge point that is farther from the reference position of the graphic element selected by the user in the setting process 200 is more likely to be determined as an abnormal point.

(g3:データ平滑化のパラメータの最適化)
図12に示すデータ平滑化モジュール318は、平滑化のパラメータを選択された代表図形要素に応じて決定する。すなわち、データ平滑化モジュール318は、選択された図形要素(代表図形要素)に応じたフィルタリングを行う。より具体的には、ユーザが選択した図形要素の特徴量に応じて、平滑化回数および平滑化フィルタサイズが自動的に決定される。例えば、代表図形要素として選択された図形要素が相対的に大きければ、フィルタサイズも相対的に大きくすればよいし、平滑化回数も相対的に多くすればよい。逆に、代表図形要素として選択された図形要素を構成する線の強度が相対的に低ければ、フィルタサイズも相対的に小さくする必要がある。このように、代表図形要素として選択された図形要素の特徴量に応じて、データ平滑化のパラメータが最適化される。
(G3: Data smoothing parameter optimization)
The data smoothing module 318 shown in FIG. 12 determines a smoothing parameter according to the selected representative graphic element. That is, the data smoothing module 318 performs filtering according to the selected graphic element (representative graphic element). More specifically, the number of smoothing and the smoothing filter size are automatically determined according to the feature amount of the graphic element selected by the user. For example, if the graphic element selected as the representative graphic element is relatively large, the filter size may be relatively large, and the number of times of smoothing may be relatively large. On the contrary, if the intensity of the line constituting the graphic element selected as the representative graphic element is relatively low, the filter size needs to be relatively small. Thus, the data smoothing parameters are optimized according to the feature amount of the graphic element selected as the representative graphic element.

(g4:図形パラメータ推定のパラメータの最適化)
図12に示す図形パラメータ推定モジュール320は、そのアルゴリズムのパラメータを選択された代表図形要素に応じて決定する。図形パラメータ推定モジュール320における図形パラメータの推定には、選択された代表図形要素の種別に応じて、複数のアルゴリズムから適切なアルゴリズムが選択される。そのため、選択されたアルゴリズム特有にパラメータが最適化される。つまり、図形パラメータ推定モジュール320は、複数のアルゴリズムのうち、推定対象の図形要素の種別に応じたアルゴリズムを実行可能に構成されている。そして、複数のアルゴリズムの各々の動作のパラメータは、推定対象の図形要素に関連付けられた特徴量に基づいて決定される。
(G4: Parameter optimization for figure parameter estimation)
The graphic parameter estimation module 320 shown in FIG. 12 determines the algorithm parameters according to the selected representative graphic element. For the estimation of graphic parameters in the graphic parameter estimation module 320, an appropriate algorithm is selected from a plurality of algorithms according to the type of the selected representative graphic element. This optimizes the parameters specific to the selected algorithm. That is, the graphic parameter estimation module 320 is configured to be able to execute an algorithm according to the type of graphic element to be estimated among a plurality of algorithms. The operation parameters of each of the plurality of algorithms are determined based on the feature amount associated with the graphic element to be estimated.

例えば、パラメータ推定アルゴリズムとして、ランダムサンプリング方式の一例であるRANSAC(Random Sampling Consensus)法を用いる場合には、ユーザが選択した図形要素の特徴量に応じて、ランダムに選択される点の組合せ、収束条件、採用条件などが自動的に決定される。パラメータ推定アルゴリズムとしては、RANSAC法に加えて、ロバスト推定法、ハフ変換(直線要素)、ハフ変換(円要素)、最小二乗法、主成分分析法、局所外れ値投票方式などを用いることができる。それぞれのアルゴリズムについて、選択された代表図形要素の特徴量に応じて決定されるパラメータは以下のようになる。   For example, when a RANSAC (Random Sampling Consensus) method, which is an example of a random sampling method, is used as a parameter estimation algorithm, a combination of points selected at random according to the feature amount of a graphic element selected by the user, convergence Conditions, employment conditions, etc. are automatically determined. As a parameter estimation algorithm, in addition to the RANSAC method, a robust estimation method, a Hough transform (linear element), a Hough transform (circle element), a least square method, a principal component analysis method, a local outlier voting method, and the like can be used. . For each algorithm, the parameters determined according to the feature amount of the selected representative graphic element are as follows.

(a)ロバスト推定法:採用点数、重み
(b)ハフ変換(直線要素):採用点数、累積値に対するしきい値、中点座標
(c)ハフ変換(円要素):中心座標、探索半径
(d)最小二乗法:採用点数、探索範囲(中点、傾き)
(e)主成分分析:軸算出に用いる累積寄与率算出時の基底数
(f)局所外れ値投票方式:点組合せ
図形要素のパラメータ推定アルゴリズムとしては、上述したものに限られず、任意のアルゴリズムを採用することができ、いずれのアルゴリズムを採用した場合であっても、実行に必要なパラメータを選択された代表図形要素の特徴量に応じて、最適化することができる。
(A) Robust estimation method: number of employed points, weight (b) Hough transform (linear element): number of employed points, threshold for accumulated value, middle point coordinates (c) Hough transform (circle element): center coordinates, search radius ( d) Least-squares method: number of adopted points, search range (midpoint, slope)
(E) Principal component analysis: Basis number at the time of calculating the cumulative contribution ratio used for axis calculation (f) Local outlier voting method: Point combination The graphic element parameter estimation algorithm is not limited to the above, and any algorithm can be used. Regardless of which algorithm is used, parameters necessary for execution can be optimized according to the feature amount of the selected representative graphic element.

<H.処理手順>
図13は、本実施の形態の画像処理装置100における処理手順を説明するためのフローチャートである。図13に示す処理手順は、典型的には、画像処理装置100のプロセッサが制御プログラムを実行することで実現される。制御プログラムは、入力画像に含まれる図形要素を推定する画像処理プログラムを含み、画像処理装置100によって制御プログラムが実行されることで、入力画像に含まれる図形要素を推定する画像処理方法が実行される。
<H. Processing procedure>
FIG. 13 is a flowchart for explaining a processing procedure in the image processing apparatus 100 of the present embodiment. The processing procedure shown in FIG. 13 is typically realized by the processor of the image processing apparatus 100 executing a control program. The control program includes an image processing program for estimating a graphic element included in the input image. When the control program is executed by the image processing apparatus 100, an image processing method for estimating the graphic element included in the input image is executed. The

上述したように、画像処理装置100では、各種の図形定パラメータを決定するための設定処理200と、実際に入力画像に対して画像処理を実行する計測処理300とが実行される。図13において、設定処理200は、ステップS100〜S108に相当し、計測処理300は、ステップS200〜S210に相当する。   As described above, in the image processing apparatus 100, the setting process 200 for determining various graphic constant parameters and the measurement process 300 for actually executing image processing on the input image are executed. In FIG. 13, the setting process 200 corresponds to steps S100 to S108, and the measurement process 300 corresponds to steps S200 to S210.

図13を参照して、設定用画像20を取得する(ステップS100)。
続いて、設定用画像20を表示し、設定用画像20に対するユーザからの図形要素の選択を受付ける(ステップS102)。このとき、計測用画像30に含まれる特徴量から計測用画像30に含まれる1つ以上の図形要素を推定した上で、選択候補として表示してもよい。続いて、ユーザが図形要素を選択すると、設定用画像20から選択された図形要素の特徴量を取得し格納する(ステップS104)。
With reference to FIG. 13, the setting image 20 is acquired (step S100).
Subsequently, the setting image 20 is displayed, and selection of a graphic element from the user for the setting image 20 is accepted (step S102). At this time, one or more graphic elements included in the measurement image 30 may be estimated from the feature amounts included in the measurement image 30 and then displayed as selection candidates. Subsequently, when the user selects a graphic element, the feature amount of the selected graphic element is acquired from the setting image 20 and stored (step S104).

そして、設定用画像20に対してユーザから別の図形要素が選択されたか否かを判断する(ステップS106)。設定用画像20に対してユーザから別の図形要素が選択された場合(ステップS106においてYESの場合)には、ステップS104の処理が繰返される。   Then, it is determined whether another graphic element has been selected by the user for the setting image 20 (step S106). If another graphic element is selected from the user for setting image 20 (YES in step S106), the process of step S104 is repeated.

これに対して、設定用画像20に対してユーザから別の図形要素が選択されていない場合(ステップS106においてNOの場合)には、別の設定用画像20がユーザから要求されたか否かを判断する(ステップS108)。別の設定用画像20がユーザから要求された場合(ステップS108においてYESの場合)には、ステップS100以下の処理が繰返される。   On the other hand, when another graphic element is not selected from the user for the setting image 20 (NO in step S106), it is determined whether another setting image 20 is requested by the user. Judgment is made (step S108). If another setting image 20 is requested by the user (YES in step S108), the processes in and after step S100 are repeated.

一方、別の設定用画像20がユーザから要求されていない場合(ステップS108においてNOの場合)には、設定処理200は終了する。   On the other hand, if another setting image 20 is not requested from the user (NO in step S108), the setting process 200 ends.

設定処理200の完了後、任意のタイミングで、計測処理300が開始される。
周期的または何らかのイベントに応答して、計測用画像30を取得する(ステップS200)。計測用画像30の取得方法としては、画像処理装置100に接続された撮像部8が被写体を撮像することで生成されるデータを取得する方法に加えて、外部の撮像装置を用いて被写体を撮像することで生成された入力画像を何らかの媒体を介して取得するようにしてもよい。
After the setting process 200 is completed, the measurement process 300 is started at an arbitrary timing.
In response to a periodic or some event, the measurement image 30 is acquired (step S200). As a method of acquiring the measurement image 30, in addition to a method of acquiring data generated when the imaging unit 8 connected to the image processing apparatus 100 images the subject, the subject is imaged using an external imaging device. Thus, the input image generated may be acquired via some medium.

続いて、計測用画像30に含まれる特徴量を抽出する(ステップS202)。具体的には、計測用画像30に対して、勾配およびエッジピーク点を算出することで、計測用画像30に含まれるエッジ点を示すエッジ画像を生成する。   Subsequently, a feature amount included in the measurement image 30 is extracted (step S202). Specifically, an edge image indicating the edge points included in the measurement image 30 is generated by calculating a gradient and an edge peak point for the measurement image 30.

続いて、設定処理200において取得および格納された各図形要素の特徴量に基づいて、計測用画像30に含まれる推定対象の図形要素を特定し、当該特定した図形要素を示すパラメータを出力する。計測用画像30に対して図形フィッティング処理を実行する。   Subsequently, the estimation target graphic element included in the measurement image 30 is specified based on the feature amount of each graphic element acquired and stored in the setting process 200, and a parameter indicating the specified graphic element is output. A graphic fitting process is executed on the measurement image 30.

予め格納されている各図形要素の特徴量に基づいて、計測用画像30に含まれる特徴量から計測用画像30から代表図形要素を選択する(ステップS204)。計測用画像30のエッジ画像に対して、ハフ変換、クラスタリングアルゴリズム、各種検出ロジックなどを適用することで、それに含まれる図形要素を推定する。   Based on the feature quantity of each graphic element stored in advance, a representative graphic element is selected from the measurement image 30 from the feature quantities included in the measurement image 30 (step S204). By applying a Hough transform, a clustering algorithm, various detection logics, and the like to the edge image of the measurement image 30, the graphic elements included in the image are estimated.

選択された代表図形要素に応じて外乱となる情報を除去する(ステップS206)。具体的には、選択された代表図形要素に従って、当該代表図形要素以外の図形要素によるノイズ要因を低減する。このノイズ要因の低減の処理としては、異常点の除去およびデータの平滑化が用いられる。このとき、異常点の除去およびデータの平滑化のパラメータを、選択された代表図形要素に関連付けられた特徴量に基づいて決定する。   Information that becomes a disturbance is removed according to the selected representative graphic element (step S206). Specifically, noise factors caused by graphic elements other than the representative graphic element are reduced according to the selected representative graphic element. As processing for reducing the noise factor, removal of abnormal points and data smoothing are used. At this time, parameters for removing abnormal points and smoothing the data are determined based on the feature amount associated with the selected representative graphic element.

続いて、図形フィッティング処理を実行する。すなわち、対象の代表図形要素を示すパラメータを推定する(ステップS208)。   Subsequently, a figure fitting process is executed. That is, a parameter indicating the target representative graphic element is estimated (step S208).

このとき、図形要素を推定するアルゴリズムに応じて、選択された代表図形要素に関連付けられる特徴量から、その動作のパラメータを決定する。   At this time, in accordance with the algorithm for estimating the graphic element, the operation parameter is determined from the feature quantity associated with the selected representative graphic element.

最終的に、ステップS208において取得された代表図形要素の推定結果を出力する(ステップS210)。そして、処理は終了する。   Finally, the estimation result of the representative graphic element acquired in step S208 is output (step S210). Then, the process ends.

本実施の形態の画像処理装置によれば、設定処理において、図形要素の推定の処理を最適に行うための情報を取得しておき、この予め取得した情報に基づいて、図形要素を推定するアルゴリズムに対して、その性能を引出すためのより適切なパラメータを決定できる。   According to the image processing apparatus of the present embodiment, in the setting process, information for optimally performing graphic element estimation processing is acquired, and an algorithm for estimating graphic elements based on the previously acquired information Therefore, it is possible to determine a more appropriate parameter for extracting the performance.

また、図形要素の推定の対象となる代表図形要素の選択においても、設定処理において予め取得された情報が用いられるので、計測用画像に複数の図形要素が混入している場合であっても、目的の図形要素に絞って図形要素の推定を行うことができる、推定精度を高めることができる。   In addition, since the information acquired in advance in the setting process is used in the selection of the representative graphic element to be estimated for the graphic element, even when a plurality of graphic elements are mixed in the measurement image, The estimation accuracy can be increased because it is possible to estimate the graphic element by focusing on the target graphic element.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1 画像処理システム、2 測定対象物、5 PLC、6 可動ステージ、8 撮像部、20 設定用画像、30 計測用画像、100 画像処理装置、200 設定処理、210 前処理、212,311 画像特徴抽出モジュール、214,312 勾配算出モジュール、216,313 エッジピーク点算出モジュール、220 チューニング処理、222 図形認識モジュール、224 図形選択モジュール、230 設定格納処理、232 設定記憶部、300 計測処理、310 図形フィッティングモジュール、314 図形要素推定モジュール、315 代表図形選択モジュール、316 ノイズ除去モジュール、317 異常点除去モジュール、318 データ平滑化モジュール、320 図形パラメータ推定モジュール。   DESCRIPTION OF SYMBOLS 1 Image processing system, 2 Measurement object, 5 PLC, 6 Movable stage, 8 Imaging part, 20 Setting image, 30 Measurement image, 100 Image processing apparatus, 200 Setting process, 210 Preprocessing, 212,311 Image feature extraction Module, 214, 312 Gradient calculation module, 216, 313 Edge peak point calculation module, 220 Tuning processing, 222 Graphic recognition module, 224 Graphic selection module, 230 Setting storage processing, 232 Setting storage section, 300 Measurement processing, 310 Graphic fitting module 314 Graphic element estimation module, 315 Representative graphic selection module, 316 Noise removal module, 317 Abnormal point removal module, 318 Data smoothing module, 320 Graphic parameter estimation module.

Claims (13)

設定用画像に対するユーザからの図形要素の選択を受付ける選択手段と、
前記選択された図形要素の特徴量を取得し格納する設定値取得手段と、
前記格納された特徴量に基づいて、計測用画像に含まれる推定対象の図形要素を特定し当該特定した図形要素を示すパラメータを出力する推定手段とを備える、
画像処理装置。
A selection means for accepting selection of a graphic element from the user for the setting image;
Setting value acquisition means for acquiring and storing the feature amount of the selected graphic element;
An estimation unit that identifies a graphic element to be estimated included in the measurement image based on the stored feature amount and outputs a parameter indicating the identified graphic element;
Image processing device.
前記選択手段は、前記計測用画像に含まれる特徴量から当該計測用画像に含まれる1つ以上の図形要素を選択候補として推定する手段を含む、請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the selection unit includes a unit that estimates one or more graphic elements included in the measurement image as selection candidates from a feature amount included in the measurement image. 前記選択手段は、ユーザの取得したい図形要素を入力装置を介して直接指定可能に構成される、請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the selection unit is configured to be able to directly specify a graphic element that the user wants to acquire via an input device. 前記選択手段は、ユーザの取得したい図形要素の特徴量の指定を受付ける、請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the selection unit accepts designation of a feature amount of a graphic element that the user wants to acquire. 前記選択手段は、前記計測用画像を表示し、当該表示された計測用画像上に対するユーザ操作を受付ける手段を含む、請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the selection unit includes a unit that displays the measurement image and receives a user operation on the displayed measurement image. 前記推定対象の図形要素に応じて外乱となる情報を前記計測用画像から除去する除去手段をさらに備え、
前記除去手段は、前記推定対象の図形要素に関連付けられた特徴量に基づいて決定されるパラメータに従って動作する、請求項1〜5のいずれか1項に記載の画像処理装置。
Further comprising a removing means for removing information that becomes a disturbance according to the graphic element to be estimated from the measurement image;
The image processing apparatus according to claim 1, wherein the removing unit operates in accordance with a parameter determined based on a feature amount associated with the graphic element to be estimated.
前記除去手段は、前記選択された図形要素には該当しない異常点を除去する、もしくは、重みを付ける手段を含む、請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the removing unit includes a unit that removes or weights abnormal points that do not correspond to the selected graphic element. 前記除去手段は、前記選択された図形要素に応じたフィルタリングを行う、もしくは、フィルタリング結果に基づき重みを付ける手段を含む、請求項6または7に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the removing unit includes a unit that performs filtering according to the selected graphic element or adds a weight based on a filtering result. 前記選択手段は、前記除去手段の動作に係るパラメータの決定に用いる特徴量の種別についてユーザからの指定を受付ける、請求項6〜8のいずれか1項に記載の画像処理装置。   The image processing apparatus according to claim 6, wherein the selection unit receives a designation from a user regarding a type of feature amount used for determining a parameter related to an operation of the removal unit. 前記推定手段は、複数の推定アルゴリズムのうち、前記推定対象の図形要素の種別に応じた推定アルゴリズムを実行可能に構成されており、
前記複数の推定アルゴリズムの各々の動作に係るパラメータは、前記推定対象の図形要素に関連付けられた特徴量に基づいて決定される、請求項1〜9のいずれか1項に記載の画像処理装置。
The estimation means is configured to be able to execute an estimation algorithm according to the type of graphic element to be estimated among a plurality of estimation algorithms,
The image processing apparatus according to claim 1, wherein a parameter relating to an operation of each of the plurality of estimation algorithms is determined based on a feature amount associated with the graphic element to be estimated.
被写体を撮像することで前記計測用画像を生成する撮像手段と、
前記推定された図形要素を示すパラメータに基づいて、前記被写体の位置を変化させる駆動装置へ指示を出力する出力手段とをさらに備える、請求項1〜10のいずれか1項に記載の画像処理装置。
Imaging means for generating the measurement image by imaging a subject;
The image processing apparatus according to claim 1, further comprising: an output unit that outputs an instruction to a driving device that changes the position of the subject based on a parameter indicating the estimated graphic element. .
設定用画像に対するユーザからの図形要素の選択を受付けるステップと、
前記選択された図形要素の特徴量を取得し格納するステップと、
前記格納された特徴量に基づいて、計測用画像に含まれる推定対象の図形要素を特定し当該特定した図形要素を示すパラメータを出力するステップとを備える、画像処理方法。
Receiving a selection of a graphic element from the user for the setting image;
Obtaining and storing a feature quantity of the selected graphic element;
An image processing method comprising: specifying a graphic element to be estimated included in the measurement image based on the stored feature amount and outputting a parameter indicating the specified graphic element.
画像処理プログラムであって、前記画像処理プログラムは、コンピュータに
設定用画像に対するユーザからの図形要素の選択を受付けるステップと、
前記選択された図形要素の特徴量を取得し格納するステップと、
前記格納された特徴量に基づいて、計測用画像に含まれる推定対象の図形要素を特定し当該特定した図形要素を示すパラメータを出力するステップとを実行させる、画像処理プログラム。
An image processing program, the image processing program receiving a selection of a graphic element from a user for a setting image on a computer;
Obtaining and storing a feature quantity of the selected graphic element;
An image processing program for executing a step of specifying a graphic element to be estimated included in a measurement image and outputting a parameter indicating the specified graphic element based on the stored feature amount.
JP2013256903A 2013-12-12 2013-12-12 Image processing apparatus, image processing method, and image processing program Active JP6314464B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013256903A JP6314464B2 (en) 2013-12-12 2013-12-12 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013256903A JP6314464B2 (en) 2013-12-12 2013-12-12 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2015114875A true JP2015114875A (en) 2015-06-22
JP6314464B2 JP6314464B2 (en) 2018-04-25

Family

ID=53528612

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013256903A Active JP6314464B2 (en) 2013-12-12 2013-12-12 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP6314464B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3460754A4 (en) * 2016-04-22 2020-02-26 Nikon Corporation Image measurement method, image measurement program, image measurement device, and object manufacture method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001319219A (en) * 2000-05-10 2001-11-16 Mitsutoyo Corp Device and method for generating part program for image measuring apparatus, image measuring apparatus and measure result display method therefor
JP2007108835A (en) * 2005-10-11 2007-04-26 Keyence Corp Image processor
JP2007256225A (en) * 2006-03-27 2007-10-04 Hitachi High-Technologies Corp Pattern matching method and computer program for executing pattern matching
JP2011100222A (en) * 2009-11-04 2011-05-19 Panasonic Electric Works Co Ltd Image processing apparatus and image processing method
JP2011124694A (en) * 2009-12-09 2011-06-23 Sony Corp Image processing device, image processing system, and image pickup device
JP2013036964A (en) * 2011-08-11 2013-02-21 Mitsutoyo Corp Image measurement apparatus and image measurement method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001319219A (en) * 2000-05-10 2001-11-16 Mitsutoyo Corp Device and method for generating part program for image measuring apparatus, image measuring apparatus and measure result display method therefor
JP2007108835A (en) * 2005-10-11 2007-04-26 Keyence Corp Image processor
JP2007256225A (en) * 2006-03-27 2007-10-04 Hitachi High-Technologies Corp Pattern matching method and computer program for executing pattern matching
JP2011100222A (en) * 2009-11-04 2011-05-19 Panasonic Electric Works Co Ltd Image processing apparatus and image processing method
JP2011124694A (en) * 2009-12-09 2011-06-23 Sony Corp Image processing device, image processing system, and image pickup device
JP2013036964A (en) * 2011-08-11 2013-02-21 Mitsutoyo Corp Image measurement apparatus and image measurement method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3460754A4 (en) * 2016-04-22 2020-02-26 Nikon Corporation Image measurement method, image measurement program, image measurement device, and object manufacture method
US11195294B2 (en) 2016-04-22 2021-12-07 Nikon Corporation Image measurement method, image measurement program, image measurement device, and object manufacture method

Also Published As

Publication number Publication date
JP6314464B2 (en) 2018-04-25

Similar Documents

Publication Publication Date Title
JP5699788B2 (en) Screen area detection method and system
US8503757B2 (en) Image measurement device, method for image measurement, and computer readable medium storing a program for image measurement
JP4616120B2 (en) Image processing apparatus and inspection apparatus
US9892504B2 (en) Image inspection method and inspection region setting method
US7747080B2 (en) System and method for scanning edges of a workpiece
US9866747B2 (en) Optical displacement measurement system, imaging condition optimization method, and imaging condition optimization program
KR101764658B1 (en) Defect analysis assistance device, program executed by defect analysis assistance device, and defect analysis system
JP4001162B2 (en) Image processing method, image processing program and storage medium therefor, and image processing apparatus
US20110133054A1 (en) Weighting surface fit points based on focus peak uncertainty
KR20120095429A (en) Defect observation method and defect observation device
JP5651428B2 (en) Pattern measuring method, pattern measuring apparatus, and program using the same
US9341579B2 (en) Defect detection apparatus, defect detection method, and computer program
US8139862B2 (en) Character extracting apparatus, method, and program
JP2009259036A (en) Image processing device, image processing method, image processing program, recording medium, and image processing system
US10074551B2 (en) Position detection apparatus, position detection method, information processing program, and storage medium
CN112381765A (en) Equipment detection method, device, equipment and storage medium based on artificial intelligence
JP6197340B2 (en) Image processing apparatus, image processing method, and program
WO2015115499A1 (en) Tool inspection method and tool inspection device
JP6599698B2 (en) Image measuring apparatus and control program therefor
JP6264008B2 (en) Image processing apparatus, image processing method, and image processing program
JP2008116206A (en) Apparatus, method, and program for pattern size measurement
JP6314464B2 (en) Image processing apparatus, image processing method, and image processing program
JP2005345290A (en) Streak-like flaw detecting method and streak-like flaw detector
JP5051671B2 (en) Information processing apparatus, information processing method, and program
CN108509845B (en) Visual inspection method for transformer substation instrument equipment inspection based on feature fitting

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161107

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170627

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170816

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171024

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171222

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180312

R150 Certificate of patent or registration of utility model

Ref document number: 6314464

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250