JP2016075658A - Information process system and information processing method - Google Patents

Information process system and information processing method Download PDF

Info

Publication number
JP2016075658A
JP2016075658A JP2015000389A JP2015000389A JP2016075658A JP 2016075658 A JP2016075658 A JP 2016075658A JP 2015000389 A JP2015000389 A JP 2015000389A JP 2015000389 A JP2015000389 A JP 2015000389A JP 2016075658 A JP2016075658 A JP 2016075658A
Authority
JP
Japan
Prior art keywords
image
unit
subject
value
parallax
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.)
Pending
Application number
JP2015000389A
Other languages
Japanese (ja)
Inventor
洋義 関口
Hiroyoshi Sekiguchi
洋義 関口
輝憲 小山
Terunori Koyama
輝憲 小山
山田 和義
Kazuyoshi Yamada
和義 山田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to EP15187756.0A priority Critical patent/EP3002550B1/en
Priority to US14/872,518 priority patent/US9659379B2/en
Publication of JP2016075658A publication Critical patent/JP2016075658A/en
Pending legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Measurement Of Optical Distance (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an information process system and an information processing method that can suppress a decrease in recognition precision of a subject.SOLUTION: A pattern projection part projects pattern light on a subject. Imaging parts 3, 4 image the subject respectively and generate luminance images. A cost calculation part 53 calculates a cost value of a candidate pixel as a candidate for a corresponding pixel. A composite cost calculation part 61 aggregates cost values to calculate a route cost value, and calculates a composite cost value. A subpixel estimation part 62 executes subpixel estimation on the basis of a shift quantity corresponding to a minimum value of the composite cost value and a composite cost value at a shift quantity adjoining thereto. A generation part 63 generates a parallax image on the basis of parallax values in subpixel units. An analysis part analyzes whether a luminance image or parallax image has image abnormality. A dimming control part executes dimming control over the pattern light.SELECTED DRAWING: Figure 11

Description

本発明は、情報処理システムおよび情報処理方法に関する。   The present invention relates to an information processing system and an information processing method.

近年、物体との距離を測定する技術として、2つのカメラを有するステレオカメラを使用し、三角測量の原理を用いたステレオマッチング処理が使用されている。ステレオマッチング処理とは、一方のカメラで撮像された基準画像と、他方のカメラで撮像された比較画像との間で対応する領域をマッチングすることにより視差値を求め、視差値からステレオカメラと、画像に含まれる物体との距離を算出する処理である。   In recent years, as a technique for measuring a distance from an object, a stereo camera having two cameras is used, and a stereo matching process using the principle of triangulation is used. Stereo matching processing is to obtain a parallax value by matching a corresponding area between a reference image captured by one camera and a comparison image captured by the other camera, and from the parallax value, a stereo camera, This is a process for calculating the distance to an object included in an image.

しかし、被写体である物体を撮像した画像においてテクスチャが弱いと、上述のステレオマッチング処理を施した場合、対応する領域を適切にマッチングさせることが困難となり、正確な視差値を導出しにくくなる。ここで、テクスチャとは、例えば、画像の各画素の明暗により現れる模様、柄、パターン、色またはドット等をいう。   However, if the texture is weak in an image obtained by imaging an object that is a subject, it is difficult to appropriately match the corresponding region when the stereo matching process described above is performed, and it is difficult to derive an accurate parallax value. Here, the texture refers to, for example, a pattern, a pattern, a pattern, a color, or a dot that appears depending on the brightness of each pixel of the image.

そこで、投光部からパターンを有する光(以下、パターン光という)を照射してテクスチャを形成し、テクスチャが形成された被写体を撮像した画像に対して、ステレオマッチング処理を施す技術が提案されている(特許文献1)。ここで、パターン光のパターンとは、上述のテクスチャを作成するための、光の強弱の分布または色の分布等をいうものとする。このように、テクスチャが形成された画像に対してステレオマッチング処理を施すことにより、視差値の導出の精度を向上させている。   Therefore, a technique has been proposed in which a texture is formed by irradiating light having a pattern (hereinafter referred to as pattern light) from a light projecting unit, and a stereo matching process is performed on an image obtained by imaging a subject on which the texture is formed. (Patent Document 1). Here, the pattern light pattern means a light intensity distribution, a color distribution, or the like for creating the texture described above. As described above, the accuracy of deriving the parallax value is improved by performing the stereo matching process on the texture-formed image.

しかしながら、特許文献1に記載された技術では、例えば、被写体の設置状態によって、撮像した画像に黒潰れした状態、白飛びによる飽和状態、または投光部の光の照り返し等の画像異常が生じた場合においては、被写体の認識精度に影響が生じてしまう可能性がある。   However, in the technique described in Patent Document 1, for example, depending on the installation state of the subject, an image abnormality such as a blackened state in the captured image, a saturated state due to whiteout, or a reflection of light from the light projecting unit has occurred. In some cases, the recognition accuracy of the subject may be affected.

本発明は、上記に鑑みてなされたものであって、被写体の認識精度の低下を抑制することができる情報処理システムおよび情報処理方法を提供することを目的とする。   The present invention has been made in view of the above, and an object thereof is to provide an information processing system and an information processing method capable of suppressing a decrease in recognition accuracy of a subject.

上述した課題を解決し、目的を達成するために、本発明は、特定のパターンを有するパターン光を被写体に照射して、前記被写体にテクスチャを形成する投光手段と、前記テクスチャが形成された前記被写体を撮像する撮像手段と、前記撮像手段により撮像された撮像画像に基づいて、前記被写体までの距離情報を導出する導出手段と、少なくとも前記撮像画像または前記距離情報に基づく画像のいずれかについて画像異常の有無を解析する解析手段と、前記解析手段により前記画像異常があると解析された場合に、調光制御を実行する調光手段と、を備えたことを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention includes a light projecting unit that irradiates a subject with pattern light having a specific pattern to form a texture on the subject, and the texture is formed. An imaging unit that images the subject, a derivation unit that derives distance information to the subject based on a captured image captured by the imaging unit, and at least one of the captured image or the image based on the distance information An analysis means for analyzing presence / absence of an image abnormality and a dimming means for executing dimming control when the analysis means analyzes that the image abnormality exists are provided.

本発明によれば、高精度な視差値を導出することができる。   According to the present invention, a highly accurate parallax value can be derived.

図1は、撮像装置から物体までの距離を算出する原理を説明する図である。FIG. 1 is a diagram for explaining the principle of calculating the distance from an imaging device to an object. 図2は、基準画像、高密度視差画像およびエッジ視差画像を示す概念図である。FIG. 2 is a conceptual diagram illustrating a reference image, a high-density parallax image, and an edge parallax image. 図3は、基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。FIG. 3 is an explanatory diagram for obtaining a corresponding pixel in a comparison image corresponding to a reference pixel in the reference image. 図4は、シフト量とコスト値との関係の一例を示すグラフである。FIG. 4 is a graph showing an example of the relationship between the shift amount and the cost value. 図5は、合成コストを算出するための概念図である。FIG. 5 is a conceptual diagram for calculating the synthesis cost. 図6は、シフト量と合成コスト値との関係の一例を示すグラフである。FIG. 6 is a graph showing an example of the relationship between the shift amount and the synthesis cost value. 図7は、本実施の形態の搬送システムの全体構成の一例を示す図である。FIG. 7 is a diagram illustrating an example of the overall configuration of the transport system according to the present embodiment. 図8は、本実施の形態に係る視差値導出システムのハードウェア構成の一例を示す図である。FIG. 8 is a diagram illustrating an example of a hardware configuration of the disparity value deriving system according to the present embodiment. 図9は、画像におけるパターン光の照り返しの一例を示す図である。FIG. 9 is a diagram illustrating an example of reflection of pattern light in an image. 図10は、照り返しにより生じた視差値の不連続性の一例を示す図である。FIG. 10 is a diagram illustrating an example of discontinuity of parallax values caused by reflection. 図11は、本実施の形態のステレオカメラの機能ブロックの構成の一例を示す図である。FIG. 11 is a diagram illustrating an example of a functional block configuration of the stereo camera according to the present embodiment. 図12は、本実施の形態の搬送システムにおける被写体の視差、および背景の視差を説明する図である。FIG. 12 is a diagram illustrating the parallax of the subject and the parallax of the background in the transport system according to the present embodiment. 図13は、本実施の形態におけるシフト量と合成コスト値との関係の一例を示す図である。FIG. 13 is a diagram illustrating an example of the relationship between the shift amount and the synthesis cost value in the present embodiment. 図14は、パターン光を照射する場合および照射しない場合の合成コスト値のグラフを説明する図である。FIG. 14 is a diagram for explaining a graph of the synthesis cost value when the pattern light is irradiated and when the pattern light is not irradiated. 図15は、パラボラフィッティングによるサブピクセル推定を説明する図である。FIG. 15 is a diagram for explaining subpixel estimation by parabolic fitting. 図16は、最小二乗法によるサブピクセル推定を説明する図である。FIG. 16 is a diagram for explaining subpixel estimation by the method of least squares. 図17は、本実施の形態の搬送システムの動作の一例を示すフローチャートである。FIG. 17 is a flowchart illustrating an example of the operation of the transport system according to the present embodiment. 図18は、本実施の形態の調光制御の動作の一例を示すフローチャートである。FIG. 18 is a flowchart illustrating an example of the operation of the light control according to the present embodiment. 図19は、本実施の形態のステレオカメラの外観斜視図の一例である。FIG. 19 is an example of an external perspective view of the stereo camera of the present embodiment. 図20は、本実施の形態のステレオカメラの平面図および底面図の一例である。FIG. 20 is an example of a plan view and a bottom view of the stereo camera of this embodiment. 図21は、本実施の形態のステレオカメラの正面図、背面図および側面図の一例である。FIG. 21 is an example of a front view, a rear view, and a side view of the stereo camera of this embodiment. 図22は、本実施の形態の変形例1に係る視差値導出システムのハードウェア構成の一例を示す図である。FIG. 22 is a diagram illustrating an example of a hardware configuration of the disparity value deriving system according to the first modification of the present embodiment. 図23は、本実施の形態の変形例2のステレオカメラの機能ブロックの構成の一例を示す図である。FIG. 23 is a diagram illustrating an example of a functional block configuration of a stereo camera according to the second modification of the present embodiment. 図24は、本実施の形態の変形例3に係る視差値導出システムの基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。FIG. 24 is an explanatory diagram for obtaining corresponding pixels in the comparison image corresponding to the reference pixels in the reference image of the disparity value deriving system according to Modification 3 of the present embodiment. 図25は、本実施の形態の変形例4に係る視差値導出システムにおいて部品情報選択の画面の一例を示す図である。FIG. 25 is a diagram illustrating an example of a component information selection screen in the disparity value deriving system according to the fourth modification of the present embodiment. 図26は、本実施の形態の変形例4に係る視差値導出システムの基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。FIG. 26 is an explanatory diagram for obtaining a corresponding pixel in a comparison image corresponding to a reference pixel in a reference image of the disparity value deriving system according to the fourth modification of the present embodiment. 図27は、本実施の形態の変形例5に係る視差値導出システムのハードウェア構成の一例を示す図である。FIG. 27 is a diagram illustrating an example of a hardware configuration of the disparity value deriving system according to the fifth modification of the present embodiment. 図28は、本実施の形態の変形例5の搬送システムの動作の一例を示すフローチャートである。FIG. 28 is a flowchart illustrating an example of the operation of the transport system according to the fifth modification of the present embodiment.

[SGM法を用いた測距方法の概略]
まず、図1〜6を用いて、本実施の形態の具体的な説明の前に、SGM(Semi−Global Matching)法を用いた測距方法の概略について説明する。
[Outline of Ranging Method Using SGM Method]
First, an outline of a distance measuring method using an SGM (Semi-Global Matching) method will be described with reference to FIGS. 1 to 6 before a specific description of the present embodiment.

(測距の原理)
図1は、撮像装置から物体までの距離を算出する原理を説明する図である。図1を参照しながら、ステレオマッチング処理により、ステレオカメラにおける物体に対する視差値を導出し、この視差値によって、ステレオカメラから物体までの距離を測定する原理について説明する。なお、以下では、説明を簡略化するため、複数の画素からなる所定領域のマッチングではなく、画素単位のマッチングの例について説明する。
(Principles of ranging)
FIG. 1 is a diagram for explaining the principle of calculating the distance from an imaging device to an object. With reference to FIG. 1, the principle of deriving a parallax value for an object in a stereo camera by stereo matching processing and measuring the distance from the stereo camera to the object using this parallax value will be described. In the following, in order to simplify the description, an example of matching in units of pixels will be described instead of matching a predetermined region composed of a plurality of pixels.

図1に示す撮像システムは、平行等位に配置された撮像装置510aと撮像装置510bとを有するものとする。撮像装置510a、510bは、それぞれ、入射する光を屈折させて物体の像を固体撮像素子であるイメージセンサ(図示せず)に結像させるレンズ511a、511bを有する。撮像装置510aおよび撮像装置510bによって撮像された各画像を、それぞれ比較画像Iaおよび基準画像Ibとする。図1において、3次元空間内の物体E上の点Sは、比較画像Iaおよび基準画像Ibそれぞれにおいて、レンズ511aとレンズ511bとを結ぶ直線と平行な直線上の位置に写像される。ここで、各画像に写像された点Sを、比較画像Iaにおいて点Sa(x,y)とし、基準画像Ibにおいて点Sb(X,y)とする。このとき、視差値dpは、比較画像Ia上の座標における点Sa(x,y)および基準画像Ib上の座標における点Sb(X,y)の座標値を用いて、以下の式(1)のように表される。   The imaging system shown in FIG. 1 has an imaging device 510a and an imaging device 510b arranged in parallel equiposition. The imaging devices 510a and 510b respectively include lenses 511a and 511b that refract incident light and form an image of an object on an image sensor (not shown) that is a solid-state imaging device. The images captured by the imaging device 510a and the imaging device 510b are referred to as a comparison image Ia and a reference image Ib, respectively. In FIG. 1, a point S on the object E in the three-dimensional space is mapped to a position on a straight line parallel to a straight line connecting the lens 511a and the lens 511b in each of the comparison image Ia and the reference image Ib. Here, the point S mapped to each image is a point Sa (x, y) in the comparative image Ia and a point Sb (X, y) in the reference image Ib. At this time, the parallax value dp is expressed by the following equation (1) using the coordinate values of the point Sa (x, y) at the coordinates on the comparison image Ia and the point Sb (X, y) at the coordinates on the reference image Ib. It is expressed as

dp=X−x (1)   dp = X−x (1)

また、図1において、比較画像Iaにおける点Sa(x,y)と撮像レンズ511aから撮像面上におろした垂線の交点との距離をΔaとし、基準画像Ibにおける点Sb(X,y)と撮像レンズ511bから撮像面上におろした垂線の交点との距離をΔbにすると、視差値dpは、dp=Δa+Δbと表すこともできる。   In FIG. 1, the distance between the point Sa (x, y) in the comparative image Ia and the intersection of the perpendicular line taken from the imaging lens 511a on the imaging surface is Δa, and the point Sb (X, y) in the reference image Ib is If the distance from the intersection of the perpendicular line taken from the imaging lens 511b on the imaging surface is Δb, the parallax value dp can also be expressed as dp = Δa + Δb.

次に、視差値dpを用いることにより、撮像装置510a、510bと物体Eとの間の距離Zを導出する。ここで、距離Zは、レンズ511aの焦点位置とレンズ511bの焦点位置とを結ぶ直線から物体E上の点Sまでの距離である。図1に示すように、撮像レンズ511aおよび撮像レンズ511bの焦点距離f、レンズ511aとレンズ511bとの間の長さである基線長B、および視差値dpを用いて、下記の式(2)により、距離Zを算出することができる。   Next, a distance Z between the imaging devices 510a and 510b and the object E is derived by using the parallax value dp. Here, the distance Z is a distance from a straight line connecting the focal position of the lens 511a and the focal position of the lens 511b to the point S on the object E. As shown in FIG. 1, using the focal length f of the imaging lens 511a and the imaging lens 511b, the baseline length B that is the length between the lens 511a and the lens 511b, and the parallax value dp, the following equation (2) Thus, the distance Z can be calculated.

Z=(B×f)/dp (2)   Z = (B × f) / dp (2)

この式(2)により、視差値dpが大きいほど距離Zは小さく、視差値dpが小さいほど距離Zは大きくなることがわかる。   From this equation (2), it can be seen that the larger the parallax value dp, the smaller the distance Z, and the smaller the parallax value dp, the larger the distance Z.

(SGM法)
次に、図2〜6を用いて、SGM法を用いた測距方法について説明する。
(SGM method)
Next, a distance measuring method using the SGM method will be described with reference to FIGS.

図2は、基準画像、高密度視差画像およびエッジ視差画像を示す概念図である。このうち、図2(a)は、基準画像を示し、図2(b)は、図2(a)に示す基準画像を用いて求められた高密度視差画像を示し、図2(c)は、図2(a)に示す基準画像を用いて求められたエッジ視差画像を示す概念図である。ここで、基準画像は、図1に示す基準画像Ibに相当し、撮像された被写体が輝度値によって表された画像である。また、高密度視差画像とは、基準画像の各画素を、SGM法によって導出された基準画像における各画素に対応する視差値で表した画像を示すものとする。そして、エッジ視差画像は、基準画像の各画素を、ブロックマッチング法によって導出された基準画像における各画素に対応する視差値で表した画像を示すものとする。ただし、ブロックマッチング法によって導出できる視差値は、後述するように、基準画像におけるエッジ部のような比較的テクスチャの強い部分であり、テクスチャの弱い部分のように視差値を導出できない場合は、例えば視差値を「0」として画像を構成する。   FIG. 2 is a conceptual diagram illustrating a reference image, a high-density parallax image, and an edge parallax image. 2A shows a reference image, FIG. 2B shows a high-density parallax image obtained using the reference image shown in FIG. 2A, and FIG. FIG. 3 is a conceptual diagram showing an edge parallax image obtained using the reference image shown in FIG. Here, the reference image corresponds to the reference image Ib shown in FIG. 1 and is an image in which the captured subject is represented by a luminance value. Further, the high-density parallax image indicates an image in which each pixel of the reference image is represented by a parallax value corresponding to each pixel in the reference image derived by the SGM method. The edge parallax image indicates an image in which each pixel of the reference image is represented by a parallax value corresponding to each pixel in the reference image derived by the block matching method. However, as will be described later, the disparity value that can be derived by the block matching method is a relatively textured portion such as an edge portion in the reference image, and when the disparity value cannot be derived such as a weak texture portion, for example, An image is configured with a parallax value of “0”.

SGM法は、画像におけるテクスチャが弱い部分に対しても適切に視差値を導出するための方法であり、図2(a)に示す基準画像に基づいて、図2(b)に示す高密度視差画像を生成する方法である。なお、ブロックマッチング法は、図2(a)に示す基準画像に基づいて、図2(c)に示すエッジ視差画像を導出する方法である。SGM法によれば、図2(b)および図2(c)における破線の楕円内を比べると分かるように、高密度視差画像は、エッジ視差画像に比べてテクスチャが弱い道路等においても詳細な視差値に基づく距離を表すことができるため、より詳細な測距を行うことができる。   The SGM method is a method for appropriately deriving a parallax value even for a portion having a weak texture in an image. Based on the reference image shown in FIG. 2A, the high-density parallax shown in FIG. A method for generating an image. The block matching method is a method for deriving the edge parallax image shown in FIG. 2C based on the reference image shown in FIG. According to the SGM method, as can be seen by comparing the inside of the dashed ellipse in FIGS. 2B and 2C, the high-density parallax image is detailed even on roads where the texture is weaker than the edge parallax image. Since the distance based on the parallax value can be expressed, more detailed distance measurement can be performed.

SGM法は、基準画像に対する比較画像上の、一致度としてのコスト値を算出して直ちに視差値を導出せず、コスト値を算出後、さらに、合成コスト値を算出することで視差値を導出する方法である。そして、SGM法は、最終的に、基準画像におけるほぼ全ての画素に対応する視差値で表された視差画像(ここでは、高密度視差画像)を導出する。   In the SGM method, the cost value as the degree of coincidence on the comparison image with respect to the reference image is not calculated and the parallax value is not derived immediately, but the parallax value is derived by calculating the combined cost value after calculating the cost value. It is a method to do. The SGM method finally derives a parallax image (here, a high-density parallax image) represented by parallax values corresponding to almost all pixels in the reference image.

なお、ブロックマッチング法の場合は、コスト値を算出する点はSGM法と同じであるが、SGM法のように、合成コスト値を算出せずに、エッジ部のような比較的テクスチャの強い部分の視差値のみが導出される。   In the case of the block matching method, the cost value is calculated in the same way as the SGM method. However, as in the SGM method, a comparatively strong texture such as an edge portion is calculated without calculating a synthesis cost value. Only the parallax value is derived.

<コスト値の算出>
図3は、基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。図4は、シフト量とコスト値との関係の一例を示すグラフである。図3および4を参照しながら、コスト値C(p,d)の算出方法について説明する。なお、以降、C(p,d)はC(x,y,d)を表すものとして説明する。
<Calculation of cost value>
FIG. 3 is an explanatory diagram for obtaining a corresponding pixel in a comparison image corresponding to a reference pixel in the reference image. FIG. 4 is a graph showing an example of the relationship between the shift amount and the cost value. A method for calculating the cost value C (p, d) will be described with reference to FIGS. In the following description, C (p, d) represents C (x, y, d).

図3のうち、図3(a)は、基準画像における基準画素を示す概念図を示し、図3(b)は、図3(a)に示す基準画素に対応する比較画像における対応画素の候補を順次シフトしながら(ずらしながら)、コスト値を算出する際の概念図である。ここで、対応画素とは、基準画像における基準画素に最も類似する比較画像における画素を示す。また、コスト値とは、基準画像における基準画素に対する、比較画像における各画素の一致度を表す評価値である。以下に示すコスト値(および合成コスト値)は、値が小さいほど比較画像における画素が基準画素と類似していることを示す。   3A is a conceptual diagram showing reference pixels in the reference image, and FIG. 3B is a corresponding pixel candidate in the comparison image corresponding to the reference pixel shown in FIG. It is a conceptual diagram at the time of calculating a cost value while shifting (shifting) sequentially. Here, the corresponding pixel indicates a pixel in the comparison image that is most similar to the reference pixel in the reference image. The cost value is an evaluation value that represents the degree of coincidence of each pixel in the comparison image with respect to the reference pixel in the reference image. The cost value (and synthesis cost value) shown below indicates that the smaller the value is, the more similar the pixel in the comparison image is to the reference pixel.

図3(a)に示すように、基準画像Ibにおける基準画素p(x,y)、および、基準画素p(x,y)に対する比較画像Iaにおけるエピポーラ線EL上の対応画素の候補である候補画素q(x+d,y)の各輝度値に基づいて、基準画素p(x,y)に対する対応画素の候補画素q(x+d,y)のコスト値C(p,d)が算出される。dは、基準画素pと候補画素qとのシフト量(ずれ量)であり、シフト量dは、画素単位でシフトされる。すなわち、図3では、候補画素q(x+d,y)を所定のシフト範囲(例えば、0<d<25)において順次一画素分シフトしながら、候補画素q(x+d,y)と基準画素p(x,y)との輝度値の一致度であるコスト値C(p,d)が算出される。   As shown in FIG. 3A, a candidate that is a candidate for a reference pixel p (x, y) in the reference image Ib and a corresponding pixel on the epipolar line EL in the comparison image Ia with respect to the reference pixel p (x, y). Based on each luminance value of the pixel q (x + d, y), the cost value C (p, d) of the candidate pixel q (x + d, y) corresponding to the reference pixel p (x, y) is calculated. d is a shift amount (shift amount) between the reference pixel p and the candidate pixel q, and the shift amount d is shifted in units of pixels. That is, in FIG. 3, the candidate pixel q (x + d, y) and the reference pixel p (x) are sequentially shifted by one pixel within a predetermined shift range (for example, 0 <d <25). A cost value C (p, d) that is the degree of coincidence of the luminance value with x, y) is calculated.

