JP7621828B2 - 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 PDFInfo
- Publication number
- JP7621828B2 JP7621828B2 JP2021024654A JP2021024654A JP7621828B2 JP 7621828 B2 JP7621828 B2 JP 7621828B2 JP 2021024654 A JP2021024654 A JP 2021024654A JP 2021024654 A JP2021024654 A JP 2021024654A JP 7621828 B2 JP7621828 B2 JP 7621828B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- pixels
- dissimilarity
- search area
- reference image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
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.
ステレオカメラが撮像するステレオ画像それぞれにおいて、同じ物体の位置の違い(視差)に基づいて、実空間における当該物体の位置を算出することが知られている。視差の算出方法として、例えば、ブロックマッチング方式が用いられている。ブロックマッチングでは、ブロック内に背景が含まれる場合、異なる距離の物体が含まれやすくなるため、ブロックマッチングの一致度が低下する。そのため、視差の算出精度が低下し得る。また、屋外環境においては、ビル等の人工物特有の鉛直方向のエッジ情報及び水平方向のエッジ情報が多く含まれることがあり、これらのエッジ情報が、ブロックマッチングの一致度に大きな影響を与え得る。一致度に大きな影響を与えることにより、視差の算出精度が低下し得る。 It is known that the position of an object in real space is calculated based on the difference in the position (parallax) of the same object in each stereo image captured by a stereo camera. For example, a block matching method is used as a method of calculating parallax. In block matching, if a background is included in a block, objects at different distances are likely to be included, and the degree of match of the block matching decreases. This can reduce the accuracy of the parallax calculation. Furthermore, in an outdoor environment, there may be a lot of vertical edge information and horizontal edge information specific to man-made objects such as buildings, and this edge information can have a significant impact on the degree of match of the block matching. This significant impact on the degree of match can reduce the accuracy of the parallax calculation.
そこで、ステレオペアにおける一次的な視差を算出し、当該一次的な視差に基づいてマッチングウィンドウのウィンドウサイズの拡大又は縮小を行うことが提案されている(特許文献1参照)。 Therefore, it has been proposed to calculate the primary disparity in a stereo pair and expand or reduce the window size of the matching window based on the primary disparity (see Patent Document 1).
ブロックマッチングにおいて、ブロックに含まれる画素が属する物体の距離に応じてブロックの大きさを変更できれば、ブロックマッチングの一致度を高められると考えられる。しかし、一次的な視差の精度が低ければ、ブロックの大きさを変更させても、視差の算出精度を向上させることは困難である。また、鉛直方向及び水平方向のエッジ情報を含む画像に対してはブロックの大きさを変更したとしても、視差の算出精度を向上させることは困難である。 In block matching, if the size of a block could be changed depending on the distance of the object to which the pixels contained in the block belong, it is thought that the degree of agreement in block matching could be improved. However, if the accuracy of the primary disparity is low, it is difficult to improve the accuracy of the disparity calculation even if the block size is changed. Furthermore, for images that contain edge information in the vertical and horizontal directions, it is difficult to improve the accuracy of the disparity calculation even if the block size is changed.
従って、上記のような従来技術の問題点に鑑みてなされた本開示の目的は、視差の算出精度を向上させる画像処理装置、ステレオカメラ装置、移動体、及び画像処理方法を提供することにある。 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 calculating disparity.
上述した諸課題を解決すべく、第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 calculates a disparity of a subject image within the search area based on a first degree of difference between a search area including a reference point in the base image and a comparison area that is displaced in pixel units along a baseline length direction of the stereo camera in the reference image,
The control unit is
clustering the pixels in the reference image so that the pixels are grouped by object;
In the search region, pixels that belong to the same subject as the subject to which the reference point belongs are weighted differently from pixels that belong to subjects other than the same subject, to calculate the first dissimilarity.
また、第2の観点によるステレオカメラ装置は、
基準画像及び参照画像を撮像するステレオカメラと、
前記基準画像内の基準点を含む探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との第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;
an image processing device that calculates a disparity of a subject image within the search area based on a first degree of difference between a search area including a reference point in the standard image and a comparison area that is displaced in pixel units along a baseline length direction of the stereo camera in the reference image;
The image processing device includes:
In the reference image, pixels are clustered by subject;
In the search region, pixels that belong to the same subject as the subject to which the reference point belongs are weighted differently from pixels that belong to subjects other than the same subject, to calculate the first dissimilarity.
また、第3の観点による移動体は、
基準画像及び参照画像を撮像するステレオカメラと、前記基準画像内の基準点を含む探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との第1の相違度に基づいて前記探索領域内の被写体像の視差を算出する画像処理装置とを有する、ステレオカメラ装置を備え、
前記ステレオカメラ装置は、
前記基準画像内で、各画素を被写体別にクラスタリングを行い、
前記探索領域において、前記基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けを施して、前記第1の相違度を算出する。
A moving body according to a third aspect of the present invention comprises:
a stereo camera device including a stereo camera for capturing a standard image and a reference image; and an image processing device for calculating a parallax of a subject image in a search area based on a first degree of difference between a search area including a standard point in the standard image and a comparison area displaced in pixel units along a base line length direction of the stereo camera in the reference image;
The stereo camera device includes:
In the reference image, pixels are clustered by subject;
In the search region, pixels that belong to the same subject as the subject to which the reference point belongs are weighted differently from pixels that belong to subjects other than the same subject, to calculate the first dissimilarity.
また、第4の観点による画像処理方法は、
ステレオカメラに基準画像及び参照画像を撮像させるステップと、
前記基準画像内で、各画素を被写体別にクラスタリングを行うステップと、
前記基準画像内の基準点を含む探索領域において、前記基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けになるように、各画素の重み付けを決定するステップと、
前記基準画像内の基準点を含む探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の第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;
clustering pixels in the reference image by object;
determining a weighting for each pixel in a search area including a reference point in the reference image such that pixels belonging to the same subject as the subject to which the reference point belongs are weighted differently from pixels belonging to subjects other than the same subject;
The method includes a step of calculating a disparity of a subject image within the search area based on a plurality of first disparities between a search area including a reference point in the base image and a comparison area in the reference image which is displaced on a pixel-by-pixel basis along a baseline length direction of the stereo camera, and a weighting of each pixel.
上記のように構成された本開示に係る画像処理装置、ステレオカメラ装置、移動体及び画像処理方法によれば、視差の算出精度が向上する。 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 calculating disparity.
以下、本開示を適用した画像処理装置の実施形態について、図面を参照して説明する。 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
移動体13は、例えば車両、船舶、航空機などを含んでよい。車両は、例えば、自動車、産業車両、鉄道車両、生活車両、滑走路を走行する固定翼機などを含んでよい。自動車は、例えば、乗用車、トラック、バス、二輪車、トロリーバスなどを含んでよい。産業車両は、例えば、農業、建設向けの産業車両などを含んでよい。産業車両は、例えば、フォークリフト、ゴルフカートなどを含んでよい。農業向けの産業車両は、例えば、トラクター、耕耘機、移植機、バインダー、コンバイン、芝刈り機などを含んでよい。建設向けの産業車両は、例えば、ブルドーザー、スクレーバー、ショベルカー、クレーン車、ダンプカー、ロードローラなどを含んでよい。車両は、人力で走行するものを含んでよい。車両の分類は、上述した例に限られない。例えば、自動車は、道路を走行可能な産業車両を含んでよい。複数の分類に同じ車両が含まれてよい。船舶は、例えば、マリンジェット、ボート、タンカーを含んでよい。航空機は、例えば、固定翼機、回転翼機などを含んでよい。
The moving
ステレオカメラ12及び画像処理装置10は、有線又は無線通信により通信可能であってよい。ステレオカメラ12及び画像処理装置10とは、ネットワークを介して通信してよい。ネットワークは、例えば、有線又は無線のLAN(Local Area Network)、CAN(Controller Area Network)などを含んでよい。ステレオカメラ12及び画像処理装置10は、同一の筺体内に収納され一体的に構成されてよい。ステレオカメラ12及び画像処理装置10は、移動体13内に位置し、移動体13内のECU(Electronic Control Unit)と通信可能に構成されてよい。
The
図2に示すように、ステレオカメラ装置11は、例えば、移動体13に搭載されてよい。ステレオカメラ12は、例えば、移動体13の前方を撮像するように設置されてよい。ステレオカメラ12は、例えば、後述する、ステレオカメラ12に含まれる複数のカメラの少なくとも1つの光軸OXは、移動体13の前後方向に略平行となるように配置される。
As shown in FIG. 2, the
ステレオカメラ12は、移動体13の多様な場所に搭載されてよい。ステレオカメラ12は、例えば、移動体13の内部に搭載され、ウインドシールドを介して移動体13の外部を撮像する。ステレオカメラ12は、ルームミラーの前方又はダッシュボード上に配置されてよい。ステレオカメラ12は、移動体13のフロントバンパー、フェンダーグリル、サイドフェンダー、ライトモジュール及びボンネットのいずれかに固定されていてよい。
The
ステレオカメラ12は、互いに視差を有する複数のカメラを含んでよい。図1に示すように、ステレオカメラ12は、例えば、第1のカメラ15及び第2のカメラ16を含んでよい。ステレオカメラ12は、複数のカメラを協働させて、複数の方向から対象を撮像してよい。ステレオカメラ12は、単一の筐体に複数のカメラを含んでよい。ステレオカメラ12は互いに独立し、且つ互いに離れて位置する2台以上のカメラを含んでよい。ステレオカメラ12は、互いに独立した複数のカメラに限られない。本開示では、例えば、離れた2箇所に入射される光を1つの受光素子に導く光学機構を有するカメラがステレオカメラ12として採用され得る。
The
ステレオカメラ12において、第1のカメラ15及び第2のカメラ16は、それぞれの光軸OXが互いに同じ被写体を撮像可能な方向を向くように、位置してよい。第1のカメラ15及び第2のカメラ16は、撮像した画像に少なくとも同じ被写体像が含まれるように、光軸OX及び位置が定められてよい。第1のカメラ15及び第2のカメラ16の光軸OXは、例えば、互いに平行である。光軸OXが平行とは、厳密な平行に限定されず、組立てのずれ、取付けのずれ、及びこれらの経時によるずれを許容してよい。第1のカメラ15及び第2のカメラ16の光軸OXは、平行に限定されず、互いに異なる方向を向いてよい。
In the
第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
第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
図1に示すように、画像処理装置10は、取得部17、出力部18、メモリ19及び制御部20を備える。画像処理装置10は、移動体13内において任意の位置に配置されてよい。画像処理装置10は、例えば、移動体13のダッシュボード内に配置される。
As shown in FIG. 1, the
取得部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
取得部17は、ステレオカメラ12が撮像により生成した基準画像及び参照画像を信号として取得する。取得部17は取得した基準画像及び参照画像を、制御部20に引き渡す。取得部17は、ステレオカメラ12の撮像信号の伝送方式に対応してよい。取得部17は、ネットワークを介してステレオカメラ12の出力インタフェースに接続されてよい。
The acquisition unit 17 acquires the standard image and the reference image generated by the
出力部18は、画像処理装置10が算出する被写体のワールド座標系における位置を、移動体13内の他の装置又は他の移動体、路側機などの移動体13外の外部装置14に出力し得る、画像処理装置10の出力インタフェースである。出力部18は、取得部17と同様に、有線及び無線の通信に対応した種々のインタフェースを含んでよい。出力部18は、例えば、CANのインタフェースを有し、移動体13内の他の装置と通信を行う。
The
メモリ19は、例えば、RAM(Random Access Memory)及びROM(Read Only Memory)など、任意の記憶デバイスを含んでよい。メモリ19は、制御部20を機能させる多様なプログラム、及び制御部20が用いる多様な情報を記憶してよい。
The
制御部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
制御部20は、基準画像内の各画素が被写体別にグループ分けされるように、クラスタリングを行う。制御部20は、多様な方法によりクラスタリングを行ってよい。制御部20は、少なくとも1つの方法により、クラスタリングを行ってよい。制御部20は、複数の方法を組合わせて、クラスタリングを行ってよい。
The
例えば、制御部20は、以下に説明する、オプティカルフローに基づいて、クラスタリングを行ってよい。オプティカルフローに基づくクラスタリングを行うために、制御部20は、基準画像を連続して取得してよい。基準画像を連続して取得とは、任意のフレームレートで、撮像時点が異なる2フレーム以上の基準画像を取得することを意味する。撮像時点が異なる2フレーム以上の基準画像は、撮像時点が連続するフレームの基準画像であってよい。
For example, the
制御部20は、例えば、Lucas-Kanade法等の任意の方法により、基準画像の各画素におけるオプティカルフローを算出する。制御部20は、算出した各画素のオプティカルフローの中で、オプティカルフロー、即ち連続する基準画像間での動きベクトルが同じ画素であって、互いに近接する画素を同一の被写体に属する画素とみなしてよい。制御部20は、各画素を任意の被写体に属するとみなすことにより、被写体別にグループ分けしてよい。
The
また、例えば、制御部20は、以下に説明する、オクルージョン領域に基づいて、クラスタリングを行ってよい。オクルージョン領域とは、近距離の被写体の周辺における遠距離の背景等の被写体領域のように、基準画像及び参照画像の一方に撮像され、他方には撮像されない領域である。
For example, the
制御部20は、基準画像から参照画像への視差、及び参照画像から基準画像への視差の比較によりオクルージョン領域を決定してよい。制御部20は、ブロックマッチングにより、基準画像の各画素からの参照画像の各画素への第1の視差を算出してよい。また、制御部20は、ブロックマッチングにより、参照画像の各画素からの基準画像の各画素への第2の視差を算出してよい。
The
制御部20は、第1の視差及び第2の視差の比較に基づいて、相違性を算出してよい。相違性は、第1の視差及び極性を反転させた第2の視差の合計の絶対値であってよい。オクルージョン領域においては、第1の視差は、極性を反転させた第2の視差に相違する可能性が高い。そこで、制御部20は、相違性が閾値以上である画素を、オクルージョン領域内の画素とみなしてよい。
The
制御部20は、基準画像内で、オクルージョン領域内とみなし、且つ互いに隣接する画素により形成される輪郭を認識してよい。制御部20は、認識した輪郭に基づいて、基準画像を複数の領域に区分けしてよい。制御部20は、基準画像の各画素をいずれの領域内に含まれるかに基づいて、被写体別にグループ分けしてよい。
The
制御部20は、以下に説明するように、少なくとも第1フィッティング関数を作成してよい。制御部20は、基準画像内の任意の領域を探索領域に指定する。制御部20は、例えば、任意の1画素を注目画素として、当該注目画素を含む所定の大きさの領域を探索領域に指定する。探索領域は、例えば、注目画素を中心としたm行n列(m、nは自然数)の大きさの領域であってよい。本願明細書において、注目画素に対応する基準画像内の点を基準点と呼ぶ。
The
制御部20は、参照画像内で、探索領域の位置から基線長方向に沿って画素単位で変位させた領域を比較領域に指定する。制御部20は、基線長方向に沿った両方向に1画素ずつ変位させて複数の比較領域を指定する。
The
制御部20は、探索領域及び比較領域に含まれる部分画像同士の第1の相違度を算出する。制御部20は、第1の相違度の算出において、以下に説明するように、クラスタリングに基づく重付けを施す。制御部20は、探索領域内で基準点が属する被写体、言換えると、注目画素が属する被写体を判別する。制御部20は、探索領域内で、注目画素が属する被写体と同一の被写体に属する画素を判別する。制御部20は、注目画素と同一の被写体に属する画素に、当該被写体以外の被写体に属する画素と異なる重付けを施す。例えば、制御部20は、注目画素と同一の被写体に属する画素に、当該被写体以外の被写体に属する画素よりも大きな重付けを施す。より具体的に説明すると、制御部20は、注目画素と同じ被写体に属する画素の画素値と、比較領域内で当該画素と同じ位置に位置する画素の画素値との差分に、他の画素よりも大きく重付けた係数を乗じてよい。係数は、例えば、注目画素と同一の被写体に属する画素に対して2であり、注目画素の被写体とは異なる被写体に属する画素に対して1である。
The
制御部20は、上述の係数を乗じた、探索領域及び比較領域内の同じ位置の画素の画素値の差分を用いて、第1の相違度を算出する。第1の相違度は、例えば、SAD(Sum of Absolute Difference)、SSD(Sum of Squared Difference)等の部分画像を構成する画素の画素値の相違に応じて変化する指数である。制御部20は、変位させた位置別の複数の第1の相違度を算出する。
The
一般的に、相違度が極値である比較領域は、第1の相違度を算出した比較領域の中で最も探索領域に類似している。本実施形態において、第1の相違度の極値は、SAD及びSSDのように探索領域と比較領域との相違が大きくなるほど相違度が増加する構成においては、極小値である。 In general, the comparison area in which the dissimilarity is an extreme value is the most similar to the search area among the comparison areas for which the first dissimilarity is calculated. In this embodiment, the extreme value of the first dissimilarity is a minimum value in a configuration in which the dissimilarity increases as the difference between the search area and the comparison area increases, such as SAD and SSD.
制御部20は、複数の比較領域それぞれに対して算出した第1の相違度に基づいて、第1フィッティング関数を作成してよい。第1フィッティング関数は、探索領域に対して比較領域を基線長方向に移動させた移動量に対する第1の相違度の関係を示す関数である。第1フィッティング関数は、前述の移動量に対応する相違度を通るように、等角直線フィッティング又はパラボラフィッティング等を行うことにより作成されてよい。
The
制御部20は、以下に説明するように、更に第2フィッティング関数を作成してよい。制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させてよい。0.5画素変位させるとは、例えば、画像を構成する画素を変位方向に沿って互いに隣接する画素値を平均することにより画素補間を行い、0.5画素変位させた位置の画素値を算出することを意味する。基準画像及び参照画像の一方の変位は、画像全体でなく、視差を算出する探索領域及び比較領域の周辺であってもよい。変位方向は-0.5画素としたマイナス方向であってよい。
The
制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で、第1フィッティング関数の作成時の画像全体の中の同じ位置で同じ大きさの領域を探索領域に指定してよい。
The
制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で、参照画像内で、探索領域の位置から基線長方向に沿って画素単位で変位させた領域を比較領域に指定してよい。制御部20は、基線長方向に沿った両方向に1画素ずつ変位させて複数の比較領域を指定してよい。
The
制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で、探索領域及び比較領域に含まれる部分画像同士の第2の相違度を算出してよい。制御部20は、第2の相違度の算出において、第1の相違度の算出と類似して、クラスタリングに基づく重付けを施してよい。
The
制御部20は、基準画像を0.5画素変位させる構成において、0.5画素変位させた基準画像に対してクラスタリングを行うことにより、0.5画素変位させた基準画像の各画素を被写体別にグループ分けしてよい。または、制御部20は、第1の相違度の算出に用いた基準画像のクラスタリングを0.5画素変位させることにより、0.5画素変位させた基準画像の各画素を被写体別にグループ分けしてよい。制御部20は、参照画像を0.5画素変位させる構成においては、第1の相違度の算出に用いたクラスタリングをそのまま、第2の相違度の算出に適用してよい。
In a configuration in which the reference image is displaced by 0.5 pixels, the
制御部20は、第2の相違度の算出において、探索領域内で、注目画素が属する被写体と同一の被写体に属する画素を判別してよい。制御部20は、注目画素と同一の被写体に属する画素に、当該被写体以外の被写体に属する画素と異なる重付けを施してよい。例えば、制御部20は、注目画素と同一の被写体に属する画素に、当該被写体以外の被写体に属する画素よりも大きな重付けを施してよい。
In calculating the second dissimilarity, the
制御部20は、第1の相違度の算出と類似して、重付けに応じた係数を乗じた探索領域及び比較領域内の同じ位置の画素の画素値の差分を用いて、第2の相違度を算出してよい。第2の相違度は、SAD(Sum of Absolute Difference)、SSD(Sum of Squared Difference)等の部分画像を構成する画素の画素値の相違に応じて変化する指数として、第1の相違度の算出に用いられた算出式とを同じ算出式が適用された指数である。制御部20は、変位させた位置別の複数の第2の相違度を算出してよい。
The
制御部20は、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で、複数の比較領域それぞれに対して算出した第2の相違度に基づいて、第2フィッティング関数を作成してよい。第2フィッティング関数は、探索領域に対して比較領域を基線長方向に移動させた移動量に対する相違度の関係を示す関数であってよい。制御部20は、等角直線フィッティング又はパラボラフィッティング等の方法の中で第1フィッティング関数の算出に採用した方法と同じ方法で、第2フィッティング関数を作成してよい。
The
制御部20は、第1の相違度に基づいて、探索領域内の被写体像の視差を算出する。より具体的には、制御部20は、第1の相違度により作成される第1フィッティング関数に基づいて、視差を算出する。制御部20は、第1フッティング関数の第1の相違度が最小となる移動量を、視差として算出してよい。
The
制御部20は、第2フィッティング関数を更に作成した構成においては、第2の相違度にも基づいて視差を算出してよい。より具体的には、制御部20は、第2の相違度により作成される第2フィッティング関数に基づいて、視差を算出してよい。より詳細には、制御部20は、第1フィッティング関数及び第2フィッティング関数の、同じ移動量における第1の相違度及び第2の相違度を合計又は平均化したフィッティング関数において第1の相違度及び第2の相違度の合計値又は平均値が最小となる移動量を、視差として算出してよい。
In a configuration in which a second fitting function is further created, the
制御部20は、算出した視差、外部標定要素、及び内部標定要素に基づいて、探索領域内の被写体像に対応する被写体のワールド座標系における位置を算出してよい。制御部20は、算出した被写体のワールド座標系の位置を外部装置14に出力するように、出力部18を制御してよい。制御部20は、基準画像の一部または基準画像のすべてを順次比較領域に指定して、画素毎に被写体の位置を算出してよい。
The
次に、本実施形態において制御部20が実行する、第1の位置算出処理について、図4のフローチャートを用いて説明する。第1の位置算出処理では、第2の相違度の算出のために、基準画像を0.5画素変位させ、変位させた基準画像に対してクラスタリングが行われる。第1の位置算出処理は、ステレオカメラ12から1フレームの基準画像及び参照画像を取得するたびに開始する。
Next, the first position calculation process executed by the
ステップS100において、制御部20は、基準画像を0.5画素の移動量で変位させる。変位後、プロセスはステップS101に進む。
In step S100, the
ステップS101では、制御部20は、基準画像及びステップS100において0.5画素変位させた基準画像に、クラスタリングを行う。オプティカルフローに基づくクラスタリングを行う構成においては、直前のフレームの基準画像を、第1の位置算出処理の開始時に取得したフレームの基準画像とともに用いてオプティカルフローを算出する。オクルージョン領域に基づくクラスタリングを行う構成においては、第1の位置算出処理の開始時に取得したフレームの基準画像を用いてオクルージョン領域を算出してよい。クラスタリング後、プロセスはステップS102に進む。
In step S101, the
ステップS102では、制御部20は、基準画像及びステップS100において0.5画素変位させた基準画像に対して指定すべき領域の中で、未指定である領域の中から探索領域を指定する。指定後、プロセスはステップS103に進む。
In step S102, the
ステップS103では、制御部20は、探索領域における注目画素が、ステップS101においてクラスタリングしたいずれの被写体に属するかを判別する。さらに、制御部20は、探索領域の各画素が注目画素と同じ被写体に属するか否かに基づいて、各画素の重付けを決定する。決定後、プロセスはステップS104に進む。
In step S103, the
ステップS104では、制御部20は、ステップS102において指定した探索領域に対して、複数の比較領域を指定する。さらに、制御部20は、ステップS102において指定した探索領域、複数の比較領域、及びステップS103において決定した重付けに基づいて、第1の相違度及び第2の相違度を算出する。算出後、プロセスはステップS105に進む。
In step S104, the
ステップS105では、制御部20は、ステップS104において算出した第1の相違度に基づいて、第1フィッティング関数を作成する。さらに、制御部20は、ステップS104において算出した第2の相違度に基づいて、第2フィッティング関数を作成する。作成後、プロセスはステップS106に進む。
In step S105, the
ステップS106では、制御部20は、ステップS105において作成した第1フィッティング関数及び第2フィッティング関数に基づいて、視差を算出する。視差の算出後、プロセスはステップS107に進む。
In step S106, the
ステップS107では、制御部20は、ステップS106において算出した視差、外部標定要素、及び内部標定要素に基づいて、ステップS102において指定した探索領域に含まれる被写体像に対応する被写体の位置を算出する。算出後、プロセスはステップS108に進む。
In step S107, the
ステップS108では、制御部20は、ステップS107において算出した位置を外部装置14に出力するように出力部18を制御する。出力後、プロセスはステップS109に進む。
In step S108, the
ステップS109では、制御部20は、基準画像及びステップS100において0.5画素変位させた基準画像に対して指定すべき領域のすべてが探索領域として指定されたか否かを判別する。一部が指定されていない場合、プロセスはステップS102に戻る。すべての指定すべき領域が指定済みである場合、第1の位置算出処理は終了する。
In step S109, the
次に、本実施形態において制御部20が実行する、第2の位置算出処理について、図5のフローチャートを用いて説明する。第2の位置算出処理では、第2の相違度の算出のために、基準画像を0.5画素変位させ、元の基準画像に対して行ったクラスタリングによる各画素の被写体別のグループ分けを0.5画素の移動量で基準画素と同じ方向に変位させることにより、0.5画素変位させた基準画像に対するクラスタリングの結果が得られる。第1の位置算出処理は、ステレオカメラ12から1フレームの基準画像及び参照画像を取得するたびに開始する。
Next, the second position calculation process executed by the
ステップS200において、制御部20は、基準画像を0.5画素の移動量で変位させる。変位後、プロセスはステップS201に進む。
In step S200, the
ステップS201では、制御部20は、基準画像に、クラスタリングを行う。オプティカルフローに基づくクラスタリングを行う構成においては、直前のフレームの基準画像を、第1の位置算出処理の開始時に取得したフレームの基準画像とともに用いてオプティカルフローを算出する。オクルージョン領域に基づくクラスタリングを行う構成においては、第1の位置算出処理の開始時に取得したフレームの基準画像を用いてオクルージョン領域を算出してよい。クラスタリング後、プロセスはステップS202に進む。
In step S201, the
ステップS202では、制御部20は、ステップS201で行ったクラスタリングによる各画素の被写体別のグループ分けを0.5画素の移動量で基準画素と同じ方向に変位させる。変位後、プロセスはステップS203に進む。
In step S202, the
ステップS203では、制御部20は、基準画像及びステップS100において0.5画素変位させた基準画像に対して指定すべき領域の中で、未指定である領域の中から探索領域を指定する。指定後、プロセスはステップS204に進む。
In step S203, the
ステップS204では、制御部20は、基準画像の探索領域における注目画素が、ステップS201においてクラスタリングしたいずれの被写体に属するかを判別する。また、制御部20は、0.5画素変位させた基準画像の探索領域における注目画素が、ステップS202において0.5画素変位させたいずれの被写体別に属するかを判別する。さらに、制御部20は、探索領域の各画素が注目画素と同じ被写体に属するか否かに基づいて、各画素の重付けを決定する。決定後、プロセスはステップS205に進む。
In step S204, the
ステップS205からS210では、制御部20は、第1の位置算出処理におけるステップS104からS109に類似した処理を行う。ステップS210において、すべての指定すべき領域が指定済みである場合、第2の位置算出処理は終了する。
In steps S205 to S210, the
次に、本実施形態において制御部20が実行する、第3の位置算出処理について、図6のフローチャートを用いて説明する。第3の位置算出処理では、第2の相違度の算出のために、参照画像を0.5画素変位させる。第3の位置算出処理は、ステレオカメラ12から1フレームの基準画像及び参照画像を取得するたびに開始する。
Next, the third position calculation process executed by the
ステップS300において、制御部20は、参照画像を0.5画素の移動量で変位させる。変位後、プロセスはステップS302に進む。
In step S300, the
ステップS301では、制御部20は、基準画像に、クラスタリングを行う。オプティカルフローに基づくクラスタリングを行う構成においては、直前のフレームの基準画像を、第1の位置算出処理の開始時に取得したフレームの基準画像とともに用いてオプティカルフローを算出する。オクルージョン領域に基づくクラスタリングを行う構成においては、第1の位置算出処理の開始時に取得したフレームの基準画像を用いてオクルージョン領域を算出してよい。クラスタリング後、プロセスはステップS302に進む。
In step S301, the
ステップS302では、制御部20は、基準画像に対して指定すべき領域の中で、未指定である領域の中から探索領域を指定する。指定後、プロセスはステップS303に進む。
In step S302, the
ステップS303では、制御部20は、探索領域における注目画素が、ステップS301においてクラスタリングしたいずれの被写体に属するかを判別する。さらに、制御部20は、探索領域の各画素が注目画素と同じ被写体に属するか否かに基づいて、各画素の重付けを決定する。決定後、プロセスはステップS304に進む。
In step S303, the
ステップS304では、制御部20は、ステップS302において指定した探索領域に対して、参照画像中で、複数の比較領域を指定する。また、制御部20は、当該探索領域に対して、ステップS300において0.5画素変位させた参照画像中で、複数の比較領域を指定する。さらに、制御部20は、ステップS302において指定した探索領域、複数の比較領域、及びステップS303において決定した重付けに基づいて、第1の相違度及び第2の相違度を算出する。算出後、プロセスはステップS305に進む。
In step S304, the
ステップS305からS309では、制御部20は、第1の位置算出処理におけるステップS105からS109に類似した処理を行う。ステップS309において、すべての指定すべき領域が指定済みである場合、第3の位置算出処理は終了する。
In steps S305 to S309, the
以上のような構成の本実施形態の画像処理装置10は、基準画像内の基準点を含む探索領域と参照画像内で基線長方向に沿って画素単位で変位させる比較領域との第1の相違度に基づいて探索領域内の被写体像の視差を算出する制御部20を有し、制御部20は、基準画像内の各画素が被写体別にグループ分けされるようにクラスタリングを行い、探索領域において基準点が属する被写体と同一の被写体に属する画素に対して、当該被写体以外の被写体に属する画素よりも大きな重付けを施して、第1の相違度を算出する。撮像した画像中には、観測対象の種類の被写体とともに、当該被写体の背景となる被写体の像が含まれることが一般的である。背景には距離の異なる複数の被写体が含まれることがあるため、ブロックマッチングによる視差の算出精度が低下する。特に、屋外の自然環境においてはビル等の鉛直方向及び水平方向のエッジ情報が画像に多く含まれるので、ブロックマッチングを用いた視差算出において、エッジ情報の強い影響により視差の算出精度がさらに低下する。このような事象に対して、上述の構成の画像処理装置10は、以下に具体例を用いて説明するように、注目画素と同じ被写体に属する画素に大きな重付けが施されるので、正確な視差以外の視差におけるフィッティング関数を大きく増大させる。したがって、画像処理装置10は、正確な視差に対するフィッティング関数の値が、正確でない視差に対するフィッティング関数の値よりも小さくなる可能性を高める。それゆえ、画像処理装置10は、視差の算出精度を向上させる。
The
視差の算出精度の説明のために、図7に示すように、5行5列の探索領域SRが例示される。図示の探索領域SRでは、中央の注目画素FPがステレオカメラ12から近距離に位置する被写体Aに属する。また、探索領域SRでは、注目画素FPから右側1列且つ下側2列の、注目画素FPを含めた6個の画素が、当該被写体Aに属する。当該被写体Aに属する画素の輝度は、50である。探索領域SRにおける左端の1列に並ぶ5画素は中距離の被写体Bに属する。当該被写体Bに属する画素の輝度は、100である。探索領域SRにおいて、被写体A及び被写体Bに属する画素以外の全画素は、遠距離の被写体Cに属する。当該被写体Cに属する画素の輝度は、200である。
To explain the accuracy of calculating the parallax, a search area SR with 5 rows and 5 columns is illustrated as shown in FIG. 7. In the illustrated search area SR, the pixel of interest FP in the center belongs to subject A located at a short distance from the
また、図8に示すように、図7の探索領域SRに対応する、5行7列に切出した参照画像RIが例示される。図示の参照画像RIには、左端2列及び右端1列に並ぶ合計15画素は中距離の被写体Bに属する。また、参照画像RIには、右端から2、3列目の下端から1から3行目に並ぶ合計6画素は近距離の被写体Aに属する。参照画像RIにおいて、被写体A及び被写体Bに属する画素以外の全画素は、遠距離の被写体Cに属する。 As shown in FIG. 8, a reference image RI cut out into 5 rows and 7 columns corresponding to the search region SR in FIG. 7 is exemplified. In the illustrated reference image RI, a total of 15 pixels arranged in the two leftmost columns and the one rightmost column belong to subject B at a medium distance. In addition, in the reference image RI, a total of 6 pixels arranged in the first to third rows from the bottom of the second and third columns from the right end belong to subject A at a close distance. In the reference image RI, all pixels other than those belonging to subjects A and B belong to subject C at a long distance.
図9に示すように、参照画像RIにおいて、左端の1列目を含む5行5列の画素の領域が、第1の比較領域CR1に定められる。参照画像RIにおいて、左端の2列目を含む5行5列の画素の領域が、第2の比較領域CR2に定められる。参照画像RIにおいて、左端の3列目を含む5行5列の画素の領域が、第3の比較領域CR3に定められる。図示の参照画像RIに対しては、第3の比較領域CR3が正確な視差に相当する領域である。 As shown in FIG. 9, in the reference image RI, a region of 5 rows and 5 columns of pixels including the first column from the left end is defined as a first comparison region CR1. In the reference image RI, a region of 5 rows and 5 columns of pixels including the second column from the left end is defined as a second comparison region CR2. In the reference image RI, a region of 5 rows and 5 columns of pixels including the third column from the left end is defined as a third comparison region CR3. For the reference image RI shown in the figure, the third comparison region CR3 is the region that corresponds to the accurate parallax.
図7に例示した探索領域SR、並びに図9に例示した第1の比較領域CR1、第2の比較領域CR2、及びに第3の比較領域CR3対して、以下のように第1の相違度が算出される。第1の相違度は、重付けを施さない構成及び本実施形態のように重付けを施す構成で別々に算出される。本例示において、第1の相違度は、SADにより算出される。重付け係数は、注目画素FPと同じ被写体に属する画素に対して2、当該被写体と異なる被写体に属する画素に対して1とする。 For the search area SR illustrated in FIG. 7, and the first comparison area CR1, second comparison area CR2, and third comparison area CR3 illustrated in FIG. 9, the first dissimilarity is calculated as follows. The first dissimilarity is calculated separately for a configuration in which no weighting is applied and a configuration in which weighting is applied as in this embodiment. In this example, the first dissimilarity is calculated by SAD. The weighting coefficient is 2 for pixels that belong to the same subject as the pixel of interest FP, and 1 for pixels that belong to a different subject from the subject.
重付けを施さない構成で、第1の相違度は、第1の比較領域CR1に対して、1850である。重付けを施さない構成で、第1の相違度は、第2の比較領域CR2に対して、900である。重付けを施さない構成で、第1の相違度は、第3の比較領域CR3に対して、1000である。したがって、重付けを施さない構成では、第1の相違度は、第2の比較領域CR2において極小となる。 In a configuration without weighting, the first dissimilarity is 1850 for the first comparison region CR1. In a configuration without weighting, the first dissimilarity is 900 for the second comparison region CR2. In a configuration without weighting, the first dissimilarity is 1000 for the third comparison region CR3. Thus, in a configuration without weighting, the first dissimilarity is minimal in the second comparison region CR2.
重付けを施す構成で、第1の相違度は、第1の比較領域CR1に対して、2750である。重付けを施す構成で、第1の相違度は、第2の比較領域CR2に対して、1350である。重付けを施す構成で、第1の相違度は、第3の比較領域CR3に対して、1000である。したがって、重付けを施す構成では、第1の相違度は、第3の比較領域CR3において極小となる。 In the weighted configuration, the first dissimilarity is 2750 for the first comparison region CR1. In the weighted configuration, the first dissimilarity is 1350 for the second comparison region CR2. In the weighted configuration, the first dissimilarity is 1000 for the third comparison region CR3. Thus, in the weighted configuration, the first dissimilarity is minimal in the third comparison region CR3.
また、本実施形態の画像処理装置10は、オプティカルフローに基づいてクラスタリングを行う。オプティカルフローが同じである画素は、同じ被写体像を表示している可能性が高い。それゆえ、上述の構成を有する画像処理装置10は、被写体に対応する被写体像のクラスタリングの正確性を向上させる。
In addition, the
また、本実施形態の画像処理装置10は、基準画像の各画素からの参照画像の各画素への視差と、当該参照画像の各画素からの基準画像の各画素への視差との比較による相違性を算出し、当該相違性が閾値以上である画素が構成する輪郭で区分けすることによりクラスタリングを行う。このような構成により、画像処理装置10は、静止している被写体であっても、当該被写体に対応する被写体像のクラスタリングの正確性を向上させる。
The
また、本実施形態の画像処理装置10は、複数の方法を組合わせてクラスタリングを行う。このような構成により、画像処理装置10は、実際には異なる被写体を、画像において、より正確にグループ分けし得る。例えば、オプティカルフローに基づくクラスタリングでは、動きの少ない被写体に対しては画像によるグループ分けは困難である。一方、オクルージョン領域に基づくクラスタリングは、動きの少ない被写体に対しても画像によるグループ分けを行い得る。したがって、これらを組合わせることにより、上述のように、実際には異なる被写体が、より正確にグループ分けされ得る。
In addition, the
また、画像処理装置10は、基準画像内の基準点を含む探索領域と参照画像内で基線長方向に沿って画素単位で変位させる比較領域との第1の相違度と、基準画像及び参照画像の一方を基線長方向に0.5画素変位させた状態で基準画像の探索領域と参照画像内で基線長方向に沿って画素単位で変位させる比較領域との第2の相違度とに基づいて、言換えると、第1フィッティング関数及び第2フィッティング関数に基づいて、探索領域内の被写体像の視差を算出する。このような構成、言換えるとEEC方式により、画像処理装置10は、サブピクセル推定における系統誤差を低減し得る。
The
本開示に係る実施形態について、諸図面及び実施例に基づき説明してきたが、当業者であれば本開示に基づき種々の変形又は修正を行うことが容易であることに注意されたい。従って、これらの変形又は修正は本開示の範囲に含まれることに留意されたい。例えば、各構成部又は各ステップなどに含まれる機能などは論理的に矛盾しないように再配置可能であり、複数の構成部又はステップなどを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 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」、「第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 may have their numbers exchanged. For example, a first camera may exchange identifiers "first" and "second" with a second camera. The exchange of identifiers is performed simultaneously. The configurations remain distinguished even after the identifier exchange. 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 alone should not be used 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 制御部
CR1 第1の比較領域
CR2 第2の比較領域
CR3 第3の比較領域
FP 注目画素
RI 参照画像
SR 探索領域
REFERENCE SIGNS
Claims (7)
前記基準画像内の基準点を含む探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との第1の相違度に基づいて前記探索領域内の被写体像の視差を算出する制御部と、を備え、
前記制御部は、
前記基準画像内の各画素が被写体別にグループ分けされるように、クラスタリングを行い、
前記探索領域において、前記基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けを施して、前記第1の相違度を算出し、
前記基準画像及び前記参照画像の一方を前記基線長方向に0.5画素変位させた状態で前記基準画像の探索領域と前記参照画像内で前記基線長方向に沿って画素単位で変位させる比較領域との第2の相違度を算出し、前記第1の相違度及び前記第2の相違度の合計値又は平均値に基づいて、前記視差を算出し、
前記第2の相違度の算出に用いる探索領域において、該探索領域の基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けを施す
画像処理装置。 An acquisition unit that acquires a standard image and a reference image captured by a stereo camera;
a control unit that calculates a disparity of a subject image within the search area based on a first degree of difference between a search area including a reference point in the base image and a comparison area that is displaced in pixel units along a baseline length direction of the stereo camera in the reference image,
The control unit is
clustering the pixels in the reference image so that the pixels are grouped by object;
calculating the first dissimilarity degree by weighting pixels in the search area that belong to the same object as the object to which the reference point belongs differently from pixels that belong to objects other than the same object ;
calculating a second dissimilarity between a search area of the standard image and a comparison area in the reference image that is displaced by a pixel unit along the base line direction in a state in which one of the standard image and the reference image is displaced by 0.5 pixels in the base line length direction, and calculating the dissimilarity based on a sum or an average value of the first dissimilarity and the second dissimilarity;
In the search area used for calculating the second dissimilarity, a weighting different from that of pixels belonging to an object other than the object to which the reference point of the search area belongs is applied to pixels belonging to the same object.
Image processing device.
前記制御部は、少なくとも1つの方法により、前記クラスタリングを行う
画像処理装置。 2. The image processing device according to claim 1,
The control unit performs the clustering by at least one method.
前記取得部は、前記基準画像を連続して取得し、
前記制御部は、撮像時点の異なる基準画像間のオプティカルフローに基づいて、前記クラスタリングを行う
画像処理装置。 3. The image processing device according to claim 1,
The acquisition unit continuously acquires the reference images,
The control unit performs the clustering based on an optical flow between reference images captured at different times.
前記制御部は、前記基準画像の各画素からの前記参照画像の各画素への視差と、該参照画像の各画素からの前記基準画像の各画素への視差との比較による相違性を算出し、該相違性が閾値以上である画素が構成する輪郭で区分けすることにより、前記クラスタリングを行う
画像処理装置。 4. The image processing device according to claim 1,
The control unit calculates disparity by comparing the disparity from each pixel of the base image to each pixel of the reference image with the disparity from each pixel of the reference image to each pixel of the base image, and performs the clustering by dividing the image into contours made up of pixels whose disparity is equal to or greater than a threshold.
前記基準画像内の基準点を含む探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との第1の相違度に基づいて前記探索領域内の被写体像の視差を算出する画像処理装置とを備え、
前記画像処理装置は、
前記基準画像内で、各画素を被写体別にクラスタリングを行い、
前記探索領域において、前記基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けを施して、前記第1の相違度を算出し、
前記基準画像及び前記参照画像の一方を前記基線長方向に0.5画素変位させた状態で前記基準画像の探索領域と前記参照画像内で前記基線長方向に沿って画素単位で変位させる比較領域との第2の相違度を算出し、前記第1の相違度及び前記第2の相違度の合計値又は平均値に基づいて、前記視差を算出し、
前記第2の相違度の算出に用いる探索領域において、該探索領域の基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けを施す
ステレオカメラ装置。 A stereo camera that captures a standard image and a reference image;
an image processing device that calculates a disparity of a subject image within the search area based on a first degree of difference between a search area including a reference point in the standard image and a comparison area that is displaced in pixel units along a baseline length direction of the stereo camera in the reference image;
The image processing device includes:
In the reference image, pixels are clustered by subject;
calculating the first dissimilarity degree by weighting pixels in the search area that belong to the same object as the object to which the reference point belongs differently from pixels that belong to objects other than the same object ;
calculating a second dissimilarity between a search area of the standard image and a comparison area in the reference image that is displaced by a pixel unit along the base line direction in a state in which one of the standard image and the reference image is displaced by 0.5 pixels in the base line length direction, and calculating the dissimilarity based on a sum or an average value of the first dissimilarity and the second dissimilarity;
In the search area used for calculating the second dissimilarity, a weighting different from that of pixels belonging to an object other than the object to which the reference point of the search area belongs is applied to pixels belonging to the same object.
Stereo camera device.
前記ステレオカメラ装置は、
前記基準画像内で、各画素を被写体別にクラスタリングを行い、
前記探索領域において、前記基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けを施して、前記第1の相違度を算出し、
前記基準画像及び前記参照画像の一方を前記基線長方向に0.5画素変位させた状態で前記基準画像の探索領域と前記参照画像内で前記基線長方向に沿って画素単位で変位させる比較領域との第2の相違度を算出し、前記第1の相違度及び前記第2の相違度の合計値又は平均値に基づいて、前記視差を算出し、
前記第2の相違度の算出に用いる探索領域において、該探索領域の基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けを施す
移動体。 a stereo camera device including a stereo camera for capturing a standard image and a reference image; and an image processing device for calculating a parallax of a subject image in a search area based on a first degree of difference between a search area including a standard point in the standard image and a comparison area displaced in pixel units along a base line length direction of the stereo camera in the reference image;
The stereo camera device includes:
In the reference image, pixels are clustered by subject;
calculating the first dissimilarity degree by weighting pixels in the search area that belong to the same object as the object to which the reference point belongs differently from pixels that belong to objects other than the same object ;
calculating a second dissimilarity between a search area of the standard image and a comparison area in the reference image that is displaced by a pixel unit along the base line direction in a state in which one of the standard image and the reference image is displaced by 0.5 pixels in the base line length direction, and calculating the dissimilarity based on a sum or an average value of the first dissimilarity and the second dissimilarity;
In the search area used for calculating the second dissimilarity, a weighting different from that of pixels belonging to an object other than the object to which the reference point of the search area belongs is applied to pixels belonging to the same object.
Mobile body.
前記基準画像内で、各画素を被写体別にクラスタリングを行うステップと、
前記基準画像内の基準点を含む探索領域において、前記基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けになるように、各画素の重付けを決定するステップと、
前記基準画像内の基準点を含む探索領域と前記参照画像内で前記ステレオカメラの基線長方向に沿って画素単位で変位させる比較領域との複数の第1の相違度と、前記各画素の重付けとに基づいて前記探索領域内の被写体像の視差を算出するステップと、を備え、
前記基準画像及び前記参照画像の一方を前記基線長方向に0.5画素変位させた状態で前記基準画像の探索領域と前記参照画像内で前記基線長方向に沿って画素単位で変位させる比較領域との第2の相違度を算出し、前記第1の相違度及び前記第2の相違度の合計値又は平均値に基づいて、前記視差を算出するステップと、
前記第2の相違度の算出に用いる探索領域において、該探索領域の基準点が属する被写体と同一の被写体に属する画素に対して、該被写体以外の被写体に属する画素と異なる重付けを施すステップと、を更に備える
画像処理方法。 A step of capturing a standard image and a reference image by a stereo camera;
clustering pixels in the reference image by object;
determining a weight for each pixel in a search area including a reference point in the reference image such that pixels belonging to the same subject as the subject to which the reference point belongs are weighted differently from pixels belonging to subjects other than the same subject;
calculating a disparity of a subject image within the search area based on a plurality of first dissimilarities between a search area including a reference point within the standard image and a comparison area displaced in pixel units along a baseline length direction of the stereo camera within the reference image, and a weighting of each pixel ;
calculating a second dissimilarity between a search area of the standard image and a comparison area in the reference image that is displaced by a pixel unit along the base line direction while one of the standard image and the reference image is displaced by 0.5 pixels in the base line length direction, and calculating the dissimilarity based on a sum or average value of the first dissimilarity and the second dissimilarity;
and weighting pixels in a search area used to calculate the second dissimilarity differently from pixels that belong to an object that is the same as an object to which a reference point of the search area belongs .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021024654A JP7621828B2 (en) | 2021-02-18 | 2021-02-18 | IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2021024654A JP7621828B2 (en) | 2021-02-18 | 2021-02-18 | IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2022126527A JP2022126527A (en) | 2022-08-30 |
| JP7621828B2 true JP7621828B2 (en) | 2025-01-27 |
Family
ID=83058859
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2021024654A Active JP7621828B2 (en) | 2021-02-18 | 2021-02-18 | IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IMAGE PROCESSING METHOD |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7621828B2 (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008275366A (en) | 2007-04-26 | 2008-11-13 | Tokyo Institute Of Technology | Stereo 3D measurement system |
| JP2009129318A (en) | 2007-11-27 | 2009-06-11 | Fuji Heavy Ind Ltd | Image processing device |
| JP2010140201A (en) | 2008-12-10 | 2010-06-24 | Toyota Motor Corp | Image processing apparatus, image processing method, image processing program |
| WO2013073167A1 (en) | 2011-11-17 | 2013-05-23 | パナソニック株式会社 | Image processing device, imaging device, and image processing method |
| JP2014096062A (en) | 2012-11-09 | 2014-05-22 | Yamaguchi Univ | Image processing method and image processing apparatus |
| JP2015201044A (en) | 2014-04-08 | 2015-11-12 | 株式会社東芝 | Image processing apparatus and image processing method |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3060114B2 (en) * | 1990-09-29 | 2000-07-10 | グローリー工業株式会社 | Corresponding point search method |
| JP3769850B2 (en) * | 1996-12-26 | 2006-04-26 | 松下電器産業株式会社 | Intermediate viewpoint image generation method, parallax estimation method, and image transmission method |
-
2021
- 2021-02-18 JP JP2021024654A patent/JP7621828B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008275366A (en) | 2007-04-26 | 2008-11-13 | Tokyo Institute Of Technology | Stereo 3D measurement system |
| JP2009129318A (en) | 2007-11-27 | 2009-06-11 | Fuji Heavy Ind Ltd | Image processing device |
| JP2010140201A (en) | 2008-12-10 | 2010-06-24 | Toyota Motor Corp | Image processing apparatus, image processing method, image processing program |
| WO2013073167A1 (en) | 2011-11-17 | 2013-05-23 | パナソニック株式会社 | Image processing device, imaging device, and image processing method |
| JP2014096062A (en) | 2012-11-09 | 2014-05-22 | Yamaguchi Univ | Image processing method and image processing apparatus |
| JP2015201044A (en) | 2014-04-08 | 2015-11-12 | 株式会社東芝 | Image processing apparatus and image processing method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022126527A (en) | 2022-08-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102772870B1 (en) | Electronic device and control method | |
| EP3358295B1 (en) | Image processing device, stereo camera device, vehicle, and image processing method | |
| JP7308115B2 (en) | OBJECT DETECTION DEVICE, OBJECT DETECTION SYSTEM, MOBILE OBJECT AND OBJECT DETECTION METHOD | |
| JP6141562B1 (en) | Parallax calculation device, stereo camera device, vehicle, and parallax calculation method | |
| CN116736277A (en) | Electronic instruments, removable devices, distance calculation methods and storage media | |
| JP6456499B2 (en) | Three-dimensional object detection device, stereo camera device, vehicle, and three-dimensional object detection method | |
| JP6810009B2 (en) | Parallax calculator | |
| JP7278846B2 (en) | OBJECT POSITION DETECTION DEVICE, TRIP CONTROL SYSTEM, AND TRIP CONTROL METHOD | |
| JP2015207278A (en) | Parallax value deriving apparatus, device control system, moving body, robot, parallax value deriving method, and program | |
| CN114402357B (en) | Road surface detection device, object detection system, moving body, and object detection method | |
| JP6674959B2 (en) | Parallax calculating device, stereo camera device, vehicle, and parallax calculating method | |
| JP5073700B2 (en) | Object detection device | |
| EP4191196A1 (en) | Image processing device, stereo camera device, moving object, parallax calculation method, and image processing method | |
| CN112639864B (en) | Method and apparatus for ranging | |
| JP7229129B2 (en) | OBJECT DETECTION DEVICE, OBJECT DETECTION SYSTEM, MOBILE OBJECT AND OBJECT DETECTION METHOD | |
| JP6121641B1 (en) | Image processing apparatus, stereo camera apparatus, vehicle, and image processing method | |
| JP7621828B2 (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 | |
| US12620110B2 (en) | Image processing device, stereo camera device, mobile object, disparity calculating method, and image processing method | |
| JP7527891B2 (en) | IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOVING BODY, AND DISPARITY CALCULATION METHOD | |
| JP7652739B2 (en) | Image processing device and image processing method | |
| JP2024137371A (en) | Electronic device, distance measurement method, and distance measurement program | |
| JP2024050248A (en) | IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, AND IMAGE PROCESSING METHOD | |
| JP7023212B2 (en) | Image processing equipment, image pickup equipment, moving objects and image processing methods | |
| CN113763534A (en) | Point cloud mapping method based on visual look-around system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230915 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240614 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240709 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240902 |
|
| 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: 20241224 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250115 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7621828 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |