JP6730029B2 - Image processing device, image processing method, image processing program, and imaging device - Google Patents

Image processing device, image processing method, image processing program, and imaging device Download PDF

Info

Publication number
JP6730029B2
JP6730029B2 JP2015257043A JP2015257043A JP6730029B2 JP 6730029 B2 JP6730029 B2 JP 6730029B2 JP 2015257043 A JP2015257043 A JP 2015257043A JP 2015257043 A JP2015257043 A JP 2015257043A JP 6730029 B2 JP6730029 B2 JP 6730029B2
Authority
JP
Japan
Prior art keywords
measurement
point
image processing
straight line
points
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.)
Active
Application number
JP2015257043A
Other languages
Japanese (ja)
Other versions
JP2017120546A5 (en
JP2017120546A (en
Inventor
圭祐 大森
圭祐 大森
徳井 圭
圭 徳井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2015257043A priority Critical patent/JP6730029B2/en
Publication of JP2017120546A publication Critical patent/JP2017120546A/en
Publication of JP2017120546A5 publication Critical patent/JP2017120546A5/ja
Application granted granted Critical
Publication of JP6730029B2 publication Critical patent/JP6730029B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は撮像装置の撮像画像から被写体の長さを計測する技術に関する。 The present invention relates to a technique for measuring the length of a subject from an image captured by an image capturing device.

2台のカメラ(ステレオカメラ)を用いて、被写体の長さや3次元位置(座標)を計測する方法(ステレオ計測)が知られている。ステレオ計測では、異なる位置に配置された2台のカメラを用いて被写体を撮像し、2台のカメラが撮像した2枚の画像間における被写体の視差に基づいて被写体の3次元位置を算出し、被写体の長さや被写体までの距離を計測する。ステレオ計測の計測精度は、被写体までの距離や、2台のカメラ間の距離である基線長やレンズの焦点距離、画素数などのカメラの仕様、視差の算出精度や計測対象点の画像上での位置指定精度などによって変化する。 A method (stereo measurement) of measuring the length and three-dimensional position (coordinates) of a subject using two cameras (stereo cameras) is known. In stereo measurement, a subject is imaged using two cameras arranged at different positions, the three-dimensional position of the subject is calculated based on the parallax of the subject between the two images captured by the two cameras, Measure the length of the subject and the distance to the subject. The measurement accuracy of the stereo measurement is the distance to the subject, the baseline length that is the distance between the two cameras, the focal length of the lens, the camera specifications such as the number of pixels, the calculation accuracy of the parallax, and the image of the measurement point. It depends on the position specification accuracy of.

ステレオカメラを使用した計測において、計測精度を向上させる技術として特許文献1に記載の技術がある。特許文献1には、被写体までの距離と奥行きの精度との比(相対誤差)を算出し、相対誤差が大きい場合は、相対誤差が小さくなる位置から再撮影することで計測精度を向上する技術が記載されている。 There is a technique described in Patent Document 1 as a technique for improving measurement accuracy in measurement using a stereo camera. Patent Document 1 discloses a technique for improving the measurement accuracy by calculating the ratio (relative error) of the distance to the subject and the accuracy of depth, and when the relative error is large, re-imaging from a position where the relative error becomes smaller. Is listed.

特開2011−232330号公報(2011年11月17日公開)JP, 2011-232330, A (Published November 17, 2011)

しかしながら、特許文献1に記載の技術は、以下の課題を有している。特許文献1に記載の技術が有する課題について、図11を用いて説明する。図11は、従来のステレオ計測における課題を説明するための図であり、(a)は、ステレオ計測する様子の一例を示す図であり、(b)は、ステレオ計測する様子の他の例を示す図である。 However, the technique described in Patent Document 1 has the following problems. The problem of the technique described in Patent Document 1 will be described with reference to FIG. FIG. 11 is a diagram for explaining a problem in the conventional stereo measurement, FIG. 11A is a diagram showing an example of the stereo measurement, and FIG. 11B is another example of the stereo measurement. FIG.

図11の(a)では、計測点1100と計測点1101をそれぞれ囲む四角形の領域1102と領域1103は、計測点1100と計測点1101をステレオ計測する場合の誤差範囲を示している。誤差範囲については後述する。また、図11の(b)は、図11の(a)に比べ、計測点までの距離Zが短いため、誤差範囲を示す領域1104と領域1105の大きさが、図11の(a)に示す領域1102、領域1103より小さくなっている。 In FIG. 11A, rectangular areas 1102 and 1103 surrounding the measurement points 1100 and 1101 respectively indicate error ranges when the measurement points 1100 and 1101 are stereo-measured. The error range will be described later. In addition, in FIG. 11B, since the distance Z to the measurement point is shorter than that in FIG. It is smaller than the areas 1102 and 1103 shown.

図11に示すように、計測点までの距離が短くなると、理論的な誤差範囲が小さくなり、被写体までの距離Zと奥行きの精度ΔZとの比である相対誤差が小さくなる。特許文献1では、相対誤差が小さくなる位置から撮影することで計測精度を向上しているが、計測精度は理論的な誤差範囲である領域1102、領域1103、領域1104、領域1105の大きさによって決まるため、撮影距離を変えて撮像しても、その撮像距離における理論的な誤差範囲以上に精度の高い計測を行うことはできない。 As shown in FIG. 11, when the distance to the measurement point becomes shorter, the theoretical error range becomes smaller, and the relative error that is the ratio of the distance Z to the subject and the depth accuracy ΔZ becomes smaller. In Patent Document 1, the measurement accuracy is improved by photographing from a position where the relative error becomes small. However, the measurement accuracy depends on the sizes of the areas 1102, 1103, 1104, and 1105 which are theoretical error ranges. Therefore, even if an image is taken while changing the shooting distance, it is not possible to perform measurement with higher accuracy than the theoretical error range in the shooting distance.

本発明は、上記の課題に鑑みてなされたものであり、その目的は、計測点の3次元座標の計測精度を向上させる技術を提供することにある。 The present invention has been made in view of the above problems, and an object thereof is to provide a technique for improving the measurement accuracy of the three-dimensional coordinates of a measurement point.

上記の課題を解決するために、本発明の一態様に係る画像処理装置は、複数の画像上に共通して含まれる計測点の3次元座標を算出する画像処理装置であって、前記画像に含まれる点を計測参照点として選択する選択部と、前記計測参照点を参照して、前記計測点の座標を補正する補正部と、を備える。 In order to solve the above problems, an image processing device according to an aspect of the present invention is an image processing device that calculates three-dimensional coordinates of measurement points that are commonly included in a plurality of images. A selection unit that selects a included point as a measurement reference point and a correction unit that refers to the measurement reference point and corrects the coordinates of the measurement point are provided.

また、上記の課題を解決するために、本発明の一態様に係る画像処理方法は、複数の画像上に共通して含まれる計測点の3次元座標を算出するための画像処理方法であって、前記画像に含まれる点を計測参照点として選択する選択ステップと、前記計測参照点を参照して、前記計測点の座標を補正する補正ステップと、を含む。 In order to solve the above problems, an image processing method according to an aspect of the present invention is an image processing method for calculating three-dimensional coordinates of measurement points that are commonly included in a plurality of images. , A selection step of selecting a point included in the image as a measurement reference point, and a correction step of correcting the coordinates of the measurement point with reference to the measurement reference point.

本発明によれば、計測点の3次元座標の計測精度を向上させることができる。 According to the present invention, it is possible to improve the measurement accuracy of the three-dimensional coordinates of the measurement point.

実施形態1に係る画像処理装置の一構成例を示すブロック図である。1 is a block diagram showing a configuration example of an image processing apparatus according to a first embodiment. ステレオ計測の原理を示す図である。It is a figure which shows the principle of stereo measurement. ステレオ計測によって算出される2点間の距離の誤差を示す図であり、(a)は、被写体を示しており、(b)は、図3の(a)を上から見た図を示しており、(c)は、計測した距離の一例を示す図であり、(d)は、計測した距離の他の例を示す図であり、(e)は、計測した距離のさらに他の例を示す図である。It is a figure which shows the error of the distance between two points calculated by stereo measurement, (a) has shown the to-be-photographed object, (b) has shown the figure which looked at (a) of FIG. 3 from the top. (C) is a diagram showing an example of the measured distance, (d) is a diagram showing another example of the measured distance, and (e) is still another example of the measured distance. FIG. 本発明の実施形態1において計測点の3次元座標を算出する方法を示す図であり、(a)は、図3の(a)に示した被写体を撮像した画像の一部を示しており、(b)は、ユーザが指定した複数の点(計測参照点)およびフィッティングして得られる直線を示す図であり、(c)は、計測点の画像上での座標を1点のみ指定した場合の誤差範囲と、フィッティングした直線の交点である補正点の誤差範囲を示しており、(d)は、計測点の指定精度が図4の(c)に示す誤差範囲である場合における、ステレオ計測での3次元座標の誤差範囲を示している。FIG. 4 is a diagram showing a method of calculating three-dimensional coordinates of a measurement point according to the first embodiment of the present invention, where (a) shows a part of an image of the subject shown in (a) of FIG. 3; (B) is a diagram showing a plurality of points (measurement reference points) designated by the user and a straight line obtained by fitting, and (c) is a case where only one coordinate on the image of the measurement point is designated. Error range and the error range of the correction point which is the intersection of the fitted straight line, and (d) shows the stereo measurement when the specified accuracy of the measurement point is within the error range shown in (c) of FIG. 3 shows the error range of the three-dimensional coordinates. 図3の(a)に示した被写体をY方向から見たXZ平面図を示している。FIG. 4 is an XZ plan view of the subject shown in FIG. 3A viewed from the Y direction. 図3の(a)に示した被写体をY方向から見たXZ平面図を示している。FIG. 4 is an XZ plan view of the subject shown in FIG. 3A viewed from the Y direction. 本発明の実施形態1における計測点の3次元座標をステレオ計測する場合の誤差範囲を示している。The error range at the time of carrying out the stereo measurement of the three-dimensional coordinates of the measurement point in Embodiment 1 of the present invention is shown. 被写体上の点をステレオ計測する場合を示しており、点線で示す直線は、計測点の画像上での座標が指定された場合の、ステレオ計測によって得られる3次元座標の位置を示している。The figure shows the case where the point on the subject is stereo-measured, and the straight line indicated by the dotted line shows the position of the three-dimensional coordinate obtained by the stereo measurement when the coordinate of the measurement point on the image is designated. 被写体上の点を計測する場合を示しており、点線で示す直線は、計測点の3次元座標が位置する直線である。The case where a point on the subject is measured is shown, and the straight line indicated by the dotted line is the line on which the three-dimensional coordinates of the measurement point are located. 本発明の実施形態2における誤差範囲と直線とを示す図であり、(a)は、誤差範囲と直線との関係を示す一例であり、(b)は、誤差範囲と直線との関係を示す他の例である。It is a figure which shows the error range and straight line in Embodiment 2 of this invention, (a) is an example which shows the relationship between an error range and a straight line, (b) shows the relationship between an error range and a straight line. Another example. 従来のステレオ計測における課題を説明するための図であり、(a)は、ステレオ計測する様子の一例を示す図であり、(b)は、ステレオ計測する様子の他の例を示す図である。It is a figure for demonstrating the subject in the conventional stereo measurement, (a) is a figure which shows an example of a mode of stereo measurement, (b) is a figure which shows another example of a mode of stereo measurement. ..

〔第1の実施形態〕
以下、図面を参照しながら本発明の一実施形態について説明する。
[First Embodiment]
An embodiment of the present invention will be described below with reference to the drawings.

(画像処理装置)
図1は、本実施形態に係る画像処理装置100の一構成例を示すブロック図である。図1に示すように、画像処理装置100は、画像取得部101、計測部102、記憶部103、計測点受付部104を備えている。
(Image processing device)
FIG. 1 is a block diagram showing a configuration example of an image processing apparatus 100 according to this embodiment. As shown in FIG. 1, the image processing apparatus 100 includes an image acquisition unit 101, a measurement unit 102, a storage unit 103, and a measurement point reception unit 104.

画像取得部101は、ステレオカメラで撮像された画像を入力画像として取得する。 The image acquisition unit 101 acquires an image captured by a stereo camera as an input image.

計測部102は、画像取得部が取得した画像に基づいて計測を行う。また、計測部102は、計測値算出部105と計測補正部106(選択部、補正部)を備えている。 The measurement unit 102 performs measurement based on the image acquired by the image acquisition unit. The measurement unit 102 also includes a measurement value calculation unit 105 and a measurement correction unit 106 (selection unit, correction unit).

計測値算出部105は、計測対象である被写体までの距離や長さを計測し、計測値を算出する。 The measurement value calculation unit 105 measures the distance and length to the subject that is the measurement target, and calculates the measurement value.

計測補正部106は、計測値算出部105が算出した計測値の計測精度が向上するよう補正を行う。 The measurement correction unit 106 performs correction so that the measurement accuracy of the measurement value calculated by the measurement value calculation unit 105 is improved.

記憶部103には、基線長や焦点距離などの計測時に必要なカメラパラメータが記憶されている。計測部102が計測する場合、記憶部103に記憶された情報を参照する。 The storage unit 103 stores camera parameters necessary for measuring a baseline length, a focal length, and the like. When the measuring unit 102 measures, the information stored in the storage unit 103 is referred to.

計測点受付部104では、ユーザ(操作者)から計測対象とする被写体(計測点)を選択する旨の操作を受け付ける機能を備えている。計測点受付部104は、操作者によって選択された計測点を示す計測点情報を取得し、取得した計測点情報を計測部102に出力する。 The measurement point accepting unit 104 has a function of accepting an operation of selecting a subject (measurement point) to be measured from a user (operator). The measurement point reception unit 104 acquires measurement point information indicating the measurement point selected by the operator, and outputs the acquired measurement point information to the measurement unit 102.

各部が行う処理の詳細については、後述する。なお、図1に示す画像処理装置100は、撮像装置(ステレオカメラ)が備える構成でもよい。 Details of the processing performed by each unit will be described later. The image processing apparatus 100 shown in FIG. 1 may be included in an imaging device (stereo camera).

(ステレオ計測の計測誤差)
図2は、ステレオ計測の原理を示す図である。左側に撮像装置200a、右側に撮像装置200bが配置されており、撮像装置200aは撮像素子201aとレンズ202aとを備え、撮像装置200bは撮像素子201bとレンズ202bとをそれぞれ備えている。2つの撮像装置の基線長はBであり、焦点距離はともにfである。図2において、撮像装置200aを計測時に基準とする撮像装置とした場合、計測点203の3次元座標(X、Y、Z)は、計測点203に対応する視差d(d=d2−d1)、焦点距離f、基線長Bを用いて、以下の式(1)、式(2)、および式(3)によって算出される。
(Measurement error of stereo measurement)
FIG. 2 is a diagram showing the principle of stereo measurement. The imaging device 200a is arranged on the left side and the imaging device 200b is arranged on the right side. The imaging device 200a includes an imaging element 201a and a lens 202a, and the imaging device 200b includes an imaging element 201b and a lens 202b. The baseline lengths of the two image pickup devices are B, and the focal lengths thereof are both f. In FIG. 2, when the imaging device 200a is used as a reference during measurement, the three-dimensional coordinates (X, Y, Z) of the measurement point 203 have a parallax d (d=d2-d1) corresponding to the measurement point 203. , Focal length f, and base line length B are used to calculate the following equations (1), (2), and (3).

Figure 0006730029
Figure 0006730029

Figure 0006730029
Figure 0006730029

Figure 0006730029
Figure 0006730029

式(2)のx、および式(3)yはそれぞれ、撮像装置200aが撮像した画像上における計測点203のx座標およびy座標である。また、2点間の距離を計測する場合は、2つの計測点のそれぞれの3次元座標を算出することで、2点間の距離を算出することができる。式(1)、式(2)、および式(3)に示すように、ステレオ計測により計測点の3次元座標を算出するためには、カメラの基線長や焦点距離などのカメラパラメータの他に、視差および計測対象点の画像上での座標(2次元座標)が必要となる。 The x in the equation (2) and the y in the equation (3) are the x coordinate and the y coordinate of the measurement point 203 on the image captured by the image capturing apparatus 200a, respectively. When measuring the distance between two points, the distance between the two points can be calculated by calculating the three-dimensional coordinates of each of the two measurement points. As shown in Expression (1), Expression (2), and Expression (3), in order to calculate the three-dimensional coordinates of the measurement point by stereo measurement, in addition to camera parameters such as the camera base length and focal length, , And the coordinates (two-dimensional coordinates) on the image of the parallax and the measurement target point are required.

したがって、ステレオ計測では、視差の算出精度や、画像上での計測点の座標を指定する指定精度が計測精度に影響する。視差や画像上で指定した計測点の座標がそれぞれの真値に対して誤差を含む場合、算出される3次元座標も、視差や画像上での計測点の座標の誤差に相当する誤差範囲をもつことになる。すなわち、ステレオ計測により得られた計測点の3次元座標は、計測点の3次元座標の真値に対して誤差範囲分の誤差を含む可能性がある。図2に示す領域204は誤差範囲を示しており、ステレオ計測によって得られた3次元座標が図2に示す点203である場合、3次元座標の真値は領域204内のいずれかに位置することになる。 Therefore, in stereo measurement, the accuracy of parallax calculation and the accuracy of specifying the coordinates of the measurement points on the image affect the measurement accuracy. When the coordinates of the measurement point specified on the parallax or the image include an error with respect to each true value, the calculated three-dimensional coordinate also has an error range corresponding to the error of the coordinate of the measurement point on the parallax or the image. I will have it. That is, the three-dimensional coordinates of the measurement point obtained by the stereo measurement may include an error corresponding to the error range with respect to the true value of the three-dimensional coordinate of the measurement point. An area 204 shown in FIG. 2 indicates an error range, and when the three-dimensional coordinates obtained by the stereo measurement are the points 203 shown in FIG. 2, the true value of the three-dimensional coordinates is located anywhere in the area 204. It will be.

上述のように、ステレオ計測により算出した3次元座標には、計測点の視差や画像上で座標の誤差に相当する理論的な誤差が生じるため、2点間の距離を計測する場合においても、理論的な誤差を含んだ計測値が得られることになる。ステレオ計測により計測した2点間の距離が誤差を含むことについて、図3を用いて説明する。 As described above, the three-dimensional coordinate calculated by the stereo measurement has a theoretical error corresponding to the parallax of the measurement point or the error of the coordinate on the image. Therefore, even when measuring the distance between the two points, A measured value including a theoretical error can be obtained. The fact that the distance between two points measured by stereo measurement includes an error will be described with reference to FIG.

図3は、ステレオ計測によって算出される2点間の距離の誤差を示す図であり、(a)は、被写体300と被写体301を示しており、2つの被写体が前後に位置している。図3の(a)において、被写体300上の点302と被写体301上の点303の2点を計測点とし、2点間の距離を計測する場合について述べる。 FIG. 3 is a diagram showing an error in the distance between two points calculated by stereo measurement. FIG. 3A shows a subject 300 and a subject 301, and the two subjects are located at the front and rear. In FIG. 3A, a case will be described in which two points, a point 302 on the subject 300 and a point 303 on the subject 301, are set as measurement points and the distance between the two points is measured.

図3の(b)は、図3の(a)を上から見た図を示しており、XZ平面図である。図3の(b)における領域304は計測点302の誤差範囲であり、領域305は計測点303の誤差範囲である。 FIG. 3B is a top view of FIG. 3A and is an XZ plan view. An area 304 in FIG. 3B is an error range of the measurement point 302, and an area 305 is an error range of the measurement point 303.

図3の(c)は、計測した距離d1の一例を示す図であり、(d)は、計測した距離d2の他の例を示す図であり、(e)は、計測した距離d3のさらに他の例を示す図である。図3の(c)に示す距離d1、図3の(d)に示す距離d2、図3の(e)に示す距離d3は、いずれも計測点302と計測点303の2点間距離を計測した場合の計測値を示している。また、計測点302と計測点303の位置が、ステレオ計測で算出された3次元座標の位置(図3の(c)、(d)および(e)では、XZ平面内での位置)を示している。図3の(c)に示す計測点302と計測点303の位置が正しい3次元座標位置であり、距離d1が、計測点302と計測点303との距離の真値である。図3の(d)、および図3の(e)に示すように、ステレオ計測では算出される3次元座標が誤差を含むため、2点間の距離を計測する場合にも、距離d2や距離d3のように真値に対して誤差が生じる。そこで、本実施形態では、視差や画像上での座標の誤差を小さくする処理を行い、誤差範囲を小さくすることで計測精度を向上させる方法について、説明する。 3C is a diagram showing an example of the measured distance d1, FIG. 3D is a diagram showing another example of the measured distance d2, and FIG. 3E is a diagram showing the measured distance d3. It is a figure which shows another example. The distance d1 shown in FIG. 3(c), the distance d2 shown in FIG. 3(d), and the distance d3 shown in FIG. 3(e) are all the distances between the measurement points 302 and 303. The measured values are shown in the case. Further, the positions of the measurement points 302 and 303 indicate the positions of the three-dimensional coordinates calculated by the stereo measurement (the positions in the XZ plane in (c), (d) and (e) of FIG. 3). ing. The positions of the measurement points 302 and 303 shown in FIG. 3C are correct three-dimensional coordinate positions, and the distance d1 is the true value of the distance between the measurement points 302 and 303. As shown in (d) of FIG. 3 and (e) of FIG. 3, since the three-dimensional coordinates calculated in stereo measurement include an error, the distance d2 and the distance are measured even when measuring the distance between two points. An error occurs with respect to the true value like d3. Therefore, in the present embodiment, a method of improving the measurement accuracy by performing a process of reducing an error in parallax or coordinates on an image and reducing an error range will be described.

図4は、本発明の実施形態1において計測点の3次元座標を算出する方法を示す図であり、(a)は、図3の(a)に示した被写体301を撮像した画像の一部を示している。計測点401は、ユーザが計測を所望する計測点であり、被写体301のコーナー部分を指している。計測点受付部104は、計測点401の画像上での座標を受け付け、受け付けた座標を計測部102に出力する。画像上での計測点401の座標を指定する方法として、例えば、画像を表示する表示装置の画面上のカーソルを計測点上に移動した上で決定キーなどを押すことで選択させてもよいし、表示装置にタッチパネルが備えられている場合は、ユーザのタッチ操作で計測点を指定させてもよい。また、精度良く座標を指定させるために、画像を拡大表示した上で計測点を指定させてもよい。 FIG. 4 is a diagram showing a method of calculating the three-dimensional coordinates of a measurement point in the first embodiment of the present invention, and FIG. 4A is a part of an image obtained by imaging the subject 301 shown in FIG. Is shown. The measurement point 401 is a measurement point that the user wants to measure, and points to the corner portion of the subject 301. The measurement point acceptance unit 104 accepts the coordinates of the measurement point 401 on the image and outputs the accepted coordinates to the measurement unit 102. As a method of designating the coordinates of the measurement point 401 on the image, for example, the cursor on the screen of the display device that displays the image may be moved to the measurement point and then the enter key or the like may be pressed to select it. If the display device is provided with a touch panel, the measurement point may be designated by the user's touch operation. Further, in order to accurately specify the coordinates, the measurement point may be specified after the image is enlarged and displayed.

しかしながら、必ずしも、ユーザが正確に計測点401の座標を指定出来るとは限らず、計測点401の座標に対して、ユーザが指定した座標に誤差が生じる可能性がある。図4の(a)に示す指定点402は、ユーザが指定した画像上の位置を示している。図4の(a)に示すように、計測点401の座標に対して、指定点402の座標がずれている場合は、ステレオ計測して算出する計測点401の3次元座標にも誤差が生じる。 However, the user cannot always correctly specify the coordinates of the measurement point 401, and an error may occur in the coordinates specified by the user with respect to the coordinates of the measurement point 401. The designated point 402 shown in FIG. 4A indicates the position on the image designated by the user. As shown in FIG. 4A, when the coordinates of the designated point 402 are deviated from the coordinates of the measurement point 401, an error also occurs in the three-dimensional coordinates of the measurement point 401 calculated by stereo measurement. ..

そこで、本実施形態では、計測補正部106が、指定点402周辺の情報を用いて指定点402の座標を補正して、計測点401に近い補正点を求めることにより、計測点の指定精度を向上させ、計測精度を向上させる方法(画像処理方法)について説明する。精度良く計測点を指定する方法として、例えば、計測補正部106が指定点402の近傍を通る2本の直線を検出し、その交点を補正点とする方法が挙げられる。 Therefore, in the present embodiment, the measurement correction unit 106 corrects the coordinates of the designated point 402 by using the information around the designated point 402, and obtains a correction point close to the measured point 401, thereby improving the designated accuracy of the measured point. A method (image processing method) for improving the measurement accuracy will be described. As a method of accurately specifying a measurement point, for example, there is a method in which the measurement correction unit 106 detects two straight lines passing near the specified point 402 and uses the intersection as a correction point.

図4の(a)おいては、計測補正部106は、指定点402の周辺の直線として、被写体301の左側の直線403と、被写体301の手前上側の直線404とを検出する(選択ステップ)。そして、計測補正部106は、検出した直線403と直線404との交点を、補正点とする(補正ステップ)。 In FIG. 4A, the measurement correction unit 106 detects a straight line 403 on the left side of the subject 301 and a straight line 404 on the front side of the subject 301 as straight lines around the designated point 402 (selection step). .. Then, the measurement correction unit 106 sets the intersection of the detected straight line 403 and the detected straight line 404 as a correction point (correction step).

直線を検出する方法としては、例えば、ハフ変換などの既知の方法を用いることができる。また、ユーザに、指定点402の周辺の直線上の複数の点を指定させ、計測補正部106が、指定された複数の点をフィッティングすることで直線(近似直線)を得ることができる。ユーザに指定させる場合は、表示装置に「計測点が通る直線上の点を指定してください」といった表示を行い、計測点受付部104が直線上の座標を受け付ける。直線のフィッティングは、例えば、最小二乗法などの既知の方法により行うことができる。 As a method of detecting a straight line, a known method such as Hough transform can be used. Further, the user can specify a plurality of points on a straight line around the specified point 402, and the measurement correction unit 106 can obtain a straight line (approximate straight line) by fitting the specified plurality of points. When the user specifies it, a message such as “Specify a point on the straight line through which the measurement point passes” is displayed on the display device, and the measurement point receiving unit 104 receives the coordinates on the straight line. The straight line fitting can be performed by a known method such as the least square method.

指定点402周辺の直線の交点を補正点とすることによる効果を説明するため、ユーザが直線上の複数の点を指定する場合について詳しく説明する。図4の(b)は、ユーザが指定した複数の点(計測参照点)およびフィッティングして得られる直線を示す図である。図4の(b)に示す点405、点406、点407、および点408はそれぞれ、図4の(a)に示した直線403上の点としてユーザが指定した点(計測参照点)を示している。計測補正部106は、指定点402と、点405、点406、点407、および点408をフィッティングすることにより、点線で示す直線414を得る。 In order to explain the effect of using the intersection of the straight line around the designated point 402 as the correction point, the case where the user designates a plurality of points on the straight line will be described in detail. FIG. 4B is a diagram showing a plurality of points (measurement reference points) designated by the user and a straight line obtained by fitting. Points 405, 406, 407, and 408 shown in FIG. 4B indicate points (measurement reference points) designated by the user as points on the straight line 403 shown in FIG. 4A. ing. The measurement correction unit 106 obtains a straight line 414 indicated by a dotted line by fitting the designated point 402, the point 405, the point 406, the point 407, and the point 408.

同様に、図4の(b)に示す点409、点410、点411、点412、および点413はそれぞれ、図4の(a)に示した直線404上の点としてユーザが指定した点(計測参照点)を示している。計測補正部106は、指定点402と、点409、点410、点411、点412、および点413をフィッティングすることにより、点線で示す直線415を得る。そして、計測補正部106は、直線414と直線415(2つの近似直線)の交点を補正点(計測点の画像上の2次元座標)とする。 Similarly, a point 409, a point 410, a point 411, a point 412, and a point 413 shown in FIG. 4B are designated by the user as points on the straight line 404 shown in FIG. The measurement reference point) is shown. The measurement correcting unit 106 obtains a straight line 415 indicated by a dotted line by fitting the designated point 402, the point 409, the point 410, the point 411, the point 412, and the point 413. Then, the measurement correction unit 106 sets the intersection of the straight line 414 and the straight line 415 (two approximate straight lines) as a correction point (two-dimensional coordinate on the image of the measurement point).

図4の(b)に示すように、直線414と直線415の交点(補正点)は、ユーザが指定した画像上の指定点402より、計測点401に近くなっている。なお、ユーザによって指定されたそれぞれの点は、指定点402同様、所望の位置(直線403上または直線404上の位置)からずれているが、複数の点をフィッティングすることで、直線の位置(直線403および直線404)と、フィッティングして得られた直線(直線404および直線415)とのずれが小さくなり、その直線の交点である補正点の指定精度が向上する。 As shown in FIG. 4B, the intersection (correction point) of the straight line 414 and the straight line 415 is closer to the measurement point 401 than the designated point 402 on the image designated by the user. Although each point designated by the user is displaced from the desired position (position on the straight line 403 or the straight line 404) like the designated point 402, by fitting a plurality of points, the position of the straight line ( The deviation between the straight line 403 and the straight line 404) and the straight line obtained by the fitting (the straight line 404 and the straight line 415) becomes small, and the designation accuracy of the correction point, which is the intersection of the straight lines, improves.

図4の(c)は、計測点401の画像上での座標を1点のみ指定した場合の、本来の計測点401の画像上の座標に対する指定点の画像上の座標のずれを示す誤差範囲416と、フィッティングした直線の交点である補正点の、本来の計測点401の画像上の座標に対する補正点の画像上の座標のずれを示す誤差範囲417を示している。例えば、ユーザが計測点の画像の座標を整数画素精度で正しく指定した場合の誤差範囲は±0.5画素となり、ユーザの指定位置が整数画素精度以上ずれている場合の誤差範囲は大きくなる。図4の(c)に示すように、フィッティングすることで本来の計測点の画像上の座標に対するずれが小さくなり、画像上の座標の誤差範囲が小さくなる。 FIG. 4C is an error range showing the deviation of the coordinates of the designated point on the image from the coordinates of the original measurement point 401 on the image when only one coordinate of the measurement point 401 is designated on the image. 416 and an error range 417 indicating the deviation of the correction point on the image of the correction point, which is the intersection of the fitted straight line, from the coordinate on the image of the original measurement point 401. For example, the error range is ±0.5 pixels when the user correctly specifies the coordinates of the image of the measurement point with integer pixel precision, and the error range is large when the user's specified position deviates by integer pixel precision or more. As shown in (c) of FIG. 4, the fitting reduces the deviation of the original measurement point from the coordinate on the image, and reduces the error range of the coordinate on the image.

図4の(d)は、計測点の指定精度が図4の(c)に示す誤差範囲である場合における、ステレオ計測での3次元座標の誤差範囲を示している。3次元座標は式(1)、式(2)、および式(3)によって算出され、画像上の座標に誤差が含まれる場合、式(2)のxおよび式(3)のyの値が誤差範囲内で変化することになるため、対応するX座標およびY座標に誤差が生じることになる。図4の(d)に示すように、画像上の座標の誤差範囲が誤差範囲416の場合、3次元座標の誤差範囲は図4の(d)に示す誤差範囲418となる。また、画像上の座標の誤差範囲が誤差範囲417の場合、3次元座標の誤差範囲は図4の(d)に示す誤差範囲419となる。図4の(d)におけるZ方向の誤差は視差dの誤差によって決まり、例えば、視差dが±0.5画素の誤差を含む場合、Z方向の誤差ΔZは、式(1)より、 FIG. 4D shows an error range of three-dimensional coordinates in stereo measurement in the case where the designated accuracy of the measurement point is the error range shown in FIG. 4C. The three-dimensional coordinates are calculated by the formula (1), the formula (2), and the formula (3). When the coordinates on the image include an error, the value of x in the formula (2) and the value of y in the formula (3) are Since it changes within the error range, an error occurs in the corresponding X coordinate and Y coordinate. As shown in FIG. 4D, when the error range of the coordinates on the image is the error range 416, the error range of the three-dimensional coordinates is the error range 418 shown in FIG. 4D. When the error range of the coordinates on the image is the error range 417, the error range of the three-dimensional coordinates is the error range 419 shown in (d) of FIG. The error in the Z direction in (d) of FIG. 4 is determined by the error of the parallax d. For example, when the parallax d includes an error of ±0.5 pixel, the error ΔZ in the Z direction is calculated from the equation (1) as follows.

Figure 0006730029
Figure 0006730029

と表わされる。式(2)及び式(3)にはZ方向の座標Zが含まれることから、Z方向の誤差ΔZは、X方向およびY方向の3次元座標にも影響する。図4の(d)に示すように、計測点の画像上の座標の指定精度が高くなると、ステレオ計測により算出する3次元座標のXY方向の誤差範囲が小さくなり、計測精度が向上する。 It is expressed as. Since the formula (2) and the formula (3) include the coordinate Z in the Z direction, the error ΔZ in the Z direction also affects the three-dimensional coordinates in the X direction and the Y direction. As shown in (d) of FIG. 4, when the accuracy of specifying the coordinates of the measurement point on the image increases, the error range in the XY directions of the three-dimensional coordinates calculated by stereo measurement decreases, and the measurement accuracy improves.

なお、図4の(b)を用いて説明した例では、2本の直線の交点を補正点としたが、指定点402を通る直線(指定点402の周辺の直線)が1本のみ存在する場合には、当該1本の直線を検出し、検出した1本の直線上の点であって、指定点から最も近い点を補正点としてもよい。また、指定点402を通る直線(指定点402の周辺の直線)が存在せず、指定点402が曲線上の点の場合(指定点402の周辺に曲線が存在する場合)は、当該曲線を検出し、検出した曲線上の点で、指定点402から最も近い点を補正点としてもよい。 In the example described with reference to FIG. 4B, the intersection of two straight lines is the correction point, but there is only one straight line that passes through the designated point 402 (straight line around the designated point 402). In this case, the one straight line may be detected, and a point on the detected one straight line which is the closest to the designated point may be used as the correction point. If there is no straight line passing through the designated point 402 (straight line around the designated point 402) and the designated point 402 is a point on the curve (when there is a curved line around the designated point 402), Of the detected points on the curve, the points closest to the designated point 402 may be used as the correction points.

次に、視差の誤差に起因する誤差範囲を低減し、計測精度を向上させる方法について述べる。図5は、図3の(a)に示した被写体301をY方向から見たXZ平面図を示している。計測点は計測点303であり、四角で示す領域501は、計測点303をステレオ計測する場合の誤差範囲を示している。また、点線で示す直線502は、計測点303の画像上での座標が指定された状況において、ステレオ計測を行ったとした場合に得られる計測点303の3次元座標の位置を示している。換言すれば、直線502は、計測点303の画像上での座標が指定された状況において、ステレオ計測によって得られる計測点303の3次元座標の可能な範囲を示している。 Next, a method of reducing the error range caused by the parallax error and improving the measurement accuracy will be described. FIG. 5 shows an XZ plan view of the subject 301 shown in FIG. 3A viewed from the Y direction. The measurement point is the measurement point 303, and an area 501 indicated by a square indicates an error range when the measurement point 303 is stereo-measured. A straight line 502 indicated by a dotted line indicates the position of the three-dimensional coordinate of the measurement point 303 obtained when stereo measurement is performed in the situation where the coordinates of the measurement point 303 on the image are designated. In other words, the straight line 502 indicates the possible range of the three-dimensional coordinates of the measurement point 303 obtained by stereo measurement in the situation where the coordinates of the measurement point 303 on the image are designated.

計測点303の画像上での2次元座標が決まると、その計測点303の3次元座標は、視差値に基づいて直線502上を移動することになり、視差が正しく算出される場合は、3次元座標は計測点303の位置となる。一方、視差が真値に対して大きく算出される場合は、計測点の実際の位置より手前の位置となり、例えば図5に示す点503の位置となる。また、視差が真値に対して小さく算出される場合は、計測点の実際の位置より奥の位置となり、例えば図5に示す点504の位置となる。すなわち、算出した視差が真値に対して誤差を含む場合、算出される3次元座標も真値に対して誤差を含むことになる。そこで、本実施形態では、視差の誤差を小さくする処理を行い、視差の誤差に起因する誤差範囲を小さくすることで計測精度を向上させる方法について説明する。 When the two-dimensional coordinate of the measurement point 303 on the image is determined, the three-dimensional coordinate of the measurement point 303 moves on the straight line 502 based on the parallax value. The dimensional coordinate is the position of the measurement point 303. On the other hand, when the parallax is calculated to be larger than the true value, it becomes a position before the actual position of the measurement point, for example, the position of the point 503 shown in FIG. When the parallax is calculated to be smaller than the true value, the position is deeper than the actual position of the measurement point, for example, the position of the point 504 shown in FIG. That is, when the calculated parallax includes an error with respect to the true value, the calculated three-dimensional coordinates also include an error with respect to the true value. Therefore, in the present embodiment, a method of improving the measurement accuracy by performing a process of reducing the parallax error and reducing the error range caused by the parallax error will be described.

図6は、図3の(a)に示す被写体301をY方向から見たXZ平面図を示しており、計測点は計測点303である。計測部102は、計測点303をステレオ計測することにより、算出点601の3次元座標を得る。ここで、計測部102によるステレオ計測は誤差範囲を含むため、計測点303の実際の位置(計測点303の3次元座標の真値)と、ステレオ計測によって算出した算出点601の3次元座標の位置がずれている。また、点線で示す直線602は、画像上での計測点303の座標が指定された場合に算出される計測点303の3次元座標の可能な範囲を示している。直線602が、計測点303を通っていない理由は、画像上で指定した計測点303の座標に誤差がある場合を想定した図を示しているためであり、画像上で指定した座標が正しければ、直線602は計測点303を通ることになる。 FIG. 6 shows an XZ plan view of the subject 301 shown in FIG. 3A viewed from the Y direction, and the measurement point is the measurement point 303. The measuring unit 102 obtains the three-dimensional coordinates of the calculation point 601 by measuring the measurement point 303 in stereo. Here, since the stereo measurement by the measurement unit 102 includes the error range, the actual position of the measurement point 303 (the true value of the three-dimensional coordinate of the measurement point 303) and the three-dimensional coordinate of the calculation point 601 calculated by the stereo measurement are calculated. The position is incorrect. Further, a straight line 602 indicated by a dotted line indicates a possible range of three-dimensional coordinates of the measurement point 303 calculated when the coordinates of the measurement point 303 on the image are designated. The reason why the straight line 602 does not pass through the measurement point 303 is because it shows a diagram assuming that the coordinates of the measurement point 303 specified on the image have an error, and if the coordinates specified on the image are correct. The straight line 602 passes through the measurement point 303.

図6における点603、点604、点605、点606、点607、点608、点609は、計測補正部106が、計測点303の通る直線610上の点(計測参照点)をステレオ計測した場合の3次元座標を示している。ステレオ計測では誤差範囲を含むため、計測補正部106が算出した上述した点の3次元座標は、直線610上に位置するとは限らない。図6に点線で示す直線611は、計測補正部106がステレオ計測することによって得た点603、点604、点605、点606、点607、点608、点609の3次元座標をフィッティングすることによって得られた直線を示している。図6に示すように、計測補正部106が算出した各点の3次元座標と直線610とのずれに対して、計測補正部106が算出した各点をフィッティングした直線611と直線610とのずれは小さくなる。 Regarding points 603, 604, 605, 606, 607, 608, and 609 in FIG. 6, the measurement correction unit 106 stereo-measures points (measurement reference points) on the straight line 610 that the measurement point 303 passes through. The three-dimensional coordinates in the case are shown. Since the stereo measurement includes the error range, the three-dimensional coordinates of the points calculated by the measurement correction unit 106 are not always located on the straight line 610. A straight line 611 indicated by a dotted line in FIG. 6 is obtained by fitting the three-dimensional coordinates of the points 603, 604, 605, 606, 607, 608, and 609 obtained by the measurement correction unit 106 performing stereo measurement. The straight line obtained by is shown. As shown in FIG. 6, with respect to the shift between the three-dimensional coordinates of each point calculated by the measurement correction unit 106 and the straight line 610, the shift between the straight line 611 fitted to each point calculated by the measurement correction unit 106 and the straight line 610. Becomes smaller.

そこで、計測部102は、直線610上の点である計測点303の3次元座標が直線611上に位置するとして3次元座標を算出する。すなわち、直線602と直線611の交点を補正点612とする。図6の場合、算出される3次元座標は、補正点612の3次元座標となるため、補正前の算出点601に比べて、計測点303との誤差が小さくなっている。上述のように、計測点303の周辺の点の3次元座標を参照して計測点の3次元座標を補正することで、視差の誤差に起因する誤差が低減し、計測精度が向上する。 Therefore, the measurement unit 102 calculates the three-dimensional coordinates assuming that the three-dimensional coordinates of the measurement point 303, which is a point on the straight line 610, are located on the straight line 611. That is, the intersection of the straight line 602 and the straight line 611 is set as the correction point 612. In the case of FIG. 6, since the calculated three-dimensional coordinates are the three-dimensional coordinates of the correction point 612, the error with the measurement point 303 is smaller than that of the calculation point 601 before correction. As described above, by correcting the three-dimensional coordinates of the measurement points with reference to the three-dimensional coordinates of the points around the measurement point 303, the error caused by the parallax error is reduced and the measurement accuracy is improved.

図7は、本発明の実施形態1における計測点701の3次元座標をステレオ計測する場合の誤差範囲を示している。図7に示す領域702は、計測点701の3次元座標のみを算出した場合の誤差範囲を示しており、領域703は、計測点701の周辺の点の3次元座標を参照して計測点701の3次元座標を補正した場合の誤差範囲を示している。計測補正部106は、計測点701の周辺の点の3次元座標を参照することで、誤差範囲が小さくすることができるので、計測精度を向上させることができる。なお、フィッティングに用いる点の数を増やせば、フィッティングの精度が向上し好適である。また、フィッティングに用いる点の数を増やすため、フィッティングに用いる3次元座標に、計測点自体の3次元座標を含めてもよい。 FIG. 7 shows an error range in the case where the three-dimensional coordinates of the measurement point 701 are stereo-measured in the first embodiment of the present invention. An area 702 shown in FIG. 7 shows an error range when only the three-dimensional coordinates of the measurement point 701 are calculated, and an area 703 refers to the three-dimensional coordinates of points around the measurement point 701 to measure the measurement point 701. The error range when the three-dimensional coordinate of is corrected is shown. Since the measurement correction unit 106 can reduce the error range by referring to the three-dimensional coordinates of points around the measurement point 701, the measurement accuracy can be improved. It is preferable to increase the number of points used for fitting because the accuracy of fitting is improved. Further, in order to increase the number of points used for fitting, the three-dimensional coordinates of the measuring point itself may be included in the three-dimensional coordinates used for fitting.

ここで、計測点の3次元座標の補正について更に詳しく説明する。図6は、XZ平面内を示しているため、計測補正部106が直線611上の点の3次元座標をフィッティングして算出した直線611と、計測点303の3次元座標の可能な範囲を示す直線602との交点が存在する。しかしながら、3次元空間で直線を定義する場合、必ずしも交点が存在するとは限らない。そこで、2つの直線が交点を有しない場合は、計測点が位置する直線602上の点のうち、直線611との距離が最も近くなる点(最近接点)を、計測点の補正後の3次元座標とすればよい。また、計測点周辺の点の3次元座標から平面をフィッティングして計測点の3次元座標を補正してもよい。 Here, the correction of the three-dimensional coordinates of the measurement point will be described in more detail. Since FIG. 6 shows the inside of the XZ plane, the straight line 611 calculated by the measurement correction unit 106 by fitting the three-dimensional coordinates of the points on the straight line 611 and the possible range of the three-dimensional coordinates of the measurement point 303 are shown. There is an intersection with the straight line 602. However, when defining a straight line in a three-dimensional space, the intersection does not always exist. Therefore, when the two straight lines do not have an intersection point, among the points on the straight line 602 where the measurement points are located, the point (closest contact point) that is closest to the straight line 611 is the three-dimensional point after correction of the measurement points. You can use coordinates. Alternatively, the three-dimensional coordinates of the measurement points may be corrected by fitting a plane from the three-dimensional coordinates of the points around the measurement points.

図8は、本発明の実施形態1における被写体801上の点802をステレオ計測する場合を示しており、点線で示す直線803は、計測点802の画像上での座標が指定された場合の、ステレオ計測によって得られる3次元座標の可能な範囲を示している。図8に示す計測点802以外の点は、被写体801の手前側の四角形の面804の周囲の辺上の点(計測参照点)をステレオ計測した3次元座標を示している。また、点線で示す面805は、面804の周囲の辺上の点をステレオ計測した3次元座標を平面でフィッティングして得られる平面(近似平面)を示している。そして、面805と直線803との交点を補正点として、計測点の補正後の3次元座標とする。面と直線との交点を算出する場合、面と直線が平行でない限り、必ず交点が存在し好適である。なお、計測点周辺の点の3次元座標を参照して直線や面をフィッティングする場合、計測点の3次元座標が位置する直線との位置関係が直交に近い方が好適である。 FIG. 8 shows a case where a point 802 on the subject 801 is stereo-measured in the first embodiment of the present invention, and a straight line 803 indicated by a dotted line indicates a case where the coordinates of the measurement point 802 on the image are designated. The possible range of three-dimensional coordinates obtained by stereo measurement is shown. Points other than the measurement points 802 shown in FIG. 8 indicate three-dimensional coordinates in which the points (measurement reference points) on the sides around the quadrangular surface 804 on the front side of the subject 801 are stereo-measured. A surface 805 indicated by a dotted line represents a plane (approximate plane) obtained by fitting the three-dimensional coordinates obtained by stereo-measuring points on the sides around the surface 804 with a plane. Then, the intersection of the surface 805 and the straight line 803 is used as the correction point, and the corrected three-dimensional coordinate of the measurement point is set. When calculating the intersection of a surface and a straight line, it is preferable that the intersection always exists unless the surface and the straight line are parallel. When fitting a straight line or a surface with reference to the three-dimensional coordinates of points around the measurement point, it is preferable that the positional relationship with the straight line where the three-dimensional coordinates of the measurement point are located is close to orthogonal.

図9は、本発明の実施形態1における被写体901上の計測点902を計測する場合を示しており、点線で示す直線903は、計測点902の画像上での座標が指定された場合の、ステレオ計測によって得られる3次元座標の可能な範囲を示している。また、点線で示す直線904は、被写体901の右側の直線上の点の3次元座標をフィッティングして算出した直線であり、点線で示す直線905は、被写体901の上側の直線上の点の3次元座標をフィッティングして算出した直線である。点906は直線903と直線904の交点であり、点907は、直線903と直線905の交点を示している。 FIG. 9 shows a case where the measurement point 902 on the subject 901 according to the first embodiment of the present invention is measured, and a straight line 903 indicated by a dotted line indicates a case where the coordinates of the measurement point 902 on the image are designated. The possible range of three-dimensional coordinates obtained by stereo measurement is shown. A straight line 904 indicated by a dotted line is a straight line calculated by fitting three-dimensional coordinates of points on the straight line on the right side of the subject 901, and a straight line 905 indicated by a dotted line is three points on the straight line above the subject 901. It is a straight line calculated by fitting the dimensional coordinates. A point 906 is an intersection of the straight line 903 and the straight line 904, and a point 907 is an intersection of the straight line 903 and the straight line 905.

点906および点907それぞれの点の、計測点902からの誤差を比較すると、点907と計測点902の誤差の方が小さい。直線903と直線904は平行に近いため、直線の向きや位置のわずかな違いにより、2直線の交点の位置が大きく変化する。一方、直線903と直線905は直交に近いため、直線の向きや位置の違いに起因する交点の位置の変化が小さい。すなわち、計測点の補正後の3次元座標の変化が小さく、計測誤差が小さくなり好適である。図9を用いて直線と直線の場合について述べたが、面と直線の交点を算出する場合も同様であり、面と直線が直交に近くなる面を、計測点の3次元座標を補正するために参照する面として選択すれば計測精度が高くなり好適である。 When the errors of the points 906 and 907 from the measurement point 902 are compared, the errors of the points 907 and 902 are smaller. Since the straight line 903 and the straight line 904 are almost parallel to each other, the position of the intersection of the two straight lines largely changes due to a slight difference in the direction and position of the straight lines. On the other hand, since the straight line 903 and the straight line 905 are nearly orthogonal, the change in the position of the intersection point due to the difference in the direction and the position of the straight line is small. That is, the change in the three-dimensional coordinates after the correction of the measurement point is small, and the measurement error is small, which is preferable. Although the case of a straight line and a straight line has been described with reference to FIG. 9, the same applies to the case of calculating the intersection point of the surface and the straight line, in order to correct the three-dimensional coordinate of the measurement point for the surface where the surface and the straight line are nearly orthogonal. If it is selected as the surface to be referred to, the measurement accuracy becomes high, which is preferable.

以上説明したように、本実施形態では、画像処理装置100は、ステレオ計測する場合(複数の画像上に共通して含まれる計測点の3次元座標を算出する場合)に、計測点の画像上の指定点の座標や、視差に基づいて算出される算出点の3次元座標を、画像上の計測点周辺の点(画像に含まれる点、計測参照点)を選択し、選択した点の情報を用いて補正することで、計測点の3次元座標を補正する。そのため、画像処理装置100は、計測点の計測精度を向上させることができる。 As described above, in the present embodiment, the image processing apparatus 100 performs stereo measurement (when calculating three-dimensional coordinates of measurement points commonly included in a plurality of images) on the image of the measurement points. The coordinates of the specified point of 3 and the three-dimensional coordinates of the calculation point calculated based on the parallax are selected from the points around the measurement point on the image (points included in the image, measurement reference point), and information on the selected point The three-dimensional coordinates of the measurement point are corrected by using the correction. Therefore, the image processing device 100 can improve the measurement accuracy of the measurement point.

なお、上述した実施形態では、画像処理装置100が計測点の3次元座標を補正する構成について記載したが、画像処理装置100は、計測点の画像上の指定点のみを補正(計測点の画像上の2次元座標を補正)して、補正後の座標についてステレオ計測して3次元座標を算出することにより、計測精度を向上させることができる。また、画像処理装置100は、計測点の画像上の指定点をユーザが指定した座標とし、視差に基づいて算出される計測点の3次元座標を補正しても計測精度を向上させることができる。 In addition, in the above-described embodiment, the configuration in which the image processing apparatus 100 corrects the three-dimensional coordinates of the measurement point is described, but the image processing apparatus 100 corrects only the designated point on the image of the measurement point (the image of the measurement point). The measurement accuracy can be improved by correcting the above two-dimensional coordinates) and performing stereo measurement on the corrected coordinates to calculate the three-dimensional coordinates. Further, the image processing apparatus 100 can improve the measurement accuracy even if the designated point on the image of the measurement point is set as the coordinate designated by the user and the three-dimensional coordinate of the measurement point calculated based on the parallax is corrected. ..

〔第2の実施形態〕
次に、本発明の第2の実施形態について説明する。第2の実施形態では、計測点の画像上の座標や計測点の3次元座標を補正する際に参照する情報について、より好適な情報を参照することで計測精度を向上する。ここで、説明をより明瞭にするため、以降の説明では、計測点の3次元座標を補正する際に参照する点を計測参照点と称し、計測点と区別する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. In the second embodiment, the measurement accuracy is improved by referring to more suitable information regarding the information referred to when correcting the coordinates of the measurement point on the image and the three-dimensional coordinates of the measurement point. Here, in order to make the description clearer, in the following description, a point referred to when correcting the three-dimensional coordinates of the measurement point is referred to as a measurement reference point, and is distinguished from the measurement point.

上述したように、本発明では、画像処理装置100は、計測点が通る直線や平面(計測点の周辺の点を参照して算出した直線や平面も含まれる)を計測参照点の3次元座標から算出することで計測精度を向上させることができる。しかしながら、必ずしも算出した直線や平面が、計測点と同一直線または同一平面上に位置するとは限らない。そこで、第2の実施形態では、取得した計測参照点及び計測参照点から算出した参照情報について計測点を補正するために好適な情報か否かを評価する構成について、説明する。 As described above, in the present invention, the image processing apparatus 100 determines the three-dimensional coordinates of the measurement reference point to be a straight line or a plane through which the measurement point passes (including a straight line or a plane calculated by referring to points around the measurement point). The measurement accuracy can be improved by calculating from. However, the calculated straight line or plane is not always located on the same straight line or the same plane as the measurement point. Therefore, in the second embodiment, a configuration for evaluating whether or not the acquired measurement reference point and the reference information calculated from the measurement reference point are suitable information for correcting the measurement point will be described.

図10は、本発明の実施形態2における本発明の実施形態2における誤差範囲と直線とを示す図であり、(a)は、誤差範囲と直線との関係を示す一例であり、(b)は、誤差範囲と直線との関係を示す他の例である。図10の(a)および(b)では、計測点1001をステレオ計測する場合のXZ平面図を示しており、領域1002が計測点1001をステレオ計測する場合の誤差範囲を示している。 FIG. 10 is a diagram showing an error range and a straight line in the second embodiment of the present invention in the second embodiment of the present invention, FIG. 10A is an example showing a relationship between the error range and the straight line, and FIG. Is another example showing the relationship between the error range and the straight line. 10A and 10B show an XZ plan view when the measurement point 1001 is stereo-measured, and the region 1002 shows an error range when the measurement point 1001 is stereo-measured.

図10の(a)に示す点1003、点1004、点1005、点1006、および点1007は、計測点1001の3次元座標を補正するための計測参照点の3次元座標を示している。また、点線で示す直線1008は、点1003、点1004、点1005、点1006、および点1007の3次元座標を計測補正部106がフィッティングして得られた直線である。図10の(a)に示す場合では、計測補正部106は、直線1008が計測点1001の誤差範囲1002の内部を通っていると判定する。 A point 1003, a point 1004, a point 1005, a point 1006, and a point 1007 shown in FIG. 10A indicate three-dimensional coordinates of measurement reference points for correcting the three-dimensional coordinates of the measurement point 1001. A straight line 1008 indicated by a dotted line is a straight line obtained by fitting the three-dimensional coordinates of the points 1003, 1004, 1005, 1006, and 1007 by the measurement correction unit 106. In the case shown in FIG. 10A, the measurement correction unit 106 determines that the straight line 1008 passes through the inside of the error range 1002 of the measurement point 1001.

図10の(b)に示す点1009、点1010、点1011、点1012、および点1013も、図10の(a)同様、計測点1001の3次元座標を補正するための計測参照点の3次元座標を示している。また、点線で示す直線1014は、点1009、点1010、点1011、点1012、および点1013の3次元座標を計測補正部106がフィッティングした直線である。図10の(b)に示す場合では、計測補正部106は、直線1014が計測点1001の誤差範囲1002の内部を通っていないと判定する。 10B, 1010, 1011, 1012, and 1013 shown in FIG. 10B are measurement reference points 3 for correcting the three-dimensional coordinates of the measurement point 1001 as in FIG. 10A. The dimensional coordinates are shown. A straight line 1014 indicated by a dotted line is a straight line obtained by fitting the three-dimensional coordinates of points 1009, 1010, 1011, 1012, and 1013 by the measurement correction unit 106. In the case shown in FIG. 10B, the measurement correction unit 106 determines that the straight line 1014 does not pass inside the error range 1002 of the measurement point 1001.

したがって、図10の(a)の場合では、計測点1001は、フィッティングした直線1008上の点である可能性が高く、計測点1001の3次元座標を補正するための情報として好適な計測参照点が選択されている。しかしながら、図10の(b)の場合では、計測点1001は、フィッティングした直線1014上の点である可能性が低く、計測点1001の3次元座標を補正するための情報として好適な計測参照点が選択されているとはいえない。 Therefore, in the case of FIG. 10A, the measurement point 1001 is highly likely to be a point on the fitted straight line 1008, and a measurement reference point suitable as information for correcting the three-dimensional coordinates of the measurement point 1001. Is selected. However, in the case of FIG. 10B, the measurement point 1001 is unlikely to be a point on the fitted straight line 1014, and a measurement reference point suitable as information for correcting the three-dimensional coordinates of the measurement point 1001. Is not selected.

そこで、図10の(b)に示す場合においては、計測補正部106がより好適な計測参照点を再探索することで、より好適な計測点の3次元座標の補正を行う。すなわち、計測補正部106は、フィッティングした直線と計測点の誤差範囲の距離を評価し、両者が離れている場合は、より好適な計測参照点を再探索する。また、3次元座標を補正するための情報として平面を参照する場合も、直線の場合と同様、計測補正部106は、フィッティングした平面と計測点の誤差範囲との距離を評価することで、計測点の3次元座標を補正するための情報として選択された計測参照点が好適な否かを判定することができる。 Therefore, in the case shown in FIG. 10B, the measurement correction unit 106 re-searches for a more suitable measurement reference point to correct the three-dimensional coordinates of the more suitable measurement point. That is, the measurement correction unit 106 evaluates the distance in the error range between the fitted straight line and the measurement point, and when both are apart, re-searches for a more suitable measurement reference point. Also, when the plane is referred to as the information for correcting the three-dimensional coordinates, the measurement correction unit 106 evaluates the distance between the fitted plane and the error range of the measurement point, as in the case of the straight line, to perform the measurement. It is possible to determine whether or not the measurement reference point selected as the information for correcting the three-dimensional coordinates of the point is suitable.

なお、1回目の計測参照点選択を自動で行い、計測参照点を再探索することになった場合、計測補正部106は、2回目以降の計測参照点の選択を、ユーザに選択(再選択)させてもよい。この構成により、画像処理装置100は、1回目の計測参照点の選択を自動で行うので、ユーザの負担を小さくすることができ、好適である。また、再探索となった場合、画像処理装置100が好適な計測参照点選択が困難なシーンである可能性があるため、計測参照点の選択をユーザに選択させることで、画像処理装置100は、好適な計測参照点を選択することができ、計測精度が向上させることができる。 When the measurement reference point is automatically selected for the first time and the measurement reference point is to be searched again, the measurement correction unit 106 selects (reselects) the measurement reference point for the second time and thereafter. ) May be done. With this configuration, the image processing apparatus 100 automatically selects the first measurement reference point, which is preferable because the burden on the user can be reduced. Further, in the case of a re-search, there is a possibility that it is difficult for the image processing apparatus 100 to select a suitable measurement reference point. Therefore, by allowing the user to select the measurement reference point, the image processing apparatus 100 A suitable measurement reference point can be selected, and the measurement accuracy can be improved.