なお、上述のように、撮像装置510a、510bは、それぞれ平行等位に配置されるため、比較画像Iaおよび基準画像Ibも、それぞれ平行等位の関係にある。したがって、基準画像Ibにおける基準画素pに対応する比較画像Iaにおける対応画素は、図3の紙面視横方向の線として示されるエピポーラ線EL上に存在することになり、比較画像Iaにおける対応画素を求めるためには、比較画像Iaのエピポーラ線EL上の画素を探索すればよい。   As described above, since the imaging devices 510a and 510b are arranged in parallel equiposition, the comparison image Ia and the reference image Ib are also in parallel equivalence relations. Therefore, the corresponding pixel in the comparison image Ia corresponding to the reference pixel p in the reference image Ib exists on the epipolar line EL shown as a horizontal line in FIG. 3, and the corresponding pixel in the comparison image Ia is In order to obtain it, the pixel on the epipolar line EL of the comparison image Ia may be searched.

このようにして算出されたコスト値C(p,d)は、シフト量dとの関係で、図4に示すグラフにより表される。図4の例では、コスト値Cは、シフト量d=5,12,19の場合が「0」となるため、最小値を求めることができない。例えば、画像におけるテクスチャが弱い部分がある場合には、このようにコスト値Cの最小値を求めることは困難になる。   The cost value C (p, d) calculated in this way is represented by the graph shown in FIG. 4 in relation to the shift amount d. In the example of FIG. 4, the cost value C is “0” when the shift amount d = 5, 12, and 19, and thus the minimum value cannot be obtained. For example, when there is a portion where the texture is weak in the image, it is difficult to obtain the minimum value of the cost value C in this way.

<合成コスト値の算出>
図5は、合成コストを算出するための概念図である。図6は、シフト量と合成コスト値との関係の一例を示すグラフである。図5および6を参照しながら、合成コスト値Ls(p,d)の算出方法について説明する。
<Calculation of synthetic cost value>
FIG. 5 is a conceptual diagram for calculating the synthesis cost. FIG. 6 is a graph showing an example of the relationship between the shift amount and the synthesis cost value. A method for calculating the synthesis cost value Ls (p, d) will be described with reference to FIGS.

合成コスト値の算出は、コスト値C(p,d)の算出だけでなく、基準画素p(x,y)の周辺の画素を基準画素とした場合のコスト値を、基準画素p(x,y)におけるコスト値C(p,d)に集約させて、合成コスト値Ls(p,d)を算出するものである。合成コスト値Ls(p,d)を算出するためには、まず、経路コスト値Lr(p,d)を算出する。経路コスト値Lr(p,d)は、下記の式(3)によって算出する。   The calculation of the combined cost value is not only the calculation of the cost value C (p, d), but also the cost value when the pixels around the reference pixel p (x, y) are used as the reference pixel is the reference pixel p (x, d The combined cost value Ls (p, d) is calculated by concentrating on the cost value C (p, d) in y). In order to calculate the combined cost value Ls (p, d), first, the route cost value Lr (p, d) is calculated. The route cost value Lr (p, d) is calculated by the following equation (3).

Lr(p,d)=C(p,d)+min(Lr(p−r,k)+P(d,k))
(3)
(P=0(d=kの場合)、
P=P1(|d−k|=1の場合)、
P=P2(>P1)(|d−k|>1の場合))
Lr (p, d) = C (p, d) + min (Lr (p−r, k) + P (d, k))
(3)
(P = 0 (when d = k))
P = P1 (when | d−k | = 1),
P = P2 (> P1) (when | dk |> 1))

式(3)に示すように経路コスト値Lrは、再帰的に求められる。ここで、rは、集約方向の方向ベクトルを示し、x方向およびy方向の2成分を有する。min()は、最小値を求める関数である。Lr(p−r,k)は、基準画素pの座標からr方向に1画素シフトした座標の画素について、シフト量を変化させた場合(この場合のシフト量をkとしている)のそれぞれの経路コスト値Lrを示す。そして、経路コスト値Lr(p,d)のシフト量であるdと、シフト量kとの間の関係に基づいて、下記の(a)〜(c)のように値P(d,k)を求め、Lr(p−r,k)+P(d,k)を算出している。   As shown in Expression (3), the route cost value Lr is obtained recursively. Here, r indicates a direction vector in the aggregation direction, and has two components in the x direction and the y direction. min () is a function for obtaining the minimum value. Lr (p−r, k) is the respective path when the shift amount is changed (the shift amount in this case is k) for the pixel having the coordinate shifted by one pixel in the r direction from the coordinate of the reference pixel p. The cost value Lr is shown. Then, based on the relationship between the shift amount d of the route cost value Lr (p, d) and the shift amount k, the value P (d, k) as shown in (a) to (c) below. Lr (p−r, k) + P (d, k) is calculated.

(a)d=kの場合、P=0とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)となる。
(b)|d−k|=1の場合、P=P1とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)+P1となる。
(c)|d−k|>1の場合、P=P2(>P1)とする。すなわち、Lr(p−r,k)+P(d,k)=Lr(p−r,k)+P2となる。
(A) When d = k, P = 0. That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k).
(B) When | d−k | = 1, P = P1. That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k) + P1.
(C) When | d−k |> 1, P = P2 (> P1). That is, Lr (p−r, k) + P (d, k) = Lr (p−r, k) + P2.

そして、min(Lr(p−r,k)+P(d,k))は、kを様々な値に変化させた場合の、上述の(a)〜(c)で算出したLr(p−r,k)+P(d,k)のうち最小の値を抽出した値となる。すなわち、比較画像Iaにおける基準画素pの座標の位置にある画素からr方向において隣接する画素(p−r)からシフト量kだけシフトした画素から離れた場合に、値P1または値P2(>P1)を加算することにより、比較画像Iaにおける基準画素pの座標から離れた画素についての、シフト量dが不連続な経路コスト値Lrの影響を受け過ぎないようにしている。また、値P1および値P2は、予め実験により定められた固定パラメータであり、経路上で隣接する基準画素の視差値が連続になりやすいようなパラメータになっている。このように、比較画像Iaにおいてr方向の各画素における経路コスト値Lrを求めるために、最初は、基準画素p(x,y)の座標からr方向の一番端の画素から経路コスト値Lrを求め、r方向に沿って経路コスト値Lrが求められる。   Then, min (Lr (p−r, k) + P (d, k)) is Lr (p−r) calculated in the above (a) to (c) when k is changed to various values. , K) + P (d, k) is a value obtained by extracting the minimum value. In other words, the value P1 or the value P2 (> P1) when the pixel located at the coordinate position of the reference pixel p in the comparison image Ia moves away from the pixel shifted by the shift amount k from the pixel (pr) adjacent in the r direction. ) Is added so that the shift amount d for the pixels away from the coordinates of the reference pixel p in the comparison image Ia is not affected by the discontinuous path cost value Lr. Further, the value P1 and the value P2 are fixed parameters determined in advance by experiments, and are parameters such that the parallax values of the reference pixels adjacent on the path are likely to be continuous. Thus, in order to obtain the path cost value Lr for each pixel in the r direction in the comparison image Ia, first, the path cost value Lr from the extreme end pixel in the r direction from the coordinates of the reference pixel p (x, y). And the route cost value Lr is obtained along the r direction.

そして、図5に示すように、8方向(r、r45、r90、r135、r180、r225、r270およびr315)の経路コスト値LrであるLr、Lr45、Lr90、Lr135、Lr180、Lr225、Lr270およびLr315が求められ、最終的に下記の式(4)に基づいて、合成コスト値Ls(p,d)が求められる。 Then, as shown in FIG. 5, Lr 0 , Lr 45 , Lr which are route cost values Lr in eight directions (r 0 , r 45 , r 90 , r 135 , r 180 , r 225 , r 270 and r 315 ). 90 , Lr 135 , Lr 180 , Lr 225 , Lr 270 and Lr 315 are obtained, and finally, a combined cost value Ls (p, d) is obtained based on the following equation (4).

Ls(p,d)=ΣLr (4)   Ls (p, d) = ΣLr (4)

以上のようにして、算出された合成コスト値Ls(p,d)は、シフト量dとの関係で、図6に示すグラフによって表すことができる。図6の例では、合成コスト値Lsは、シフト量d=3の場合が最小値となるため、視差値dp=3として導出される。なお、上述の説明においては、r方向の数を8個として説明しているが、これに限定されるものではない。例えば、8方向をさらに2つに分割して16方向、または、3つに分割して24方向等にしてもよい。あるいは、8方向のうちのいずれかの経路コスト値Lrを求め、合計することによって合成コスト値Lsを算出するものとしてもよい。   As described above, the calculated combined cost value Ls (p, d) can be represented by the graph shown in FIG. 6 in relation to the shift amount d. In the example of FIG. 6, the combined cost value Ls is derived as a parallax value dp = 3 because the minimum value is obtained when the shift amount d = 3. In the above description, the number in the r direction is eight, but the present invention is not limited to this. For example, the eight directions may be further divided into two to be 16 directions, or may be divided into three to be 24 directions. Alternatively, the combined cost value Ls may be calculated by obtaining the route cost value Lr in any one of the eight directions and adding the route cost values Lr.

[本実施の形態の具体的な説明]
以下、図7〜18を用いて、本実施の形態の具体的な説明をする。本実施の形態では、上述のようなステレオマッチング処理により視差値を導出する視差値導出システムが、ロボットアームを備えた搬送システムに搭載された場合を例に説明する。なお、以下の本実施の形態の説明によって本発明が限定されるものではなく、以下の実施の形態における構成要素には、当業者が容易に想到できるもの、実質的に同一のもの、およびいわゆる均等の範囲のものが含まれる。さらに、以下の実施の形態の要旨を逸脱しない範囲で構成要素の種々の省略、置換、変更および組み合わせを行うことができる。
[Specific Description of this Embodiment]
Hereinafter, this embodiment will be described in detail with reference to FIGS. In the present embodiment, a case where a parallax value deriving system that derives a parallax value by the stereo matching process as described above is mounted on a transport system including a robot arm will be described as an example. It should be noted that the present invention is not limited by the following description of the present embodiment, and constituent elements in the following embodiment can be easily conceived by those skilled in the art, substantially the same, and so-called The equivalent range is included. Furthermore, various omissions, substitutions, changes, and combinations of the constituent elements can be made without departing from the scope of the following embodiments.

(搬送システムの全体構成)
図7は、本実施の形態の搬送システムの全体構成の一例を示す図である。図7を参照しながら、本実施の形態に係る搬送システム1の全体構成について説明する。
(Overall configuration of transfer system)
FIG. 7 is a diagram illustrating an example of the overall configuration of the transport system according to the present embodiment. The overall configuration of the transport system 1 according to the present embodiment will be described with reference to FIG.

図7に示すように、本実施の形態の搬送システム1は、台(以下、「背景部21」という)に設置された部品を、ロボットのアームによって把持し、搬送先に搬送するシステムである。図7に示すように、搬送システム1は、情報処理システムの一例である視差値導出システム15と、認識処理部7と、アーム制御部10と、アーム11と、を備えている。   As shown in FIG. 7, the transport system 1 according to the present embodiment is a system that grips a part installed on a table (hereinafter referred to as “background part 21”) by a robot arm and transports it to a transport destination. . As illustrated in FIG. 7, the transport system 1 includes a parallax value derivation system 15 that is an example of an information processing system, a recognition processing unit 7, an arm control unit 10, and an arm 11.

視差値導出システム15は、被写体である部品にパターン光を照射させた状態で、2つの撮像部により被写体を撮像した輝度画像から、被写体に対する視差画像を生成するシステムである。視差値導出システム15は、ステレオカメラ2と、パターン投光部8(投光手段)と、調光制御部9と、を備えている。   The parallax value derivation system 15 is a system that generates a parallax image for a subject from luminance images obtained by imaging the subject with two imaging units in a state in which pattern light is irradiated on a component that is the subject. The parallax value deriving system 15 includes a stereo camera 2, a pattern light projecting unit 8 (light projecting unit), and a light control unit 9.

ステレオカメラ2は、2つの撮像部により被写体である部品を撮像した輝度画像から、被写体に対する視差画像を生成する装置である。ステレオカメラ2は、撮像部3、4と、マッチング部5と、視差画像生成部6と、を備えている。撮像部3、4、マッチング部5および視差画像生成部6の機能については、図4において後述する。   The stereo camera 2 is a device that generates a parallax image for a subject from a luminance image obtained by imaging a component that is a subject by two imaging units. The stereo camera 2 includes imaging units 3 and 4, a matching unit 5, and a parallax image generation unit 6. The functions of the imaging units 3 and 4, the matching unit 5, and the parallax image generation unit 6 will be described later with reference to FIG.

パターン投光部8は、撮像部3、4の被写体となる部品20に対して、特殊なパターンを有するパターン光を照射する装置である。特殊なパターンとしては、例えば、二次元の乱数パターン、または複数の明度を有するパターン等であることが好ましい。一方、特殊なパターンとして、繰り返し周期を有するパターンは、コスト値Cの値が繰り返す場合があるため、好ましくない。このように、パターン投光部8により部品20に対してパターン光が照射されることにより、部品20に対してテクスチャを形成することができるので、ステレオマッチング処理により導出される視差値の精度を向上させることができる。   The pattern light projecting unit 8 is a device that irradiates the component 20 that is the subject of the imaging units 3 and 4 with pattern light having a special pattern. The special pattern is preferably, for example, a two-dimensional random number pattern or a pattern having a plurality of brightness values. On the other hand, as a special pattern, a pattern having a repetition period is not preferable because the cost value C may be repeated. As described above, the pattern light can be formed on the component 20 by irradiating the component 20 with the pattern light by the pattern projecting unit 8, so that the accuracy of the parallax value derived by the stereo matching process can be improved. Can be improved.

調光制御部9は、ステレオカメラ2が出力する輝度画像および視差画像について異常があるか否かを解析し、異常があると検知した場合に、パターン投光部8が照射するパターン光の光量の調整量を決定し、決定した調整量をパターン投光部8に送信する装置である。例えば、調光制御部9は、ステレオカメラ2から受信した輝度画像について、黒潰れの状態の領域があることを検知した場合、黒潰れの状態を解消するために、パターン光の光量を上げるための調整量をパターン投光部8に送信する。また、調光制御部9は、ステレオカメラ2から受信した輝度画像について、飽和状態の領域があることを検知した場合、飽和状態を解消するために、パターン光の光量を下げるための調整量をパターン投光部8に送信する。なお、調光制御部9は、受信する輝度画像として、撮像部3の撮像画像を受信しているが、これに限定されるものではなく、撮像部4の撮像画像を受信するものとしてもよい。   The dimming control unit 9 analyzes whether the luminance image and the parallax image output from the stereo camera 2 are abnormal, and when detecting that there is an abnormality, the light amount of the pattern light emitted by the pattern light projecting unit 8 The adjustment amount is determined, and the determined adjustment amount is transmitted to the pattern projector 8. For example, the dimming control unit 9 increases the amount of pattern light in order to eliminate the blacked-out state when the luminance image received from the stereo camera 2 detects that there is a blacked-out state region. Is sent to the pattern projector 8. Further, when the dimming control unit 9 detects that there is a saturated region in the luminance image received from the stereo camera 2, the dimming control unit 9 sets an adjustment amount for reducing the amount of pattern light in order to eliminate the saturated state. Transmit to the pattern projector 8. In addition, although the light control part 9 has received the captured image of the imaging part 3 as a luminance image to receive, it is not limited to this, It is good also as what receives the captured image of the imaging part 4. .

なお、視差値導出システム15のステレオカメラ2、パターン投光部8および調光制御部9の機能については、後述の図8および9で詳述する。   The functions of the stereo camera 2, the pattern light projecting unit 8, and the dimming control unit 9 of the parallax value deriving system 15 will be described in detail with reference to FIGS.

認識処理部7は、ステレオカメラ2が出力する輝度画像および視差画像に基づいて、ステレオカメラ2により撮像された部品20の形状、位置および距離等を認識する装置である。アーム制御部10は、認識処理部7による部品20に対する認識結果に基づいて、多関節ロボット等であるアーム11に対して、部品20を把持させ、搬送先に搬送させる制御を行う装置である。   The recognition processing unit 7 is a device that recognizes the shape, position, distance, and the like of the component 20 captured by the stereo camera 2 based on the luminance image and the parallax image output from the stereo camera 2. The arm control unit 10 is a device that controls the arm 11, such as an articulated robot, to grip the component 20 and convey it to the conveyance destination based on the recognition result of the component 20 by the recognition processing unit 7.

