Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7516204B2 - IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD - Google Patents
[go: Go Back, main page]

JP7516204B2 - IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD - Google Patents

IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD Download PDF

Info

Publication number
JP7516204B2
JP7516204B2 JP2020175540A JP2020175540A JP7516204B2 JP 7516204 B2 JP7516204 B2 JP 7516204B2 JP 2020175540 A JP2020175540 A JP 2020175540A JP 2020175540 A JP2020175540 A JP 2020175540A JP 7516204 B2 JP7516204 B2 JP 7516204B2
Authority
JP
Japan
Prior art keywords
fitting function
disparity
image
search area
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020175540A
Other languages
Japanese (ja)
Other versions
JP2022066925A (en
Inventor
弘理 外舘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyocera Corp
Original Assignee
Kyocera Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyocera Corp filed Critical Kyocera Corp
Priority to JP2020175540A priority Critical patent/JP7516204B2/en
Priority to US18/007,299 priority patent/US12620110B2/en
Priority to EP21849069.6A priority patent/EP4191196A4/en
Priority to CN202180059982.XA priority patent/CN116171371A/en
Priority to PCT/JP2021/026692 priority patent/WO2022024793A1/en
Publication of JP2022066925A publication Critical patent/JP2022066925A/en
Application granted granted Critical
Publication of JP7516204B2 publication Critical patent/JP7516204B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Image Analysis (AREA)

Description

本発明は、画像処理装置、ステレオカメラ装置、移動体及び画像処理方法に関するものである。 The present invention relates to an image processing device, a stereo camera device, a moving object, and an image processing method.

ステレオカメラが撮像するステレオ画像それぞれにおいて、同じ物体の位置の違い(視差)に基づいて、実空間における当該物体の位置を算出することが知られている。視差を算出するために、基準画像の一つの小領域に対して、対応する比較画像の小領域を水平方向に1画素ずつずらしながらシティブロック距離が最小値となる画素ズレ量を算出する、いわゆるブロックマッチング方法が提案されている(特許文献1参照)。 It is known that the position of an object in real space can be calculated based on the difference in the position (parallax) of the same object in each of the stereo images captured by a stereo camera. To calculate the parallax, a so-called block matching method has been proposed in which a small area of a corresponding comparison image is shifted by one pixel at a time in the horizontal direction relative to a small area of a reference image, and the pixel shift amount at which the city block distance becomes the minimum value is calculated (see Patent Document 1).

特開2000-207965Patent Publication 2000-207965

しかし、ブロックマッチング方法では、視差の精度が低下することがある。 However, the block matching method can sometimes result in reduced disparity accuracy.

従って、上記のような従来技術の問題点に鑑みてなされた本開示の目的は、算出する視差の精度を向上させる画像処理装置、ステレオカメラ装置、移動体及び画像処理方法を提供することにある。 Therefore, in consideration of the problems with the conventional technology described above, the objective of the present disclosure is to provide an image processing device, a stereo camera device, a moving object, and an image processing method that improve the accuracy of calculated disparity.

上述した諸課題を解決すべく、第1の観点による画像処理装置は、
ステレオカメラが撮像した基準画像及び参照画像を取得する取得部と、
前記基準画像内の探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第1フィッティング関数を作成し、前記第1フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づいて、前記第1フィッティング関数に基づいて算出した視差、及び動的計画法を用いて算出した視差のいずれかを、前記探索領域内の被写体像の視差として選択する制御部と、を備える。
In order to solve the above-mentioned problems, an image processing apparatus according to a first aspect comprises:
An acquisition unit that acquires a standard image and a reference image captured by a stereo camera;
a control unit that creates a first fitting function indicating a relationship between the degree of disparity between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of disparity between a search area in the standard image and a comparison area that is displaced in the reference image by a pixel unit along a baseline length direction of the stereo camera, and selects, based on at least one of an extreme value of the first fitting function and a slope near the extreme value, one of a disparity calculated based on the first fitting function and a disparity calculated using dynamic programming, as a disparity of a subject image in the search area.

また、第2の観点によるステレオカメラ装置は、
基準画像及び参照画像を撮像するステレオカメラと、
前記基準画像内の探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第1フィッティング関数を作成し、前記第1フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づいて、前記第1フィッティング関数に基づいて算出した視差、及び動的計画法を用いて算出した視差のいずれかを、前記探索領域内の被写体像の視差として選択する画像処理装置と、を備える。
Moreover, a stereo camera device according to a second aspect of the present invention comprises:
A stereo camera that captures a standard image and a reference image;
and an image processing device that creates a first fitting function indicating a relationship between the degree of disparity between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of disparity between a search area in the standard image and a comparison area that is displaced in the reference image by a pixel unit along a baseline length direction of the stereo camera, and selects, based on at least one of an extreme value of the first fitting function and a slope near the extreme value, one of a disparity calculated based on the first fitting function and a disparity calculated using dynamic programming, as a disparity of a subject image in the search area.

また、第3の観点による移動体は、
基準画像及び参照画像を撮像するステレオカメラと、前記基準画像内の探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第1フィッティング関数を作成し、前記第1フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づいて、前記第1フィッティング関数に基づいて算出した視差、及び動的計画法を用いて算出した視差のいずれかを、前記探索領域内の被写体像の視差として選択する画像処理装置と、を有するステレオカメラ装置を備える。
A moving body according to a third aspect of the present invention comprises:
The stereo camera device includes: a stereo camera that captures a standard image and a reference image; and an image processing device that creates a first fitting function that indicates a relationship between the degree of dissimilarity of the search area and the comparison area relative to an amount of movement of the comparison area in the baseline length direction based on a plurality of degrees of dissimilarity between a search area in the standard image and a comparison area that is displaced in the reference image on a pixel-by-pixel basis along a baseline length direction of the stereo camera, and selects, as a dissimilarity of a subject image in the search area, one of a dissimilarity calculated based on the first fitting function and a dissimilarity calculated using dynamic programming based on at least one of an extreme value of the first fitting function and a slope near the extreme value.

また、第4の観点による画像処理方法は、
ステレオカメラに基準画像及び参照画像を撮像させるステップと、
前記基準画像内の探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第1フィッティング関数を作成するステップと、
前記第1フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づいて、前記第1フィッティング関数に基づいて算出した視差、及び動的計画法を用いて算出した視差のいずれかを、前記探索領域内の被写体像の視差として選択するステップと、を備える。
Further, an image processing method according to a fourth aspect comprises:
A step of capturing a standard image and a reference image by a stereo camera;
creating a first fitting function that indicates a relationship between the degree of difference between the search area and the comparison area relative to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the standard image and a comparison area that is displaced in the reference image in units of pixels along a baseline length direction of the stereo camera;
and selecting, based on at least one of an extreme value of the first fitting function and a slope near the extreme value, either the disparity calculated based on the first fitting function or the disparity calculated using dynamic programming as the disparity of the subject image within the search area.

上記のように構成された本開示に係る画像処理装置、ステレオカメラ装置、移動体及び画像処理方法によれば、視差の精度が向上する。 The image processing device, stereo camera device, moving body, and image processing method according to the present disclosure configured as described above improve the accuracy of parallax.

本実施形態に係る画像処理装置を含むステレオカメラ装置の概略構成を示すブロック図である。1 is a block diagram showing a schematic configuration of a stereo camera device including an image processing device according to an embodiment of the present invention. 図1のステレオカメラの移動体における位置を概念的に例示する側面図である。2 is a side view conceptually illustrating the position of the stereo camera of FIG. 1 on the moving body. 図1のステレオカメラの移動体における位置を概念的に例示する正面図である。2 is a front view conceptually illustrating the position of the stereo camera of FIG. 1 on the moving body. 図1の制御部が実行する位置算出処理を説明するためのフローチャートである。4 is a flowchart for explaining a position calculation process executed by a control unit in FIG. 1 . 第1フィッティング関数の極値の移動量と、移動量を無限に小さくしたフィッティング関数の極値の移動量とのずれが比較的大きい場合を示すグラフである。13 is a graph showing a case in which there is a relatively large deviation between the amount of movement of the extreme value of the first fitting function and the amount of movement of the extreme value of a fitting function in which the amount of movement is made infinitely small. 第1フィッティング関数の極値の移動量と、移動量を無限に小さくしたフィッティング関数の極値の移動量とのずれが比較的小さい場合を示すグラフである。13 is a graph showing a case in which the deviation between the amount of movement of the extreme value of the first fitting function and the amount of movement of the extreme value of a fitting function in which the amount of movement is infinitely small is relatively small. 第1フィッティング関数及び第2フィッティング関数それぞれの移動量ズレと、それぞれの極値との関係を示すグラフである。11 is a graph showing the relationship between the shift amount deviation of each of the first fitting function and the second fitting function and the respective extreme values.

以下、本開示を適用した画像処理装置の実施形態について、図面を参照して説明する。 Below, an embodiment of an image processing device to which the present disclosure is applied will be described with reference to the drawings.

図1に示すように、本実施形態の画像処理装置10を含むステレオカメラ装置11は、ステレオカメラ12及び画像処理装置10を含む。図2に示すように、ステレオカメラ装置11は、撮像したステレオ画像に基づいて、ステレオ画像に含まれる被写体像に相当する被写体の、移動体13を基準にしたワールド座標系における位置を算出する。図1に示すように、ステレオカメラ装置11は、被写体のワールド座標系の位置を外部装置14に通知する。外部装置14は、オートクルーズコントロールなどの走行支援装置、自動ブレーキ装置などの運転支援装置、被写体までの距離を報知する報知装置、ならびに警告を発する警告装置を含む。 As shown in FIG. 1, a stereo camera device 11 including an image processing device 10 of this embodiment includes a stereo camera 12 and an image processing device 10. As shown in FIG. 2, the stereo camera device 11 calculates the position of a subject corresponding to the subject image included in the stereo image in a world coordinate system based on a moving body 13, based on a captured stereo image. As shown in FIG. 1, the stereo camera device 11 notifies an external device 14 of the position of the subject in the world coordinate system. The external device 14 includes a driving support device such as an auto cruise control, a driving support device such as an automatic braking device, a notification device that notifies the distance to the subject, and a warning device that issues a warning.

移動体13は、例えば車両、船舶、航空機などを含んでよい。車両は、例えば、自動車、産業車両、鉄道車両、生活車両、滑走路を走行する固定翼機などを含んでよい。自動車は、例えば、乗用車、トラック、バス、二輪車、トロリーバスなどを含んでよい。産業車両は、例えば、農業、建設向けの産業車両などを含んでよい。産業車両は、例えば、フォークリフト、ゴルフカートなどを含んでよい。農業向けの産業車両は、例えば、トラクター、耕耘機、移植機、バインダー、コンバイン、芝刈り機などを含んでよい。建設向けの産業車両は、例えば、ブルドーザー、スクレーバー、ショベルカー、クレーン車、ダンプカー、ロードローラなどを含んでよい。車両は、人力で走行するものを含んでよい。車両の分類は、上述した例に限られない。例えば、自動車は、道路を走行可能な産業車両を含んでよい。複数の分類に同じ車両が含まれてよい。船舶は、例えば、マリンジェット、ボート、タンカーを含んでよい。航空機は、例えば、固定翼機、回転翼機などを含んでよい。 The moving body 13 may include, for example, vehicles, ships, aircraft, etc. The vehicles may include, for example, automobiles, industrial vehicles, railroad vehicles, residential vehicles, fixed-wing aircraft running on runways, etc. The automobiles may include, for example, passenger cars, trucks, buses, motorcycles, trolley buses, etc. The industrial vehicles may include, for example, industrial vehicles for agriculture and construction. The industrial vehicles may include, for example, forklifts, golf carts, etc. The agricultural industrial vehicles may include, for example, tractors, cultivators, transplanters, binders, combines, lawnmowers, etc. The construction industrial vehicles may include, for example, bulldozers, scrapers, excavators, cranes, dump trucks, road rollers, etc. The vehicles may include those that run by human power. The classification of vehicles is not limited to the above examples. For example, automobiles may include industrial vehicles that can run on roads. The same vehicle may be included in multiple classifications. The ships may include, for example, marine jets, boats, and tankers. Aircraft may include, for example, fixed-wing aircraft, rotorcraft, etc.

ステレオカメラ12及び画像処理装置10は、有線又は無線通信により通信可能である。ステレオカメラ12及び画像処理装置10とは、ネットワークを介して通信してよい。ネットワークは、例えば、有線又は無線のLAN(Local Area Network)、CAN(Controller Area Network)などを含んでよい。ステレオカメラ12及び画像処理装置10は、同一の筺体内に収納され一体的に構成されてよい。ステレオカメラ12及び画像処理装置10は、移動体13内に位置し、移動体13内のECU(Electronic Control Unit)と通信可能に構成されてよい。 The stereo camera 12 and the image processing device 10 can communicate with each other by wired or wireless communication. The stereo camera 12 and the image processing device 10 may communicate with each other via a network. The network may include, for example, a wired or wireless LAN (Local Area Network), CAN (Controller Area Network), etc. The stereo camera 12 and the image processing device 10 may be housed in the same housing and configured as an integrated unit. The stereo camera 12 and the image processing device 10 may be located in a mobile object 13 and configured to be able to communicate with an ECU (Electronic Control Unit) in the mobile object 13.

図2に示すように、ステレオカメラ装置11は、例えば、移動体13に搭載される。ステレオカメラ12は、例えば、移動体13の前方を撮像するように設置される。ステレオカメラ12は、例えば、後述する、ステレオカメラ12に含まれる複数のカメラの少なくとも1つの光軸OXは、移動体13の前後方向に略平行となるように配置される。 As shown in FIG. 2, the stereo camera device 11 is mounted on, for example, a moving body 13. The stereo camera 12 is installed, for example, so as to capture an image in front of the moving body 13. The stereo camera 12 is arranged, for example, so that the optical axis OX of at least one of the multiple cameras included in the stereo camera 12, which will be described later, is approximately parallel to the front-rear direction of the moving body 13.

ステレオカメラ12は、移動体13の多様な場所に搭載しうる。ステレオカメラ12は、例えば、移動体13の内部に搭載され、ウインドシールドを介して移動体13の外部を撮像する。ステレオカメラ12は、ルームミラーの前方又はダッシュボード上に配置される。ステレオカメラ12は、移動体13のフロントバンパー、フェンダーグリル、サイドフェンダー、ライトモジュール及びボンネットのいずれかに固定されていてよい。 The stereo camera 12 may be mounted in various locations on the mobile body 13. For example, the stereo camera 12 may be mounted inside the mobile body 13 and capture images of the outside of the mobile body 13 through the windshield. The stereo camera 12 may be positioned in front of the rearview mirror or on the dashboard. The stereo camera 12 may be fixed to any of the front bumper, fender grille, side fender, light module, and bonnet of the mobile body 13.

ステレオカメラ12は、互いに視差を有する複数のカメラを含む。図1に示すように、ステレオカメラ12は、例えば、第1のカメラ15及び第2のカメラ16を含む。ステレオカメラ12は、複数のカメラを協働させて、複数の方向から対象を撮像させ得る。ステレオカメラ12は、単一の筐体に複数のカメラを含んでよい。ステレオカメラ12は互いに独立し、且つ互いに離れて位置する2台以上のカメラを含んでよい。ステレオカメラ12は、互いに独立した複数のカメラに限られない。本開示では、例えば、離れた2箇所に入射される光を1つの受光素子に導く光学機構を有するカメラがステレオカメラ12として採用され得る。 The stereo camera 12 includes multiple cameras having a parallax with respect to each other. As shown in FIG. 1, the stereo camera 12 includes, for example, a first camera 15 and a second camera 16. The stereo camera 12 can capture images of an object from multiple directions by using multiple cameras in cooperation with each other. The stereo camera 12 may include multiple cameras in a single housing. The stereo camera 12 may include two or more cameras that are independent of each other and positioned apart from each other. The stereo camera 12 is not limited to multiple cameras that are independent of each other. In the present disclosure, for example, a camera having an optical mechanism that guides light incident at two separate points to one light receiving element may be adopted as the stereo camera 12.

ステレオカメラ12において、第1のカメラ15及び第2のカメラ16は、それぞれの光軸OXが互いに同じ被写体を撮像可能な方向を向くように、位置している。第1のカメラ15及び第2のカメラ16は、撮像した画像に少なくとも同じ被写体像が含まれるように、光軸OX及び位置が定められる。第1のカメラ15及び第2のカメラ16の光軸OXは、例えば、互いに平行である。光軸OXが平行とは、厳密な平行に限定されず、組立てのずれ、取付けのずれ、及びこれらの経時によるずれを許容してよい。第1のカメラ15及び第2のカメラ16の光軸OXは、平行に限定されず、互いに異なる方向を向いてよい。 In the stereo camera 12, the first camera 15 and the second camera 16 are positioned so that their optical axes OX face in directions that allow them to capture the same subject. The optical axes OX and positions of the first camera 15 and the second camera 16 are determined so that the captured images include at least the same subject image. The optical axes OX of the first camera 15 and the second camera 16 are, for example, parallel to each other. The optical axes OX being parallel is not limited to being strictly parallel, and may allow for misalignment in assembly, misalignment in installation, and misalignment over time. The optical axes OX of the first camera 15 and the second camera 16 are not limited to being parallel, and may face in different directions.

第1のカメラ15及び第2のカメラ16は、光軸OXに交わる方向において離れて位置している。図3に示すように、第1のカメラ15及び第2のカメラ16は、移動体13への取り付けにおいて定められている姿勢において、左右方向に沿って位置している。第1のカメラ15及び第2のカメラ16の位置の違いにより、各カメラで撮像した2つの画像において、互いに対応する被写体の位置は、異なる。第1のカメラ15が生成する基準画像、及び第2のカメラ16が生成する参照画像は、異なる視点から撮像したステレオ画像である。第1のカメラ15及び第2のカメラ16は、所定のフレームレート(例えば30fps)で被写体を撮像する。 The first camera 15 and the second camera 16 are positioned apart in a direction intersecting the optical axis OX. As shown in FIG. 3, the first camera 15 and the second camera 16 are positioned along the left-right direction in a posture determined when they are attached to the moving body 13. Due to differences in the positions of the first camera 15 and the second camera 16, the positions of the corresponding subjects in the two images captured by each camera are different. The base image generated by the first camera 15 and the reference image generated by the second camera 16 are stereo images captured from different viewpoints. The first camera 15 and the second camera 16 capture images of the subject at a predetermined frame rate (e.g., 30 fps).

第1のカメラ15及び第2のカメラ16は、それぞれ光軸OXを規定する光学系と撮像素子とを備える。第1のカメラ15及び第2のカメラ16はそれぞれ異なる光軸OXを有する。光学系は、レンズ又はミラーを含み、被写体像を撮像素子の受光面に結像させる。撮像素子は、例えば、CCDイメージセンサ(Charge-Coupled Device Image Sensor)、又はCMOSイメージセンサ(Complementary MOS Image Sensor)である。第1のカメラ15及び第2のカメラ16それぞれの撮像素子は、それぞれのカメラの光軸OXに垂直な同一面内に存在してよい。第1のカメラ15及び第2のカメラ16それぞれの撮像素子は、行列状に配置される複数の画素を有する。第1のカメラ15及び第2のカメラ16の撮像素子において、画素の並ぶ行方向がステレオカメラ12の基線長方向に平行であってよい。基線長方向は、第1のカメラ15の撮像素子の受光面への光軸OXの交点と、第2のカメラ16の撮像素子の受光面への光軸OXの交点とを通る直線の方向である。第1のカメラ15及び第2のカメラ16は、撮像素子に結像された画像を信号として生成する。第1のカメラ15及び第2のカメラ16は、撮像した画像に、歪み補正、明度調整、コントラスト調整、ガンマ補正などの任意の画像処理を施してよい。 The first camera 15 and the second camera 16 each include an optical system that defines an optical axis OX and an imaging element. The first camera 15 and the second camera 16 each have a different optical axis OX. The optical system includes a lens or a mirror, and forms an image of a subject on the light receiving surface of the imaging element. The imaging element is, for example, a CCD image sensor (Charge-Coupled Device Image Sensor) or a CMOS image sensor (Complementary MOS Image Sensor). The imaging elements of the first camera 15 and the second camera 16 may exist in the same plane perpendicular to the optical axis OX of each camera. The imaging elements of the first camera 15 and the second camera 16 each have a plurality of pixels arranged in a matrix. In the imaging elements of the first camera 15 and the second camera 16, the row direction in which the pixels are arranged may be parallel to the baseline length direction of the stereo camera 12. The baseline length direction is the direction of a straight line passing through the intersection of the optical axis OX of the first camera 15 with the light receiving surface of the imaging element of the second camera 16 and the intersection of the optical axis OX of the second camera 16 with the light receiving surface of the imaging element. The first camera 15 and the second camera 16 generate signals based on the images formed on the imaging elements. The first camera 15 and the second camera 16 may perform any image processing such as distortion correction, brightness adjustment, contrast adjustment, and gamma correction on the captured images.

図1に示すように、画像処理装置10は、取得部17、出力部18、メモリ19及び制御部20を備える。画像処理装置10は、移動体13内において任意の位置に配置されてよい。画像処理装置10は、例えば、移動体13のダッシュボード内に配置される。 As shown in FIG. 1, the image processing device 10 includes an acquisition unit 17, an output unit 18, a memory 19, and a control unit 20. The image processing device 10 may be disposed at any position within the mobile object 13. The image processing device 10 is disposed, for example, within the dashboard of the mobile object 13.

取得部17は、ステレオカメラ12及び外部機器から情報を取得する、画像処理装置10の入力インタフェースである。取得部17には、物理コネクタ、及び無線通信機が採用される。物理コネクタは、電気信号による伝送に対応した電気コネクタ、光信号による伝送に対応した光コネクタ及び電磁波による伝送に対応した電磁コネクタが含まれる。電気コネクタには、IEC60603に準拠するコネクタ、USB規格に準拠するコネクタ、RCA端子に対応するコネクタ、EIAJ CP-1211Aに規定されるS端子に対応するコネクタ、EIAJ RC-5237に規定されるD端子に対応するコネクタ、HDMI(登録商標)規格に準拠するコネクタ及びBNCを含む同軸ケーブルに対応するコネクタを含む。光コネクタは、IEC 61754に準拠する種々のコネクタを含む。無線通信機は、Bluetooth(登録商標)、及びIEEE802.11を含む各規格に準拠する無線通信機を含む。無線通信機は、少なくとも1つのアンテナを含む。 The acquisition unit 17 is an input interface of the image processing device 10 that acquires information from the stereo camera 12 and external devices. The acquisition unit 17 employs a physical connector and a wireless communication device. The physical connector includes an electrical connector that supports transmission by electrical signals, an optical connector that supports transmission by optical signals, and an electromagnetic connector that supports transmission by electromagnetic waves. The electrical connector includes a connector that complies with IEC 60603, a connector that complies with the USB standard, a connector that supports an RCA terminal, a connector that supports an S terminal defined in EIAJ CP-1211A, a connector that supports a D terminal defined in EIAJ RC-5237, a connector that complies with the HDMI (registered trademark) standard, and a connector that supports a coaxial cable including BNC. The optical connector includes various connectors that comply with IEC 61754. The wireless communication device includes a wireless communication device that complies with each standard including Bluetooth (registered trademark) and IEEE 802.11. The wireless communication device includes at least one antenna.

取得部17は、ステレオカメラ12が撮像により生成した基準画像及び参照画像を信号として取得する。取得部17は取得した基準画像及び参照画像を、制御部20に引き渡す。取得部17は、ステレオカメラ12の撮像信号の伝送方式に対応してよい。取得部17は、ネットワークを介してステレオカメラ12の出力インタフェースに接続されてよい。 The acquisition unit 17 acquires the standard image and the reference image generated by the stereo camera 12 through imaging as signals. The acquisition unit 17 passes the acquired standard image and reference image to the control unit 20. The acquisition unit 17 may be compatible with a transmission method for the imaging signal of the stereo camera 12. The acquisition unit 17 may be connected to the output interface of the stereo camera 12 via a network.

出力部18は、画像処理装置10が算出する被写体のワールド座標系における位置を、移動体13内の他の装置又は他の移動体、路側機などの移動体13外の外部装置14に出力し得る、画像処理装置10の出力インタフェースである。出力部18は、取得部17と同様に、有線及び無線の通信に対応した種々のインタフェースを含む。出力部18は、例えば、CANのインタフェースを有し、移動体13内の他の装置と通信を行う。 The output unit 18 is an output interface of the image processing device 10 that can output the position of the subject in the world coordinate system calculated by the image processing device 10 to other devices within the mobile body 13 or to external devices 14 outside the mobile body 13, such as other mobile bodies or roadside units. The output unit 18, like the acquisition unit 17, includes various interfaces compatible with wired and wireless communication. The output unit 18 has, for example, a CAN interface and communicates with other devices within the mobile body 13.

メモリ19は、例えば、RAM(Random Access Memory)及びROM(Read Only Memory)など、任意の記憶デバイスを含む。メモリ19は、制御部20を機能させる多様なプログラム、及び制御部20が用いる多様な情報を記憶する。 The memory 19 includes any storage device, such as a RAM (Random Access Memory) and a ROM (Read Only Memory). The memory 19 stores various programs that cause the control unit 20 to function, and various information used by the control unit 20.

制御部20は、1以上のプロセッサ及びメモリを含む。プロセッサは、特定のプログラムを読み込ませて特定の機能を実行する汎用のプロセッサ、及び特定の処理に特化した専用のプロセッサを含んでよい。専用のプロセッサは、特定用途向けIC(ASIC;Application Specific Integrated Circuit)を含んでよい。プロセッサは、プログラマブルロジックデバイス(PLD;Programmable Logic Device)を含んでよい。PLDは、FPGA(Field-Programmable Gate Array)を含んでよい。制御部20は、1つまたは複数のプロセッサが協働するSoC(System-on-a-Chip)、及びSiP(System In a Package)のいずれかであってもよい。 The control unit 20 includes one or more processors and memories. The processor may include a general-purpose processor that loads a specific program to execute a specific function, and a dedicated processor specialized for a specific process. The dedicated processor may include an application specific integrated circuit (ASIC). The processor may include a programmable logic device (PLD). The PLD may include a field-programmable gate array (FPGA). The control unit 20 may be either a system-on-a-chip (SoC) in which one or more processors work together, or a system in a package (SIP).

制御部20は、以下に説明するように、少なくとも第1フィッティング関数を作成する。制御部20は、基準画像内の任意の領域を探索領域に指定する。制御部20は、例えば、任意の1画素を注目画素として、当該注目画素を含む所定の大きさの領域を探索領域に指定する。探索領域は、例えば、注目画素を中心としたm行n列(m、nは自然数)の大きさの領域であってよい。 The control unit 20 creates at least a first fitting function as described below. The control unit 20 designates an arbitrary region in the reference image as a search region. For example, the control unit 20 designates an arbitrary pixel as a pixel of interest and designates an area of a predetermined size including the pixel of interest as the search region. The search region may be, for example, an area of m rows and n columns (m and n are natural numbers) centered on the pixel of interest.

制御部20は、参照画像内で、探索領域の位置から基線長方向に沿って画素単位で変位させた領域を比較領域に指定する。制御部20は、基線長方向に沿った両方向に1画素ずつ変位させて複数の比較領域を指定する。 The control unit 20 designates, as a comparison region, a region in the reference image that is displaced in pixel units from the position of the search region along the baseline length direction. The control unit 20 designates multiple comparison regions by displacing one pixel at a time in both directions along the baseline length direction.

制御部20は、探索領域及び比較領域に含まれる部分画像同士の相違度を算出する。相違度は、例えば、SAD(Sum of Absolute Difference)、SSD(Sum of Squared Difference)などの部分画像を構成する画素の画素値の相違に応じて変化する指数である。制御部20は、変位させた位置別の複数の相違度を算出する。本実施形態において、相違度は、SAD及びSSDのように探索領域と比較領域との視覚的な相違が大きくなるほど増加する。 The control unit 20 calculates the degree of difference between the partial images included in the search area and the comparison area. The degree of difference is an index that changes according to the difference in pixel values of the pixels that make up the partial image, such as SAD (Sum of Absolute Difference) and SSD (Sum of Squared Difference). The control unit 20 calculates multiple degrees of difference for each displaced position. In this embodiment, the degree of difference increases as the visual difference between the search area and the comparison area increases, such as SAD and SSD.

一般的に、相違度が極値である比較領域は、相違度を算出した比較領域の中で最も探索領域に類似している。本実施形態において、相違度の極値は、SAD及びSSDのように探索領域と比較領域との視覚的な相違が大きくなるほど相違度が増加する構成においては、極小値である。 In general, a comparison area with an extreme dissimilarity is the most similar to the search area among the comparison areas for which the dissimilarity was calculated. In this embodiment, the extreme dissimilarity is a minimum value in a configuration such as SAD and SSD in which the dissimilarity increases as the visual difference between the search area and the comparison area increases.

制御部20は、複数の比較領域それぞれに対して算出した相違度に基づいて、第1フィッティング関数を作成する。第1フィッティング関数は、探索領域に対して比較領域を基線長方向に移動させた移動量に対する相違度の関係を示す関数である。 The control unit 20 creates a first fitting function based on the dissimilarity calculated for each of the multiple comparison regions. The first fitting function is a function that indicates the relationship between the dissimilarity and the amount of movement of the comparison region in the baseline length direction relative to the search region.

制御部20は、第1フィッティング関数として、第1粗関数及び第1詳細関数の少なくとも一方を作成してよい。第1粗関数は、移動量が互いに隣接する2つの相違度を線分で結ばれている関数であってよい。第1詳細関数は、前述の移動量に対応する相違度を通るように、等角直線フィッティング又はパラボラフィッティングなどを行うことにより作成される。 The control unit 20 may create at least one of a first coarse function and a first detailed function as the first fitting function. The first coarse function may be a function in which two dissimilarity degrees whose movement amounts are adjacent to each other are connected by a line segment. The first detailed function is created by performing equiangular linear fitting or parabolic fitting so that the function passes through the dissimilarity degree corresponding to the aforementioned movement amount.

制御部20は、以下に説明するように、さらに第2フィッティング関数を作成してよい。制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させる。0.5画素変位させるとは、例えば、画像を構成する画素を変位方向に沿って互いに隣接する画素値を平均することにより画素補間を行い、0.5画素変位させた位置の画素値を算出することを意味する。基準画像及び参照画像の一方の変位は、画像全体でなく、視差を算出する探索領域及び比較領域の周辺であってもよい。変位方向は-0.5画素としたマイナス方向であってよい。 The control unit 20 may further create a second fitting function, as described below. The control unit 20 displaces one of the base image and the reference image by 0.5 pixels in the baseline length direction. Displacing by 0.5 pixels means, for example, performing pixel interpolation by averaging the pixel values of pixels that make up the image adjacent to each other along the displacement direction, and calculating the pixel value at the position displaced by 0.5 pixels. The displacement of one of the base image and the reference image may not be the entire image, but may be the periphery of the search area and comparison area where the parallax is calculated. The displacement direction may be a negative direction of -0.5 pixels.

制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で、第1フィッティング関数の作成時の画像全体の中の同じ位置で同じ大きさの領域を探索領域に指定する。探索領域の大きさは第1フィッティング関数を作成する場合の探索領域と同じ大きさである。 The control unit 20 displaces one of the base image and the reference image by 0.5 pixels in the baseline length direction, and specifies an area of the same size and position in the entire image as when the first fitting function was created as the search area. The size of the search area is the same as the size of the search area when the first fitting function is created.

制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で、参照画像内で、探索領域の位置から基線長方向に沿って画素単位で変位させた領域を比較領域に指定する。制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で、探索領域及び比較領域に含まれる部分画像同士の相違度を算出する。 The control unit 20 designates an area in the reference image that is displaced by pixels from the position of the search area along the baseline length direction as a comparison area, with one of the base image and the reference image displaced by 0.5 pixels in the baseline length direction. The control unit 20 calculates the degree of difference between the partial images included in the search area and the comparison area, with one of the base image and the reference image displaced by 0.5 pixels in the baseline length direction.

制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で、上述の複数の比較領域それぞれに対して算出した相違度に基づいて、第2フィッティング関数を作成する。第2フィッティング関数は、探索領域に対して比較領域を基線長方向に移動させた移動量に対する相違度の関係を示す関数である。 The control unit 20 creates a second fitting function based on the degree of dissimilarity calculated for each of the above-mentioned multiple comparison regions while one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction. The second fitting function is a function that indicates the relationship between the degree of dissimilarity and the amount of movement of the comparison region in the baseline length direction relative to the search region.

制御部20は第2フィッティング関数として、第2粗関数及び第2詳細関数の少なくとも一方を作成してよい。第2粗関数は、移動量が互いに隣接する2つの相違度を線分で結ばれている関数であってよい。第2詳細関数は、前述の移動量に対応する相違度を通るように、当確直線フィッティング又はパラボラフィッティングなどを行うことにより作成される。 The control unit 20 may create at least one of a second coarse function and a second detailed function as the second fitting function. The second coarse function may be a function in which two dissimilarity degrees whose movement amounts are adjacent to each other are connected by a line segment. The second detailed function is created by performing approximate straight line fitting or parabolic fitting so that the function passes through the dissimilarity degree corresponding to the aforementioned movement amount.

制御部20は、作成した第1フィッティング関数に基づいて、視差を算出する。制御部20は、さらに具体的には、第1フィッティング関数の相違度が最小となる移動量を、視差として算出してよい。視差を算出するための第1フィッティング関数は、第1粗関数及び第1詳細関数のいずれであってよい。本実施形態において、視差を算出するための第1フィッティング関数は第1詳細関数である。 The control unit 20 calculates the disparity based on the created first fitting function. More specifically, the control unit 20 may calculate the amount of movement that minimizes the degree of difference of the first fitting function as the disparity. The first fitting function for calculating the disparity may be either the first coarse function or the first detailed function. In this embodiment, the first fitting function for calculating the disparity is the first detailed function.

制御部20は、第2フィッティング関数を更に作成した構成においては、作成した第1フィッティング関数及び第2フィッティング関数に基づいて、視差を算出してよい。制御部20は、さらに具体的には、第1フィッティング関数及び第2フィッティング関数の、同じ移動量における相違度を合計又は平均化したフィッティング関数において相違度が最小となる移動量を、視差として算出してよい。 In a configuration in which a second fitting function is further created, the control unit 20 may calculate the disparity based on the created first fitting function and second fitting function. More specifically, the control unit 20 may calculate, as the disparity, the movement amount at which the disparity is minimum in a fitting function obtained by summing or averaging the disparities at the same movement amount between the first fitting function and the second fitting function.

また、制御部20は、動的計画法、言換えるとSGM(Semi―Global Matching)法を用いて、視差を算出する。SGM法について、以下に簡単に説明する。SGM法では、(1)式で定められる合成コストS(p,d)の最小値に対する画素のずれ量が視差として算出される。 The control unit 20 also calculates the disparity using dynamic programming, in other words, the SGM (Semi-Global Matching) method. The SGM method is briefly described below. In the SGM method, the amount of pixel shift with respect to the minimum value of the synthesis cost S(p, d) defined by equation (1) is calculated as the disparity.

Figure 0007516204000001
Figure 0007516204000001

(1)式において、pは注目画素、dはシフト量、Lr(p,d)は(2)式で定められる、注目画素pのシフト量dに対する、r方向における経路コスト値である。 In equation (1), p is the pixel of interest, d is the shift amount, and Lr(p, d) is the path cost value in the r direction for the shift amount d of the pixel of interest p, as determined by equation (2).

Figure 0007516204000002
Figure 0007516204000002

(2)式において、C(p,d)はシフト量dの時のコスト、rハットはr方向において注目画素pの1画素手前の画素、Lr(p-r、d)はr方向の経路において注目画素pの1画素手前の画素のシフト量dに対する、r方向における経路コスト値、iは変数、P、PはP>Pが成立するペナルティ値である。 In equation (2), C(p, d) is the cost for a shift amount of d, r is the pixel one pixel before the pixel of interest p in the r direction, Lr(p-r, d) is the path cost value in the r direction for a shift amount d of the pixel one pixel before the pixel of interest p on the path in the r direction, i is a variable, and P1 and P2 are penalty values for which P2 > P1 holds.

制御部20は、少なくとも第1フィッティング関数の極値及び当該極値近傍の傾きの少なくとも一方に基づいて、第1フィッティング関数に基づいて算出した視差及び動的計画法を用いて算出した視差のいずれかを、探索領域内の被写体像の視差として選択する。制御部20は、さらに第2フィッティング関数の極値及び当該極値近傍の傾きの少なくとも一方にも基づいて、2つの視差のいずれかを選択してよい。 The control unit 20 selects one of the disparities calculated based on the first fitting function and the disparity calculated using dynamic programming as the disparity of the subject image in the search area based on at least one of the extreme value of the first fitting function and the slope near the extreme value. The control unit 20 may further select one of the two disparities based on at least one of the extreme value of the second fitting function and the slope near the extreme value.

最初に、第1フィッティング関数の極値及び当該極値近傍の傾きの少なくとも一方に基づいた視差の選択(以下、「第1フィッティング関数に基づく視差の選択」とも呼ぶ。)について、以下に説明する。 First, the selection of disparity based on at least one of the extreme value of the first fitting function and the slope near the extreme value (hereinafter also referred to as "selection of disparity based on the first fitting function") will be described below.

本実施形態においては、制御部20は、第1フィッティング関数の極小値が第1の極小閾値以上且つ当該極小値近傍の傾きが第1の傾き閾値以上である場合、第1フィッティング関数に基づいて算出した視差を選択してよい。極小値近傍の傾きは、例えば、極小値となる移動量から、当該移動量にプラス方向に隣接する整数の移動量までの間の傾きと、当該移動量にマイナス方向に隣接する整数の移動量までの間の傾きの絶対値との中の最大値である。制御部20は、第1フィッティング関数の極小値が第1の極小閾値以下且つ当該極小値近傍の傾きが第1の傾き閾値以下である場合、動的計画法を用いて算出した視差を選択する。 In this embodiment, the control unit 20 may select the disparity calculated based on the first fitting function when the minimum value of the first fitting function is equal to or greater than the first minimum threshold and the slope near the minimum value is equal to or greater than the first slope threshold. The slope near the minimum value is, for example, the maximum value among the absolute values of the slope between the movement amount that is the minimum value and the integer movement amount adjacent to the movement amount in the positive direction and the slope between the integer movement amount adjacent to the movement amount in the negative direction. The control unit 20 selects the disparity calculated using dynamic programming when the minimum value of the first fitting function is equal to or less than the first minimum threshold and the slope near the minimum value is equal to or less than the first slope threshold.

視差を選択するための第1フィッティング関数は、第1粗関数及び第1詳細関数のいずれであってよい。本実施形態において、視差を選択するための第1フィッティング関数は第1粗関数である。 The first fitting function for selecting the disparity may be either a first coarse function or a first detailed function. In this embodiment, the first fitting function for selecting the disparity is a first coarse function.

さらに、本実施形態において、制御部20は、第1フィッティング関数の極小値が第1の極小閾値以上であること、及び当該極小値近傍の傾きが第1の傾き閾値以上であることのいずれかを満たす場合、第1フィッティング関数に基づいて算出した視差を選択してよい。言換えると、制御部20は、第1フィッティング関数の極小値が第1極小閾値以下且つ当該極小値近傍の傾きが第1傾き閾値以下ではない場合、第1フィッティング関数に基づいて算出した視差を選択してよい。 Furthermore, in this embodiment, the control unit 20 may select the disparity calculated based on the first fitting function when either the minimum value of the first fitting function is equal to or greater than the first minimum threshold, or the slope near the minimum value is equal to or greater than the first slope threshold. In other words, the control unit 20 may select the disparity calculated based on the first fitting function when the minimum value of the first fitting function is equal to or less than the first minimum threshold and the slope near the minimum value is not equal to or less than the first slope threshold.

または、本実施形態において、制御部20は、第1フィッティング関数の極小値が第2の極小閾値以下であること、及び当該極小値近傍の傾きが第2の傾き閾値以下であることのいずれかを満たす場合、動的計画法を用いて算出した視差を選択してよい。第2の極小閾値は、第1の極小閾値未満である。第2の傾き閾値は、第1の傾き閾値未満である。 Alternatively, in this embodiment, the control unit 20 may select the disparity calculated using dynamic programming if either the minimum value of the first fitting function is equal to or less than the second minimum threshold and the slope near the minimum value is equal to or less than the second slope threshold. The second minimum threshold is less than the first minimum threshold. The second slope threshold is less than the first slope threshold.

次に、第1フィッティング関数の極値及び当該極値近傍の傾きの少なくとも一方、並びに第2フィッティング関数の極値及び当該極値近傍の傾きの少なくとも一方に基づいた視差の選択(以下、「第1フィッティング関数及び第2フィッティング関数に基づく視差の選択」とも呼ぶ。)について、以下に説明する。 Next, the selection of disparity based on at least one of the extreme value of the first fitting function and the slope near the extreme value, and at least one of the extreme value of the second fitting function and the slope near the extreme value (hereinafter, also referred to as "selection of disparity based on the first fitting function and the second fitting function") will be described below.

本実施形態において、制御部20は、第1フィッティング関数の極小値及び第2フィッティング関数の極小値の中の最大値(以後、「最大の極小値」とも呼ぶ。)を、第1フィッティング関数に基づく視差の選択における第1フィッティング関数の極小値の代わりに用いて、視差の選択を行ってよい。制御部20は、第1フィッティング関数の傾き及び前記第2フィッティング関数の傾きの中の最大値(「最大の傾き」とも呼ぶ。)を、第1フィッティング関数に基づく視差の選択における第1フィッティング関数の極小値近傍の傾きの代わりに用いて、視差の選択を行ってよい。 In this embodiment, the control unit 20 may select a disparity by using the maximum value among the minimum values of the first fitting function and the second fitting function (hereinafter also referred to as the "largest minimum value") instead of the minimum value of the first fitting function in selecting a disparity based on the first fitting function. The control unit 20 may select a disparity by using the maximum value among the slopes of the first fitting function and the second fitting function (hereinafter also referred to as the "maximum slope") instead of the slope near the minimum value of the first fitting function in selecting a disparity based on the first fitting function.

より具体的には、制御部20は、最大の極小値が第1の極小閾値以上且つ最大の傾きが第1の傾き閾値以上である場合、第1フィッティング関数及び第2フィッティング関数に基づいて算出した視差を、探索領域内の被写体像の視差として選択する。制御部20は、最大の極小値が第1の極小閾値以下且つ最大の傾きが第1の傾き閾値以下である場合、動的計画法を用いて算出した視差を選択する。 More specifically, when the maximum minimum value is equal to or greater than the first minimum threshold and the maximum slope is equal to or greater than the first slope threshold, the control unit 20 selects the disparity calculated based on the first fitting function and the second fitting function as the disparity of the subject image in the search region. When the maximum minimum value is equal to or less than the first minimum threshold and the maximum slope is equal to or less than the first slope threshold, the control unit 20 selects the disparity calculated using dynamic programming.

さらに、制御部20は、最大の極小値が第1の極小閾値以上であること、及び最大の傾きが第1の傾き閾値以上であることのいずれかを満たす場合、第1フィッティング関数及び第2フィッティング関数に基づいて算出した視差を選択してよい。または、制御部20は、最大の極小値が第2の極小閾値以下であること、及び最大の傾きが第2の傾き閾値以下であることのいずれかを満たす場合、動的計画法を用いて算出した視差を選択してよい。 Furthermore, the control unit 20 may select the disparity calculated based on the first fitting function and the second fitting function when either the maximum minimum value is equal to or greater than the first minimum threshold value and the maximum slope is equal to or greater than the first slope threshold value. Alternatively, the control unit 20 may select the disparity calculated using dynamic programming when either the maximum minimum value is equal to or less than the second minimum threshold value and the maximum slope is equal to or less than the second slope threshold value.

制御部20は、選択した視差、外部標定要素及び内部標定要素に基づいて、探索領域内の被写体像に対応する被写体のワールド座標系における位置を算出してよい。制御部20は、算出した被写体のワールド座標系の位置を外部装置14に出力するように、出力部18を制御してよい。制御部20は、基準画像の一部または基準画像のすべてを順次比較領域に指定して、画素毎に被写体の位置を算出してよい。 The control unit 20 may calculate the position in the world coordinate system of the subject corresponding to the subject image in the search area based on the selected parallax, exterior orientation parameters, and interior orientation parameters. The control unit 20 may control the output unit 18 to output the calculated position in the world coordinate system of the subject to the external device 14. The control unit 20 may sequentially designate a part of the reference image or the entire reference image as a comparison area and calculate the position of the subject for each pixel.

次に、本実施形態において制御部20が実行する、位置算出処理について、図4のフローチャートを用いて説明する。位置算出処理は、ステレオカメラ12から1フレームの基準画像及び参照画像を取得するたびに開始する。 Next, the position calculation process executed by the control unit 20 in this embodiment will be described with reference to the flowchart in FIG. 4. The position calculation process starts each time one frame of the base image and the reference image is acquired from the stereo camera 12.

ステップS100において、制御部20は、基準画像に対して指定すべき領域の中で、未指定である領域の中から探索領域を指定する。また、制御部20は、参照画像に対して複数の比較領域を指定する。指定後、プロセスはステップS101に進む。 In step S100, the control unit 20 specifies a search area from among unspecified areas that should be specified for the base image. The control unit 20 also specifies multiple comparison areas for the reference image. After the specification, the process proceeds to step S101.

ステップS101では、制御部20は、ステップS100において指定した探索領域と複数の比較領域それぞれとの相違度に基づいて第1フィッティング関数及び第2フィッティング関数を作成する。作成後、プロセスはステップS102に進む。 In step S101, the control unit 20 creates a first fitting function and a second fitting function based on the degree of difference between the search area specified in step S100 and each of the multiple comparison areas. After the functions are created, the process proceeds to step S102.

ステップS102では、制御部20は、第1フィッティング関数及び第2フィッティング関数に基づいて視差を算出する。算出後、プロセスはステップS103に進む。 In step S102, the control unit 20 calculates the disparity based on the first fitting function and the second fitting function. After the calculation, the process proceeds to step S103.

ステップS103では、制御部20は、動的計画法を用いて視差を算出する。算出後、プロセスはステップS104に進む。 In step S103, the control unit 20 calculates the disparity using dynamic programming. After the calculation, the process proceeds to step S104.

ステップS104では、制御部20は、第1フィッティング関数及び第2フィッティング関数それぞれの極小値を選択する。選択後、プロセスはステップS105に進む。 In step S104, the control unit 20 selects the minimum values of each of the first fitting function and the second fitting function. After the selection, the process proceeds to step S105.

ステップS105では、制御部20は、ステップS104において選択した第1フィッティング関数及び第2フィッティング関数それぞれの極小値近傍の傾きを算出する。算出後、プロセスはステップS106に進む。 In step S105, the control unit 20 calculates the slopes near the minimum values of the first fitting function and the second fitting function selected in step S104. After the calculation, the process proceeds to step S106.

ステップS106では、制御部20は、ステップS104において選択した第1フィッティング関数及び第2フィッティング関数それぞれの極小値の中の最大の極小値を選択する。また、制御部20は、ステップS105において算出した第1フィッティング関数及び第2フィッティング関数それぞれの極小値近傍の傾きの中の最大の傾きを選択する。選択後、プロセスはステップS107に進む。 In step S106, the control unit 20 selects the maximum minimum value among the minimum values of each of the first fitting function and the second fitting function selected in step S104. The control unit 20 also selects the maximum slope among the slopes near the minimum values of each of the first fitting function and the second fitting function calculated in step S105. After the selection, the process proceeds to step S107.

ステップS107では、制御部20は、ステップS106において選択した最大の極小値が第1の極小閾値以下且つステップS106において選択した最大の傾きが第1の傾き閾値以下であるか否かを判別する。最大の極小閾値が第1の極小閾値以下且つ最大の傾きが第1の傾き閾値以下である場合、プロセスはステップS108に進む。最大の極小閾値が第1の極小閾値以下且つ最大の傾きが第1の傾き閾値以下でない場合、プロセスはステップS109に進む。 In step S107, the control unit 20 determines whether the maximum minimum value selected in step S106 is less than or equal to the first minimum threshold and the maximum slope selected in step S106 is less than or equal to the first slope threshold. If the maximum minimum threshold is less than or equal to the first minimum threshold and the maximum slope is less than or equal to the first slope threshold, the process proceeds to step S108. If the maximum minimum threshold is not less than or equal to the first minimum threshold and the maximum slope is not less than or equal to the first slope threshold, the process proceeds to step S109.

ステップS108では、制御部20は、ステップS103において算出した、動的計画法を用いた視差を、ステップS100において指定した探索領域の被写体像の視差として選択する。選択後、プロセスはステップS110に進む。 In step S108, the control unit 20 selects the disparity calculated using dynamic programming in step S103 as the disparity of the subject image in the search area specified in step S100. After the selection, the process proceeds to step S110.

ステップS109では、制御部20は、ステップS102において算出した、第1フィッティング関数及び第2フィッティング関数に基づいて算出した視差を、ステップS100において指定した探索領域の被写体像の視差として選択する。選択後、プロセスはステップS110に進む。 In step S109, the control unit 20 selects the disparity calculated based on the first fitting function and the second fitting function calculated in step S102 as the disparity of the subject image in the search area specified in step S100. After the selection, the process proceeds to step S110.

ステップS110では、制御部20は、ステップS108及びステップS109の一方において選択した視差、外部標定要素及び内部標定要素に基づいて、ステップS100において指定した探索領域に含まれる被写体像に対応する被写体の位置を算出する。算出後、プロセスはステップS111に進む。 In step S110, the control unit 20 calculates the position of the subject corresponding to the subject image included in the search area specified in step S100 based on the parallax, exterior orientation parameters, and interior orientation parameters selected in one of steps S108 and S109. After the calculation, the process proceeds to step S111.

ステップS111では、制御部20は、ステップS110において算出した位置を外部装置14に出力するように出力部18を制御する。出力後、プロセスはステップS112に進む。 In step S111, the control unit 20 controls the output unit 18 to output the position calculated in step S110 to the external device 14. After the output, the process proceeds to step S112.

ステップS112では、制御部20は、基準画像に対して指定すべき領域のすべてが探索領域として指定されたか否かを判別する。一部が指定されていない場合、プロセスはステップS100に戻る。すべての指定すべき領域が指定済みである場合、位置算出処理は終了する。 In step S112, the control unit 20 determines whether all of the areas to be specified in the reference image have been specified as search areas. If some areas have not been specified, the process returns to step S100. If all of the areas to be specified have been specified, the position calculation process ends.

以上のような構成の本実施形態の画像処理装置10は、基準画像内の探索領域と参照画像内でステレオカメラ12の基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、比較領域を基線長方向に移動させた移動量に対する探索領域及び比較領域の相違度の関係を示す第1フィッティング関数を作成し、第1フィッティング関数の極値及び当該極値近傍の傾きの少なくとも一方に基づいて、第1フィッティング関数に基づいて算出した視差及び動的計画法を用いて算出した視差のいずれかを、探索領域内の被写体像の視差として選択する。一般的に、テクスチャレスの領域内のように探索領域と探索領域近傍の領域とが似ている場合、極値近傍における複数の比較領域それぞれの相違度は差が小さい。相違度の差が小さいことは、複数の比較領域の視覚的な相違が極めて小さいことを示す。それゆえ、当該場合、フィッティング関数を用いたブロックマッチングにより算出する視差の精度は低下する。一方で、探索領域と探索領域近傍の領域とが似ている場合であっても、動的計画法を用いて算出する視差の精度は、フロックマッチングにより算出する視差の精度より高い。そこで、上述の構成を有する画像処理装置10は、探索領域と探索領域近傍の領域の視覚的な相違に応じて変わり得る、第1フィッティング関数の極値及び極値近傍の傾きの少なくとも一方に基づいて、より精度の高い視差を選択し得る。したがって、画像処理装置10は、被写体の位置の算出に用いる視差の精度を向上させる。 The image processing device 10 of this embodiment configured as described above creates a first fitting function that indicates the relationship between the disparity between the search area and the comparison area relative to the amount of movement of the comparison area in the baseline length direction based on multiple disparities between the search area in the standard image and the comparison area displaced in pixel units along the baseline length direction of the stereo camera 12 in the reference image, and selects either the disparity calculated based on the first fitting function or the disparity calculated using dynamic programming as the disparity of the subject image in the search area based on at least one of the extreme value of the first fitting function and the slope near the extreme value. Generally, when the search area and the area near the search area are similar, such as in a textureless area, the difference between the disparities of each of the multiple comparison areas near the extreme value is small. A small difference in disparity indicates that the visual difference between the multiple comparison areas is extremely small. Therefore, in this case, the accuracy of the disparity calculated by block matching using the fitting function decreases. On the other hand, even if the search area and the area near the search area are similar, the accuracy of the disparity calculated using dynamic programming is higher than the accuracy of the disparity calculated by flock matching. Therefore, the image processing device 10 having the above-mentioned configuration can select a more accurate disparity based on at least one of the extreme value and the slope near the extreme value of the first fitting function, which can change depending on the visual difference between the search area and the area near the search area. Therefore, the image processing device 10 improves the accuracy of the disparity used to calculate the position of the subject.

また、本実施形態の画像処理装置10では、相違度は探索領域と比較領域との視覚的な相違が大きくなるほど増加し、制御部20は第1フィッティング関数の極小値が第1の極小閾値以上且つ当該極小値近傍の傾きが第1の傾き閾値以上である場合に第1フィッティング関数に基づいて算出した視差を選択し、極小値が第1の極小閾値以下且つ傾きが第1の傾き閾値以下である場合に動的計画法を用いて算出した視差を選択する。一般的に、探索領域における特徴が少ない場合、探索領域及び比較領域の相違度は相対的に小さい。また、一般的に探索領域における特徴が少ない場合、移動量に対する相違度の変化、言換えると傾きは相対的に小さい。そこで、上述の構成を有する画像処理装置10は、特徴が多い可能性の高い探索領域に対しては、ブロックマッチングにより算出した視差を選択し得、特徴が少ない可能性の高い探索領域に対しては、動的計画法を用いて算出した視差を選択し得る。 In addition, in the image processing device 10 of this embodiment, the disparity increases as the visual difference between the search area and the comparison area increases, and the control unit 20 selects the disparity calculated based on the first fitting function when the minimum value of the first fitting function is equal to or greater than the first minimum threshold and the slope near the minimum value is equal to or greater than the first slope threshold, and selects the disparity calculated using dynamic programming when the minimum value is equal to or less than the first minimum threshold and the slope is equal to or less than the first slope threshold. In general, when there are few features in the search area, the disparity between the search area and the comparison area is relatively small. In addition, when there are few features in the search area, the change in disparity relative to the amount of movement, in other words the slope, is relatively small. Therefore, the image processing device 10 having the above-mentioned configuration can select the disparity calculated by block matching for a search area that is likely to have many features, and can select the disparity calculated using dynamic programming for a search area that is likely to have few features.

また、本実施形態の画像処理装置10は、極小値が第1の極小閾値以上であること、及び傾きが第1の傾き閾値以上であることのいずれかを満たす場合、第1フィッティング関数に基づいて算出した視差を選択する。このような構成により、画像処理装置10は、極小値が第1の極小閾値以下且つ傾きが第1の傾き閾値以下で無い場合、ブロックマッチングにより算出した視差を選択し得る。したがって、画像処理装置10は、ブロックマッチングにより算出する視差の精度が低下する可能性の高い場合以外においては、ブロックマッチングにより算出した視差を選択し得る。その結果、画像処理装置10は、フロックマッチングにより算出する視差より、動的計画法を用いて算出する視差の精度が高くなる可能性の高い探索領域に対してのみ、動的計画法を用いて算出した視差を選択し得る。それゆえ、画像処理装置10は、被写体の位置の算出に用いる視差の精度をより向上させる。 In addition, the image processing device 10 of this embodiment selects the disparity calculated based on the first fitting function when either the minimum value is equal to or greater than the first minimum threshold and the slope is equal to or greater than the first slope threshold. With this configuration, the image processing device 10 can select the disparity calculated by block matching when the minimum value is equal to or less than the first minimum threshold and the slope is not equal to or less than the first slope threshold. Therefore, the image processing device 10 can select the disparity calculated by block matching except when there is a high possibility that the accuracy of the disparity calculated by block matching is reduced. As a result, the image processing device 10 can select the disparity calculated by dynamic programming only for a search area where the accuracy of the disparity calculated by dynamic programming is likely to be higher than that of the disparity calculated by block matching. Therefore, the image processing device 10 further improves the accuracy of the disparity used to calculate the position of the subject.

また、本実施形態の画像処理装置10は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で基準画像の探索領域と参照画像内で前記基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、比較領域を基線長方向に移動させた移動量に対する探索領域及び比較領域の相違度の関係を示す第2フィッティング関数を作成し、第2フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方にも基づいて、探索領域内の被写体像の視差を選択する。第1フィッティング関数は画素単位の移動量に対する相違度に基づいて作成されるので、図5に示すように、単位移動量を無限に小さくしたフィッティング関数fminの極値Evminに対応する移動量iminと、第1フィッティング関数f1の極値Ev1に対応する移動量iとにずれΔi(以下、「移動量ズレ」と呼ぶこともある。)が生じ得る。当該移動量ズレΔiはある程度の大きさであることが一般的であり、第1フィッティング関数f1の極値Ev1は、当該極値Ev1に対応する移動量iにおける比較領域と探索領域との視覚的な相違が少しは存在することを示しえる。しかし、図6に示すように、移動量ズレΔiが小さい場合、第1フィッティング関数f1の極値Ev1は、探索領域と探索領域近傍の領域とが似ている場合のフィッティング関数ftlの極値Evtlと同程度の大きさであり得、当該極値Ev1に対応する移動量iにおける比較領域と探索領域との視覚的な相違が極めて小さいことを示す。それゆえ、移動量ズレΔiが小さい場合、第1フィッティング関数f1の極値よりも、移動量ズレが大きくなる別のフィッティング関数の極値を用いて選択する方が視差の選択の精度が向上する。一般的に、図7に示すように、第1フィッティング関数f1の極値Ev1に対応する移動量i及び第2フィッティング関数f2の極値Ev2に対応する移動量i+0.5又はi-0.5の一方の移動量ズレΔiは他方より大きくなり得る。したがって、上述の構成を有する画像処理装置10は、第1フィッティング関数f1及び第2フィッティング関数f2それぞれの極値Ev1、Ev2に基づいて、少なくとも第1フィッティング関数に基づいて算出した視差及び動的計画法を用いて算出した視差のいずれかを選択し得るので、視差の精度がさらに向上し得る。また、図5、6に示すように移動量ズレΔiが大きくなると、単位移動量を無限に小さくしたフィッティング関数fminの極値Evminと第1フィッティング関数f1の極値Ev1とのずれΔEv(以下、「極値ズレ」と呼ぶこともある。)は、大きくなり得る。したがって、図5に示すように、極値ズレΔEvが大きくなると、極値Ev1近傍の傾きは、探索領域と探索領域近傍の領域とが似ている場合のフィッティング関数ftlの極値近傍の傾きに近づき得る。それゆえ、移動量ズレΔiが大きい場合、第1フィッティング関数f1の極値Ev1近傍の傾きよりも、極値ズレΔEvが小さくなる別のフィッティング関数の傾きを用いて選択する方が視差の選択の精度が向上する。一般的に、図7に示すように、第1フィッティング関数f1の極値Ev1及び第2フィッティング関数f2の極値Ev2のいずれかは、極値ズレΔEvが大きくなり得る。したがって、上述の構成を有する画像処理装置10は第1フィッティング関数f1及び第2フィッティング関数f2それぞれの極値Ev1、Ev2近傍の傾きに基づいて、少なくとも第1フィッティング関数に基づいて算出した視差及び動的計画法を用いて算出した視差のいずれかを選択し得るので、視差の精度がさらに向上し得る。 In addition, the image processing device 10 of this embodiment creates a second fitting function that indicates a relationship between the degree of difference between the search area and the comparison area with respect to the amount of movement of the comparison area in the base line length direction based on a plurality of degrees of difference between the search area of the base line image and the comparison area that is moved in the base line length direction in the reference image in a state where one of the base image and the reference image is displaced by 0.5 pixels in the base line length direction, and selects the parallax of the subject image in the search area based on at least one of the extreme value of the second fitting function and the gradient near the extreme value. Since the first fitting function is created based on the degree of difference with respect to the amount of movement in pixel units, as shown in FIG. 5, a shift Δi (hereinafter, sometimes referred to as a "shift amount shift") may occur between the amount of movement i min corresponding to the extreme value Ev min of the fitting function f min in which the unit amount of movement is infinitely small, and the amount of movement i corresponding to the extreme value Ev1 of the first fitting function f1. The shift amount deviation Δi is generally of a certain magnitude, and the extreme value Ev1 of the first fitting function f1 may indicate that there is a slight visual difference between the comparison area and the search area at the shift amount i corresponding to the extreme value Ev1. However, as shown in FIG. 6, when the shift amount deviation Δi is small, the extreme value Ev1 of the first fitting function f1 may be of the same magnitude as the extreme value Evtl of the fitting function ftl when the search area and the area near the search area are similar, indicating that the visual difference between the comparison area and the search area at the shift amount i corresponding to the extreme value Ev1 is extremely small. Therefore, when the shift amount deviation Δi is small, the accuracy of the selection of the disparity is improved by selecting using the extreme value of another fitting function with a larger shift amount deviation than the extreme value of the first fitting function f1. In general, as shown in FIG. 7, the shift amount deviation Δi of one of the shift amount i corresponding to the extreme value Ev1 of the first fitting function f1 and the shift amount i+0.5 or i-0.5 corresponding to the extreme value Ev2 of the second fitting function f2 may be larger than the other. Therefore, the image processing device 10 having the above-mentioned configuration can select at least one of the disparity calculated based on the first fitting function and the disparity calculated using dynamic programming based on the extreme values Ev1 and Ev2 of the first fitting function f1 and the second fitting function f2, so that the accuracy of the disparity can be further improved. Also, as shown in FIG. 5 and FIG. 6, when the shift amount deviation Δi becomes large, the deviation ΔEv between the extreme value Ev min of the fitting function f min in which the unit shift amount is infinitely small and the extreme value Ev1 of the first fitting function f1 (hereinafter, sometimes referred to as "extreme value deviation") may become large. Therefore, as shown in FIG. 5, when the extreme value deviation ΔEv becomes large, the gradient near the extreme value Ev1 may approach the gradient near the extreme value of the fitting function f tl when the search area and the area near the search area are similar. Therefore, when the movement amount deviation Δi is large, the accuracy of the selection of the parallax is improved by selecting using the gradient of another fitting function that has a smaller extreme value deviation ΔEv than the gradient near the extreme value Ev1 of the first fitting function f1. In general, as shown in FIG. 7, either the extreme value Ev1 of the first fitting function f1 or the extreme value Ev2 of the second fitting function f2 may have a large extreme value deviation ΔEv. Therefore, the image processing device 10 having the above-mentioned configuration can select at least either the parallax calculated based on the first fitting function or the parallax calculated using dynamic programming based on the gradient near the extreme values Ev1 and Ev2 of the first fitting function f1 and the second fitting function f2, and the accuracy of the parallax can be further improved.

また、本実施形態の画像処理装置10は、第1フィッティング関数f1及び第2フィッティング関数f2の、同じ移動量における相違度を合計又は平均化したフィッティング関数において相違度が最小となる移動量を、視差として算出する。このような構成、言換えるとEEC方式により、画像処理装置10は、サブピクセル推定における系統誤差を低減し得る。 In addition, the image processing device 10 of this embodiment calculates, as the disparity, the movement amount that minimizes the disparity in a fitting function that sums or averages the disparities at the same movement amount between the first fitting function f1 and the second fitting function f2. With this configuration, in other words, the EEC method, the image processing device 10 can reduce systematic errors in subpixel estimation.

本開示に係る実施形態について、諸図面及び実施例に基づき説明してきたが、当業者であれば本開示に基づき種々の変形又は修正を行うことが容易であることに注意されたい。従って、これらの変形又は修正は本開示の範囲に含まれることに留意されたい。例えば、各構成部又は各ステップなどに含まれる機能などは論理的に矛盾しないように再配置可能であり、複数の構成部又はステップなどを1つに組み合わせたり、或いは分割したりすることが可能である。本開示に係る実施形態について装置を中心に説明してきたが、本開示に係る実施形態は装置の各構成部が実行するステップを含む方法としても実現し得るものである。本開示に係る実施形態は装置が備えるプロセッサにより実行される方法、プログラム、又はプログラムを記録した記憶媒体としても実現し得るものである。本開示の範囲にはこれらも包含されるものと理解されたい。 Although the embodiments of the present disclosure have been described based on the drawings and examples, it should be noted that those skilled in the art can easily make various modifications or corrections based on the present disclosure. Therefore, it should be noted that these modifications or corrections are included in the scope of the present disclosure. For example, the functions included in each component or each step can be rearranged so as not to cause logical inconsistencies, and multiple components or steps can be combined into one or divided. Although the embodiments of the present disclosure have been described mainly with respect to the device, the embodiments of the present disclosure can also be realized as a method including steps executed by each component of the device. The embodiments of the present disclosure can also be realized as a method, a program, or a storage medium on which a program is recorded, executed by a processor provided in the device. It should be understood that these are also included in the scope of the present disclosure.

例えば、本実施形態において、相違度は、探索領域と比較領域との視覚的な相違が大きくなるほど増加する構成であるが、低下する構成であってよい。当該構成において、相違度の極値は、極大値である。当該構成において、第1フィッティング関数に基づく視差の選択には、第1フィッティング関数の極大値が用いられ、極大値と閾値との比較は反対となる。また、当該構成において、第1フィッティング関数及び第2フィッティング関数に基づく視差の選択には、第1フィッティング関数及び第2フィッティング関数それぞれの極大値が用いられ、極大値と閾値との比較は反対となる。 For example, in this embodiment, the dissimilarity increases as the visual difference between the search area and the comparison area increases, but it may also decrease. In this configuration, the extreme value of the dissimilarity is a local maximum value. In this configuration, the local maximum value of the first fitting function is used to select the dissimilarity based on the first fitting function, and the comparison of the local maximum value with the threshold value is reversed. Also, in this configuration, the local maximum values of the first fitting function and the second fitting function are used to select the dissimilarity based on the first fitting function and the second fitting function, and the comparison of the local maximum value with the threshold value is reversed.

本開示において「第1」、「第2」などの記載は、当該構成を区別するための識別子である。本開示における「第1」、「第2」などの記載で区別された構成は、当該構成における番号を交換することができる。例えば、第1のカメラは、第2のカメラと識別子である「第1」と「第2」とを交換することができる。識別子の交換は同時に行われる。識別子の交換後も当該構成は区別される。識別子は削除してよい。識別子を削除した構成は、符号で区別される。本開示における「第1」、「第2」などの識別子の記載のみに基づいて、当該構成の順序の解釈、小さい番号の識別子が存在することの根拠に利用してはならない。 In this disclosure, descriptions such as "first" and "second" are identifiers for distinguishing the configuration. Configurations distinguished by descriptions such as "first" and "second" in this disclosure can have their numbers exchanged. For example, a first camera can exchange identifiers "first" and "second" with a second camera. The exchange of identifiers is performed simultaneously. The configurations remain distinguished even after the exchange of identifiers. Identifiers may be deleted. A configuration from which an identifier has been deleted is distinguished by a code. Descriptions of identifiers such as "first" and "second" in this disclosure should not be used solely to interpret the order of the configurations or to justify the existence of an identifier with a smaller number.

10 画像処理装置
11 ステレオカメラ装置
12 ステレオカメラ
13 移動体
14 外部装置
15 第1のカメラ
16 第2のカメラ
17 取得部
18 出力部
19 メモリ
20 制御部
REFERENCE SIGNS LIST 10 Image processing device 11 Stereo camera device 12 Stereo camera 13 Moving object 14 External device 15 First camera 16 Second camera 17 Acquisition unit 18 Output unit 19 Memory 20 Control unit

Claims (9)

ステレオカメラが撮像した基準画像及び参照画像を取得する取得部と、
前記基準画像内の探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第1フィッティング関数を作成し、前記第1フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づいて、前記第1フィッティング関数に基づいて算出した視差、及び動的計画法を用いて算出した視差のいずれかを、前記探索領域内の被写体像の視差として選択する制御部と、を備える
画像処理装置。
An acquisition unit that acquires a standard image and a reference image captured by a stereo camera;
a control unit that creates a first fitting function indicating a relationship between the degree of disparity of the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of disparity between a search area in the standard image and a comparison area that is displaced in the reference image along a baseline length direction of the stereo camera, and selects, based on at least one of an extreme value of the first fitting function and a slope near the extreme value, one of a disparity calculated based on the first fitting function and a disparity calculated using dynamic programming, as a disparity of a subject image in the search area.
請求項1に記載の画像処理装置において、
前記相違度は、探索領域と比較領域との相違が大きくなるほど増加し、
前記制御部は、前記極値である極小値が第1の極小閾値以上且つ前記傾きが第1の傾き閾値以上である場合に前記第1フィッティング関数に基づいて算出した視差を選択し、前記極小値が前記第1の極小閾値以下且つ前記傾きが前記第1の傾き閾値以下である場合に前記動的計画法を用いて算出した視差を選択する
画像処理装置。
2. The image processing device according to claim 1,
The dissimilarity increases as the difference between the search region and the comparison region increases,
the control unit selects the disparity calculated based on the first fitting function when the minimum value, which is the extreme value, is equal to or greater than a first minimum threshold and the slope is equal to or greater than a first slope threshold, and selects the disparity calculated using the dynamic programming when the minimum value is equal to or less than the first minimum threshold and the slope is equal to or less than the first slope threshold.
請求項2に記載の画像処理装置において、
前記制御部は、前記極小値が前記第1の極小閾値以上であること、及び前記傾きが前記第1の傾き閾値以上であることのいずれかを満たす場合、前記第1フィッティング関数に基づいて算出した視差を選択する
画像処理装置。
3. The image processing device according to claim 2,
The control unit selects the disparity calculated based on the first fitting function when either the minimum value is equal to or greater than the first minimum threshold and the slope is equal to or greater than the first slope threshold.
請求項2に記載の画像処理装置において、
前記制御部は、前記極小値が前記第1の極小閾値未満の第2の極小閾値以下であること、及び前記傾きが前記第1の傾き閾値未満の第2の傾き閾値以下であることのいずれかを満たす場合、前記動的計画法を用いて算出した視差を選択する
画像処理装置。
3. The image processing device according to claim 2,
The control unit selects the disparity calculated using the dynamic programming when either one of the following is satisfied: the minimum value is equal to or smaller than a second minimum threshold that is less than the first minimum threshold; and the tilt is equal to or smaller than a second tilt threshold that is less than the first tilt threshold.
請求項1から4のいずれか1項に記載の画像処理装置において、
前記制御部は、前記基準画像及び前記参照画像の一方を前記基線長方向に0.5画素変位させた状態で前記基準画像の探索領域と前記参照画像内で前記基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第2フィッティング関数を作成し、前記探索領域内の被写体像の視差の選択を前記第2フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づかせる
画像処理装置。
5. The image processing device according to claim 1,
the control unit creates a second fitting function indicating a relationship between the degree of dissimilarity of the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction based on multiple degrees of dissimilarity between a search area of the standard image and a comparison area displaced pixel by pixel along the baseline length direction in the reference image with one of the standard image and the reference image displaced by 0.5 pixels in the baseline length direction, and selects a disparity of the subject image in the search area based on at least one of an extreme value of the second fitting function and a slope near the extreme value.
請求項5に記載の画像処理装置において、
前記相違度は、探索領域と比較領域との相違が大きくなるほど増加し、
前記制御部は、
前記第1フィッティング関数の極小値及び前記第2フィッティング関数の極小値の中の最大値が第1の極小閾値以上、且つ前記第1フィッティング関数の傾き及び前記第2フィッティング関数の傾きの中の最大値が第1の傾き閾値以上である場合、前記第1フィッティング関数及び前記第2フィッティング関数に基づいて算出した視差を、前記探索領域内の被写体像の視差として選択し、
前記第1フィッティング関数の極小値及び前記第2フィッティング関数の極小値の中の最大値が第1の極小閾値以下、且つ前記第1フィッティング関数の傾き及び前記第2フィッティング関数の傾きの中の最大値が第1の傾き閾値以下である場合、前記動的計画法を用いて算出した視差を、前記探索領域内の被写体像の視差として選択する
画像処理装置。
6. The image processing device according to claim 5,
The dissimilarity increases as the difference between the search region and the comparison region increases,
The control unit is
selecting a disparity calculated based on the first fitting function and the second fitting function as a disparity of a subject image within the search region when a maximum value among the minimum values of the first fitting function and the second fitting function is equal to or greater than a first minimum threshold and a maximum value among the slopes of the first fitting function and the second fitting function is equal to or greater than a first slope threshold;
when a maximum value among the minimum values of the first fitting function and the second fitting function is equal to or less than a first minimum threshold, and a maximum value among the slopes of the first fitting function and the second fitting function is equal to or less than a first slope threshold, the image processing device selects the disparity calculated using the dynamic programming as the disparity of the subject image within the search area.
基準画像及び参照画像を撮像するステレオカメラと、
前記基準画像内の探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第1フィッティング関数を作成し、前記第1フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づいて、前記第1フィッティング関数に基づいて算出した視差、及び動的計画法を用いて算出した視差のいずれかを、前記探索領域内の被写体像の視差として選択する画像処理装置と、を備える
ステレオカメラ装置。
A stereo camera that captures a standard image and a reference image;
and an image processing device that creates a first fitting function indicating a relationship between the degree of disparity of the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of disparity between a search area in the standard image and a comparison area that is displaced in the reference image by a pixel unit along a baseline length direction of the stereo camera, and selects, based on at least one of an extreme value of the first fitting function and a slope near the extreme value, one of a disparity calculated based on the first fitting function and a disparity calculated using dynamic programming, as a disparity of a subject image in the search area.
基準画像及び参照画像を撮像するステレオカメラと、前記基準画像内の探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第1フィッティング関数を作成し、前記第1フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づいて、前記第1フィッティング関数に基づいて算出した視差、及び動的計画法を用いて算出した視差のいずれかを、前記探索領域内の被写体像の視差として選択する画像処理装置と、を有するステレオカメラ装置を備える
移動体。
a first fitting function that indicates a relationship between a degree of dissimilarity of the search area and the comparison area relative to an amount of movement of the comparison area in the baseline length direction based on a plurality of degrees of dissimilarity between a search area in the reference image and a comparison area that is displaced in the reference image by a pixel unit along a baseline length direction of the stereo camera, and a dissimilarity calculation method that calculates a dissimilarity of a subject image in the search area based on at least one of an extreme value of the first fitting function and a gradient near the extreme value, and a dissimilarity calculation method that calculates a dissimilarity of a subject image in the search area based on the extreme value of the first fitting function.
ステレオカメラに基準画像及び参照画像を撮像させるステップと、
前記基準画像内の探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の相違度に基づいて、前記比較領域を前記基線長方向に移動させた移動量に対する前記探索領域及び前記比較領域の相違度の関係を示す第1フィッティング関数を作成するステップと、
前記第1フィッティング関数の極値及び該極値近傍の傾きの少なくとも一方に基づいて、前記第1フィッティング関数に基づいて算出した視差、及び動的計画法を用いて算出した視差のいずれかを、前記探索領域内の被写体像の視差として選択するステップと、を備える
画像処理方法。
A step of capturing a standard image and a reference image by a stereo camera;
creating a first fitting function that indicates a relationship between the degree of difference between the search area and the comparison area relative to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the standard image and a comparison area that is displaced in the reference image in units of pixels along a baseline length direction of the stereo camera;
and selecting, based on at least one of an extreme value of the first fitting function and a gradient near the extreme value, one of a disparity calculated based on the first fitting function and a disparity calculated using dynamic programming as a disparity of a subject image within the search area.
JP2020175540A 2020-07-28 2020-10-19 IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD Active JP7516204B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2020175540A JP7516204B2 (en) 2020-10-19 2020-10-19 IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD
US18/007,299 US12620110B2 (en) 2020-07-28 2021-07-15 Image processing device, stereo camera device, mobile object, disparity calculating method, and image processing method
EP21849069.6A EP4191196A4 (en) 2020-07-28 2021-07-15 IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOVING OBJECT, PARALLAX CALCULATION METHOD AND IMAGE PROCESSING METHOD
CN202180059982.XA CN116171371A (en) 2020-07-28 2021-07-15 Image processing device, stereo camera device, moving object, parallax calculation method, and image processing method
PCT/JP2021/026692 WO2022024793A1 (en) 2020-07-28 2021-07-15 Image processing device, stereo camera device, moving object, parallax calculation method, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020175540A JP7516204B2 (en) 2020-10-19 2020-10-19 IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD

Publications (2)

Publication Number Publication Date
JP2022066925A JP2022066925A (en) 2022-05-02
JP7516204B2 true JP7516204B2 (en) 2024-07-16

Family

ID=81389748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020175540A Active JP7516204B2 (en) 2020-07-28 2020-10-19 IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD

Country Status (1)

Country Link
JP (1) JP7516204B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019066308A (en) 2017-09-29 2019-04-25 トヨタ自動車株式会社 Parallax calculating device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019066308A (en) 2017-09-29 2019-04-25 トヨタ自動車株式会社 Parallax calculating device

Also Published As

Publication number Publication date
JP2022066925A (en) 2022-05-02

Similar Documents

Publication Publication Date Title
KR101811157B1 (en) Bowl-shaped imaging system
EP3358295B1 (en) Image processing device, stereo camera device, vehicle, and image processing method
JP6141562B1 (en) Parallax calculation device, stereo camera device, vehicle, and parallax calculation method
JP6855325B2 (en) Image processing equipment, stereo camera systems, moving objects, road surface shape detection methods and programs
CN108700414A (en) Stereo photographic device, vehicle and parallax calculation method
JP6456499B2 (en) Three-dimensional object detection device, stereo camera device, vehicle, and three-dimensional object detection method
JP2015207278A (en) Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program
EP4191196A1 (en) Image processing device, stereo camera device, moving object, parallax calculation method, and image processing method
JP7262350B2 (en) Road surface detection device, object detection device, object detection system, moving body and object detection method
JP6674959B2 (en) Parallax calculating device, stereo camera device, vehicle, and parallax calculating method
JP6121641B1 (en) Image processing apparatus, stereo camera apparatus, vehicle, and image processing method
JP7229129B2 (en) OBJECT DETECTION DEVICE, OBJECT DETECTION SYSTEM, MOBILE OBJECT AND OBJECT DETECTION METHOD
JP7516204B2 (en) IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD
JP7569173B2 (en) IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD
JP7621828B2 (en) IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD
CN118570289A (en) Method and device for positioning optical center of automobile camera
US12620110B2 (en) Image processing device, stereo camera device, mobile object, disparity calculating method, and image processing method
JP2024137371A (en) Electronic device, distance measurement method, and distance measurement program
JP7527891B2 (en) IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOVING BODY, AND DISPARITY CALCULATION METHOD

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230517

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240625

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240703

R150 Certificate of patent or registration of utility model

Ref document number: 7516204

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150