次に、より好適に計測参照点を選択する方法について述べる。計測点の計測精度を向上させるため、計測点周辺の直線や平面を参照する方法について述べたが、計測点と同一直線または同一平面に位置する計測参照点は、計測点からの距離が近い方が存在確率が高い。すなわち、計測点からの距離が遠い計測参照点は、計測点と異なる被写体上の点であったり、同一被写体上の点であっても、計測点と同一直線または同一平面上の点ではない確率が高くなったりする。そのため、計測点からの距離が近いほど、計測点と同一直線または同一平面上の点である確率が高くなる。 Next, a method for selecting the measurement reference point more preferably will be described. In order to improve the measurement accuracy of the measurement point, the method of referring to the straight line or the plane around the measurement point was described.However, the measurement reference point located on the same straight line or the same plane as the measurement point should be closer to the measurement point. Has a high probability of existence. That is, a measurement reference point that is far from the measurement point is a point on a subject different from the measurement point, or even if it is a point on the same subject, it is not a point on the same straight line or the same plane as the measurement point Will be high. Therefore, the shorter the distance from the measurement point, the higher the probability of being a point on the same straight line or the same plane as the measurement point.

このように、計測参照点を探索する場合、計測点近傍の点を探索することが好ましい。また、画像の色や明るさを考慮して計測参照点を選択してもよい。計測点近傍に位置し、計測点と同一直線上または同一平面上に位置する点は、計測点と同一被写体上の点である可能性が高く、近接するため計測点と色や明るさが近い可能性が高い。そこで、計測点の色や明るさの類似度を考慮して計測参照点を選択すれば、計測点と同一直線上または同一平面上に位置する点である可能性が高く好適である。 Thus, when searching for the measurement reference point, it is preferable to search for a point near the measurement point. Further, the measurement reference point may be selected in consideration of the color and brightness of the image. A point located near the measurement point and on the same straight line or on the same plane as the measurement point is likely to be a point on the same subject as the measurement point. Since they are close to each other, the color and brightness are close to the measurement point. Probability is high. Therefore, if the measurement reference point is selected in consideration of the similarity in color and brightness of the measurement point, it is highly likely that the measurement reference point is located on the same straight line or the same plane as the measurement point, which is preferable.