(視差値導出システムのハードウェア構成)
図8は、本実施の形態に係る視差値導出システムのハードウェア構成の一例を示す図である。図9は、画像におけるパターン光の照り返しの一例を示す図である。図10は、照り返しにより生じた視差値の不連続性の一例を示す図である。図8〜10を参照しながら、本実施の形態に係る視差値導出システム15のハードウェア構成について主に説明する。
(Hardware configuration of disparity value derivation system)
FIG. 8 is a diagram illustrating an example of a hardware configuration of the disparity value deriving system according to the present embodiment. FIG. 9 is a diagram illustrating an example of reflection of pattern light in an image. FIG. 10 is a diagram illustrating an example of discontinuity of parallax values caused by reflection. A hardware configuration of the disparity value deriving system 15 according to the present embodiment will be mainly described with reference to FIGS.

図8に示すように、視差値導出システム15のステレオカメラ2は、CPU(Central Processing Unit)100と、ROM(Read Only Memory)101と、ROMI/F102と、RAM(Random Access Memory)103と、RAMI/F104と、画像処理部105と、撮像部106(撮像手段)と、撮像部制御用I/F107と、を備えている。   As shown in FIG. 8, the stereo camera 2 of the parallax value derivation system 15 includes a CPU (Central Processing Unit) 100, a ROM (Read Only Memory) 101, a ROM I / F 102, a RAM (Random Access Memory) 103, A RAM I / F 104, an image processing unit 105, an imaging unit 106 (imaging unit), and an imaging unit control I / F 107 are provided.

CPU100は、ステレオカメラ2の各機能を制御する演算装置である。ROM101は、CPU100がステレオカメラ2の各機能を制御するために実行するプログラムを記憶する不揮発性記憶装置である。ROMI/F102は、ROM101に対する読出しおよび書込みの動作を、CPU100の命令によって実現するためのCPU100とROM101とを接続するインターフェースである。   The CPU 100 is an arithmetic device that controls each function of the stereo camera 2. The ROM 101 is a non-volatile storage device that stores a program executed by the CPU 100 to control each function of the stereo camera 2. The ROM I / F 102 is an interface for connecting the CPU 100 and the ROM 101 for realizing read and write operations to the ROM 101 by instructions of the CPU 100.

RAM103は、CPU100のワークメモリ、および、画像処理部105からRAMI/F104を介して入力された撮像画像のバッファ等として機能する揮発性記憶装置である。RAMI/F104は、RAM103に対する読出しおよび書込みの動作を、CPU100の命令によって実現するためのCPU100とRAM103とを接続するインターフェースである。   The RAM 103 is a volatile storage device that functions as a work memory of the CPU 100 and a buffer for a captured image input from the image processing unit 105 via the RAM I / F 104. The RAM I / F 104 is an interface that connects the CPU 100 and the RAM 103 for realizing read and write operations to the RAM 103 by instructions of the CPU 100.

画像処理部105は、撮像部106により撮像された撮像画像(輝度画像)から視差画像を生成するFPGA(Field Programmable Gate Array)またはASIC(Application Specific Integrated Circuit)等のハードウェア回路である。   The image processing unit 105 is a hardware circuit such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit) that generates a parallax image from a captured image (luminance image) captured by the imaging unit 106.

撮像部106は、図2では簡略のために1つのみ記載されているが2つの撮像部によって構成されており、この2つの撮像部が所定距離だけ離間した状態で固定治具により固定され、それぞれが被写体を撮像して、アナログ形式の画像データを生成し、さらにデジタル形式の画像データに変換する装置である。撮像部106は、レンズ106aと、絞り106bと、イメージセンサ106cと、を備える。   Although only one image pickup unit 106 is shown in FIG. 2 for the sake of brevity, the image pickup unit 106 is composed of two image pickup units. The two image pickup units are fixed by a fixing jig in a state of being separated by a predetermined distance, Each device captures an image of a subject, generates analog image data, and further converts it into digital image data. The imaging unit 106 includes a lens 106a, a diaphragm 106b, and an image sensor 106c.

レンズ106aは、入射する光を屈折させて物体の像をイメージセンサ106cに結像させるための光学素子である。絞り106bは、レンズ106aを通過した光の一部を遮ることによって、イメージセンサ106cに結像させる光の量を調整する部材である。イメージセンサ106cは、レンズ106aに入射し、絞り106bを通過した光を電気的なアナログ形式の画像データに変換する固体撮像素子である。イメージセンサ106cは、例えば、CCD(Charge Coupled Devices)またはCMOS(Complementary Metal Oxide Semiconductor)によって実現される。   The lens 106a is an optical element that refracts incident light and forms an image of an object on the image sensor 106c. The diaphragm 106b is a member that adjusts the amount of light that forms an image on the image sensor 106c by blocking part of the light that has passed through the lens 106a. The image sensor 106c is a solid-state imaging device that converts light incident on the lens 106a and passing through the aperture 106b into electrical analog image data. The image sensor 106c is realized by, for example, a CCD (Charge Coupled Devices) or a CMOS (Complementary Metal Oxide Semiconductor).

撮像部制御用I/F107は、撮像部106の露光時間を制御するためのレジスタ設定値を、調光制御部9から撮像部106へ中継したり、逆に、撮像部106からのレジスタ設定値を中継するインターフェースである。撮像部制御用I/F107は、例えば、Ethernet(登録商標)に準拠したインターフェースである。   The imaging unit control I / F 107 relays register setting values for controlling the exposure time of the imaging unit 106 from the dimming control unit 9 to the imaging unit 106, or conversely, register setting values from the imaging unit 106. Is an interface that relays The imaging unit control I / F 107 is, for example, an interface compliant with Ethernet (registered trademark).

図8に示すように、視差値導出システム15の調光制御部9は、解析部200(解析手段)と、調光部201(調光手段)と、を備えている。   As shown in FIG. 8, the dimming control unit 9 of the parallax value deriving system 15 includes an analyzing unit 200 (analyzing unit) and a dimming unit 201 (dimming unit).

解析部200は、ステレオカメラ2の画像処理部105から受信した輝度画像または視差画像について画像異常があるか否かを解析する回路である。例えば、解析部200は、受信した輝度画像から、被写体、または被写体の周囲の背景部における黒潰れ状態または飽和状態の領域の有無を検知する。また、解析部200は、受信した視差画像から、被写体または背景部における、パターン投光部8が照射するパターン光の照り返しに伴う視差値の不連続領域の有無を検知する。ここで、図9は、例えば、解析部200が画像処理部105から輝度画像として基準画像Ib_exを受信した場合に、基準画像Ib_exに写り込んでいる部品の周囲の背景部の領域400に照り返しが撮像されている状態の例を示す。撮像部106は、上述したように、2つの撮像部が所定距離だけ離間しているため、図9に示す基準画像Ib_exの領域400の照り返しは、比較画像においては異なる位置に撮像されることになる。その結果、画像処理部105により生成された図10に示す視差画像Ip_exにおいては、背景部の領域401に不連続な視差値を生じることになる。なお、視差画像に不連続な視差値が生じる原因としては、上述のように、パターン光の照り返しが輝度画像に写り込んでいることのみに限定されない。   The analysis unit 200 is a circuit that analyzes whether the luminance image or the parallax image received from the image processing unit 105 of the stereo camera 2 has an image abnormality. For example, the analysis unit 200 detects the presence or absence of a blackened state or a saturated region in the subject or the background portion around the subject from the received luminance image. Further, the analysis unit 200 detects from the received parallax image whether or not there is a discontinuous region of the parallax value associated with the reflection of the pattern light emitted from the pattern light projecting unit 8 in the subject or background. Here, in FIG. 9, for example, when the analysis unit 200 receives the reference image Ib_ex as the luminance image from the image processing unit 105, the reflection is reflected on the background region 400 around the component reflected in the reference image Ib_ex. The example of the state currently imaged is shown. As described above, since the imaging unit 106 is separated from the imaging unit by a predetermined distance, the reflection of the region 400 of the reference image Ib_ex illustrated in FIG. 9 is captured at a different position in the comparison image. Become. As a result, in the parallax image Ip_ex shown in FIG. 10 generated by the image processing unit 105, discontinuous parallax values are generated in the background area 401. Note that the cause of discontinuous parallax values in the parallax image is not limited to the fact that the reflection of the pattern light is reflected in the luminance image as described above.

また、解析部200は、後述のように、調光部201による調光の結果、ステレオカメラ2の画像処理部105から受信した輝度画像において、テクスチャが適正に形成されているか否か、すなわちテクスチャにぼやけが生じていないか否かを解析する。この場合、解析部200は、例えば、輝度画像に対して、テクスチャの先鋭度を算出し、所定の閾値と比較して、閾値以上の場合、テクスチャが適正に形成されていると判定するものとすればよい。   Further, as will be described later, the analysis unit 200 determines whether the texture is properly formed in the luminance image received from the image processing unit 105 of the stereo camera 2 as a result of the light control by the light control unit 201, that is, the texture. Analyzes whether or not the image is blurred. In this case, for example, the analysis unit 200 calculates the sharpness of the texture with respect to the luminance image, and determines that the texture is properly formed when the texture is equal to or greater than the predetermined threshold. do it.

調光部201は、解析部200から解析結果を受け取り、その解析結果から、輝度画像に黒潰れ状態もしくは飽和状態が発生し、または、視差画像に視差値の不連続領域が発生している等の画像異常が発生していると判定した場合、画像異常の内容に応じた調整量をパターン投光部8に送信する回路である。具体的には、調光部201は、画像異常(黒潰れ状態、飽和状態、および視差値の不連続等)の内容と、パターン投光部8の光量に対する調整量とを関連付けた光量調整テーブル(図示せず)から、画像異常の内容に応じた調整量を決定してパターン投光部8に送信する。なお、調光部201は、光量調整データによって、光量調整テーブルにより画像異常の内容から調整量を決定するものとしたが、テーブル形式に限定されるものとではなく、画像異常の内容と、調整量とを関連付ける情報であればどのような形式の情報であってもよい。また、調光部201は、調整量をパターン投光部8に送信することによりパターン光の調光を実行した後、パターン投光部8から光量データを受信する。   The light control unit 201 receives the analysis result from the analysis unit 200, and from the analysis result, a blackened state or a saturated state occurs in the luminance image, or a discontinuous region of the parallax value occurs in the parallax image. This is a circuit that transmits an adjustment amount according to the content of the image abnormality to the pattern projector 8 when it is determined that the image abnormality is occurring. Specifically, the dimming unit 201 associates the content of the image abnormality (black crushing state, saturation state, disparity value discontinuity, etc.) with the adjustment amount for the light amount of the pattern light projecting unit 8. An adjustment amount corresponding to the content of the image abnormality is determined from (not shown) and transmitted to the pattern projector 8. The light adjustment unit 201 determines the adjustment amount from the content of the image abnormality by the light amount adjustment table based on the light amount adjustment data, but is not limited to the table format, and the content of the image abnormality and the adjustment. Any form of information may be used as long as the information is associated with the quantity. The dimming unit 201 performs dimming of the pattern light by transmitting the adjustment amount to the pattern projecting unit 8, and then receives the light amount data from the pattern projecting unit 8.

調光部201は、パターン投光部8から受信した光量データから、調光限界に達した、すなわち、調光がこれ以上できないと判定した場合、または、解析部200から受信した解析結果から、輝度画像にテクスチャが適正に形成されていない画像異常が発生していると判定した場合、露光調整を実行する。具体的には、調光部201は、露光調整として、撮像部106に対し露光時間を調整するための調整指示情報を送信する。撮像部106は、調光部201から受信した調整指示情報に従って、撮像における露光時間を調整する。   The light control unit 201 has reached the light control limit from the light amount data received from the pattern light projecting unit 8, that is, when it is determined that light control cannot be performed any more, or from the analysis result received from the analysis unit 200, When it is determined that an image abnormality in which the texture is not properly formed in the luminance image has occurred, exposure adjustment is executed. Specifically, the light control unit 201 transmits adjustment instruction information for adjusting the exposure time to the imaging unit 106 as exposure adjustment. The imaging unit 106 adjusts the exposure time in imaging according to the adjustment instruction information received from the light control unit 201.

また、調光部201は、解析部200から受信した解析結果が、輝度画像および視差画像に画像異常がないことが示されている場合、パターン投光部8に対する調光動作、および撮像部106に対する露光調整動作を停止する。ただし、解析部200は、輝度画像および視差画像に画像異常があるか否かの解析を継続し、調光部201は、解析部200からの解析結果の受信、およびパターン投光部8からの光量データの受信を継続する。   In addition, the dimming unit 201 performs the dimming operation on the pattern light projecting unit 8 and the imaging unit 106 when the analysis result received from the analyzing unit 200 indicates that there is no image abnormality in the luminance image and the parallax image. The exposure adjustment operation for is stopped. However, the analysis unit 200 continues the analysis of whether there is an image abnormality in the luminance image and the parallax image, and the dimming unit 201 receives the analysis result from the analysis unit 200 and receives from the pattern light projecting unit 8. Continue receiving light intensity data.

なお、調光部201は、露光調整として、撮像部106に対する露光時間を調整するものとしてが、これに限定されるものではない。例えば、調光部201は、露光調整として、複数種類の露光を撮像部106の撮像画像(フレーム)単位で変えることにより得られた複数のフレームを、単純に足し合わせたり、ガンマ処理等の画素値変換等を施した後に足し合わせるダイナミックレンジ拡大処理を実行するものとしてもよい。   In addition, although the light control part 201 adjusts the exposure time with respect to the imaging part 106 as exposure adjustment, it is not limited to this. For example, the light control unit 201 simply adds a plurality of frames obtained by changing a plurality of types of exposure in units of captured images (frames) of the imaging unit 106 as exposure adjustment, or performs pixel processing such as gamma processing. It is also possible to execute a dynamic range expansion process to be added after performing value conversion or the like.

図8に示すように、視差値導出システム15のパターン投光部8は、光量調整部300と、光源部301と、テクスチャフィルタ302と、レンズ303と、を備えている。   As shown in FIG. 8, the pattern light projecting unit 8 of the parallax value deriving system 15 includes a light amount adjusting unit 300, a light source unit 301, a texture filter 302, and a lens 303.

光量調整部300は、調光部201から受信した調整量を用いて、光源部301から発光される光の光量を調整する装置である。また、光量調整部300は、調光部201から受信した調整量を用いて、光源部301の光の光量を調整した後、光量データを調光部201に送信する。光源部301は、光量調整部300により調整された光量により光を発光する光源である。テクスチャフィルタ302は、光源部301から発光された光に特殊なパターンを帯びさせるためのフィルタである。テクスチャフィルタ302を透過した光源部301からの光は、パターン光としてレンズ303に向かう。レンズ303は、テクスチャフィルタ302を透過したパターン光が、被写体に対して拡散して照射されるように、パターン光を屈折させる光学素子である。   The light amount adjustment unit 300 is a device that adjusts the amount of light emitted from the light source unit 301 using the adjustment amount received from the light control unit 201. The light amount adjustment unit 300 adjusts the light amount of the light from the light source unit 301 using the adjustment amount received from the dimming unit 201, and then transmits the light amount data to the dimming unit 201. The light source unit 301 is a light source that emits light with the light amount adjusted by the light amount adjusting unit 300. The texture filter 302 is a filter for causing the light emitted from the light source unit 301 to have a special pattern. The light from the light source unit 301 that has passed through the texture filter 302 is directed to the lens 303 as pattern light. The lens 303 is an optical element that refracts the pattern light so that the pattern light transmitted through the texture filter 302 is diffused and applied to the subject.

なお、解析部200、調光部201および光量調整部300は、ハードウェア回路によって実現されるものとしたが、これに限定されるものではない。すなわち、解析部200、調光部201および光量調整部300の少なくともいずれかは、ソフトウェアであるプログラムがCPU等によって実行されることにより実現されてもよい。   In addition, although the analysis part 200, the light control part 201, and the light quantity adjustment part 300 shall be implement | achieved by the hardware circuit, it is not limited to this. That is, at least one of the analysis unit 200, the light control unit 201, and the light amount adjustment unit 300 may be realized by a program that is software executed by a CPU or the like.

また、図8に示した解析部200、調光部201および光量調整部300のハードウェア構成は、一例を示したものであって、このようなハードウェア構成に限定されるものではない。   Further, the hardware configurations of the analysis unit 200, the light control unit 201, and the light amount adjustment unit 300 illustrated in FIG. 8 are merely examples, and are not limited to such hardware configurations.

(ステレオカメラの機能ブロック構成および各機能ブロックの動作)
図11は、本実施の形態のステレオカメラの機能ブロックの構成の一例を示す図である。図12は、本実施の形態の搬送システムにおける被写体の視差、および背景の視差を説明する図である。図13は、本実施の形態におけるシフト量と合成コスト値との関係の一例を示す図である。図14は、パターン光を照射する場合および照射しない場合の合成コスト値のグラフを説明する図である。図15は、パラボラフィッティングによるサブピクセル推定を説明する図である。図16は、最小二乗法によるサブピクセル推定を説明する図である。図11〜16を参照しながら、本実施の形態に係るステレオカメラ2の機能ブロック構成および各機能ブロックの動作について説明する。
(Function block configuration of stereo camera and operation of each function block)
FIG. 11 is a diagram illustrating an example of a functional block configuration of the stereo camera according to the present embodiment. FIG. 12 is a diagram illustrating the parallax of the subject and the parallax of the background in the transport system according to the present embodiment. FIG. 13 is a diagram illustrating an example of the relationship between the shift amount and the synthesis cost value in the present embodiment. FIG. 14 is a diagram for explaining a graph of the synthesis cost value when the pattern light is irradiated and when the pattern light is not irradiated. FIG. 15 is a diagram for explaining subpixel estimation by parabolic fitting. FIG. 16 is a diagram for explaining subpixel estimation by the method of least squares. With reference to FIGS. 11 to 16, the functional block configuration of the stereo camera 2 according to the present embodiment and the operation of each functional block will be described.

図11に示すように、ステレオカメラ2は、撮像部3、4と、マッチング部5と、視差画像生成部6と、を備えている。   As shown in FIG. 11, the stereo camera 2 includes imaging units 3 and 4, a matching unit 5, and a parallax image generation unit 6.

また、撮像部3、4は、所定距離だけ離間した状態で固定され、それぞれが被写体を撮像して、アナログ形式の画像データを生成し、さらにデジタル形式の画像データに変換して輝度画像を生成する機能部である。撮像部3、4は、図8に示す撮像部106に相当するものである。   In addition, the imaging units 3 and 4 are fixed in a state where they are separated by a predetermined distance, and each captures an image of a subject, generates analog image data, and further converts it into digital image data to generate a luminance image. It is a functional part to do. The imaging units 3 and 4 correspond to the imaging unit 106 shown in FIG.

マッチング部5は、撮像部3、4により生成された輝度画像を、それぞれ基準画像および比較画像として、基準画像の基準画素に対する、比較画像における各画素の一致度であるコスト値Cを算出する機能部である。マッチング部5は、フィルタ部51、52と、コスト算出部53(第1の算出手段)と、を備えている。マッチング部5は、図8に示す画像処理部105により実現される。なお、撮像部3により生成された輝度画像を比較画像として、撮像部4により生成された輝度画像を基準画像としてもよい。   The matching unit 5 uses the luminance images generated by the imaging units 3 and 4 as the reference image and the comparison image, respectively, and calculates a cost value C that is the degree of coincidence of each pixel in the comparison image with respect to the reference pixel of the reference image. Part. The matching unit 5 includes filter units 51 and 52 and a cost calculation unit 53 (first calculation means). The matching unit 5 is realized by the image processing unit 105 shown in FIG. Note that the luminance image generated by the imaging unit 3 may be used as a comparative image, and the luminance image generated by the imaging unit 4 may be used as a reference image.

視差画像生成部6は、マッチング部5から受け取ったコスト値Cに用いて、視差画像を生成する機能部である。視差画像生成部6は、合成コスト算出部61(第2の算出手段)と、サブピクセル推定部62(導出手段)と、生成部63(生成手段)と、を備えている。視差画像生成部6は、図8に示す画像処理部105により実現される。   The parallax image generation unit 6 is a functional unit that generates a parallax image using the cost value C received from the matching unit 5. The parallax image generation unit 6 includes a synthesis cost calculation unit 61 (second calculation unit), a subpixel estimation unit 62 (derivation unit), and a generation unit 63 (generation unit). The parallax image generation unit 6 is realized by the image processing unit 105 illustrated in FIG.

フィルタ部51、52は、それぞれ撮像部3、4により生成された輝度画像に対して、ノイズを除去する機能部である。ここでは、フィルタ部51によりノイズが除去された輝度画像を基準画像Ibとするものとし、フィルタ部52によりノイズが除去された輝度画像を比較画像Iaとするものとする。   The filter units 51 and 52 are functional units that remove noise from the luminance images generated by the imaging units 3 and 4, respectively. Here, the luminance image from which noise has been removed by the filter unit 51 is referred to as a reference image Ib, and the luminance image from which noise has been removed by the filter unit 52 is referred to as a comparative image Ia.

コスト算出部53は、基準画像Ibにおける基準画素p(x,y)(第1の基準領域)の輝度値、および、基準画素p(x,y)に基づく比較画像Iaにおけるエピポーラ線上で、基準画素p(x,y)の位置に相当する画素からシフト量dでシフトすることにより特定される、対応画素(対応領域)の候補である候補画素q(x+d,y)の各輝度値に基づいて、各候補画素q(x+d,y)のコスト値C(p,d)(一致度)を算出する機能部である。コスト算出部53によるコスト値Cの算出方法としては、例えば、SAD(Sum of Absolute Difference)、SSD(Sum of Squared Difference)、またはNCC(Normalized Cross−Correlation)等を用いるものとすればよい。   The cost calculation unit 53 performs the reference on the epipolar line in the comparison image Ia based on the luminance value of the reference pixel p (x, y) (first reference region) in the reference image Ib and the reference pixel p (x, y). Based on each luminance value of the candidate pixel q (x + d, y), which is a candidate for the corresponding pixel (corresponding region), specified by shifting from the pixel corresponding to the position of the pixel p (x, y) by the shift amount d. The functional unit calculates the cost value C (p, d) (degree of coincidence) of each candidate pixel q (x + d, y). As a method for calculating the cost value C by the cost calculation unit 53, for example, SAD (Sum of Absolute Difference), SSD (Sum of Squared Difference), or NCC (Normalized Cross-Correlation) may be used.

また、図7に示す搬送システム1における部品20の搬送の場合、図12に示すように、ステレオカメラ2から背景部21までの距離は固定であるので、上述の式(2)により、背景部21を撮像した基準画像Ibおよび比較画像Iaにおける背景領域21aのポイント21bの視差値dp21は予め既知の情報である。したがって、コスト算出部53が、基準画素p(x,y)に対して、シフト量dによる候補画素q(x+d,y)の探索範囲は、所定の有限範囲に決めておくことができ、その探索範囲内でコスト値Cを算出することが可能である。これによって、予め候補画素qの探索範囲を決めておくことによって、基準画像Ibおよび比較画像Iaにおける部品領域20aの視差値dp20を精度よく導出することができ、かけ離れた視差値dp20の誤検出を抑制することができ、また、コスト算出部53の演算負荷を低減することができる。   Further, in the case of the transportation of the component 20 in the transportation system 1 shown in FIG. 7, the distance from the stereo camera 2 to the background portion 21 is fixed as shown in FIG. The parallax value dp21 of the point 21b of the background region 21a in the reference image Ib and the comparison image Ia obtained by capturing 21 is known information in advance. Therefore, the cost calculation unit 53 can determine a search range of the candidate pixel q (x + d, y) based on the shift amount d to a predetermined finite range with respect to the reference pixel p (x, y). It is possible to calculate the cost value C within the search range. Thus, by determining the search range of the candidate pixel q in advance, the parallax value dp20 of the component area 20a in the reference image Ib and the comparison image Ia can be derived with high accuracy, and erroneous detection of the disparity value dp20 that is far away can be performed. In addition, the calculation load on the cost calculation unit 53 can be reduced.

また、シフト量dと、コスト算出部53により算出されたコスト値Cとの関係を示すグラフの例が、上述した図4に示すグラフである。図4に示すグラフにおいては、シフト量d=5,12,19において、コスト値Cの最小値として近似した値となっているため、コスト値Cの最小値を求めることによって、基準画像Ibにおける基準画素に対応する比較画像Iaにおける対応画素を求めることは困難である。   Further, an example of a graph showing the relationship between the shift amount d and the cost value C calculated by the cost calculation unit 53 is the graph shown in FIG. 4 described above. In the graph shown in FIG. 4, since the shift value d = 5, 12, 19 is an approximate value as the minimum value of the cost value C, by obtaining the minimum value of the cost value C, the reference image Ib It is difficult to obtain a corresponding pixel in the comparison image Ia corresponding to the reference pixel.

合成コスト算出部61は、合成コスト値Ls(p,d)(一致度)を算出するために、まず、上述の式(3)によって、所定のr方向の経路コスト値Lr(p,d)を算出する機能部である。経路コスト値Lr(p,d)は、式(3)に示すように基準画像Ibにおける基準画素p(x,y)のr方向で隣接する画素を基準画素(第2の基準領域)とした場合のその基準画素についての比較画像Iaにおけるコスト値Cを、コスト算出部53により算出された候補画素q(x+d,y)のコスト値C(p,d)に集約させて算出される値である。   In order to calculate the combined cost value Ls (p, d) (degree of coincidence), the combined cost calculation unit 61 firstly calculates the route cost value Lr (p, d) in a predetermined r direction according to the above equation (3). Is a functional unit for calculating In the path cost value Lr (p, d), the pixel adjacent in the r direction of the reference pixel p (x, y) in the reference image Ib is set as the reference pixel (second reference region) as shown in the equation (3). The cost value C in the comparison image Ia for the reference pixel in the case is a value calculated by aggregating the cost value C (p, d) of the candidate pixel q (x + d, y) calculated by the cost calculation unit 53. is there.

合成コスト算出部61は、図5に示したように、8方向(r、r45、r90、r135、r180、r225、r270およびr315)の経路コスト値LrであるLr、Lr45、Lr90、Lr135、Lr180、Lr225、Lr270およびLr315を算出し、最終的に上述の式(4)に基づいて、合成コスト値Ls(p,d)を算出する。そして、シフト量dと、合成コスト算出部61により算出された合成コスト値Lsとの関係を示すグラフが、図13に示すグラフである。図13に示すように、合成コスト値Lsは、シフト量d=3のとき最小値となる。なお、上述の説明においては、r方向の数を8個として説明しているが、これに限定されるものではない。例えば、8方向をさらに2つに分割して16方向、または、3つに分割して24方向等にしてもよい。あるいは、8方向のうちのいずれかの経路コスト値Lrを求め、合成コスト値Lsを算出するものとしてもよい。 As illustrated in FIG. 5, the synthesis cost calculation unit 61 performs Lr which is a route cost value Lr in eight directions (r 0 , r 45 , r 90 , r 135 , r 180 , r 225 , r 270, and r 315 ). 0 , Lr 45 , Lr 90 , Lr 135 , Lr 180 , Lr 225 , Lr 270 and Lr 315 are calculated, and finally the synthesis cost value Ls (p, d) is calculated based on the above-described equation (4). To do. And the graph which shows the relationship between the shift amount d and the synthetic | combination cost value Ls calculated by the synthetic | combination cost calculation part 61 is a graph shown in FIG. As shown in FIG. 13, the combined cost value Ls becomes the minimum value when the shift amount d = 3. In the above description, the number in the r direction is eight, but the present invention is not limited to this. For example, the eight directions may be further divided into two to be 16 directions, or may be divided into three to be 24 directions. Or it is good also as what calculates | requires the path | route cost value Lr in any of eight directions, and calculates the synthetic | combination cost value Ls.

また、図14に示すシフト量dと合成コスト値Lsとの関係を示すグラフは、パターン投光部8が部品20にパターン光を照射してテクスチャを形成した場合のグラフと、パターン光を照射しないでテクスチャを形成しなかった場合のグラフである。図14のテクスチャを形成しない場合のグラフでは、最小の合成コスト値Lsに対応する視差値dp1が得られているが、視差値dp1における合成コスト値Ls以外の合成コスト値Lsについても近似しており、明確な視差値を得られるとまでは言えない。一方、図14のテクスチャを形成した場合のグラフでは、算出される合成コスト値Lsのコントラストが大きくなり、最小の合成コスト値Lsが明確となるので、精度よく視差値dpを得ることができることになる。   Further, the graph showing the relationship between the shift amount d and the synthesis cost value Ls shown in FIG. 14 is a graph in the case where the pattern projecting unit 8 irradiates the component 20 with pattern light and forms a texture, and the pattern light is irradiated. It is a graph at the time of not forming a texture without doing. In the graph when the texture is not formed in FIG. 14, the parallax value dp1 corresponding to the minimum synthesis cost value Ls is obtained. However, the synthesis cost value Ls other than the synthesis cost value Ls in the parallax value dp1 is also approximated. Therefore, it cannot be said that a clear parallax value can be obtained. On the other hand, in the graph when the texture of FIG. 14 is formed, the contrast of the calculated synthesis cost value Ls becomes large and the minimum synthesis cost value Ls becomes clear, so that the parallax value dp can be obtained with high accuracy. Become.

サブピクセル推定部62は、合成コスト算出部61により算出された、基準画像Ibにおける基準画素についての比較画像Iaにおける画素の合成コスト値Lsの最小値に対応するシフト量d、およびそれに隣接するシフト量dにおける合成コスト値Lsに基づいて、サブピクセル推定を実行する。上述の図13に示す合成コスト値Lsのグラフは、画素単位のシフト量dに対する合成コスト値Lsのグラフである。したがって、図13に示すグラフの合成コスト値Lsの最小値は、画素単位のシフト量d=3における合成コスト値Lsということになる。すなわち、図13に示すような画素単位のシフト量dに対する合成コスト値Lsのグラフにおいては、視差値dpとして画素単位の値を導出することしかできないことになる。ここで、サブピクセル推定とは、視差値dpを画素単位の値ではなく、画素単位より小さい単位(以下、サブピクセル単位という)で視差値dpを推定して導出するものである。この視差値dpによって、対応する画素の被写体までの距離が上述の式(2)から算出できる。すなわち、視差値dpは、被写体までの距離の指標値となる。   The sub-pixel estimation unit 62 calculates the shift amount d corresponding to the minimum value of the combined cost value Ls of the pixels in the comparison image Ia for the reference pixel in the reference image Ib calculated by the combined cost calculating unit 61, and the shift adjacent thereto. Sub-pixel estimation is performed based on the combined cost value Ls in the quantity d. The graph of the synthesis cost value Ls shown in FIG. 13 is a graph of the synthesis cost value Ls with respect to the shift amount d in pixel units. Therefore, the minimum value of the synthesis cost value Ls in the graph shown in FIG. 13 is the synthesis cost value Ls at the shift amount d = 3 in pixel units. That is, in the graph of the synthesis cost value Ls with respect to the shift amount d in pixel units as shown in FIG. 13, it is only possible to derive a value in pixel units as the parallax value dp. Here, sub-pixel estimation is to derive the parallax value dp by estimating the parallax value dp in units smaller than the pixel unit (hereinafter referred to as sub-pixel unit) instead of the pixel unit value. From this parallax value dp, the distance to the subject of the corresponding pixel can be calculated from the above-described equation (2). That is, the parallax value dp is an index value of the distance to the subject.

まず、図15を参照しながら、サブピクセル推定部62がパラボラフィッティングによるサブピクセル推定を実行する場合について説明する。サブピクセル推定部62は、合成コスト算出部61によって算出された合成コスト値Lsのグラフ(図13参照)において、合成コスト値Lsが最小となるシフト量dの値を求める。図13の例では、シフト量d=3の場合が、合成コスト値Lsが最小となる。次に、サブピクセル推定部62は、シフト量d=3に隣接するシフト量dを求める。具体的には、シフト量d=2,4である。次に、サブピクセル推定部62は、図13に示すシフト量dと合成コスト値Lsとのグラフにおいて、図15に示すように、シフト量d=2,3,4である3点を通る下に凸の2次曲線を求める。そして、サブピクセル推定部62は、その2次曲線の極小値(極値)に対応するサブピクセル単位のシフト量dが視差値dpであると推定する。   First, a case where the subpixel estimation unit 62 performs subpixel estimation by parabolic fitting will be described with reference to FIG. The sub-pixel estimation unit 62 obtains the value of the shift amount d that minimizes the combined cost value Ls in the graph of the combined cost value Ls calculated by the combined cost calculating unit 61 (see FIG. 13). In the example of FIG. 13, the combined cost value Ls is minimum when the shift amount d = 3. Next, the subpixel estimation unit 62 obtains a shift amount d adjacent to the shift amount d = 3. Specifically, the shift amount d = 2,4. Next, in the graph of the shift amount d and the combined cost value Ls shown in FIG. 13, the sub-pixel estimation unit 62 passes through the three points where the shift amount d = 2, 3, and 4 as shown in FIG. A convex quadratic curve is obtained. Then, the subpixel estimation unit 62 estimates that the shift amount d in subpixel units corresponding to the minimum value (extreme value) of the quadratic curve is the parallax value dp.

次に、図16を参照しながら、サブピクセル推定部62が最小二乗法によるサブピクセル推定を実行する場合について説明する。サブピクセル推定部62は、合成コスト算出部61によって算出された合成コスト値Lsのグラフ(図13参照)において、合成コスト値Lsが最小となるシフト量dの値を求める。図13の例では、シフト量d=3の場合が、合成コスト値Lsが最小となる。次に、サブピクセル推定部62は、シフト量d=3の近傍の4つのシフト量dを求める。具体的には、シフト量d=1,2,4,5である。次に、サブピクセル推定部62は、図13に示すシフト量dと合成コスト値Lsとのグラフにおいて、図16に示すように、最小二乗法によってシフト量d=1,2,3,4,5である5点の近傍を通る下に凸の2次曲線を求める。そして、サブピクセル推定部62は、その2次曲線の極小値(極値)に対応するサブピクセル単位のシフト量dが視差値dpであると推定する。   Next, a case where the subpixel estimation unit 62 performs subpixel estimation by the least square method will be described with reference to FIG. The sub-pixel estimation unit 62 obtains the value of the shift amount d that minimizes the combined cost value Ls in the graph of the combined cost value Ls calculated by the combined cost calculating unit 61 (see FIG. 13). In the example of FIG. 13, the combined cost value Ls is minimum when the shift amount d = 3. Next, the sub-pixel estimation unit 62 obtains four shift amounts d in the vicinity of the shift amount d = 3. Specifically, the shift amount d = 1, 2, 4, 5. Next, as shown in FIG. 16, in the graph of the shift amount d and the combined cost value Ls shown in FIG. 13, the subpixel estimation unit 62 uses the least square method to shift the amount d = 1, 2, 3, 4, and so on. A convex quadratic curve passing through the vicinity of 5 points, which is 5, is obtained. Then, the subpixel estimation unit 62 estimates that the shift amount d in subpixel units corresponding to the minimum value (extreme value) of the quadratic curve is the parallax value dp.

サブピクセル推定部62は、図15に示すパラボラフィッティングによるサブピクセル推定、または、図16に示す最小二乗法によるサブピクセル推定のいずれかによって、視差値dpを推定して導出する。これによって、画素単位より小さい単位であるサブピクセル単位で視差値dpを導出することができるので、精度が高く、かつ密な視差値dpを導出することができる。   The subpixel estimation unit 62 estimates and derives the parallax value dp by either subpixel estimation by parabolic fitting shown in FIG. 15 or subpixel estimation by the least square method shown in FIG. As a result, the parallax value dp can be derived in units of sub-pixels, which is a unit smaller than the pixel unit, so that it is possible to derive a precise and dense parallax value dp.

なお、サブピクセル推定は、上述のパラボラフィッティングによるもの、または、最小二乗法によるものに限定されるものではなく、その他の方法によってサブピクセル推定を行うものとしてもよい。例えば、サブピクセル推定部62は、図15に示す3点を用いて、2次曲線ではなく、3点を通る等角直線を求めて視差値dpを推定する等角直線フィッティングによりサブピクセル推定を実行するものとしてもよい。   The sub-pixel estimation is not limited to the above-described parabolic fitting or the least-square method, and the sub-pixel estimation may be performed by other methods. For example, the sub-pixel estimation unit 62 uses the three points shown in FIG. 15 to perform sub-pixel estimation by equiangular straight fitting that estimates the disparity value dp by obtaining a conformal straight line that passes through the three points instead of the quadratic curve. It may be executed.

また、最小二乗法によるサブピクセル推定において、図16に示すグラフ上の5点を用いて2次曲線を求めるものとしたが、これに限定されるものではなく、異なる数の点を用いて2次曲線を求めるものとしてもよい。   Further, in the subpixel estimation by the least square method, the quadratic curve is obtained using the five points on the graph shown in FIG. 16, but the present invention is not limited to this. A quadratic curve may be obtained.

また、サブピクセル推定部62によるサブピクセル推定によってサブピクセル単位の視差値dpを算出することに限定されるものではなく、サブピクセル推定の実行はせずに、画素単位の視差値dpを算出するものとしてもよい。この場合、サブピクセル推定部62は、合成コスト算出部61により算出された、基準画像Ibにおける基準画素についての比較画像Iaにおける画素の合成コスト値Lsの最小値に対応するシフト量dを視差値dpとすればよい。   The subpixel estimation by the subpixel estimation unit 62 is not limited to calculating the parallax value dp in units of subpixels, and the parallax value dp in units of pixels is calculated without performing subpixel estimation. It may be a thing. In this case, the sub-pixel estimation unit 62 calculates the shift amount d corresponding to the minimum value of the combined cost value Ls of the pixels in the comparison image Ia for the reference pixel in the reference image Ib calculated by the combined cost calculating unit 61 as the parallax value. dp may be used.

また、コスト算出部53が算出するコスト値C、および合成コスト算出部61が算出する合成コスト値Lsとして、値が小さいほど、比較画像Iaにおける画素が基準画像Ibの基準画素と類似する評価値を用いているが、これに限定されるものではなく、値が大きいほど類似する評価値を用いてもよい。この場合、上述のサブピクセル推定部62が求めた2次曲線では、その極大値に対応するサブピクセル単位のシフト量dが視差値dpであるものとすればよい。   Further, as the cost value C calculated by the cost calculation unit 53 and the synthesis cost value Ls calculated by the synthesis cost calculation unit 61, the smaller the value, the more similar the evaluation value the pixel in the comparison image Ia is to the reference pixel in the reference image Ib. However, the present invention is not limited to this, and a similar evaluation value may be used as the value increases. In this case, in the quadratic curve obtained by the subpixel estimation unit 62 described above, the shift amount d in subpixel units corresponding to the local maximum value may be the parallax value dp.

生成部63は、サブピクセル推定部62により導出されたサブピクセル単位の視差値dpに基づいて、基準画像Ibの各画素の輝度値を、その画素に対応する視差値dpで表した画像である視差画像Ip(高密度視差画像)を生成する機能部である。なお、この視差画像Ip(距離情報に基づく画像)は、視差値dpではなく、視差値dpから算出された距離情報で表した画像であってもよい。   The generation unit 63 is an image in which the luminance value of each pixel of the reference image Ib is represented by a parallax value dp corresponding to the pixel based on the sub-pixel unit parallax value dp derived by the sub-pixel estimation unit 62. This is a functional unit that generates a parallax image Ip (high-density parallax image). The parallax image Ip (image based on distance information) may be an image represented by distance information calculated from the parallax value dp instead of the parallax value dp.

なお、コスト算出部53、合成コスト算出部61、サブピクセル推定部62および生成部63は、ハードウェア回路によって実現されるものとしたが、これに限定されるものではない。すなわち、コスト算出部53、合成コスト算出部61、サブピクセル推定部62および生成部63の少なくともいずれかは、ソフトウェアであるプログラムがCPU100によって実行されることにより実現されてもよい。   In addition, although the cost calculation part 53, the synthetic | combination cost calculation part 61, the subpixel estimation part 62, and the production | generation part 63 shall be implement | achieved by the hardware circuit, it is not limited to this. That is, at least one of the cost calculation unit 53, the synthesis cost calculation unit 61, the sub-pixel estimation unit 62, and the generation unit 63 may be realized by the CPU 100 executing a program that is software.