(ソフトウェアによって実現する例)
なお、上述した画像処理装置100の各ブロック(特に、計測部102)をコンピュータで実現するようにしても良い。その場合、上述した画像処理装置100を実現するためのプログラム(画像処理プログラム)をコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。ここでいう「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
(Example implemented by software)
Each block of the image processing apparatus 100 described above (particularly, the measuring unit 102) may be realized by a computer. In that case, a program (image processing program) for realizing the above-described image processing apparatus 100 is recorded in a computer-readable recording medium, and the program recorded in this recording medium is read by a computer system and executed. May be realized by The "computer-readable recording medium" here means a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, and a storage device such as a hard disk built in a computer system. Further, the "computer-readable recording medium" means a program that dynamically holds a program for a short time, such as a communication line when transmitting the program through a network such as the Internet or a communication line such as a telephone line. In such a case, a volatile memory inside a computer system that serves as a server or a client, which holds a program for a certain period of time, may be included. Further, the program may be one for realizing some of the functions described above, or may be one that can realize the functions described above in combination with a program already recorded in the computer system.

また、上述した実施形態におけるステレオ計測の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。ステレオ計測の各機能ブロックは個別にプロセッサ化してもよいし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。 Moreover, you may implement|achieve a part or all of the stereo measurement in the above-mentioned embodiment as integrated circuits, such as LSI(Large Scale Integration). Each functional block of the stereo measurement may be individually implemented as a processor, or a part or all of the functional blocks may be integrated and implemented as a processor. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. In addition, when a technique for forming an integrated circuit that replaces LSI appears with the progress of semiconductor technology, an integrated circuit according to the technique may be used.

以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 Although one embodiment of the present invention has been described in detail above with reference to the drawings, the specific configuration is not limited to the above, and various design changes and the like without departing from the scope of the present invention. It is possible to

〔まとめ〕
本発明の態様1に係る画像処理装置(100)は、複数の画像上に共通して含まれる計測点の3次元座標を算出する画像処理装置であって、前記画像に含まれる点を計測参照点として選択する選択部(計測補正部106)と、前記計測参照点を参照して、前記計測点の座標を補正する補正部(計測補正部106)と、を備える。
[Summary]
An image processing apparatus (100) according to aspect 1 of the present invention is an image processing apparatus that calculates three-dimensional coordinates of measurement points commonly included in a plurality of images, and measures and references points included in the images. A selection unit (measurement correction unit 106) that is selected as a point, and a correction unit (measurement correction unit 106) that refers to the measurement reference point and corrects the coordinates of the measurement point are provided.

上記の構成によれば、画像処理装置は、複数の画像上に共通して含まれる計測点の3次元座標を算出する際に、計測参照点を参照して計測点の座標を補正する。そのため、画像処理装置は、例えば、ユーザが所望の計測点を指定できなかった場合であっても、所望の計測点に近い位置に補正することができるため、計測点の3次元座標の計測精度を向上させることができる。 According to the above configuration, the image processing apparatus corrects the coordinates of the measurement points by referring to the measurement reference points when calculating the three-dimensional coordinates of the measurement points commonly included in the plurality of images. Therefore, for example, even when the user cannot specify a desired measurement point, the image processing apparatus can correct the measurement point to a position close to the desired measurement point, and thus the measurement accuracy of the three-dimensional coordinates of the measurement point can be improved. Can be improved.

本発明の態様2に係る画像処理装置において、上記態様1における補正部は、前記計測参照点を参照して、前記計測点の3次元座標を補正してもよい。 In the image processing device according to the second aspect of the present invention, the correction unit in the first aspect may correct the three-dimensional coordinates of the measurement point with reference to the measurement reference point.

上記の構成によれば、画像処理装置は、計測参照点を参照して、計測点の3次元座標を補正する。そのため、画像処理装置は、例えば、ユーザが所望の計測点を指定できなかった場合であっても、算出した計測点の3次元座標を、所望の計測点の3次元座標に近い座標に補正できるため、計測点の3次元座標の計測精度を向上させることができる。 According to the above configuration, the image processing device refers to the measurement reference point and corrects the three-dimensional coordinates of the measurement point. Therefore, the image processing apparatus can correct the calculated three-dimensional coordinates of the measurement point to coordinates close to the three-dimensional coordinates of the desired measurement point, for example, even when the user cannot specify the desired measurement point. Therefore, the measurement accuracy of the three-dimensional coordinates of the measurement point can be improved.

本発明の態様3に係る画像処理装置において、上記態様1または2における補正部は、前記計測点の補正後の3次元座標を、前記計測参照点をフィッティングして得られる近似平面と、前記計測点が通る直線との交点として算出してもよい。 In the image processing apparatus according to the third aspect of the present invention, the correction unit according to the first or second aspect includes an approximate plane obtained by fitting the three-dimensional coordinate after the correction of the measurement point to the measurement reference point, and the measurement. It may be calculated as an intersection with a straight line passing through the points.

上記の構成によれば、画像処理装置は、計測参照点をフィッティングして得られる近似平面と、計測点が通る直線の交点を、補正後の3次元座標とする。そのため、画像処理装置は、計測点が存在する平面、または計測点の近傍にある平面と、計測点が通る直線の交点の3次元座標を、計測点の3次元座標とするので、計測点の3次元座標の計測精度を向上させることができる。 According to the above configuration, the image processing apparatus sets the intersection of the approximate plane obtained by fitting the measurement reference point and the straight line passing through the measurement point as the corrected three-dimensional coordinates. Therefore, the image processing apparatus uses the three-dimensional coordinates of the intersection of the plane where the measurement point exists or the plane near the measurement point and the straight line through which the measurement point passes, as the three-dimensional coordinates of the measurement point. It is possible to improve the measurement accuracy of three-dimensional coordinates.

本発明の態様4に係る画像処理装置において、上記態様1または2における補正部は、前記計測点の補正後の3次元座標を、前記計測点が通る直線上の点のうち、前記計測参照点をフィッティングして得られる近似直線との最近接点として算出してもよい。 In the image processing apparatus according to Aspect 4 of the present invention, the correction unit according to Aspect 1 or 2 provides the corrected three-dimensional coordinates of the measurement point, among the points on the straight line passing through the measurement point, the measurement reference point. May be calculated as the closest point to the approximate straight line obtained by fitting.

上記の構成によれば、画像処理装置は、計測点が通る直線と、計測参照点をフィッティングして得られる近似直線との交点が存在しない場合であっても、最接近点を補正後の3次元座標とする。そのため、画像処理装置は、様々な画像上の計測点であっても、3次元座標を算出することができる。 According to the above configuration, the image processing apparatus, even if there is no intersection between the straight line through which the measurement point passes and the approximate straight line obtained by fitting the measurement reference point, corrects the closest point to 3 after correction. Use dimensional coordinates. Therefore, the image processing device can calculate three-dimensional coordinates even at measurement points on various images.

本発明の態様5に係る画像処理装置において、上記態様1または2における補正部は、前記計測点の補正前の3次元座標に対応する誤差範囲を算出し、前記計測参照点をフィッティングして得られる近似平面または前記計測参照点をフィッティングして得られる近似直線と、前記計測点の前記誤差範囲との位置関係を参照して、前記選択部に前記計測参照点を再選択させるか否かを判定してもよい。 In the image processing device according to the fifth aspect of the present invention, the correction unit according to the first or second aspect calculates an error range corresponding to the three-dimensional coordinates of the measurement point before correction, and obtains the measurement reference point by fitting. The approximate plane obtained by fitting the approximate plane or the measurement reference point, and the positional relationship between the error range of the measurement point is referred to, and whether or not the selection unit reselects the measurement reference point is determined. You may judge.

上記の構成によれば、画像処理装置は、計測点の補正前の3次元座標に対応する誤差範囲内に、近似平面または近似直線が含まれない場合、計測参照点を再選択する。そのため、画像処理装置は、適切な計測参照点を選択できなかった場合であっても、適切な計測参照点が選択できるまで再選択することができる。 According to the above configuration, the image processing apparatus reselects the measurement reference point when the approximate plane or the approximate straight line is not included in the error range corresponding to the three-dimensional coordinates of the measurement point before correction. Therefore, even when the appropriate measurement reference point cannot be selected, the image processing device can reselect until the appropriate measurement reference point can be selected.

本発明の態様6に係る画像処理装置において、上記態様1における補正部は、前記計測参照点に基づいて、前記計測点の画像上の2次元座標を補正してもよい。 In the image processing device according to the sixth aspect of the present invention, the correction unit in the first aspect may correct the two-dimensional coordinates on the image of the measurement point based on the measurement reference point.

上記の構成によれば、画像処理装置は、計測点の画像上の2次元座標を補正する。そのため、画像処理装置は、補正した2次元座標から3次元座標を算出するので、計測点の3次元座標の計測精度を向上させることができる。 According to the above configuration, the image processing device corrects the two-dimensional coordinates of the measurement point on the image. Therefore, the image processing apparatus calculates the three-dimensional coordinates from the corrected two-dimensional coordinates, so that the measurement accuracy of the three-dimensional coordinates of the measurement point can be improved.

本発明の態様7に係る画像処理装置において、上記態様6における補正部は、前記計測参照点の画像上の2次元座標をフィッティングして得られる2つの近似直線の画像上での交点を、前記計測点の画像上の2次元座標としてもよい。 In the image processing device according to the seventh aspect of the present invention, the correction unit in the sixth aspect may calculate the intersection point on the image of two approximate straight lines obtained by fitting the two-dimensional coordinates of the measurement reference point on the image as described above. It may be two-dimensional coordinates on the image of the measurement point.

上記の構成によれば、画像処理装置は、計測点の2次元座標を、所望の計測点の座標に近い座標に補正することができる。そのため、画像処理装置は、補正した2次元座標から3次元座標を算出することにより、計測点の3次元座標の計測精度を向上させることができる。 According to the above configuration, the image processing device can correct the two-dimensional coordinates of the measurement point to the coordinates close to the coordinates of the desired measurement point. Therefore, the image processing apparatus can improve the measurement accuracy of the three-dimensional coordinates of the measurement point by calculating the three-dimensional coordinates from the corrected two-dimensional coordinates.