また、図11に示したフィルタ部51、フィルタ部52、コスト算出部53、合成コスト算出部61、サブピクセル推定部62および生成部63のブロック構成は、機能を概念的に示したものであって、このようなブロック構成に限定されるものではない。   Further, the block configurations of the filter unit 51, the filter unit 52, the cost calculation unit 53, the synthesis cost calculation unit 61, the subpixel estimation unit 62, and the generation unit 63 illustrated in FIG. 11 conceptually illustrate functions. Thus, the present invention is not limited to such a block configuration.

(搬送システムの全体動作)
図17は、本実施の形態の搬送システムの動作の一例を示すフローチャートである。図17を参照しながら、本実施の形態に係る視差値導出システム15のステレオマッチング処理(SGM法)に基づく画像処理を含む搬送システム1の全体的な動作について説明する。
(Overall operation of transport system)
FIG. 17 is a flowchart illustrating an example of the operation of the transport system according to the present embodiment. The overall operation of the transport system 1 including image processing based on the stereo matching processing (SGM method) of the disparity value deriving system 15 according to the present embodiment will be described with reference to FIG.

<ステップS11>
図1に示すように、台である背景部21に部品20が設置されているものとする。部品20は、搬送システム1の前工程の設備から背景部21に設置された場合を想定してもよく、作業者によって背景部21に設置された場合を想定してもよい。そして、ステップS12へ移行する。
<Step S11>
As shown in FIG. 1, it is assumed that a component 20 is installed on a background portion 21 that is a table. The part 20 may be assumed to be installed in the background part 21 from the equipment in the previous process of the transport system 1 or may be assumed to be installed in the background part 21 by the operator. Then, the process proceeds to step S12.

<ステップS12>
視差値導出システム15のパターン投光部8は、背景部21に設置された部品20に対して、特殊なパターンを有するパターン光を照射する。これによって、部品20および背景部21の表面にテクスチャが形成される。そして、ステップS13へ移行する。
<Step S12>
The pattern light projecting unit 8 of the parallax value deriving system 15 irradiates the component 20 installed on the background unit 21 with pattern light having a special pattern. Thereby, a texture is formed on the surfaces of the component 20 and the background portion 21. Then, the process proceeds to step S13.

<ステップS13>
ステレオカメラ2の撮像部3、4は、それぞれ被写体を撮像して、アナログ形式の画像データを生成し、さらにデジタル形式の画像データに変換して輝度画像を生成する。ステレオカメラ2のマッチング部5のフィルタ部51は、撮像部3(撮像手段、第1の撮像手段)により生成された輝度画像に対して、ノイズを除去し、基準画像Ibを出力する。ステレオカメラ2のマッチング部5のフィルタ部52は、撮像部4(撮像手段、第2の撮像手段)により生成された輝度画像に対して、ノイズを除去し、比較画像Iaを出力する。そして、ステップS14へ移行する。
<Step S13>
The imaging units 3 and 4 of the stereo camera 2 respectively image a subject to generate analog image data, and further convert the image data to digital image data to generate a luminance image. The filter unit 51 of the matching unit 5 of the stereo camera 2 removes noise from the luminance image generated by the imaging unit 3 (imaging unit, first imaging unit) and outputs a reference image Ib. The filter unit 52 of the matching unit 5 of the stereo camera 2 removes noise from the luminance image generated by the imaging unit 4 (imaging unit, second imaging unit), and outputs a comparison image Ia. Then, the process proceeds to step S14.

<ステップS14>
ステレオカメラ2のマッチング部5のコスト算出部53は、基準画像Ibにおける基準画素p(x,y)の輝度値、および、基準画素p(x,y)に基づく比較画像Iaにおけるエピポーラ線上で、基準画素p(x,y)の位置に相当する画素からシフト量dでシフトすることにより特定される、対応画素の候補である候補画素q(x+d,y)の各輝度値に基づいて、各候補画素q(x+d,y)のコスト値C(p,d)を算出する。上述のように、ステレオカメラ2から背景部21までの距離は固定であるので、コスト算出部53は、シフト量dによる候補画素q(x+d,y)のコスト値Cを算出する探索範囲は、所定の有限範囲とすればよい。
<Step S14>
The cost calculation unit 53 of the matching unit 5 of the stereo camera 2 performs the luminance value of the reference pixel p (x, y) in the reference image Ib and the epipolar line in the comparison image Ia based on the reference pixel p (x, y). Based on each luminance value of the candidate pixel q (x + d, y), which is a candidate for the corresponding pixel, specified by shifting from the pixel corresponding to the position of the reference pixel p (x, y) by the shift amount d, The cost value C (p, d) of the candidate pixel q (x + d, y) is calculated. As described above, since the distance from the stereo camera 2 to the background portion 21 is fixed, the search range in which the cost calculation unit 53 calculates the cost value C of the candidate pixel q (x + d, y) based on the shift amount d is A predetermined finite range may be used.

ステレオカメラ2の視差画像生成部6の合成コスト算出部61は、上述の式(3)により、基準画像Ibにおける基準画素p(x,y)のr方向で隣接する画素を基準画素とした場合のその基準画素についての比較画像Iaにおけるコスト値Cを、コスト算出部53により算出された候補画素q(x+d,y)のコスト値C(p,d)に集約させて算出される経路コスト値Lr(p,d)を算出する。合成コスト算出部61は、図5に示したように、8方向(r、r45、r90、r135、r180、r225、r270およびr315)の経路コスト値LrであるLr、Lr45、Lr90、Lr135、Lr180、Lr225、Lr270およびLr315を算出し、最終的に上述の式(4)に基づいて、合成コスト値Ls(p,d)を算出する。そして、ステップS15へ移行する。 When the synthesis cost calculation unit 61 of the parallax image generation unit 6 of the stereo camera 2 uses, as the reference pixel, a pixel adjacent in the r direction of the reference pixel p (x, y) in the reference image Ib according to the above-described equation (3). The cost value C in the comparison image Ia for the reference pixel is calculated by aggregating the cost value C (p, d) of the candidate pixel q (x + d, y) calculated by the cost calculation unit 53. Lr (p, d) is calculated. As illustrated in FIG. 5, the synthesis cost calculation unit 61 performs Lr which is a route cost value Lr in eight directions (r 0 , r 45 , r 90 , r 135 , r 180 , r 225 , r 270, and r 315 ). 0 , Lr 45 , Lr 90 , Lr 135 , Lr 180 , Lr 225 , Lr 270 and Lr 315 are calculated, and finally the synthesis cost value Ls (p, d) is calculated based on the above-described equation (4). To do. Then, the process proceeds to step S15.

<ステップS15>
ステレオカメラ2の視差画像生成部6のサブピクセル推定部62は、合成コスト算出部61により算出された、基準画像Ibにおける基準画素についての比較画像Iaにおける画素の合成コスト値Lsの最小値に対応するシフト量d、およびそれに隣接するシフト量dにおける合成コスト値Lsに基づいて、サブピクセル推定を実行する。サブピクセル推定部62は、サブピクセル推定によって求めた近似曲線(図15および図16においては下に凸の2次曲線)の極小値に対応するサブピクセル単位のシフト量dを視差値dpであると推定して視差値dpを導出する。
<Step S15>
The sub-pixel estimation unit 62 of the parallax image generation unit 6 of the stereo camera 2 corresponds to the minimum value of the pixel synthesis cost value Ls in the comparison image Ia calculated by the synthesis cost calculation unit 61 for the reference pixel in the reference image Ib. Sub-pixel estimation is executed based on the combined cost value Ls of the shift amount d to be performed and the shift amount d adjacent thereto. The sub-pixel estimation unit 62 uses the shift amount d in sub-pixel units corresponding to the minimum value of the approximate curve obtained by the sub-pixel estimation (a downwardly convex quadratic curve in FIGS. 15 and 16) as the parallax value dp. And the parallax value dp is derived.

ステレオカメラ2の視差画像生成部6の生成部63は、サブピクセル推定部62により導出されたサブピクセル単位の視差値dpに基づいて、基準画像Ibの各画素の輝度値を、その画素に対応する視差値dpで表した画像である視差画像Ip(高密度視差画像)を生成する。ステレオカメラ2は、撮像部3または撮像部4から出力された輝度画像、および生成部63により生成された視差画像Ipを出力する。そして、ステップS16へ移行する。   The generation unit 63 of the parallax image generation unit 6 of the stereo camera 2 corresponds to the luminance value of each pixel of the reference image Ib based on the sub-pixel unit parallax value dp derived by the sub-pixel estimation unit 62. A parallax image Ip (high-density parallax image) that is an image represented by the parallax value dp to be generated is generated. The stereo camera 2 outputs the luminance image output from the imaging unit 3 or the imaging unit 4 and the parallax image Ip generated by the generation unit 63. Then, the process proceeds to step S16.

<ステップS16>
調光制御部9の解析部200は、ステレオカメラ2から受信した輝度画像または視差画像Ipについて画像異常があるか否かを解析する。解析の結果、画像異常がある場合(ステップS16:Yes)、ステップS17へ移行し、画像異常がない場合(ステップS16:No)、ステップS18へ移行する。
<Step S16>
The analysis unit 200 of the dimming control unit 9 analyzes whether there is an image abnormality in the luminance image or the parallax image Ip received from the stereo camera 2. As a result of the analysis, if there is an image abnormality (step S16: Yes), the process proceeds to step S17. If there is no image abnormality (step S16: No), the process proceeds to step S18.

<ステップS17>
解析部200により輝度画像または視差画像Ipに画像異常があると判定された場合、調光制御部9は、パターン投光部8が部品20に照射するパターン光に対して調光制御を実行する。調光制御の詳細については、図18において後述する。調光制御部9による調光制御の実行後、ステップS13へ戻る。
<Step S17>
When the analysis unit 200 determines that there is an image abnormality in the luminance image or the parallax image Ip, the dimming control unit 9 performs dimming control on the pattern light that the pattern light projecting unit 8 irradiates the component 20. . Details of the light control will be described later with reference to FIG. After executing the dimming control by the dimming control unit 9, the process returns to step S13.

<ステップS18>
解析部200により輝度画像または視差画像Ipに画像異常がないと判定された場合、認識処理部7は、ステレオカメラ2が出力する輝度画像および視差画像に基づいて、ステレオカメラ2により撮像された部品20の形状、位置および距離等を認識する。そして、ステップS19へ移行する。
<Step S18>
When the analysis unit 200 determines that there is no image abnormality in the luminance image or the parallax image Ip, the recognition processing unit 7 is a component imaged by the stereo camera 2 based on the luminance image and the parallax image output from the stereo camera 2. Recognize 20 shapes, positions and distances. Then, the process proceeds to step S19.

<ステップS19>
アーム制御部10は、認識処理部7による部品20に対する認識結果に基づいて、多関節ロボット等であるアーム11に対して、部品20を把持させ、搬送先に搬送させる制御を行う。
<Step S19>
Based on the recognition result of the component 20 by the recognition processing unit 7, the arm control unit 10 controls the arm 11, such as an articulated robot, to grip the component 20 and transport it to the transport destination.

以上のような動作によって、視差値導出システム15のステレオマッチング処理(SGM法)に基づく画像処理を含む搬送システム1の全体的な動作が行われる。   The overall operation of the transport system 1 including image processing based on the stereo matching processing (SGM method) of the parallax value derivation system 15 is performed by the operation as described above.

(調光制御)
図18は、本実施の形態の調光制御の動作の一例を示すフローチャートである。図18を参照しながら、調光制御部9によるパターン投光部8に対する調光制御について説明する。
(Dimming control)
FIG. 18 is a flowchart illustrating an example of the operation of the light control according to the present embodiment. The dimming control for the pattern light projecting unit 8 by the dimming control unit 9 will be described with reference to FIG.

上述のように、調光制御部9は、解析部200により輝度画像または視差画像Ipに画像異常があると判定された場合、パターン投光部8が部品20に照射するパターン光に対して調光制御を実行する。この場合、調光制御部9は、後述のように、図18に示すステップS171、S172およびS173において、ステレオカメラ2から受信した輝度画像について画像異常の有無を解析する。また、調光制御部9は、図18に示すステップS174において、ステレオカメラ2から受信した視差画像Ipについて画像異常の有無を解析する。   As described above, the light adjustment control unit 9 adjusts the pattern light emitted from the pattern light projecting unit 8 to the component 20 when the analysis unit 200 determines that the luminance image or the parallax image Ip has an image abnormality. Perform light control. In this case, as will be described later, the dimming control unit 9 analyzes the presence or absence of an image abnormality in the luminance image received from the stereo camera 2 in steps S171, S172, and S173 shown in FIG. Further, the dimming control unit 9 analyzes the presence / absence of an image abnormality in the parallax image Ip received from the stereo camera 2 in step S174 shown in FIG.

<ステップS171>
調光制御部9の解析部200は、ステレオカメラ2から受信した輝度画像から、被写体の周囲の背景部における黒潰れ状態または飽和状態の領域の有無を解析する。背景部において黒潰れ状態または飽和状態の領域がある場合(ステップS171:Yes)、ステップS175へ移行し、ない場合(ステップS171:No)、ステップS172へ移行する。
<Step S171>
The analysis unit 200 of the dimming control unit 9 analyzes the presence or absence of a blackened state or a saturated region in the background portion around the subject from the luminance image received from the stereo camera 2. If there is a blackened or saturated region in the background (step S171: Yes), the process proceeds to step S175, and if not (step S171: No), the process proceeds to step S172.

<ステップS172>
解析部200は、ステレオカメラ2から受信した輝度画像から、被写体における黒潰れ状態または飽和状態の領域の有無を解析する。被写体において黒潰れ状態または飽和状態の領域がある場合(ステップS172:Yes)、ステップS175へ移行し、ない場合(ステップS172:No)、ステップS173へ移行する。
<Step S172>
The analysis unit 200 analyzes the presence or absence of a blackened state or a saturated region in the subject from the luminance image received from the stereo camera 2. When there is a blackened area or a saturated area in the subject (step S172: Yes), the process proceeds to step S175, and when there is no area (step S172: No), the process proceeds to step S173.

<ステップS173>
解析部200は、ステレオカメラ2から受信した輝度画像において、テクスチャが適正に形成されているか否か、すなわちテクスチャにぼやけが生じていないか否かを解析する。テクスチャにぼやけが生じている場合(ステップS173:Yes)、ステップS177へ移行し、生じていない場合(ステップS173:No)、解析部200は、輝度画像に画像異常がないと判定する。
<Step S173>
The analysis unit 200 analyzes whether or not the texture is properly formed in the luminance image received from the stereo camera 2, that is, whether or not the texture is blurred. If the texture is blurred (step S173: Yes), the process proceeds to step S177, and if not (step S173: No), the analysis unit 200 determines that there is no image abnormality in the luminance image.

<ステップS174>
解析部200は、ステレオカメラ2から受信した視差画像Ipから、被写体または背景部における、パターン投光部8が照射するパターン光の照り返しに伴う視差値の不連続領域の有無を解析する。視差値の不連続領域がある場合(ステップS174:Yes)、ステップS175へ進み、ない場合(ステップS174:No)、解析部200は、視差画像に画像異常がないと判定する。
<Step S174>
The analysis unit 200 analyzes from the parallax image Ip received from the stereo camera 2 whether or not there is a discontinuous region of the parallax value associated with the reflection of the pattern light emitted from the pattern light projecting unit 8 in the subject or background. When there is a discontinuous region with a parallax value (step S174: Yes), the process proceeds to step S175, and when there is no disparity value (step S174: No), the analysis unit 200 determines that there is no image abnormality in the parallax image.

<ステップS175>
解析部200は、輝度画像に黒潰れ状態もしくは飽和状態が発生し、または、視差画像に視差値の不連続領域が発生している等の画像異常が発生している旨の解析結果を調光部201に送る。調光部201は、解析部200から受け取った解析結果が示す画像異常の内容に応じた調整量をパターン投光部8に送信する。具体的には、調光部201は、画像異常の内容と、パターン投光部8の光量に対する調整量とを関連付けた光量調整テーブルから、画像異常の内容に応じた調整量を決定してパターン投光部8に送信する。パターン投光部8の光量調整部300は、調光部201から受信した調整量を用いて、光源部301から発光される光の光量を調整する。光源部301から発光された光は、テクスチャフィルタ302およびレンズ303を透過してパターン光として被写体に照射される。そして、ステップS176へ移行する。
<Step S175>
The analysis unit 200 dimmes an analysis result indicating that an image abnormality such as a blackened state or a saturated state occurs in the luminance image or a discontinuous region of the parallax value occurs in the parallax image. Send to part 201. The light control unit 201 transmits an adjustment amount according to the content of the image abnormality indicated by the analysis result received from the analysis unit 200 to the pattern light projecting unit 8. Specifically, the light control unit 201 determines an adjustment amount according to the content of the image abnormality from the light amount adjustment table in which the content of the image abnormality and the adjustment amount for the light amount of the pattern light projecting unit 8 are associated with each other. Transmit to the light projecting unit 8. The light amount adjustment unit 300 of the pattern light projecting unit 8 adjusts the amount of light emitted from the light source unit 301 using the adjustment amount received from the light control unit 201. The light emitted from the light source unit 301 passes through the texture filter 302 and the lens 303 and is irradiated to the subject as pattern light. Then, control goes to a step S176.

<ステップS176>
調光部201は、調整量をパターン投光部8の光量調整部300に送信することによりパターン光の調光を実行した後、光量調整部300から光量データを受信する。調光部201は、パターン投光部8から受信した光量データから、調光限界に達したか否か、すなわち、調光がこれ以上できないか否かを判定する。調光限界に達した場合(ステップS176:Yes)、ステップS177へ移行し、達していない場合(ステップS176:No)、調光部201は、パターン投光部8に対する調光がまだ可能であると認識する。
<Step S176>
The light control unit 201 performs light control of the pattern light by transmitting the adjustment amount to the light amount adjustment unit 300 of the pattern light projecting unit 8, and then receives light amount data from the light amount adjustment unit 300. The light control unit 201 determines from the light amount data received from the pattern light projecting unit 8 whether or not the light control limit has been reached, that is, whether or not light control can be performed any more. When the light control limit has been reached (step S176: Yes), the process proceeds to step S177. When the light control limit has not been reached (step S176: No), the light control unit 201 can still perform light control on the pattern light projecting unit 8. Recognize.

<ステップS177>
調光部201は、パターン投光部8から受信した光量データから、調光限界に達した、すなわち、調光がこれ以上できないと判定した場合、または、解析部200から受信した解析結果から、輝度画像のテクスチャにぼやけが生じている画像異常が発生していると判定した場合、露光調整を実行する。具体的には、調光部201は、露光調整として、撮像部106に対し露光時間を調整するための調整指示情報を送信する。撮像部106は、調光部201から受信した調整指示情報に従って、撮像における露光時間を調整する。
<Step S177>
The light control unit 201 has reached the light control limit from the light amount data received from the pattern light projecting unit 8, that is, when it is determined that light control cannot be performed any more, or from the analysis result received from the analysis unit 200, When it is determined that an image abnormality in which the texture of the luminance image is blurred has occurred, exposure adjustment is executed. Specifically, the light control unit 201 transmits adjustment instruction information for adjusting the exposure time to the imaging unit 106 as exposure adjustment. The imaging unit 106 adjusts the exposure time in imaging according to the adjustment instruction information received from the light control unit 201.

以上のような一連の動作において、輝度画像および視差画像のいずれにも画像異常がなく、または、輝度画像または視差画像の少なくともいずれかに画像異常が発生し、調光動作が行われても調光限界に達しない場合、もしくは、露光調整動作が実行された場合に、調光制御を終了する。   In a series of operations as described above, there is no image abnormality in either the luminance image or the parallax image, or an image abnormality occurs in at least one of the luminance image or the parallax image, and the dimming operation is performed. When the light limit is not reached, or when the exposure adjustment operation is executed, the light control is terminated.

以上のように、パターン投光部8は、被写体に対して、特殊なパターンを有するパターン光を照射し、撮像部3、4は、それぞれ被写体を撮像して輝度画像(基準画像Ib、比較画像Ia)を生成し、ステレオカメラ2は、基準画像Ibおよび比較画像Iaからステレオマッチング処理によって視差値dpを導出し、視差値dpにより視差画像Ipを生成している。そして、解析部200は、輝度画像または視差画像Ipについて画像異常があるか否かを解析し、画像異常があると判定した場合、調光制御部9は、パターン投光部8が照射するパターン光に対して調光制御を実行するものとしている。これによって、パターン光を照射した状態で被写体が撮像された輝度画像、およびそれに基づく視差画像に画像異常が発生しても、照射するパターン光を調光制御によって、画像異常を解消した状態で再度被写体を撮像することができる。よって、ステレオマッチング処理によって高精度な視差値を導出することができる。よって、被写体の認識精度を向上させることができる。   As described above, the pattern projecting unit 8 irradiates the subject with pattern light having a special pattern, and the imaging units 3 and 4 respectively capture the subject and display luminance images (reference image Ib, comparison image). Ia) is generated, and the stereo camera 2 derives the parallax value dp from the reference image Ib and the comparison image Ia by stereo matching processing, and generates the parallax image Ip from the parallax value dp. Then, the analysis unit 200 analyzes whether or not there is an image abnormality for the luminance image or the parallax image Ip, and when it is determined that there is an image abnormality, the dimming control unit 9 performs the pattern irradiated by the pattern light projecting unit 8. Dimming control is performed on the light. As a result, even if an image abnormality occurs in the luminance image obtained by illuminating the pattern light and the parallax image based on the luminance image, the pattern light to be irradiated is again controlled in the state in which the image abnormality is eliminated by dimming control. The subject can be imaged. Therefore, a highly accurate parallax value can be derived by stereo matching processing. Therefore, the recognition accuracy of the subject can be improved.

上述の調光制御として、具体的には、解析部200は、輝度画像において黒潰れ状態または飽和状態の領域があることを検知し、または、視差画像においてパターン光の照り返しに伴う視差値の不連続領域があることを検知した場合、調光部201は、パターン投光部8に対して調光動作を実行する。また、解析部200は、調光動作の結果、パターン投光部8から受信した光量データから、調光限界に達した場合、または、解析部200から受信した解析結果から、輝度画像にテクスチャが適正に形成されていない画像異常が発生していると判定した場合、露光調整を実行する。このような動作によって、輝度画像および視差画像の画像異常を解消または低減することができ、高精度な視差値の導出に寄与することができる。   Specifically, as the above-described dimming control, the analysis unit 200 detects that there is a blackened state or a saturated region in the luminance image, or the parallax value in the parallax image does not reflect the reflection of pattern light. When it is detected that there is a continuous area, the dimming unit 201 performs a dimming operation on the pattern light projecting unit 8. Further, the analysis unit 200 has a texture on the luminance image when the light control limit is reached from the light amount data received from the pattern light projecting unit 8 as a result of the dimming operation or from the analysis result received from the analysis unit 200. When it is determined that an image abnormality that is not properly formed has occurred, exposure adjustment is executed. Such an operation can eliminate or reduce the image abnormality of the luminance image and the parallax image, and can contribute to the derivation of the parallax value with high accuracy.

また、ステレオカメラ2は、上述のように、SGM法によるステレオマッチング処理によって、合成コスト値を算出することにより、画像においてテクスチャが弱い部分がある場合においても、高精度な視差値の導出を可能としている。なお、本実施の形態においては、調光制御が施されるパターン光によって、被写体にテクスチャが形成されるので、ステレオカメラ2は、必ずしもSGM法によるステレオマッチング処理を実行する必要はなく、SGM法ではない通常のブロックマッチング等のステレオマッチング処理を実行するものとしてもよい。   In addition, as described above, the stereo camera 2 can calculate the parallax value with high accuracy even when there is a portion where the texture is weak in the image by calculating the synthesis cost value by the stereo matching process by the SGM method. It is said. In the present embodiment, since the texture is formed on the subject by the pattern light subjected to the light control, the stereo camera 2 does not necessarily need to execute the stereo matching process by the SGM method. Alternatively, a stereo matching process such as normal block matching may be executed.

(ステレオカメラの外観構造)
図19は、本実施の形態のステレオカメラの外観斜視図の一例である。図20は、本実施の形態のステレオカメラの平面図および底面図の一例である。図21は、本実施の形態のステレオカメラの正面図、背面図および側面図の一例である。図19〜21を参照しながら、本実施の形態のステレオカメラ2の外観構造について説明する。
(Appearance structure of stereo camera)
FIG. 19 is an example of an external perspective view of the stereo camera of the present embodiment. FIG. 20 is an example of a plan view and a bottom view of the stereo camera of this embodiment. FIG. 21 is an example of a front view, a rear view, and a side view of the stereo camera of this embodiment. The external structure of the stereo camera 2 according to the present embodiment will be described with reference to FIGS.

図19(a)は、ステレオカメラ2の前方からの斜視図の一例である。図19(b)は、ステレオカメラ2の後方からの斜視図の一例である。図20(a)は、ステレオカメラ2の平面図の一例である。図20(b)は、ステレオカメラ2の底面図の一例である。図21(a)は、ステレオカメラ2の正面図の一例である。図21(b)は、ステレオカメラ2の背面図の一例である。図21(c)は、ステレオカメラ2の右側面図の一例である。図21(d)は、ステレオカメラ2の左側面図の一例である。図19〜21に示すように、ステレオカメラ2は、その外観構造として、レンズ106a_1、106a_2と、撮像部制御用I/F107と、フロントカバー108と、サイドカバー109と、リアカバー110と、電源コネクタ111と、背面カバー112と、を備えている。   FIG. 19A is an example of a perspective view from the front of the stereo camera 2. FIG. 19B is an example of a perspective view from the rear of the stereo camera 2. FIG. 20A is an example of a plan view of the stereo camera 2. FIG. 20B is an example of a bottom view of the stereo camera 2. FIG. 21A is an example of a front view of the stereo camera 2. FIG. 21B is an example of a rear view of the stereo camera 2. FIG. 21C is an example of a right side view of the stereo camera 2. FIG. 21D is an example of a left side view of the stereo camera 2. As shown in FIGS. 19 to 21, the stereo camera 2 has, as its external structure, lenses 106a_1 and 106a_2, an imaging unit control I / F 107, a front cover 108, a side cover 109, a rear cover 110, and a power connector. 111 and a back cover 112.

レンズ106a_1、106a_2は、図8に示す撮像部106のレンズ106aに相当するレンズであり、入射する光を屈折させて物体の像をイメージセンサ106c(図8参照)に結像させるための光学素子である。図19(a)および21(a)に示すように、レンズ106a_1、106a_2は、フロントカバー108の前面側に所定間隔に離間した状態で固定されている。   The lenses 106a_1 and 106a_2 are lenses corresponding to the lens 106a of the imaging unit 106 shown in FIG. 8, and are optical elements for refracting incident light to form an image of an object on the image sensor 106c (see FIG. 8). It is. As shown in FIGS. 19A and 21A, the lenses 106a_1 and 106a_2 are fixed to the front side of the front cover 108 at a predetermined interval.

撮像部制御用I/F107は、ステレオカメラ2のリアカバー110に配置されており、その機能は図8において上述した通りである。   The imaging unit control I / F 107 is disposed on the rear cover 110 of the stereo camera 2 and the function thereof is as described above with reference to FIG.

フロントカバー108は、ステレオカメラ2の上面から正面(前面)、そして背面側の一部にかけて内部を覆うカバーである。図19(a)に示すように、フロントカバー108は、前面と上面とで形成される稜線、および前面と背面とで形成される稜線が面取りされた形状を有する。   The front cover 108 is a cover that covers the interior from the top surface of the stereo camera 2 to the front surface (front surface) and part of the rear surface side. As shown in FIG. 19A, the front cover 108 has a shape in which a ridge line formed between the front surface and the upper surface and a ridge line formed between the front surface and the back surface are chamfered.

サイドカバー109は、ステレオカメラ2の両側面(右側面および左側面)を覆うカバーである。図20(a)および20(b)に示すように、サイドカバー109は、側面と、前面および背面とで形成される稜線が面取りされた形状を有する。また、図21(a)および21(b)に示すように、サイドカバー109は、側面と、上面および底面とで形成される稜線が面取りされた形状を有する。また、サイドカバー109は、放熱フィン109aを有する。放熱フィン109aは、ステレオカメラ2が内蔵するCPU100および画像処理部105等(図8参照)が発生する熱を、ステレオカメラ2外部に放熱するフィンである。   The side cover 109 is a cover that covers both side surfaces (right side surface and left side surface) of the stereo camera 2. As shown in FIGS. 20A and 20B, the side cover 109 has a shape in which a ridgeline formed by a side surface, a front surface, and a back surface is chamfered. Further, as shown in FIGS. 21A and 21B, the side cover 109 has a shape in which a ridge formed by a side surface, an upper surface, and a bottom surface is chamfered. Further, the side cover 109 has heat radiation fins 109a. The heat radiation fin 109a is a fin that radiates heat generated by the CPU 100, the image processing unit 105, and the like (see FIG. 8) built in the stereo camera 2 to the outside of the stereo camera 2.

リアカバー110は、ステレオカメラ2の背面を覆うカバーである。図19(b)、21(c)および21(d)に示すように、リアカバー110およびフロントカバー108は、背面と上面とで稜線が形成されないように面取りされた態様で構成されている。図19(b)、20(b)、21(c)および21(d)に示すように、リアカバー110および背面カバー112は、背面と底面とで稜線が形成されないように面取りされた態様で構成されている。   The rear cover 110 is a cover that covers the rear surface of the stereo camera 2. As shown in FIGS. 19B, 21C, and 21D, the rear cover 110 and the front cover 108 are configured to be chamfered so that no ridge line is formed between the back surface and the top surface. As shown in FIGS. 19 (b), 20 (b), 21 (c) and 21 (d), the rear cover 110 and the back cover 112 are configured to be chamfered so that no ridge line is formed between the back surface and the bottom surface. Has been.

電源コネクタ111は、ステレオカメラ2のリアカバー110に配置されており、図8に示すステレオカメラ2が備える各ユニットに電源を供給するためのコネクタである。   The power connector 111 is disposed on the rear cover 110 of the stereo camera 2 and is a connector for supplying power to each unit included in the stereo camera 2 shown in FIG.

背面カバー112は、ステレオカメラ2の底面のうち、フロントカバー108で覆われていない部分を覆うカバーである。   The back cover 112 is a cover that covers a portion of the bottom surface of the stereo camera 2 that is not covered by the front cover 108.

以上のように、ステレオカメラ2は、正面(前面)および背面の周縁の稜線が全周にわたって面取りされた構造を有している。   As described above, the stereo camera 2 has a structure in which the ridge lines of the peripheral edges of the front surface (front surface) and the back surface are chamfered over the entire periphery.

(変形例1)
図22は、本実施の形態の変形例1に係る視差値導出システムのハードウェア構成の一例を示す図である。図22を参照しながら、本変形例に係る視差値導出システム15aについて、上述の実施の形態の視差値導出システム15とは相違する点を中心に説明する。なお、図22に示すステレオカメラ2および調光制御部9については、上述の実施の形態の図8において示したものと同様であるので、同一符号を付し、ここでの説明を省略する。
(Modification 1)
FIG. 22 is a diagram illustrating an example of a hardware configuration of the disparity value deriving system according to the first modification of the present embodiment. With reference to FIG. 22, the parallax value deriving system 15a according to the present modification will be described focusing on differences from the parallax value deriving system 15 of the above-described embodiment. Note that the stereo camera 2 and the dimming control unit 9 shown in FIG. 22 are the same as those shown in FIG. 8 of the above-described embodiment, so the same reference numerals are given and the description thereof is omitted here.

図22に示すように、本変形例に係る視差値導出システム15aは、ステレオカメラ2と、パターン投光部8aと、調光制御部9と、テクスチャ送信部12(送信手段)と、を備えている。このうち、パターン投光部8aは、撮像部3、4(図7参照)の被写体となる部品20(図7参照)に対して、特殊なパターンを有するパターン光を照射する装置である。パターン投光部8aは、光量調整部300と、プロジェクタ304と、を備えている。   As shown in FIG. 22, the parallax value deriving system 15a according to this modification includes a stereo camera 2, a pattern light projecting unit 8a, a dimming control unit 9, and a texture transmitting unit 12 (transmitting means). ing. Among these, the pattern light projecting unit 8a is a device that irradiates the component 20 (see FIG. 7) that is the subject of the imaging units 3 and 4 (see FIG. 7) with pattern light having a special pattern. The pattern light projecting unit 8 a includes a light amount adjusting unit 300 and a projector 304.

光量調整部300は、調光部201から受信した調整量を用いて、プロジェクタ304から投影される光の光量を調整する装置である。また、光量調整部300は、調光部201から受信した調整量を用いて、プロジェクタ304の光の光量を調整した後、光量データを調光部201に送信する。   The light amount adjustment unit 300 is a device that adjusts the light amount of light projected from the projector 304 using the adjustment amount received from the light control unit 201. Further, the light amount adjustment unit 300 adjusts the light amount of the light of the projector 304 using the adjustment amount received from the dimming unit 201, and then transmits the light amount data to the dimming unit 201.

プロジェクタ304は、光学フィルタ、マイクロミラーデバイス、レンズおよびランプ等を備え、テクスチャ送信部12から送信されるテクスチャデータに基づいて、特殊なパターンを有するパターン光を投影する装置である。テクスチャ送信部12は、プロジェクタ304から投影されるパターン光が被写体に照射されて形成されるテクスチャの模様、柄、パターン、色またはドット等を決定するためのテクスチャデータ(テクスチャ情報)をプロジェクタ304に送信する装置である。   The projector 304 is an apparatus that includes an optical filter, a micromirror device, a lens, a lamp, and the like, and projects pattern light having a special pattern based on the texture data transmitted from the texture transmission unit 12. The texture transmitting unit 12 sends texture data (texture information) for determining a texture pattern, a pattern, a pattern, a color, a dot, or the like formed by irradiating the subject with the pattern light projected from the projector 304. It is a device that transmits.

以上のように、パターン光を照射する装置として、既製のプロジェクタ304を採用することにより、開発コストを低減することができる。また、プロジェクタ304は、テクスチャ送信部12から送信されるテクスチャデータに基づいてパターン光を生成するので、被写体に形成するテクスチャを自由に変更することが可能となる。したがって、黒潰れ状態、飽和状態、または視差値の不連続等の画像異常が生じにくい態様でテクスチャを被写体に形成することができる。よって、被写体の認識精度を向上させることができる。   As described above, the development cost can be reduced by adopting the ready-made projector 304 as an apparatus for irradiating pattern light. Further, since the projector 304 generates pattern light based on the texture data transmitted from the texture transmission unit 12, the texture formed on the subject can be freely changed. Therefore, it is possible to form a texture on the subject in a manner in which image abnormality such as a blackout state, a saturated state, or disparity discontinuity hardly occurs. Therefore, the recognition accuracy of the subject can be improved.

(変形例2)
図23は、本実施の形態の変形例2のステレオカメラの機能ブロックの構成の一例を示す図である。図23を参照しながら、本変形例のステレオカメラ2aについて、上述の実施の形態のステレオカメラ2とは相違する点を中心に説明する。なお、図23に示す撮像部3、4、マッチング部5および視差画像生成部6については、上述の実施の形態の図11において示したものと同様であるので、同一符号を付し、ここでの説明を省略する。
(Modification 2)
FIG. 23 is a diagram illustrating an example of a functional block configuration of a stereo camera according to the second modification of the present embodiment. With reference to FIG. 23, the stereo camera 2a of the present modification will be described focusing on differences from the stereo camera 2 of the above-described embodiment. Note that the imaging units 3 and 4, the matching unit 5, and the parallax image generation unit 6 illustrated in FIG. 23 are the same as those illustrated in FIG. 11 of the above-described embodiment, and thus are denoted by the same reference numerals. The description of is omitted.

図23に示すように、ステレオカメラ2aは、撮像部3、4と、前処理部13、14(第1の前処理手段、第2の前処理手段)と、マッチング部5と、視差画像生成部6と、を備えている。   As shown in FIG. 23, the stereo camera 2a includes an imaging unit 3, 4, a preprocessing unit 13, 14 (first preprocessing unit, second preprocessing unit), a matching unit 5, and parallax image generation. Part 6.

前処理部13、14は、それぞれ撮像部3、4により生成された輝度画像に対して、前処理として歪み補正またはダイナミックレンジ拡大処理等の画像処理を実行する装置である。前処理部13、14は、前処理した輝度画像を、それぞれフィルタ部51、52に送信する。なお、図23においては、前処理部13と前処理部14とが別の機能部として記載されているが、一体型の機能部であってもよい。   The preprocessing units 13 and 14 are devices that perform image processing such as distortion correction or dynamic range expansion processing as preprocessing on the luminance images generated by the imaging units 3 and 4, respectively. The preprocessing units 13 and 14 transmit the preprocessed luminance images to the filter units 51 and 52, respectively. In FIG. 23, the preprocessing unit 13 and the preprocessing unit 14 are described as separate functional units, but may be integrated functional units.

このように、前処理部13、14が、それぞれ撮像部3、4により生成された輝度画像に対して、前処理としてダイナミックレンジ拡大処理を実行することによって、マッチング部5および視差画像生成部6において視差値を導出する段階で、基準画像Ibまたは比較画像Iaにおける黒潰れ状態および飽和状態の発生を抑制することができる。また、前処理部13、14が、それぞれ撮像部3、4により生成された輝度画像に対して、前処理として歪み補正を実行することによって、マッチング部5によるコスト値Cの算出の精度に影響を与える基準画像Ibおよび比較画像Iaとの歪み状態を低減することができる。したがって、マッチング部5によるコスト値Cの算出の精度を向上させることができる。よって、被写体の認識精度を向上させることができる。   As described above, the preprocessing units 13 and 14 execute the dynamic range expansion process as the preprocessing on the luminance images generated by the imaging units 3 and 4, respectively, and thereby the matching unit 5 and the parallax image generation unit 6. In the step of deriving the parallax value in step S1, it is possible to suppress the occurrence of a black-out state and a saturated state in the reference image Ib or the comparison image Ia. In addition, the preprocessing units 13 and 14 perform distortion correction as preprocessing on the luminance images generated by the imaging units 3 and 4, respectively, thereby affecting the accuracy of calculation of the cost value C by the matching unit 5. It is possible to reduce the distortion state between the reference image Ib and the comparative image Ia. Therefore, the accuracy of calculation of the cost value C by the matching unit 5 can be improved. Therefore, the recognition accuracy of the subject can be improved.

(変形例3)
図24は、本実施の形態の変形例3に係る視差値導出システムの基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。図24を参照しながら、本変形例に係る視差値導出システムの動作について、上述の実施の形態の視差値導出システム15と相違する点を中心に説明する。
(Modification 3)
FIG. 24 is an explanatory diagram for obtaining corresponding pixels in the comparison image corresponding to the reference pixels in the reference image of the disparity value deriving system according to Modification 3 of the present embodiment. With reference to FIG. 24, the operation of the parallax value derivation system according to the present modification will be described focusing on differences from the parallax value derivation system 15 of the above-described embodiment.

図24に示すように、比較画像Ia_2(または基準画像Ib_2)における部品が撮像された部分である部品領域20bにおいて、部品の照り返しにより飽和領域22が形成されている場合を考える。基準画像Ib_2の飽和領域22の基準領域p1に対して、比較画像Ia_2の飽和領域22の候補領域q1からコスト値Cを算出するための探索を実施(図24の矢印方向)した場合、候補領域の画素値はいずれも飽和状態であるため、基準領域p1に対応する対応領域(図24の対応領域p1a)の視差値を導出することができない。そこで、コスト算出部53(図11参照)は、コスト値Cを算出するための探索の範囲について所定範囲を決めておき、所定範囲以上、画素値(輝度値)が連続して飽和状態とみなせる所定値(第1の値)以上の値となっている場合、その所定範囲において飽和状態となっていると判定する。次に、コスト算出部53は、判定結果を調光制御部9に送信し、調光制御部9の解析部200は、輝度画像(比較画像Ia_2(または基準画像Ib_2))において飽和状態の領域があると解析する。そして、解析部200により輝度画像に画像異常がある判定されると、調光制御部9は、パターン投光部8が部品に照射するパターン光に対して調光制御を実行する。   As shown in FIG. 24, a case is considered where a saturated region 22 is formed by reflection of a component in a component region 20b that is a portion where a component is imaged in the comparison image Ia_2 (or the reference image Ib_2). When a search for calculating the cost value C from the candidate region q1 of the saturated region 22 of the comparative image Ia_2 is performed on the reference region p1 of the saturated region 22 of the reference image Ib_2 (in the direction of the arrow in FIG. 24), the candidate region Since the pixel values of all are saturated, the parallax value of the corresponding region (corresponding region p1a in FIG. 24) corresponding to the reference region p1 cannot be derived. Therefore, the cost calculation unit 53 (see FIG. 11) determines a predetermined range for the search range for calculating the cost value C, and the pixel values (luminance values) can be regarded as being saturated continuously beyond the predetermined range. When the value is equal to or greater than a predetermined value (first value), it is determined that the saturated state is reached in the predetermined range. Next, the cost calculation unit 53 transmits the determination result to the dimming control unit 9, and the analysis unit 200 of the dimming control unit 9 is a saturated region in the luminance image (comparison image Ia_2 (or reference image Ib_2)). Analyzes that there is. When the analysis unit 200 determines that there is an image abnormality in the luminance image, the dimming control unit 9 performs dimming control on the pattern light that the pattern projecting unit 8 irradiates the component.