本発明の態様8に係る画像処理装置は、上記態様1〜7の何れかにおいて、計測点受付部(104)をさらに備え、前記計測点受付部は、操作者が選択した点を前記計測参照点として受け付けてもよい。 An image processing apparatus according to aspect 8 of the present invention is the image processing device according to any one of aspects 1 to 7, further including a measurement point acceptance unit (104), wherein the measurement point acceptance unit refers to a point selected by an operator as the measurement reference. You may accept as points.

上記の構成によれば、画像処理装置は、計測参照点を、操作者に選択させる。そのため、画像処理装置は、適切な計測参照点を選択することができる。 According to the above configuration, the image processing apparatus causes the operator to select the measurement reference point. Therefore, the image processing device can select an appropriate measurement reference point.

本発明の態様9に係る画像処理方法は、複数の画像上に共通して含まれる計測点の3次元座標を算出するための画像処理方法であって、前記画像に含まれる点を計測参照点として選択する選択ステップと、前記計測参照点を参照して、前記計測点の座標を補正する補正ステップと、を含む。 An image processing method according to aspect 9 of the present invention is an image processing method for calculating three-dimensional coordinates of measurement points commonly included on a plurality of images, wherein points included in the images are measured reference points. And a correction step of correcting the coordinates of the measurement point with reference to the measurement reference point.

上記の構成によれば、画像処理方法は、上記態様1に係る画像処理装置と同等の効果を奏する。 According to the above configuration, the image processing method has the same effects as the image processing device according to the first aspect.

本発明の態様10に係る撮像装置は、上記態様1から8の何れかに記載の画像処理装置を備える。 An imaging apparatus according to aspect 10 of the present invention includes the image processing apparatus according to any one of aspects 1 to 8 above.

上記の構成によれば、上記態様1から8の何れかに係る画像処理装置を備える撮像装置を実現できる。 According to the above configuration, it is possible to realize the imaging device including the image processing device according to any one of the first to eighth aspects.

本発明の各態様に係る画像処理装置は、コンピュータによって実現してもよく、この場合には、コンピュータを上記画像処理装置が備える各部(ソフトウェア要素)として動作させることにより上記画像処理装置をコンピュータにて実現させる画像処理装置のプログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。 The image processing device according to each aspect of the present invention may be realized by a computer. In this case, the image processing device is implemented by operating the computer as each unit (software element) included in the image processing device. The program of the image processing apparatus realized by the above, and a computer-readable recording medium recording the program are also included in the scope of the present invention.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。さらに、各実施形態にそれぞれ開示された技術的手段を組み合わせることにより、新しい技術的特徴を形成することができる。 The present invention is not limited to the above-described embodiments, but various modifications can be made within the scope of the claims, and embodiments obtained by appropriately combining the technical means disclosed in the different embodiments Is also included in the technical scope of the present invention. Furthermore, a new technical feature can be formed by combining the technical means disclosed in each embodiment.

本発明は、ステレオ計測に利用することができる。 The present invention can be used for stereo measurement.

100 画像処理装置
101 画像取得部
102 計測部
103 記憶部
104 計測点受付部
105 計測値算出部
106 計測補正部(選択部、補正部)
200a、200b 撮像装置
201a、201b 撮像素子
202a、202b レンズ
100 image processing device 101 image acquisition unit 102 measurement unit 103 storage unit 104 measurement point acceptance unit 105 measurement value calculation unit 106 measurement correction unit (selection unit, correction unit)
200a, 200b Imaging device 201a, 201b Imaging element 202a, 202b Lens

Claims (7)

画像に含まれる計測点の3次元座標を算出する画像処理装置であって、
前記画像に含まれる4点以上の計測参照点の入力を受け付ける受付部と、
前記受付部にて受け付けられた前記4点以上の計測参照点の全てをフィッティングして得られる近似平面を参照して、前記計測点の座標を補正する補正部と、
を備えることを特徴とする画像処理装置。
An image processing apparatus for calculating three-dimensional coordinates of measurement points included in an image,
A receiving unit that receives input of four or more measurement reference points included in the image;
Referring to approximate plane that obtained by fitting all of the above four measurement reference points accepted by the accepting section, and a correcting unit for correcting the coordinates of the measurement point,
An image processing apparatus comprising:
前記受付部は、前記近似平面を指定するための前記4点以上の計測参照点の入力を受け付けることを特徴とする請求項1に記載の画像処理装置。 The receiving unit image processing apparatus according to claim 1, characterized in that accepting the input of four or more points of measurement reference points for specifying the pre-Symbol approximate plane. 前記補正部は、前記計測点の補正後の3次元座標を、前記近似平面上の点として算出することを特徴とする請求項2に記載の画像処理装置。 The image processing apparatus according to claim 2, wherein the correction unit calculates the corrected three-dimensional coordinates of the measurement point as a point on the approximate plane. 前記補正部は、前記計測点の補正前の3次元座標と、前記近似平面との位置関係に応じて、前記受付部に前記4点以上の計測参照点を再入力させるか否かを判定することを特徴とする請求項1〜のいずれか一項に記載の画像処理装置。 The correction unit determines the three-dimensional coordinates before correction of the measurement points, depending on the positional relationship between the pre-Symbol approximate plane, whether to re-enter the measurement reference points of the four or more points on the receiving unit the image processing apparatus according to any one of claims 1 to 3, characterized in that. 画像処理装置が、画像に含まれる計測点の3次元座標を算出するための画像処理方法であって、
前記画像に含まれる複数の計測参照点であって、2つの近似直線を指定するための前記複数の計測参照点の入力を受け付け、
前記複数の計測参照点をフィッティングして得られる前記2つの近似直線であって、前記複数の計測参照点によって指定された前記2つの近似直線の交点に基づいて、前記計測点の補正後の3次元座標を算出することにより、前記計測点の座標を補正することを特徴とする画像処理方法。
An image processing method for an image processing apparatus to calculate three-dimensional coordinates of measurement points included in an image,
Receiving a plurality of measurement reference points included in the image, the plurality of measurement reference points for designating two approximate straight lines ;
It is the two approximate straight lines obtained by fitting the plurality of measurement reference points, and the corrected three of the measurement points based on the intersection of the two approximate straight lines designated by the plurality of measurement reference points. An image processing method, wherein the coordinates of the measurement points are corrected by calculating dimensional coordinates .
請求項1からの何れか1項に記載の画像処理装置としてコンピュータを機能させるための画像処理プログラムであって、上記受付部および上記補正部としてコンピュータを機能させるための画像処理プログラム。 An image processing program for causing a computer to function as the image processing apparatus according to claim 1, any one of 4, an image processing program for causing a computer to function as the receiving unit and the correction unit. 請求項1からの何れか1項に記載の画像処理装置を備える撮像装置。 Imaging apparatus including an image processing apparatus according to any one of claims 1 to 4.
JP2015257043A 2015-12-28 2015-12-28 Image processing device, image processing method, image processing program, and imaging device Active JP6730029B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015257043A JP6730029B2 (en) 2015-12-28 2015-12-28 Image processing device, image processing method, image processing program, and imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015257043A JP6730029B2 (en) 2015-12-28 2015-12-28 Image processing device, image processing method, image processing program, and imaging device

Publications (3)

Publication Number Publication Date
JP2017120546A JP2017120546A (en) 2017-07-06
JP2017120546A5 JP2017120546A5 (en) 2018-11-22
JP6730029B2 true JP6730029B2 (en) 2020-07-29

Family

ID=59272310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015257043A Active JP6730029B2 (en) 2015-12-28 2015-12-28 Image processing device, image processing method, image processing program, and imaging device

Country Status (1)

Country Link
JP (1) JP6730029B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230003991A1 (en) * 2020-03-09 2023-01-05 Evident Corporation Surface estimation method, surface estimation device, and recording medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012190215A (en) * 2011-03-10 2012-10-04 Sony Corp Input processor, input processing method, and program
JP2013228267A (en) * 2012-04-25 2013-11-07 Panasonic Corp Display device, display method, and program
US9633450B2 (en) * 2012-11-30 2017-04-25 Sharp Kabushiki Kaisha Image measurement device, and recording medium
US10074179B2 (en) * 2013-05-07 2018-09-11 Sharp Kabushiki Kaisha Image measurement device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230003991A1 (en) * 2020-03-09 2023-01-05 Evident Corporation Surface estimation method, surface estimation device, and recording medium

Also Published As

Publication number Publication date
JP2017120546A (en) 2017-07-06

Similar Documents

Publication Publication Date Title
CN105453136B (en) The three-dimensional system for rolling correction, method and apparatus are carried out using automatic focus feedback
US10277889B2 (en) Method and system for depth estimation based upon object magnification
WO2013146269A1 (en) Image capturing device, image processing method, and program
JP6502511B2 (en) Calculation device, control method of calculation device, and calculation program
US10776937B2 (en) Image processing apparatus and image processing method for setting measuring point to calculate three-dimensional coordinates of subject image with high reliability
JP5715735B2 (en) Three-dimensional measurement method, apparatus and system, and image processing apparatus
JP5951043B2 (en) Image measuring device
EP2887313B1 (en) Image processing apparatus, system, image processing method, and computer-readable recording medium
JP4701848B2 (en) Image matching apparatus, image matching method, and image matching program
US20200394809A1 (en) 3 Dimensional Coordinates Calculating Apparatus and 3 Dimensional Coordinates Calculating Method Using Photo Images
JP2016217944A (en) Measurement device and measurement method
JP5996233B2 (en) Imaging device
US10922841B2 (en) Image processing device, image processing method, and image processing program
US11385053B2 (en) Distance measuring camera
JP6730029B2 (en) Image processing device, image processing method, image processing program, and imaging device
EP3825649A1 (en) Ranging camera
JP2018032144A (en) Image processor, image processing method and program
JP4153322B2 (en) Method and apparatus for associating measurement points in photogrammetry
WO2023199583A1 (en) Viewer control method and information processing device
CN112424566B (en) Distance measuring camera
JP5201160B2 (en) Common image plane determination program, common image plane determination method, and common image plane determination apparatus
JP2023010392A (en) Image processor, method for controlling image processor, and image processing program
WO2019093062A1 (en) Measuring device, method for controlling measuring device, measuring program, and recording medium
JP2004233139A (en) Method and apparatus for determination of corresponding point with measurement point in photogrammetry

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181004

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181004

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190823

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190910

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191101

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200414

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200604

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200702

R150 Certificate of patent or registration of utility model

Ref document number: 6730029

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150