なお、上述のように、輝度値が飽和した場合について説明したが、これに限定されるものではなく、輝度値が低い、いわゆる、黒潰れの状態が発生した場合、調光制御部9は、以下のように調光制御を実行してもよい。コスト算出部53(図11参照)は、コスト値Cを算出するための探索の範囲について所定範囲を決めておき、所定範囲以上、画素値(輝度値)が連続して黒潰れ状態とみなせる所定値(第2の値)以下の値となっている場合、その所定範囲において黒潰れ状態となっていると判定する。ここで、第2の値は、第1の値より小さい値である。次に、コスト算出部53は、判定結果を調光制御部9に送信し、調光制御部9の解析部200は、輝度画像(比較画像Ia_2(または基準画像Ib_2))において黒潰れ状態の領域があると解析する。そして、解析部200により輝度画像に画像異常がある判定されると、調光制御部9は、パターン投光部8が部品に照射するパターン光に対して調光制御を実行する。   As described above, the case where the luminance value is saturated has been described. However, the present invention is not limited to this, and when the luminance value is low, that is, when a so-called blackened state occurs, the dimming control unit 9 The dimming control may be executed as follows. The cost calculation unit 53 (see FIG. 11) determines a predetermined range for the search range for calculating the cost value C, and is a predetermined range in which pixel values (luminance values) can be regarded as a black-out state continuously for a predetermined range or more. When the value is equal to or smaller than the value (second value), it is determined that the black area is in the predetermined range. Here, the second value is smaller than the first value. Next, the cost calculation unit 53 transmits the determination result to the dimming control unit 9, and the analysis unit 200 of the dimming control unit 9 is in a blackened state in the luminance image (the comparative image Ia_2 (or the reference image Ib_2)). Analyzes that there is a region. When the analysis unit 200 determines that there is an image abnormality in the luminance image, the dimming control unit 9 performs dimming control on the pattern light that the pattern projecting unit 8 irradiates the component.

これによって、コスト算出部53によるコスト値Cの算出段階で、輝度画像に飽和状態の有無を判定することができるので、早いタイミングで調光制御を実行して、パターン投光部8に被写体の認識精度を向上させるパターン光を照射させることができる。   Thus, since it is possible to determine whether or not the luminance image is saturated in the stage of calculating the cost value C by the cost calculation unit 53, the dimming control is executed at an early timing, and the pattern light projecting unit 8 is informed of the subject. Pattern light that improves recognition accuracy can be irradiated.

(変形例4)
図25は、本実施の形態の変形例4に係る視差値導出システムにおいて部品情報選択の画面の一例を示す図である。図26は、本実施の形態の変形例4に係る視差値導出システムの基準画像における基準画素に対応する比較画像における対応画素を求める場合の説明図である。図25および26を参照しながら、本変形例に係る視差値導出システムの動作について、上述の実施の形態の視差値導出システム15、および上述の変形例3の視差値導出システムと相違する点を中心に説明する。
(Modification 4)
FIG. 25 is a diagram illustrating an example of a component information selection screen in the disparity value deriving system according to the fourth modification of the present embodiment. FIG. 26 is an explanatory diagram for obtaining a corresponding pixel in a comparison image corresponding to a reference pixel in a reference image of the disparity value deriving system according to the fourth modification of the present embodiment. 25 and 26, the operation of the disparity value deriving system according to the present modification is different from the disparity value deriving system 15 of the above-described embodiment and the disparity value deriving system of the above-described modification 3. The explanation is centered.

本変形例に係る視差値導出システムは、ステレオカメラ2の撮像部制御用I/F107に通常のPC(Personal Computer)等の情報処理装置が接続されている。なお、上述のように撮像部制御用I/F107には、調光制御部9が接続されるので、情報処理装置を接続する場合は、例えば、スイッチングハブ等のネットワーク機器を介して、調光制御部9および情報処理装置を接続するものとすればよい。情報処理装置は、マウスおよびキーボード等の入力装置、設定画面等を表示する表示装置(例えば、図25に示す表示装置150)、CPU、RAM、ROM、およびHDD(Hard Disk Drive)等の外部記憶装置等を有する。   In the parallax value derivation system according to the present modification, an information processing apparatus such as a normal PC (Personal Computer) is connected to the imaging unit control I / F 107 of the stereo camera 2. As described above, since the dimming control unit 9 is connected to the imaging unit control I / F 107, when the information processing apparatus is connected, for example, the dimming is performed via a network device such as a switching hub. What is necessary is just to connect the control part 9 and information processing apparatus. The information processing apparatus includes an input device such as a mouse and a keyboard, a display device that displays a setting screen or the like (for example, the display device 150 illustrated in FIG. 25), an external storage such as a CPU, RAM, ROM, and HDD (Hard Disk Drive). Equipment.

図25(a)は、被写体となる部品の材質(被写体の情報)を選択するための部品情報選択画面1500が表示装置150に表示された状態を示す図である。パターン投光部8からパターン光が照射された部品は、その部品の材質(例えば、金属、アクリル、木材、ガラス等)に応じて、飽和状態となる領域の面積が異なる。例えば、部品の材質が金属である場合、金属は光を反射しやすく飽和状態となりやすいことが予め知られているので、パターン投光部8からパターン光が照射された金属である部品は、他の材質と比較して飽和領域となる面積が大きくなる傾向がある。この場合、部品情報選択画面1500において、入力装置によりラジオボタン等で「金属」を選択し、OKボタン1500aを選択することにより、コスト値Cの算出するための探索の範囲を金属に応じた範囲に設定される。逆に、部品の材質が木材である場合、木材は光を反射しにくく飽和状態となりにくいことが予め知られているので、パターン投光部8からパターン光が照射された木材である部品は、他の材質と比較して飽和領域となる面積が小さくなる傾向がある。   FIG. 25A is a diagram showing a state in which a component information selection screen 1500 for selecting a material (subject information) of a component that is a subject is displayed on the display device 150. A part irradiated with pattern light from the pattern light projecting unit 8 has a different area in a saturated state depending on the material of the part (for example, metal, acrylic, wood, glass, etc.). For example, when the material of the component is a metal, it is known in advance that the metal easily reflects light and is likely to be saturated. Therefore, a component that is a metal irradiated with pattern light from the pattern light projecting unit 8 There is a tendency that the area that becomes the saturated region becomes larger than that of the material. In this case, in the component information selection screen 1500, the search range for calculating the cost value C is selected according to the metal by selecting “metal” with a radio button or the like using the input device and selecting the OK button 1500a. Set to On the contrary, when the material of the component is wood, it is known in advance that the wood hardly reflects light and is not easily saturated. Therefore, the component made of wood irradiated with pattern light from the pattern light projecting unit 8 is Compared to other materials, the area that becomes the saturated region tends to be small.

図25(b)は、被写体となる部品の反射レベル(被写体の情報)を選択するための部品情報選択画面1501が表示装置150に表示された状態を示す図である。パターン投光部8からパターン光が照射された部品は、その部品の反射レベル(例えば、光沢、暗い、ノーマル等)に応じて、飽和状態となる領域の面積が異なる。例えば、部品の表面が光沢状態で反射レベルが高い場合、光沢状態の部品は光を反射しやすく飽和状態となりやすいことが予め知られているので、パターン投光部8からパターン光が照射された部品は、他の反射レベルの部品と比較して飽和領域となる面積が大きくなる傾向がある。この場合、部品情報選択画面1501において、入力装置によりラジオボタン等で「光沢」を選択し、OKボタン1501aを選択することにより、コスト値Cの算出するための探索の範囲を「光沢」に応じた範囲に設定される。逆に、部品の表面が、光沢がなく暗い状態である場合、光を反射しにくく飽和状態となりにくいことが予め知られているので、パターン投光部8からパターン光が照射された光沢のない部品は、他の反射レベルの部品と比較して飽和領域となる面積が小さくなる傾向がある。なお、上述の表示装置150に表示された部品情報選択画面1500、1501、およびユーザが操作する入力装置は、本発明の「設定手段」に相当する。   FIG. 25B is a diagram showing a state in which a component information selection screen 1501 for selecting a reflection level (subject information) of a component that is a subject is displayed on the display device 150. The area irradiated with the pattern light from the pattern light projecting unit 8 has a different area in a saturated state depending on the reflection level (for example, gloss, dark, normal, etc.) of the part. For example, when the surface of the component is glossy and the reflection level is high, it is known in advance that the component in the glossy state easily reflects light and is likely to be saturated, so that pattern light is emitted from the pattern light projecting unit 8. A part tends to have a larger area as a saturation region compared to a part having another reflection level. In this case, in the part information selection screen 1501, “glossy” is selected with a radio button or the like by the input device, and the OK button 1501a is selected, so that the search range for calculating the cost value C corresponds to “glossy”. Range. On the contrary, when the surface of the component is not glossy and dark, it is known in advance that it is difficult to reflect light and to be in a saturated state. Therefore, there is no gloss when pattern light is irradiated from the pattern light projecting unit 8. The part tends to have a smaller area that becomes a saturated region as compared to other reflection level parts. The component information selection screens 1500 and 1501 displayed on the display device 150 and the input device operated by the user correspond to the “setting unit” of the present invention.

例えば、部品は金属、または、光沢状態を有するものとであり、表示装置150の部品情報選択画面1500または部品情報選択画面1501において、「金属」または「光沢」が設定されたものとする。図26に示すように、比較画像Ia_3(または基準画像Ib_3)における部品が撮像された部分である部品領域20cにおいて、部品の照り返しにより飽和領域23が形成されているものとする。ここで、コスト算出部53は、基準画像Ib_3の飽和領域23の基準領域p2を、部品の材質または反射レベルに応じた大きさに変更する。ここでは、部品は金属、または、光沢状態を有するものと設定されているので、基準領域p2の大きさを、他の材質、または反射レベルの部品に対応する大きさよりも大きくする。基準画像Ib_3の飽和領域23の基準領域p2に対して、比較画像Ia_3の飽和領域23の候補領域q2(基準領域p2と同じ大きさ)からコスト値Cを算出するための探索を実施(図26の矢印方向)した場合、候補領域の画素値はいずれも飽和状態であるため、基準領域p2に対応する対応領域(図26の対応領域p2a)の視差値を導出することができない。そこで、コスト算出部53(図11参照)は、コスト値Cを算出するための探索の範囲について所定範囲を決めておき、所定範囲以上、画素値が連続して飽和状態とみなせる所定値以上の値となっている場合、その所定範囲において飽和状態となっていると判定する。次に、コスト算出部53は、判定結果を調光制御部9に送信し、調光制御部9の解析部200は、輝度画像(比較画像Ia_3(または基準画像Ib_3))において飽和状態の領域があると解析する。そして、解析部200により輝度画像に画像異常がある判定されると、調光制御部9は、パターン投光部8が部品に照射するパターン光に対して調光制御を実行する。   For example, it is assumed that the part is metal or has a glossy state, and “metal” or “gloss” is set on the part information selection screen 1500 or the part information selection screen 1501 of the display device 150. As shown in FIG. 26, it is assumed that a saturated region 23 is formed by reflection of a component in a component region 20c that is a portion where a component is imaged in the comparison image Ia_3 (or the reference image Ib_3). Here, the cost calculation unit 53 changes the reference region p2 of the saturation region 23 of the reference image Ib_3 to a size according to the material of the part or the reflection level. Here, since the component is set to have a metallic or glossy state, the size of the reference region p2 is made larger than the size corresponding to the other material or the component of the reflection level. A search for calculating the cost value C from the candidate region q2 (same size as the reference region p2) of the saturated region 23 of the comparison image Ia_3 is performed on the reference region p2 of the saturated region 23 of the reference image Ib_3 (FIG. 26). In this case, since the pixel values of the candidate areas are all saturated, the parallax value of the corresponding area corresponding to the reference area p2 (corresponding area p2a in FIG. 26) cannot be derived. Therefore, the cost calculation unit 53 (see FIG. 11) determines a predetermined range for the search range for calculating the cost value C, and the predetermined value is equal to or greater than the predetermined value that allows the pixel values to be continuously considered to be saturated. If it is a value, it is determined that the state is saturated within the predetermined range. Next, the cost calculation unit 53 transmits the determination result to the dimming control unit 9, and the analysis unit 200 of the dimming control unit 9 is a saturated region in the luminance image (comparison image Ia_3 (or reference image Ib_3)). Analyzes that there is. When the analysis unit 200 determines that there is an image abnormality in the luminance image, the dimming control unit 9 performs dimming control on the pattern light that the pattern projecting unit 8 irradiates the component.

このように、部品の材質または反射レベルに応じて、基準画像Ib_3の基準領域p2(および比較画像Ia_3の候補領域q2)の大きさを設定することにより、部品における飽和状態の有無の判定精度を向上させることができる。   In this way, by setting the size of the reference region p2 of the reference image Ib_3 (and the candidate region q2 of the comparison image Ia_3) according to the material or reflection level of the component, the determination accuracy of the presence or absence of saturation in the component is increased. Can be improved.

(変形例5)
図27は、本実施の形態の変形例5に係る視差値導出システムのハードウェア構成の一例を示す図である。図27を参照しながら、本変形例に係る視差値導出システム15bについて、上述の実施の形態の視差値導出システム15とは相違する点を中心に説明する。なお、図27において、上述の実施の形態の視差値導出システム15の各構成部の機能と同一である場合、同一符号を付し、ここでの説明を省略する。
(Modification 5)
FIG. 27 is a diagram illustrating an example of a hardware configuration of the disparity value deriving system according to the fifth modification of the present embodiment. With reference to FIG. 27, the disparity value deriving system 15b according to the present modification will be described focusing on differences from the disparity value deriving system 15 of the above-described embodiment. In FIG. 27, when the functions of the respective components of the parallax value deriving system 15 of the above-described embodiment are the same, the same reference numerals are given and the description thereof is omitted here.

図27に示すように、本変形例に係る視差値導出システム15bは、ステレオカメラ2と、パターン投光部8と、調光制御部9と、被写体情報設定部16(設定手段)と、を備えている。   As shown in FIG. 27, the parallax value deriving system 15b according to this modification includes a stereo camera 2, a pattern light projecting unit 8, a dimming control unit 9, and a subject information setting unit 16 (setting unit). I have.

被写体情報設定部16は、被写体の情報である部品の材質または反射レベルを設定する装置である。被写体情報設定部16は、設定した被写体の情報を調光制御部9の調光部201に送信する。なお、被写体情報設定部16は、上述の変形例4で説明した表示装置150に表示された部品情報選択画面1500、1501、およびユーザが操作する入力装置を含む構成であってもよい。   The subject information setting unit 16 is a device that sets the material or reflection level of a component, which is subject information. The subject information setting unit 16 transmits the set subject information to the dimming unit 201 of the dimming control unit 9. Note that the subject information setting unit 16 may include a component information selection screen 1500, 1501 displayed on the display device 150 described in the above-described modification example 4, and an input device operated by the user.

調光部201は、被写体情報設定部16から被写体の情報を受信し、かつ、解析部200から解析結果を受け取り、被写体情報または解析結果に応じた調整量をパターン投光部8に送信する回路である。具体的には、調光部201は、被写体情報設定部16から受信した被写体の情報から、予め部品の飽和状態または黒潰れ状態となる領域の面積の変化の傾向を予測できるので、飽和状態または黒潰れ状態を小さくするために、パターン投光部8に照射させるパターン光の光量を調整する。例えば、被写体情報設定部16が、部品の材質として「金属」、または部品の反射レベルとして「光沢」を設定した場合、調光部201は、他の材質または反射レベルの場合と比較して、パターン投光部8に照射させるパターン光の光量を低下させる。   The light control unit 201 is a circuit that receives subject information from the subject information setting unit 16, receives an analysis result from the analysis unit 200, and transmits an adjustment amount according to the subject information or the analysis result to the pattern light projecting unit 8. It is. Specifically, the dimming unit 201 can predict the trend of change in the area of the region that is saturated or blacked out in advance from the subject information received from the subject information setting unit 16. In order to reduce the black crushing state, the amount of pattern light irradiated to the pattern light projecting unit 8 is adjusted. For example, when the subject information setting unit 16 sets “metal” as the material of the component or “gloss” as the reflection level of the component, the dimming unit 201 compares with the case of other materials or the reflection level, The light quantity of the pattern light irradiated to the pattern light projection part 8 is reduced.

このように、予め、被写体の情報である部品の材質または反射レベルを設定し、その設定に基づきパターン投光部8に照射させるパターン光の光量を調整するため、飽和状態または黒潰れ状態の発生を抑制することができる。したがって、被写体の認識精度を向上させることができる。   As described above, since the material or reflection level of the component that is subject information is set in advance, and the amount of pattern light to be irradiated to the pattern light projecting unit 8 is adjusted based on the setting, occurrence of a saturated state or a blackout state occurs. Can be suppressed. Accordingly, the recognition accuracy of the subject can be improved.

なお、上述のように、調光部201は、解析部200から解析結果を受け取り、解析結果に応じた調整量をパターン投光部8に送信するものとしたが、これに限定されるものではなく、調光部201は、解析部200の解析結果を利用しないものとしてもよい。   As described above, the dimming unit 201 receives the analysis result from the analysis unit 200 and transmits the adjustment amount according to the analysis result to the pattern light projecting unit 8, but is not limited thereto. In addition, the light control unit 201 may not use the analysis result of the analysis unit 200.

図28は、本実施の形態の変形例5の搬送システムの動作の一例を示すフローチャートである。図28を参照しながら、上述の図17に示す搬送システム1の全体的な動作と相違する点を中心に説明する。   FIG. 28 is a flowchart illustrating an example of the operation of the transport system according to the fifth modification of the present embodiment. With reference to FIG. 28, description will be made centering on differences from the overall operation of the transport system 1 shown in FIG.

<ステップS21>
上述の実施の形態の図1と同様に、台である背景部21に部品20が設置されているものとする。部品20は、搬送システム1の前工程の設備から背景部21に設置された場合を想定してもよく、作業者によって背景部21に設置された場合を想定してもよい。そして、ステップS22へ移行する。
<Step S21>
Similarly to FIG. 1 of the above-described embodiment, it is assumed that the component 20 is installed on the background portion 21 that is a table. The part 20 may be assumed to be installed in the background part 21 from the equipment in the previous process of the transport system 1 or may be assumed to be installed in the background part 21 by the operator. Then, the process proceeds to step S22.

<ステップS22>
被写体情報設定部16は、被写体の情報である部品の材質または反射レベルを設定し、設定した被写体の情報を調光制御部9の調光部201に送信する。そして、ステップS23へ移行する。
<Step S22>
The subject information setting unit 16 sets the material or reflection level of the component that is the subject information, and transmits the set subject information to the dimming unit 201 of the dimming control unit 9. Then, the process proceeds to step S23.

<ステップS23>
調光部201は、被写体情報設定部16から受信した被写体の情報に応じて、パターン投光部8に照射させるパターン光の光量を調整する。そして、ステップS24へ移行する。
<Step S23>
The light control unit 201 adjusts the amount of pattern light to be irradiated to the pattern light projecting unit 8 according to the subject information received from the subject information setting unit 16. Then, the process proceeds to step S24.

<ステップS24〜S29>
本変形例のステップS24〜S29の処理は、それぞれ、上述の図17に示したステップS12〜S15、S18、S19の処理と同様である。
<Steps S24 to S29>
The processes of steps S24 to S29 of this modification are the same as the processes of steps S12 to S15, S18, and S19 shown in FIG.

なお、上述の実施の形態(各変形例を含む)では、ステレオカメラを備えるものとして説明したが、これに限定されるものではなく、ステレオカメラに代えて、単眼カメラを備えるものとしてもよい。この場合、単眼カメラを移動させて被写体としての部品を複数回撮像し、その撮像した画像を使用して測距するものとしてもよく、また、位相シフト法を用いてもよい。   In the above-described embodiment (including each modification example), the stereo camera is described. However, the present invention is not limited to this, and a monocular camera may be provided instead of the stereo camera. In this case, the monocular camera may be moved to pick up a part as a subject a plurality of times, and distance measurement may be performed using the picked-up image, or a phase shift method may be used.

また、上述の実施の形態のコスト算出部53、合成コスト算出部61、サブピクセル推定部62および生成部63の少なくともいずれかがプログラムの実行によって実現される場合、そのプログラムは、ROM等に予め組み込まれて提供される。また、上述の実施の形態のステレオカメラ2、2aで実行されるプログラムは、インストール可能な形式または実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録して提供するように構成してもよい。また、上述の実施の形態のステレオカメラ2、2aで実行されるプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、上述の実施の形態のステレオカメラ2、2aで実行されるプログラムを、インターネット等のネットワーク経由で提供または配布するように構成してもよい。また、上述の実施の形態のステレオカメラ2、2aで実行されるプログラムは、上述したコスト算出部53、合成コスト算出部61、サブピクセル推定部62および生成部63の少なくともいずれかを含むモジュール構成となっており、実際のハードウェアとしてはCPU100がROM101からプログラムを読み出して実行することにより、上述の各部が主記憶装置上にロードされて生成されるようになっている。   When at least one of the cost calculation unit 53, the synthesis cost calculation unit 61, the subpixel estimation unit 62, and the generation unit 63 according to the above-described embodiment is realized by executing a program, the program is stored in a ROM or the like in advance. Provided embedded. The programs executed by the stereo cameras 2 and 2a of the above-described embodiments are files in an installable format or an executable format, and are CD-ROM, flexible disk (FD), CD-R, DVD (Digital Versatile). It may be configured to be recorded on a computer-readable recording medium such as Disk). Further, the program executed by the stereo cameras 2 and 2a of the above-described embodiment may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network. . Further, the program executed by the stereo cameras 2 and 2a of the above-described embodiment may be configured to be provided or distributed via a network such as the Internet. The program executed by the stereo cameras 2 and 2a of the above-described embodiment includes a module configuration including at least one of the above-described cost calculation unit 53, synthesis cost calculation unit 61, sub-pixel estimation unit 62, and generation unit 63. As actual hardware, the CPU 100 reads out and executes a program from the ROM 101, so that the above-described units are loaded onto the main storage device and generated.

1 搬送システム
2、2a ステレオカメラ
3、4 撮像部
5 マッチング部
6 視差画像生成部
7 認識処理部
8、8a パターン投光部
9 調光制御部
10 アーム制御部
11 アーム
12 テクスチャ送信部
13、14 前処理部
15、15a、15b 視差値導出システム
16 被写体情報設定部
20 部品
20a、20b、20c 部品領域
21 背景部
21a 背景領域
21b ポイント
22、23 飽和領域
51、52 フィルタ部
53 コスト算出部
61 合成コスト算出部
62 サブピクセル推定部
63 生成部
100 CPU
101 ROM
102 ROMI/F
103 RAM
104 RAMI/F
105 画像処理部
106 撮像部
106a、106a_1、106a_2 レンズ
106b 絞り
106c イメージセンサ
107 撮像部制御用I/F
108 フロントカバー
109 サイドカバー
109a 放熱フィン
110 リアカバー
111 電源コネクタ
112 底面カバー
150 表示装置
200 解析部
201 調光部
300 光量調整部
301 光源部
302 テクスチャフィルタ
303 レンズ
304 プロジェクタ
400、401 領域
510a、510b 撮像装置
511a、511b レンズ
1500、1501 部品情報選択画面
1500a、1501a OKボタン
B 基線長
C コスト値
d シフト量
dp、dp1、dp20、dp21 視差値
E 物体
EL エピポーラ線
f 焦点距離
Ia、Ia_2、Ia_3 比較画像
Ib、Ib_2、Ib_3、Ib_ex 基準画像
Ip、Ip_ex 視差画像
Lr 経路コスト値
Ls 合成コスト値
p 基準画素
p1、p2 基準領域
p1a、p2a 対応領域
q 候補画素
q1、q2 候補領域
S、Sa、Sb 点
Z 距離
DESCRIPTION OF SYMBOLS 1 Transport system 2, 2a Stereo camera 3, 4 Image pick-up part 5 Matching part 6 Parallax image generation part 7 Recognition processing part 8, 8a Pattern light projection part 9 Light control part 10 Arm control part 11 Arm 12 Texture transmission part 13, 14 Pre-processing unit 15, 15a, 15b Parallax value deriving system 16 Subject information setting unit 20 Component 20a, 20b, 20c Component region 21 Background portion 21a Background region 21b Point 22, 23 Saturation region 51, 52 Filter unit 53 Cost calculation unit 61 Composition Cost calculation unit 62 Subpixel estimation unit 63 Generation unit 100 CPU
101 ROM
102 ROMI / F
103 RAM
104 RAM I / F
DESCRIPTION OF SYMBOLS 105 Image processing part 106 Imaging part 106a, 106a_1, 106a_2 Lens 106b Aperture 106c Image sensor 107 I / F for imaging part control
DESCRIPTION OF SYMBOLS 108 Front cover 109 Side cover 109a Radiation fin 110 Rear cover 111 Power supply connector 112 Bottom cover 150 Display apparatus 200 Analysis part 201 Light control part 300 Light quantity adjustment part 301 Light source part 302 Texture filter 303 Lens 304 Projector 400, 401 area 510a, 510b Imaging device 511a, 511b Lens 1500, 1501 Component information selection screen 1500a, 1501a OK button B Base line length C Cost value d Shift amount dp, dp1, dp20, dp21 Parallax value E Object EL Epipolar line f Focal length Ia, Ia_2, Ia_3 Comparison image Ib , Ib_2, Ib_3, Ib_ex Reference image Ip, Ip_ex Parallax image Lr Path cost value Ls Composite cost value p Reference pixel p1, p2 Reference region p1 , P2a corresponding region q candidate pixels q1, q2 candidate region S, Sa, Sb point Z distance

特開2012−181142号公報JP 2012-181142 A

Claims (13)

特定のパターンを有するパターン光を被写体に照射して、前記被写体にテクスチャを形成する投光手段と、
前記テクスチャが形成された前記被写体を撮像する撮像手段と、
前記撮像手段により撮像された撮像画像に基づいて、前記被写体までの距離情報を導出する導出手段と、
少なくとも前記撮像画像または前記距離情報に基づく画像のいずれかについて画像異常の有無を解析する解析手段と、
前記解析手段により前記画像異常があると解析された場合に、調光制御を実行する調光手段と、
を備えた情報処理システム。
A light projecting means for irradiating a subject with pattern light having a specific pattern to form a texture on the subject;
Imaging means for imaging the subject on which the texture is formed;
Derivation means for deriving distance information to the subject based on a captured image captured by the imaging means;
Analyzing means for analyzing the presence or absence of an image abnormality for at least either the captured image or the image based on the distance information;
A dimming unit that performs dimming control when it is analyzed that the image abnormality is present by the analyzing unit;
Information processing system with
前記撮像手段は、前記被写体を撮像して基準画像を生成する第1の撮像手段と、前記第1の撮像手段と異なる位置に配置され、前記被写体を撮像して比較画像を生成する第2撮像手段と、を有し、
前記導出手段は、前記基準画像の領域と、前記比較画像の領域との一致度を算出する算出手段を、さらに備え、
前記導出手段は、前記算出手段により算出された前記一致度から、前記基準画像の基準領域に対応する前記比較画像の対応領域を特定する視差値を、前記距離情報として導出し、
前記視差値に基づいて視差画像を生成する生成手段を、さらに備え、
前記解析手段は、前記撮像画像および前記視差画像について前記画像異常の有無を解析する請求項1に記載の情報処理システム。
The image pickup means is arranged in a position different from the first image pickup means for picking up the subject and generating a reference image, and second image pickup for picking up the subject and generating a comparison image Means,
The derivation means further comprises calculation means for calculating the degree of coincidence between the area of the reference image and the area of the comparison image,
The deriving unit derives, as the distance information, a parallax value that specifies a corresponding region of the comparison image corresponding to a reference region of the reference image from the degree of coincidence calculated by the calculating unit,
A generating unit configured to generate a parallax image based on the parallax value;
The information processing system according to claim 1, wherein the analysis unit analyzes the presence / absence of the image abnormality in the captured image and the parallax image.
前記調光手段は、前記解析手段により、前記画像異常として前記撮像画像における前記テクスチャのぼやけがあると解析された場合、または、前記調光手段が調光限界に達したと解析された場合、前記調光制御として、前記第1の撮像手段および前記第2の撮像手段に対する露光調整動作を実行する請求項2に記載の情報処理システム。   When the light control means is analyzed by the analysis means that there is blur of the texture in the captured image as the image abnormality, or when it is analyzed that the light control means has reached the light control limit, The information processing system according to claim 2, wherein an exposure adjustment operation for the first imaging unit and the second imaging unit is executed as the light control. 前記調光手段は、前記露光調整動作として、前記基準画像および前記比較画像に対してダイナミックレンジ拡大処理を実行する請求項3に記載の情報処理システム。   The information processing system according to claim 3, wherein the dimming unit performs dynamic range expansion processing on the reference image and the comparative image as the exposure adjustment operation. 前記解析手段は、前記撮像画像の輝度値が、該撮像画像の所定範囲以上にわたって第1の値以上である場合、または、該撮像画像の所定範囲以上にわたって前記第1の値よりも小さい第2の値以下である場合、該撮像画像に前記画像異常があると解析する請求項2〜4のいずれか一項に記載の情報処理システム。   The analysis means is configured such that the luminance value of the captured image is equal to or greater than the first value over a predetermined range of the captured image, or the second smaller than the first value over the predetermined range of the captured image. The information processing system according to any one of claims 2 to 4, wherein when the image is less than or equal to the value, the captured image is analyzed as having the image abnormality. 前記被写体の情報を設定する設定手段を、さらに備え、
前記算出手段は、前記被写体の情報に応じて、前記基準画像の前記基準領域の大きさを変更する請求項2〜5のいずれか一項に記載の情報処理システム。
Setting means for setting information on the subject;
The information processing system according to any one of claims 2 to 5, wherein the calculation unit changes a size of the reference region of the reference image according to information on the subject.
前記被写体の情報は、前記被写体の反射レベルであることを特徴とする請求項6に記載の情報処理システム。   The information processing system according to claim 6, wherein the subject information is a reflection level of the subject. 前記被写体の情報は、前記被写体の材質であることを特徴とする請求項6に記載の情報処理システム。   The information processing system according to claim 6, wherein the subject information is a material of the subject. 前記調光手段は、前記設定手段により設定された前記被写体の情報に応じて、前記投光手段の前記パターン光の光量を調整する請求項6〜8のいずれか一項に記載の情報処理システム。   The information processing system according to any one of claims 6 to 8, wherein the light control unit adjusts a light amount of the pattern light of the light projecting unit according to information on the subject set by the setting unit. . 特定のパターンを有するパターン光を被写体に照射して、前記被写体にテクスチャを形成する投光手段と、
前記テクスチャが形成された前記被写体を撮像する撮像手段と、
前記撮像手段により撮像された撮像画像に基づいて、前記被写体までの距離情報を導出する導出手段と、
前記被写体の情報を設定する設定手段と、
前記設定手段により設定された前記被写体の情報に基づいて調光制御を実行する調光手段と、
を備えた情報処理システム。
A light projecting means for irradiating a subject with pattern light having a specific pattern to form a texture on the subject;
Imaging means for imaging the subject on which the texture is formed;
Derivation means for deriving distance information to the subject based on a captured image captured by the imaging means;
Setting means for setting information of the subject;
Dimming means for performing dimming control based on information on the subject set by the setting means;
Information processing system with
前記被写体の情報は、前記被写体の反射レベルであることを特徴とする請求項10に記載の情報処理システム。   The information processing system according to claim 10, wherein the subject information is a reflection level of the subject. 前記被写体の情報は、前記被写体の材質であることを特徴とする請求項10に記載の情報処理システム。   The information processing system according to claim 10, wherein the subject information is a material of the subject. 特定のパターンを有するパターン光を被写体に照射して、前記被写体にテクスチャを形成する投光ステップと、
前記テクスチャが形成された前記被写体を撮像する撮像ステップと、
撮像した撮像画像に基づいて、前記被写体までの距離情報を導出する導出ステップと、
少なくとも前記撮像画像または前記距離情報に基づく画像のいずれかについて画像異常の有無を解析する解析ステップと、
前記画像異常があると解析した場合に、調光制御を実行する調光ステップと、
を有する情報処理方法。
A light projecting step of irradiating a subject with pattern light having a specific pattern to form a texture on the subject;
An imaging step of imaging the subject on which the texture is formed;
A derivation step for deriving distance information to the subject based on the captured image;
An analysis step of analyzing the presence or absence of an image abnormality for at least either the captured image or the image based on the distance information;
A dimming step for performing dimming control when analyzing that there is an image abnormality;
An information processing method comprising:
JP2015000389A 2014-10-03 2015-01-05 Information process system and information processing method Pending JP2016075658A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP15187756.0A EP3002550B1 (en) 2014-10-03 2015-09-30 Information processing system and information processing method for distance measurement
US14/872,518 US9659379B2 (en) 2014-10-03 2015-10-01 Information processing system and information processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2014204693 2014-10-03
JP2014204693 2014-10-03

Publications (1)

Publication Number Publication Date
JP2016075658A true JP2016075658A (en) 2016-05-12

Family

ID=55949894

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015000389A Pending JP2016075658A (en) 2014-10-03 2015-01-05 Information process system and information processing method

Country Status (1)

Country Link
JP (1) JP2016075658A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018017653A (en) * 2016-07-29 2018-02-01 セイコーエプソン株式会社 Three-dimensional measuring device, robot, robot controlling device, and robot system
WO2018061927A1 (en) * 2016-09-30 2018-04-05 日本電気株式会社 Information processing device, information processing method, and program storage medium
WO2018061925A1 (en) * 2016-09-30 2018-04-05 日本電気株式会社 Information processing device, length measurement system, length measurement method, and program storage medium
JP2019120591A (en) * 2018-01-05 2019-07-22 パナソニックIpマネジメント株式会社 Parallax value calculation device, parallax value calculation method and program
WO2020137199A1 (en) * 2018-12-27 2020-07-02 株式会社デンソー Object detection device and object detection method
JP2020129187A (en) * 2019-02-07 2020-08-27 ファナック株式会社 Contour recognition device, contour recognition system and contour recognition method
JP2021503603A (en) * 2017-11-17 2021-02-12 トリナミクス ゲゼルシャフト ミット ベシュレンクテル ハフツング Detector for locating at least one object
US11443410B2 (en) 2019-10-10 2022-09-13 Canon Kabushiki Kaisha Image processing method and image processing apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2008041518A1 (en) * 2006-10-02 2010-02-04 コニカミノルタホールディングス株式会社 Image processing apparatus, image processing apparatus control method, and image processing apparatus control program
JP2011137753A (en) * 2009-12-28 2011-07-14 Canon Inc Measuring system, image correction method, and computer program
JP2011209019A (en) * 2010-03-29 2011-10-20 Sony Corp Robot device and method of controlling the same
US20140132721A1 (en) * 2012-11-14 2014-05-15 Qualcomm Incorporated Structured Light Active Depth Sensing Systems Combining Multiple Images to Compensate for Differences in Reflectivity and/or Absorption

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2008041518A1 (en) * 2006-10-02 2010-02-04 コニカミノルタホールディングス株式会社 Image processing apparatus, image processing apparatus control method, and image processing apparatus control program
JP2011137753A (en) * 2009-12-28 2011-07-14 Canon Inc Measuring system, image correction method, and computer program
JP2011209019A (en) * 2010-03-29 2011-10-20 Sony Corp Robot device and method of controlling the same
US20140132721A1 (en) * 2012-11-14 2014-05-15 Qualcomm Incorporated Structured Light Active Depth Sensing Systems Combining Multiple Images to Compensate for Differences in Reflectivity and/or Absorption

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018017653A (en) * 2016-07-29 2018-02-01 セイコーエプソン株式会社 Three-dimensional measuring device, robot, robot controlling device, and robot system
WO2018061927A1 (en) * 2016-09-30 2018-04-05 日本電気株式会社 Information processing device, information processing method, and program storage medium
WO2018061925A1 (en) * 2016-09-30 2018-04-05 日本電気株式会社 Information processing device, length measurement system, length measurement method, and program storage medium
JPWO2018061927A1 (en) * 2016-09-30 2019-06-24 日本電気株式会社 INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM STORAGE MEDIUM
JP2021503603A (en) * 2017-11-17 2021-02-12 トリナミクス ゲゼルシャフト ミット ベシュレンクテル ハフツング Detector for locating at least one object
JP7254799B2 (en) 2017-11-17 2023-04-10 トリナミクス ゲゼルシャフト ミット ベシュレンクテル ハフツング a detector for determining the position of at least one object
JP2019120591A (en) * 2018-01-05 2019-07-22 パナソニックIpマネジメント株式会社 Parallax value calculation device, parallax value calculation method and program
JP2020106341A (en) * 2018-12-27 2020-07-09 株式会社デンソー Object detector and object detection method
JP7135846B2 (en) 2018-12-27 2022-09-13 株式会社デンソー Object detection device and object detection method
WO2020137199A1 (en) * 2018-12-27 2020-07-02 株式会社デンソー Object detection device and object detection method
JP2020129187A (en) * 2019-02-07 2020-08-27 ファナック株式会社 Contour recognition device, contour recognition system and contour recognition method
JP7028814B2 (en) 2019-02-07 2022-03-02 ファナック株式会社 External shape recognition device, external shape recognition system and external shape recognition method
US11443410B2 (en) 2019-10-10 2022-09-13 Canon Kabushiki Kaisha Image processing method and image processing apparatus

Similar Documents

Publication Publication Date Title
JP2016075658A (en) Information process system and information processing method
US9659379B2 (en) Information processing system and information processing method
EP3248374B1 (en) Method and apparatus for multiple technology depth map acquisition and fusion
US9092875B2 (en) Motion estimation apparatus, depth estimation apparatus, and motion estimation method
US9460516B2 (en) Method and image processing apparatus for generating a depth map
JP6786225B2 (en) Image processing equipment, imaging equipment and image processing programs
US9696613B2 (en) Image processing apparatus, projector and image processing method
US20210256729A1 (en) Methods and systems for determining calibration quality metrics for a multicamera imaging system
JP6353233B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP2017134561A (en) Image processing device, imaging apparatus and image processing program
JP2020021126A (en) Image processing device and control method thereof, distance detection device, imaging device, program
JP2011095131A (en) Image processing method
JP6362070B2 (en) Image processing apparatus, imaging apparatus, image processing method, program, and storage medium
JP6381206B2 (en) Image processing apparatus, control method thereof, and program
EP3987764B1 (en) Method for determining one or more groups of exposure settings to use in a 3d image acquisition process
US11037316B2 (en) Parallax calculation apparatus, parallax calculation method, and control program of parallax calculation apparatus
JP2021127998A (en) Distance information acquisition device and distance information acquisition method
JP2021004762A (en) Measurement device, imaging device, measurement system, control method, program and recording medium
JP2020106502A (en) Shape measuring device, control method, and program
JP2005216191A (en) Stereo image processing apparatus and method
US11790600B2 (en) Image processing device, imaging apparatus, image processing method, and recording medium
WO2024134935A1 (en) Three-dimensional information correction device and three-dimensional information correction method
TWI596360B (en) Image capturing device and image capturing method
JP6247724B2 (en) Measuring device
JP2016130721A (en) Method and apparatus for handling defect object in image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181023

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181024

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20190416