JP7818478B2 - Image processing device and image processing method - Google Patents
Image processing device and image processing methodInfo
- Publication number
- JP7818478B2 JP7818478B2 JP2022108907A JP2022108907A JP7818478B2 JP 7818478 B2 JP7818478 B2 JP 7818478B2 JP 2022108907 A JP2022108907 A JP 2022108907A JP 2022108907 A JP2022108907 A JP 2022108907A JP 7818478 B2 JP7818478 B2 JP 7818478B2
- Authority
- JP
- Japan
- Prior art keywords
- image processing
- processing device
- light source
- parallax
- unit
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/55—Depth or shape recovery from multiple images
- G06T7/593—Depth or shape recovery from multiple images from stereo images
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C3/00—Measuring distances in line of sight; Optical rangefinders
- G01C3/02—Details
- G01C3/06—Use of electric means to obtain final indication
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Electromagnetism (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Measurement Of Optical Distance (AREA)
- Image Analysis (AREA)
- Stereoscopic And Panoramic Photography (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Description
本発明は、ステレオカメラで同期撮像した一対の画像に基づいて撮像対象物の三次元位置を算出する画像処理装置、および、画像処理方法に関する。 The present invention relates to an image processing device and image processing method that calculates the three-dimensional position of an object based on a pair of images captured synchronously by a stereo camera.
近年の自動車には、自車両周辺の他車両、歩行者、障害物等や、路面の中央線、車線境界線等の撮像対象物の三次元位置を推定し、それらの推定結果に応じて自車両の駆動、制動、操舵等を制御する、先進運転支援システムや自動運転システムを搭載したものが普及しつつある。 In recent years, cars equipped with advanced driver assistance systems and autonomous driving systems are becoming increasingly common. These systems estimate the three-dimensional positions of captured objects around the vehicle, such as other vehicles, pedestrians, obstacles, road centerlines, lane markings, etc., and control the vehicle's driving, braking, steering, etc. based on these estimation results.
それらのシステムで利用される外界認識装置の一種として、ステレオカメラが知られている。ステレオカメラでは、異なる位置に配置した複数のカメラによって異なる視点から同一対象物を同期撮像し、撮像した複数の画像における同一対象物の見え方のずれ、いわゆる視差に基づいて対象物までの距離を算出することで、撮像対象物の三次元位置を推定している。 A stereo camera is known as one type of external recognition device used in these systems. With a stereo camera, multiple cameras placed in different locations capture images of the same object from different viewpoints in a synchronized manner, and the three-dimensional position of the captured object is estimated by calculating the distance to the object based on the difference in how the same object appears in the multiple captured images, known as parallax.
視差の算出にあたっては、ブロックマッチングなどの手法が用いられる。この手法は、一対のカメラで同期撮像した一対の画像のうち一方の画像を基準画像とし、基準画像上で指定した小領域を抜き出して、他方の参照画像から同一の小領域を探索する視差算出手法である。小領域同士が同一であるかについては、SAD(Sum of Absolute Difference)などのコスト関数が用いられる。但し、これらの視差算出手法の利用には、各カメラの光学特性が同一であることが前提となる。 Disparity calculations use techniques such as block matching. This method uses one of a pair of images captured synchronously by a pair of cameras as a reference image, extracts a specified small area from the reference image, and searches for the same small area in the other reference image. Cost functions such as SAD (Sum of Absolute Difference) are used to determine whether the small areas are identical. However, these disparity calculation methods require that the optical characteristics of each camera are identical.
ブロックマッチング処理中の探索は通常、画素単位で行われるが、後段処理によって測距分解能を向上する技術として、特許文献1がある。この文献の要約書には、課題として「ステレオ画像を処理して得られる画素を単位とする視差に起因する遠距離での測距分解能の低下を解消し、近距離から遠距離まで測距分解能を向上する。」と記載されており、解決手段として「ステレオカメラ10で撮像した一対の画像に対し、ステレオ処理部30で、各画像の小領域毎にシティブロック距離を計算して互いの相関を求めることで対応する小領域を特定するステレオマッチングを行い、対象物までの距離に応じて生じる画素のズレ(=視差)を距離データとして画像化した距離画像を生成する。さらに、認識処理部40で、基準画像及び比較画像のデータを用いてステレオマッチングを行って1画素以下の視差(サブピクセル成分)を求め、距離画像から得られる画素を単位とする視差を1画素以下の分解能で補間する。これにより、遠距離での測距分解能の低下を解消し、近距離から遠距離までの測距精度を確保する。」と記載されている。 While searches during block matching are typically performed in pixel units, Patent Document 1 describes a technology for improving ranging resolution through post-processing. The abstract of this document states that the problem is to "eliminate the reduction in ranging resolution at long distances caused by pixel-based parallax obtained by processing stereo images, thereby improving ranging resolution from short to long distances." It also states that the solution is to "perform stereo matching on a pair of images captured by the stereo camera 10, in which the stereo processing unit 30 calculates the city-block distance for each small region of each image and determines the correlation between them to identify corresponding small regions. A distance image is generated in which pixel deviations (parallax) that occur depending on the distance to the object are visualized as distance data. Furthermore, the recognition processing unit 40 performs stereo matching using data from the reference image and comparison image to determine parallax of less than one pixel (sub-pixel components), and interpolates the pixel-based parallax obtained from the distance image with a resolution of less than one pixel. This eliminates the reduction in ranging resolution at long distances and ensures ranging accuracy from short to long distances."
特許文献1の技術によって測距精度を確保するには、ステレオカメラの左右カメラの光学特性が同一という前提を必要とした。しかしながら、実際には各カメラの光学特性必ずしも同一ではないため、各カメラの光学特性が同一という前提で視差を算出した場合、視差算出結果には誤差が含まれることになる。 Ensuring distance measurement accuracy using the technology in Patent Document 1 requires the assumption that the optical characteristics of the left and right cameras of the stereo camera are identical. However, in reality, the optical characteristics of each camera are not necessarily identical, so if parallax is calculated under the assumption that the optical characteristics of each camera are identical, the parallax calculation result will contain errors.
各カメラの光学特性が異なる要因の一つとして、各カメラのレンズの拡散特性Fの相違が挙げられる。図1に示す通り、レンズ21(1枚のレンズとして簡略表示しているが、複数のレンズを組み合わせたものであっても良い)と撮像素子22(CMOSイメージセンサーなど)を有するカメラ2では、理想的な点光源Sから発された光はレンズ21を通して撮像素子22に投影され、画像Pが生成される。 One of the reasons why the optical characteristics of each camera differ is the difference in the diffusion characteristic F of each camera's lens. As shown in Figure 1, in camera 2, which has lens 21 (simply shown as a single lens, but may be a combination of multiple lenses) and image sensor 22 (e.g., a CMOS image sensor), light emitted from an ideal point light source S is projected through lens 21 onto image sensor 22, generating image P.
この場合、大きさを持たない点光源Sを撮像していることから、理想的には「理想のモデル」の画像Piのように、点光源Sが撮像素子22上で結像した1画素にのみ光源が撮像されることが期待される。ところが実際には、レンズ21の拡散特性Fによって点光源Sの光が撮像位置周辺に拡散するため、「実際のモデル」の画像Prのように、点光源Sに起因する光が外周に行くほど明るさを減衰しながら広範囲に撮像されることとなる。 In this case, since a point light source S, which has no size, is being imaged, ideally it would be expected that the light source would be imaged only in one pixel where the point light source S is imaged on the image sensor 22, as in the "ideal model" image Pi. However, in reality, the light from the point light source S is diffused around the imaging position due to the diffusion characteristic F of the lens 21, so the light resulting from the point light source S is imaged over a wide area, with brightness decreasing as it moves toward the periphery, as in the "actual model" image Pr.
従って、ステレオカメラの左右カメラの拡散特性Fが異なれば、仮に同じ位置から同じ明るさの点光源Sを撮像しても、異なる態様の画像が各カメラで撮像されることになる。この結果、各カメラの拡散特性Fが異なるステレオカメラを利用して視差を算出する場合は、画像毎に相違する拡散成分を元にブロックマッチングを実施することになるため、光源の視差が正確には算出されず、光源の三次元位置を正確に推定できないことになる。特に、光源が遠方にある場合は、ステレオカメラの特性上、小さな視差誤差でも大きな測距誤差に繋がるという性質があるため、遠方の物体を測距して後段の制御に利用するような処理、例えば、車載ステレオカメラを利用した先行車追従機能などでは、各カメラの拡散特性Fの相違に起因する視差誤差が大きな問題となる。 Therefore, if the diffusion characteristics F of the left and right cameras of a stereo camera are different, even if a point light source S of the same brightness is captured from the same position, each camera will capture a different image. As a result, when calculating parallax using stereo cameras with different diffusion characteristics F, block matching is performed based on the different diffusion components for each image, so the parallax of the light source is not calculated accurately and the three-dimensional position of the light source cannot be accurately estimated. In particular, when the light source is far away, due to the characteristics of stereo cameras, even a small parallax error can lead to a large ranging error. Therefore, in processes that measure the distance to a distant object and use this information for subsequent control, such as a vehicle-following function using an in-vehicle stereo camera, parallax errors caused by differences in the diffusion characteristics F of each camera can be a major problem.
この問題に対し、ステレオカメラの左右カメラが同一の拡散特性Fを持つようにレンズをペアリングすることが1つの解決策として考えられるが、同一設計値のレンズの同一ロット品であっても拡散特性Fにはバラツキがあるため、拡散特性の一致するレンズをペアリングするには、レンズ毎に拡散特性Fの計測を行い、似た特性のレンズを探し出してペアリングする、という多大な労力を必要とした。 One possible solution to this problem would be to pair lenses so that the left and right cameras of a stereo camera have the same diffusion characteristic F, but because there is variation in the diffusion characteristic F even between lenses of the same design value and the same lot, pairing lenses with matching diffusion characteristics requires a great deal of effort, as it is necessary to measure the diffusion characteristic F for each lens and then find and pair lenses with similar characteristics.
本発明は、このような問題を鑑みてなされたものであり、ステレオカメラを構成する各カメラの拡散特性が異なっても、正しく視差を算出できる画像処理装置、および、画像処理方法を提供することを目的とする。 The present invention was made in consideration of these problems, and aims to provide an image processing device and image processing method that can accurately calculate parallax even when the diffusion characteristics of each camera that makes up a stereo camera differ.
上記目的を達成するために、本発明は、視野が重複する複数のカメラで同時に得られた複数の画像のそれぞれにおいて光源の撮影される領域を特定する光源領域特定部と、光源領域の画素の輝度値に応じて当該画素に重みづけを行い、重みづけされた各画素を用いて、光源領域の視差マッチングを行うことで視差を求める視差算出部と、を備える。 To achieve the above objective, the present invention comprises a light source area identification unit that identifies the area where the light source is captured in each of multiple images simultaneously captured by multiple cameras with overlapping fields of view, and a disparity calculation unit that weights pixels in the light source area according to their luminance values and uses each weighted pixel to perform disparity matching of the light source area to determine the disparity.
本発明の画像処理装置、および、画像処理方法によれば、テレオカメラを構成する各カメラの拡散特性が異なっても、正しく視差を算出することができる。上記した以外の課題、構成及び効果は、以下の実施例により明らかにされる。 The image processing device and image processing method of the present invention can accurately calculate parallax even if the diffusion characteristics of each camera constituting a stereo camera differ. Issues, configurations, and advantages other than those described above will be made clear in the following examples.
以下、本発明の画像処理装置の実施例を、図面を参照して説明する。なお、以下では、車両に搭載した画像処理装置を例に本発明を説明するが、本発明の画像処理装置は車両に搭載されるものに限定されるものではない。 An embodiment of the image processing device of the present invention will be described below with reference to the drawings. Note that, although the present invention will be described below using an image processing device mounted on a vehicle as an example, the image processing device of the present invention is not limited to being mounted on a vehicle.
図2から図10を用いて、本発明の実施例1に係る画像処理装置1を説明する。 The image processing device 1 according to the first embodiment of the present invention will be described using Figures 2 to 10.
まず、図2を用いて、実施例1の画像処理装置1の概略構成を説明する。ここに示すように、本実施例の画像処理装置1は、ステレオカメラ11、メモリ12、演算処理部13、画像処理部14、外部出力部15を備える。そして、各構成要素は、通信ライン16を介して相互通信可能に接続されている。 First, the schematic configuration of the image processing device 1 of Example 1 will be described using Figure 2. As shown here, the image processing device 1 of this example includes a stereo camera 11, a memory 12, an arithmetic processing unit 13, an image processing unit 14, and an external output unit 15. Each component is connected to each other via a communication line 16 so that they can communicate with each other.
ステレオカメラ11は、左カメラ2Lと右カメラ2Rを用い、左画像と右画像を同期撮像するカメラシステムである。以下では、同期撮像した左右画像のうち任意の一方を基準画像P0と称し、他方を参照画像P1と称する。なお、本実施例の左カメラ2Lと右カメラ2Rは、視線方向が並行、かつ、視野が重複するように配置されているものとする。 The stereo camera 11 is a camera system that uses a left camera 2L and a right camera 2R to capture left and right images synchronously. Hereinafter, any one of the synchronously captured left and right images will be referred to as the base image P0, and the other as the reference image P1. In this embodiment, the left camera 2L and right camera 2R are positioned so that their line of sight are parallel and their fields of view overlap.
メモリ12は、基準画像P0や参照画像P1を一時記憶したり、演算処理部13や画像処理部14が実行するプログラムを記憶したりする、半導体メモリ等の記憶装置である。 Memory 12 is a storage device such as a semiconductor memory that temporarily stores the base image P0 and reference image P1, and stores programs executed by the calculation processing unit 13 and image processing unit 14.
演算処理部13は、メモリ12に格納されているプログラムの指示に従って、以降で説明する演算処理を実装するCPU(Central Processing Unit)等の演算装置である。 The calculation processing unit 13 is a calculation device such as a CPU (Central Processing Unit) that implements the calculation processing described below in accordance with the instructions of the program stored in the memory 12.
画像処理部14は、基準画像P0と参照画像P1に基づいて視差pを算出したりするGPU(Graphics Processing Unit)等の演算装置である。なお、画像処理部14で実行される、視差pを算出するための具体的な処理については後段で述べる。 The image processing unit 14 is a computing device such as a GPU (Graphics Processing Unit) that calculates the parallax p based on the base image P0 and the reference image P1. The specific processing performed by the image processing unit 14 to calculate the parallax p will be described later.
外部出力部15は、画像処理部14で算出した視差p等を外部(例えば、ECU(Electronic Control Unit))に送信するインターフェースである。なお、ECUは、車両の駆動系、制動系、操舵系等を制御する制御装置であり、外部出力部15から取得した視差p等を、先進運転支援システムや自動運転システムの一機能である、物体検知や走行路検出等に活用する。なお、これらの機能は、画像処理装置1の一部として組み込まれていても構わない。 The external output unit 15 is an interface that transmits the parallax p, etc. calculated by the image processing unit 14 to an external device (for example, an ECU (Electronic Control Unit)). The ECU is a control device that controls the vehicle's drive system, braking system, steering system, etc., and uses the parallax p, etc. obtained from the external output unit 15 for object detection, driving path detection, etc., which are functions of advanced driver assistance systems and autonomous driving systems. These functions may be incorporated as part of the image processing device 1.
<画像処理部14>
次に、図3の機能ブロック図を用いて、画像処理部14の詳細について説明する。図示するように、画像処理部14は、光源領域特定部141と、視差算出部142を有している。以下、各部の詳細を順次説明する。
<Image processing unit 14>
Next, the image processing unit 14 will be described in detail using the functional block diagram of Fig. 3. As shown in the figure, the image processing unit 14 has a light source region specifying unit 141 and a parallax calculation unit 142. Details of each unit will be described below in order.
<<光源領域特定部141>>
光源領域特定部141は、ステレオカメラ11で撮像した一対の画像を、基準画像P0、参照画像P1として受け取り、受け取った画像内において光源の撮像された領域(以下、光源領域Rと称する)を特定する。ここで、本実施例における光源とは、自発光する自動車のヘッドライト・ブレーキランプ・テールランプ、街灯、信号などはもちろん、強い光を反射する鏡など、周辺環境に比べて強い光をカメラ2に向けて発している物体を包括する用語である。
<<Light source area identification unit 141>>
The light source region identification unit 141 receives a pair of images captured by the stereo camera 11 as a base image P0 and a reference image P1, and identifies the region in the received images where the light source is captured (hereinafter referred to as the light source region R). Here, the light source in this embodiment is a term that encompasses not only self-luminous automobile headlights, brake lights, tail lights, street lights, traffic lights, etc., but also objects that emit stronger light toward the camera 2 than the surrounding environment, such as mirrors that reflect strong light.
光源領域Rを特定する手法の1つとして、画像内の画素の輝度値を参照し、輝度値が閾値以上である領域を光源領域Rとして抽出する手法が考えられる。また、このとき、拡散成分は光源が明るいほど強くなり、拡散成分が視差マッチングに与える影響は周辺が暗いほど強くなる。よって、図4Aに示すように、画像全体から判定した周辺の暗さが明るいほど、光源判定閾値が大きくなるように、光源領域特定部141を設計することが望ましい。 One method for identifying the light source region R is to refer to the luminance values of pixels in the image and extract the region where the luminance value is equal to or greater than a threshold as the light source region R. In this case, the brighter the light source, the stronger the diffuse component, and the darker the periphery, the stronger the influence of the diffuse component on parallax matching. Therefore, as shown in Figure 4A, it is desirable to design the light source region identification unit 141 so that the light source determination threshold increases as the periphery determined from the entire image becomes brighter.
また、図4Bに、周辺の明るさと、視差マッチングに影響を与える拡散光成分の関係を簡単に示す。この図では、横軸を右に行くほど周辺が明るくなり、縦軸を上に行くほど光源が明るくなる。この図から明らかなように、光源の明るさが同じであり、同様の拡散光を発生させていても、周辺が明るければ、周辺の光に紛れて拡散光成分が小さくなるため、視差マッチングへの影響は相対的に小さくなる。一方、周辺が暗い場合は、比較的暗い光源であっても拡散光成分の影響は相対的に大きくなる。すなわち、図4Aのように、周辺の明るさを元に光源と判定する閾値を決定することで、視差マッチングに影響のある光源の撮像された領域(光源領域R)だけを効率よく抽出することができる。 Figure 4B also shows a simple diagram of the relationship between ambient brightness and the diffuse light component that affects parallax matching. In this diagram, the further to the right on the horizontal axis the brighter the periphery, and the further up the vertical axis the brighter the light source. As is clear from this diagram, even if the light source has the same brightness and generates the same amount of diffuse light, if the ambient light is bright, the diffuse light component will be blended into the ambient light and become smaller, resulting in a relatively small impact on parallax matching. On the other hand, if the ambient light is dark, the impact of the diffuse light component will be relatively large, even if the light source is relatively dark. In other words, by determining a threshold for determining a light source based on ambient brightness, as in Figure 4A, it is possible to efficiently extract only the imaged area of the light source (light source area R) that affects parallax matching.
<<視差算出部142>>
視差算出部142は、光源領域特定部141で特定した光源領域Rの各画素に対して重みづけを行い、重みづけされた各画素を用いた視差マッチング処理を行うことで最終的な視差pを算出する。
<<Parallax calculation unit 142>>
The parallax calculation unit 142 weights each pixel in the light source region R identified by the light source region identification unit 141, and calculates the final parallax p by performing parallax matching processing using each weighted pixel.
図5の機能ブロック図に示すように、視差算出部142は、重み設定部142aと、視差マッチング部142bを有している。以下、各部の詳細を順次説明する。 As shown in the functional block diagram in Figure 5, the disparity calculation unit 142 has a weight setting unit 142a and a disparity matching unit 142b. Details of each unit will be explained below.
重み設定部142aは、ステレオカメラ11で撮像した基準画像P0と参照画像P1、及び、光源領域特定部141で特定した光源領域Rに基づいて、画像の各画素に対して重みを設定する。 The weight setting unit 142a sets a weight for each pixel of the image based on the base image P0 and reference image P1 captured by the stereo camera 11, and the light source region R identified by the light source region identification unit 141.
重み設定部142aで設定する重みについて図6を用いて説明する。ここに例示するように、基準画像P0の光源領域R0においては、光源そのものが撮影されている部分A1が特に輝度値が高く、視差誤差の要因となる拡散光成分A2はその周辺に低輝度で分布している。このことから、この基準画像P0に対しては、図6左下グラフに示すように、単純に輝度値に応じて重みを設定する方法が考えられる。あるいは、輝度値だけでなく輝度勾配を合わせて考慮して重みを設定しても良い。図6左下グラフでは、重みは離散的に変化しているが、滑らかに変化する輝度値に合わせて滑らかに重みが変化するようモデル化しても良い。 The weights set by the weight setting unit 142a will be explained using Figure 6. As shown in this example, in the light source region R0 of the reference image P0, the portion A1 where the light source itself is photographed has a particularly high brightness value, while the diffuse light component A2 that causes parallax error is distributed around it at low brightness. For this reason, for this reference image P0, a method of simply setting weights according to brightness values is conceivable, as shown in the graph at the bottom left of Figure 6. Alternatively, weights may be set taking into account not only brightness values but also brightness gradients. In the graph at the bottom left of Figure 6, the weights change discretely, but they may also be modeled so that they change smoothly in accordance with smoothly changing brightness values.
ここで、夜間に撮像した画像Pにおいて、光源を含む光源領域Rと、光源ではない物体(例えば、林立する柱状物体)を含む非光源領域R’を例に、各領域に設定すべき重みについて説明する。図7に示すように、非光源領域R’内の林立する柱状物体は、単純に光量が少ないため低輝度の画素となっているが、視差マッチングに積極的に利用したい画素であるので設定する重みを大きくしたい。一方、光源領域Rの拡散光成分は、非光源領域R’内の柱状物体撮像領域と同程度の低輝度の画素となっているが、視差マッチング時のノイズになると考えられるため、設定する重みを小さくしたい。すなわち、同程度の低輝度の画素でも、光源領域Rと非光源領域R’では、最適な重みが異なっている。 Here, we will explain the weights that should be set for each region in an image P captured at night, using as an example a light source region R that includes a light source and a non-light source region R' that includes objects that are not light sources (for example, a forest of columnar objects). As shown in Figure 7, the forest of columnar objects in the non-light source region R' are low-brightness pixels simply due to the low amount of light. However, since these are pixels that we want to actively use in parallax matching, we want to set a large weight. On the other hand, the diffuse light component of the light source region R is a pixel with a low brightness similar to that of the columnar object imaging region in the non-light source region R', but since it is thought to become noise during parallax matching, we want to set a small weight. In other words, even for pixels with similar low brightness, the optimal weights are different between the light source region R and the non-light source region R'.
低輝度の画素が何れに分類されるかを区別する際に参考となりうる、光源領域Rと非光源領域R’の特性を比較すると、両者には次の相違があることが分かる。すなわち、非光源領域R’では、柱状物体の外縁部で物体の有無によって輝度が急変するため、全体的に輝度値が小さくても、大きな輝度勾配を含む傾向にある。一方、光源領域Rの拡散光成分は、輝度値が小さく、かつ、輝度勾配も緩やかである。 Comparing the characteristics of the light source region R and the non-light source region R', which can be useful when distinguishing which category a low-brightness pixel falls into, reveals the following differences between the two. In other words, in the non-light source region R', the brightness at the outer edge of the columnar object changes suddenly depending on whether or not the object is present, so even if the overall brightness value is low, it tends to contain a large brightness gradient. On the other hand, the diffuse light component in the light source region R has a low brightness value and a gentle brightness gradient.
そこで、両者の特性の差異に鑑み、輝度値が低く、かつ、輝度勾配が小さいときにのみ(すなわち、光源領域R内の拡散光成分に該当すると考えられるときのみ)小さくなるような重みを設計することで、拡散光成分以外の低輝度部分(例えば、非光源領域R’内の物体)に対して重みを不当に小さくする危険性を回避することができる。 Therefore, taking into account the differences in the characteristics of the two, by designing weights that are small only when the luminance value is low and the luminance gradient is small (i.e., only when it is considered to correspond to the diffuse light component within the light source region R), it is possible to avoid the risk of assigning inappropriately small weights to low-luminance areas other than the diffuse light component (for example, objects within the non-light source region R').
本実施例で各画素に設定する重みwをより具体的に説明すれば、仮に、ある画像座標(i,j)における輝度値をL(i,j)、輝度勾配をL’(i,j)とする場合、以下の式1で規定されるような重みwを画像座標(i,j)に与えればよい。ここで、式1のa,bは、輝度値と輝度勾配のスケールを合わせるスケールファクターとしての役割を果たす係数である。 To explain more specifically the weight w set for each pixel in this embodiment, if the luminance value at a certain image coordinate (i, j) is L(i, j) and the luminance gradient is L'(i, j), then the weight w defined by the following equation 1 can be assigned to the image coordinate (i, j). Here, a and b in equation 1 are coefficients that act as scale factors that match the scale of the luminance value and luminance gradient.
視差マッチング部142bは、重み設定部142aで設定した重みを元に画素ごとに重みづけをしつつ視差マッチングを行い、視差pを出力する。以下、重みづけの反映の仕方について説明する。 The disparity matching unit 142b performs disparity matching while weighting each pixel based on the weight set by the weight setting unit 142a, and outputs the disparity p. The method for reflecting the weighting is explained below.
図8に、視差に先立ち計算する輝度差分に画素毎の重み付けを行う視差マッチング部142bの機能ブロック図を示す。この例においては、基準画像P0と参照画像P1の輝度差分を計算した後に、各輝度差分に対して重み付けを適用する。その後、重みを適用した輝度差分を利用して、視差マッチングにより視差を算出する。但し、この手法では、参照画像P1側の各画素に設定すべき重みを考慮していないため、重みの低い画素(拡散光成分)の影響を十分に排除できない。 Figure 8 shows a functional block diagram of the parallax matching unit 142b, which weights each pixel on the brightness difference calculated prior to calculating the parallax. In this example, after calculating the brightness difference between the base image P0 and the reference image P1, a weight is applied to each brightness difference. The weighted brightness differences are then used to calculate the parallax through parallax matching. However, this method does not take into account the weights that should be set for each pixel on the reference image P1 side, and therefore cannot fully eliminate the influence of pixels with low weights (diffuse light components).
そこで、図8の問題を改善する方策の一例として、図9に、事前に基準画像P0と参照画像P1の双方を画像変換することで、両画像について画素毎の重み付けを実現する視差マッチング部142bの機能ブロック図を示す。この図においては、重みの小さな画素における輝度が後段の差分計算において影響が小さくなるように、輝度画像である基準画像P0と参照画像P1を事前に変換する。例えば、重みの低い領域においては、該当する画素の輝度値が左右画像(基準画像P0と参照画像P1)ですべて0になるよう変換すれば、その領域内では視差マッチング時に計算される差分は常に0となり、他の領域の差分が優先的に扱われることになる。 As an example of a method for improving the problem shown in Figure 8, Figure 9 shows a functional block diagram of the parallax matching unit 142b, which performs image transformation on both the base image P0 and the reference image P1 in advance to weight each pixel in both images. In this diagram, the base image P0 and the reference image P1, which are luminance images, are transformed in advance so that the luminance of pixels with low weights has less of an effect on the difference calculation that follows. For example, in areas with low weights, if the luminance values of the corresponding pixels are transformed to all 0 in the left and right images (base image P0 and reference image P1), the difference calculated during parallax matching within that area will always be 0, and differences in other areas will be given priority.
実際の変換手順の例について、図10に示す。同図の上段グラフは、基準画像P0の光源領域R0の横方向の輝度変化を示したグラフである。この上段グラフの輝度に対して、式1等による重み係数を単純に乗算する方法では、領域に設定された重みをそれぞれの輝度に掛けて画像を生成し、視差マッチングを行う。このやり方は簡単であるが、図10の中段グラフに示した通り重みを強くした部分と弱くした部分の間で急激に変化する画像となり、元々存在しない部分に新たなエッジが生成されてしまい、元々存在しない物体を検知したと誤解して誤マッチングに繋がる可能性もある。 An example of the actual conversion procedure is shown in Figure 10. The top graph in the figure is a graph showing the horizontal brightness change in the light source region R0 of the reference image P0. In a method where the brightness of this top graph is simply multiplied by a weighting coefficient such as that in Equation 1, an image is generated by multiplying each brightness by the weight set for the region, and then parallax matching is performed. This method is simple, but as shown in the middle graph in Figure 10, the image changes suddenly between areas with strong and weak weights, and new edges are generated in areas that did not originally exist. This can lead to the mistaken belief that an object that did not originally exist has been detected, which can lead to incorrect matching.
そこで、図10の下段グラフに示すように、画像全体の輝度を所定量減算した輝度画像を生成し、これを視差マッチングの処理対象とすることで、重み変化箇所の影響を最小限にした視差マッチングを行うことができる。この手法では、光源として特定された領域全体から、一定の輝度値を一律に減算した後にマッチングを行う。明るい部分からも輝度が減算されることから、下段グラフに示したように、高輝度領域では輝度勾配が一定に保たれる。減算する輝度の具体的な数値については、重みが一定以下である画素の輝度値がすべて0になるように減算値を設定しても良いし、光源領域の輝度が初期状態の20%になるような減算値を設定しても良い。これらは使用するレンズ21の拡散特性Fにも影響されるため、ステレオカメラ11に要求される視差精度を元に設計する必要がある。 Therefore, as shown in the lower graph in Figure 10, a luminance image is generated by subtracting a predetermined amount from the luminance of the entire image, and this is then used for parallax matching. This allows for parallax matching that minimizes the impact of weight-change areas. With this method, matching is performed after a certain luminance value is uniformly subtracted from the entire area identified as the light source. Because luminance is subtracted from bright areas as well, a constant luminance gradient is maintained in high-luminance areas, as shown in the lower graph. The specific luminance value to be subtracted can be set so that the luminance values of all pixels with weights below a certain value are set to 0, or so that the luminance of the light source area is 20% of the initial value. These values are also affected by the diffusion characteristic F of the lens 21 used, so they must be designed based on the parallax accuracy required for the stereo camera 11.
以上で説明した実施例の画像処理装置1によって、光源を撮像して視差算出を行った際、光源周辺の拡散光成分の影響を除去したうえで視差算出を行うため、左右レンズ特性の違いに起因する視差誤差を最小限に抑え、高精度な測距を実現することができる。 When the image processing device 1 of the embodiment described above captures an image of a light source and calculates parallax, it calculates the parallax after removing the effects of diffuse light components around the light source, thereby minimizing parallax errors caused by differences in the characteristics of the left and right lenses and achieving highly accurate distance measurement.
次に、図11から図14を用いて、本発明の実施例2に係る画像処理装置1を説明する。なお、実施例1との共通点は重複説明を省略する。 Next, an image processing device 1 according to a second embodiment of the present invention will be described using Figures 11 to 14. Note that overlapping explanations of points common to the first embodiment will be omitted.
実施例2は実施例1の変形例であり、光源となり得る物体の物体識別結果Iを外部から取得する場合の実施例である。本実施例によれば、本発明の画像処理を行うべき光源領域を画像輝度値以外の情報も活用して特定することができ、重要な光源を見落とすことなく画像処理することができる。 Example 2 is a modification of Example 1, and is an example in which the object identification result I of an object that can be a light source is acquired externally. According to this example, the light source area on which the image processing of the present invention should be performed can be identified using information other than image brightness values, and image processing can be performed without overlooking important light sources.
本実施例における光源領域特定部141の機能ブロック図を図11に示す。ここに示すように、本実施例の光源領域特定部141は、基準画像P0、参照画像P1、物体識別結果Iを入力とし、光源領域Rを出力するものであり、監視領域設定部141aと、輝度変化判定部141bを有している。 Figure 11 shows a functional block diagram of the light source region identification unit 141 in this embodiment. As shown here, the light source region identification unit 141 in this embodiment receives the base image P0, the reference image P1, and the object identification result I as input, and outputs the light source region R. It has a monitoring region setting unit 141a and a brightness change determination unit 141b.
物体識別結果Iは、画像上で立体物を検知した領域と、その立体物の種別を示すラベルを合わせたものであり、図示しない物体識別部でパターンマッチング等を利用して生成される。物体識別結果Iの一例を図12に示す。例えば、物体識別結果Iとして車両検知結果Ob1が得られた場合、ブレーキランプ点灯やテールランプ点灯の可能性があるため、光源領域特定部141では、車両検知結果Ob1が示す領域を光源可能性物体として扱う。具体的には、監視領域設定部141aにて車両のブレーキランプが存在するであろう領域を監視領域として設定する。そして、該当領域を時系列に追跡し、輝度変化判定部141bで輝度値が大きく変化した瞬間を判定する。輝度値が明るい方向に変化していた場合、ブレーキランプ点灯タイミングであると判定され、該当領域は光源領域であるとして出力する。 The object identification result I is a combination of the area in the image where a three-dimensional object is detected and a label indicating the type of three-dimensional object, and is generated by an object identification unit (not shown) using pattern matching or the like. An example of the object identification result I is shown in Figure 12. For example, if a vehicle detection result Ob1 is obtained as the object identification result I, there is a possibility that the brake lights or tail lights are on, so the light source area identification unit 141 treats the area indicated by the vehicle detection result Ob1 as a possible light source object. Specifically, the monitoring area setting unit 141a sets the area where the vehicle's brake lights are likely to be located as the monitoring area. The relevant area is then tracked over time, and the brightness change determination unit 141b determines the moment when the brightness value changes significantly. If the brightness value changes in the brighter direction, it is determined that this is the timing for the brake lights to be turned on, and the relevant area is output as a light source area.
同様に、物体識別結果Iとして信号検知結果Ob2を得た場合も、監視領域設定部141aは、上記同様に、信号のランプ位置を光源可能性物体として監視領域に設定した後、輝度変化判定部141bで該領域の輝度変化を監視し、明るくなった場合に光源領域であるとして出力する。 Similarly, when signal detection result Ob2 is obtained as object identification result I, the monitoring area setting unit 141a sets the position of the signal lamp as a possible light source object in the monitoring area, as described above, and then the brightness change determination unit 141b monitors the brightness change of the area, and if it becomes brighter, outputs it as a light source area.
一方、街路樹など光源となりえない物体のその他検知結果Ob3が得られた場合は、監視領域設定部141aでは、特に監視領域を設定する必要はない。 On the other hand, if other detection results Ob3 are obtained for objects that cannot be light sources, such as roadside trees, the monitoring area setting unit 141a does not need to set a specific monitoring area.
次に、本実施例の視差算出部142の機能ブロック図を図13に示す。ここに示すように、本実施例の視差算出部142は、実施例1の図5等で説明した重み設定部142aと視差マッチング部142bに加え、種別パラメタ設定部142cと重みマージ部142dを有している。 Next, Figure 13 shows a functional block diagram of the disparity calculation unit 142 of this embodiment. As shown here, the disparity calculation unit 142 of this embodiment includes a type parameter setting unit 142c and a weight merging unit 142d in addition to the weight setting unit 142a and disparity matching unit 142b described in Figure 5 of Example 1, etc.
種別パラメタ設定部142cでは、上記した物体識別結果Iを受け取り、実施例1の重みとは別に種別パラメタを設定する。種別パラメタとは、対象物体に対する測距の重要度から本発明の重みづけ処理の軽重を決定する重みである。重みづけを強く実施した場合、拡散光成分が除去される効果が高いため測距精度が向上する。一方、視差マッチングに使用しない画素が増えることから、検知の安定性という点で劣る。重みづけを弱くした場合はその逆である。これらの影響はトレードオフであるから、シーンに応じて適切に用いることが重要である。 The type parameter setting unit 142c receives the object identification result I described above and sets a type parameter separate from the weighting used in Example 1. The type parameter is a weight that determines the importance of the weighting process of the present invention based on the importance of distance measurement for the target object. When strong weighting is applied, the diffuse light component is more effectively removed, improving distance measurement accuracy. On the other hand, the number of pixels not used for parallax matching increases, resulting in a decrease in detection stability. The opposite is true when weak weighting is applied. These effects are a trade-off, so it is important to use the weighting appropriately depending on the scene.
図12に例示したように、外部から取得した物体識別結果Iに基づいて撮像対象物体の種別が予め分かっている場合、例えばブレーキランプ点灯中の先行車両であれば、自車両の緊急ブレーキ対象となる可能性があり、緊急性・測距要求精度ともに高い。よって、本発明による拡散光成分の除去を出来る限り行い、高精度な測距を行うべきである。しかし、テールランプ点灯中の車両であれば、緊急性は低く、ランプがブレーキランプより暗いことから拡散光の影響による誤差量も小さいため、拡散光成分の除去はブレーキランプよりも小さくて良い。さらに、信号や街灯であれば、測距要求精度は低い。 As shown in Figure 12, if the type of object being imaged is known in advance based on the object identification result I obtained from an external source, for example, if the preceding vehicle has its brake lights on, it is likely to be subject to emergency braking by the vehicle itself, and both the urgency and the required accuracy of distance measurement are high. Therefore, the diffused light component should be removed as much as possible using the present invention to perform highly accurate distance measurement. However, if the vehicle has its tail lights on, the urgency is low and the lamps are dimmer than the brake lights, so the amount of error due to the influence of diffused light is smaller, so the amount of diffused light component removed can be smaller than for brake lights. Furthermore, if the vehicle is a traffic light or street light, the required accuracy of distance measurement is low.
このように種別に応じて重みづけを変化させることで、測距精度が必要な場合においては本処理を強く実施して精度を優先し、そうでない場合においては本処理を弱めることで安定性を確保する。種別パラメタはこれらの傾向を示すパラメタとして後段処理に出力する。 By changing the weighting depending on the type in this way, when distance measurement accuracy is required, this process is performed strongly to prioritize accuracy, and when this is not the case, this process is weakened to ensure stability. The type parameter is output to subsequent processing as a parameter indicating these tendencies.
重み設定部142aと種別パラメタ設定部142cで算出された重みと種別パラメタは、重みマージ部142dにおいて最終的に視差マッチングに用いるための重みに統合される。説明のため、全く同一の光源を先行車のブレーキランプとして判定した場合の統合重み算出の例と、信号として判定した場合の統合重み算出の例を図14に示す。 The weights and type parameters calculated by the weight setting unit 142a and type parameter setting unit 142c are integrated by the weight merging unit 142d into weights to be used for disparity matching. For illustrative purposes, Figure 14 shows an example of integrated weight calculation when the exact same light source is determined to be the brake light of a preceding vehicle, and an example of integrated weight calculation when it is determined to be a traffic light.
図14左図に示すように、光源をブレーキランプと判定した場合、拡散光の影響を少しでも減らして測距精度を上げるために、光源部分と拡散光部分の重み変化をより急峻に変換する。これは、先進運転支援システムや自動運転システムの制御によって、急減速中の先行車への追突を回避するには、その前提として、先行車のブレーキランプまでの距離を正確に推定する必要があるからである。 As shown in the left diagram of Figure 14, when the light source is determined to be a brake light, the weighting of the light source portion and the diffused light portion is changed more steeply to reduce the influence of diffused light as much as possible and improve distance measurement accuracy. This is because, in order to avoid a rear-end collision with a leading vehicle that is suddenly decelerating using control from an advanced driver assistance system or autonomous driving system, it is necessary to accurately estimate the distance to the leading vehicle's brake light.
一方、図14右図に示すように、光源を信号と判定した場合は、光源部分では測距精度を向上させず、視差マッチングに使う情報を増やすことで信号検出の安定性を保つ。これは、信号までの距離を正確に推定できなくても、特段の悪影響が無いからである。 On the other hand, as shown in the right image of Figure 14, when a light source is determined to be a signal, the distance measurement accuracy is not improved in the light source area, and the stability of signal detection is maintained by increasing the information used for disparity matching. This is because there is no particular adverse effect even if the distance to the signal cannot be accurately estimated.
本実施例によれば、重みづけ処理を行うべき光源領域を画像輝度値以外の情報も活用して特定すると共に、該光源の種別に応じた重みづけを行うことで、測距制度の必要な光源についてのみ、適切に拡散光成分を除去した視差マッチングを行うことができる。 According to this embodiment, the light source area for which weighting processing should be performed is identified using information other than image brightness values, and by performing weighting according to the type of light source, it is possible to perform parallax matching that appropriately removes diffuse light components only for light sources that require distance measurement accuracy.
次に、図15から図17を用いて、本発明の実施例3に係る画像処理装置1を説明する。なお、上記の実施例との共通点は重複説明を省略する。 Next, an image processing device 1 according to a third embodiment of the present invention will be described using Figures 15 to 17. Note that overlapping explanations of points common to the above embodiments will be omitted.
実施例3は実施例1の変化例であり、実施例1の画像処理部14に、さらに各視差の信頼度マップMを算出する信頼度算出部143を追加したものである。本実施例によれば、出力された視差pそれぞれの信頼度マップMを出力することができ、後段処理で視差pを用いる際に、信頼度マップMが示す信頼度の高い視差pだけを用いた高精度な測距や、信頼度の低い点を用いた密な点群処理などを選択的に行うことができる。 Example 3 is a variation of Example 1, in which a reliability calculation unit 143 that calculates a reliability map M for each parallax is added to the image processing unit 14 of Example 1. According to this example, a reliability map M can be output for each output parallax p, and when using the parallax p in subsequent processing, it is possible to selectively perform high-precision ranging using only parallax p with high reliability indicated by the reliability map M, or dense point cloud processing using points with low reliability.
本実施例における画像処理部14の構成図を図15に示す。ここに示すように、本実施例の画像処理部14は、実施例1の画像処理部14(図3参照)の後端に、信頼度算出部143を付加したものである。これにより、前述の手法で視差算出部142が視差pを算出した後、各視差の信頼度を算出する信頼度算出部143で、信頼度マップMを算出することができる。 Figure 15 shows a configuration diagram of the image processing unit 14 in this embodiment. As shown here, the image processing unit 14 in this embodiment is configured by adding a reliability calculation unit 143 to the rear end of the image processing unit 14 in embodiment 1 (see Figure 3). As a result, after the disparity calculation unit 142 calculates the disparity p using the method described above, the reliability calculation unit 143, which calculates the reliability of each disparity, can calculate the reliability map M.
信頼度算出部143の機能ブロック図の一例を図16に示す。ここに示す信頼度算出部143は、通常視差マッチング部143aと、視差比較部143bを有する。 An example of a functional block diagram of the reliability calculation unit 143 is shown in Figure 16. The reliability calculation unit 143 shown here has a normal disparity matching unit 143a and a disparity comparison unit 143b.
通常視差マッチング部143aでは、重みづけを行わない単純な視差算出を行う。視差算出の方法には前述したブロックマッチングなどがあるが、視差算出部142の視差マッチング部142bと同一の方法を用い、重みづけの有無だけが差分である。以後、ここで算出された視差pを通常視差pn、視差マッチング部142bの出力である重みづけ視差pwと呼び、区別する。 The normal disparity matching unit 143a performs simple disparity calculation without weighting. While methods for calculating disparity include the block matching mentioned above, the same method as the disparity matching unit 142b of the disparity calculation unit 142 is used, with the only difference being the presence or absence of weighting. Hereinafter, the disparity p calculated here will be referred to as the normal disparity pn, and the weighted disparity pw, which is the output of the disparity matching unit 142b, to distinguish them.
次に、視差比較部143bにおいて、画素ごとに通常視差pnと重みづけ視差pwを比較する。重みが一致した画素では拡散光成分の影響がないと判断されるため、その画素の信頼度は高いと判断することができる。一方、通常視差pnと重みづけ視差pwが異なる場合は拡散光成分の影響があると判断されるため、その画素の信頼度は低いと判断することができる。なお、通常視差pnと重みづけ視差pwが異なる領域は、本発明の拡散光成分の除去によって視差誤差が除去された領域である。 Next, the parallax comparison unit 143b compares the normal parallax pn with the weighted parallax pw for each pixel. Pixels with matching weights are determined to be unaffected by the diffuse light component, and therefore the reliability of the pixel can be determined to be high. On the other hand, if the normal parallax pn and weighted parallax pw differ, it is determined to be affected by the diffuse light component, and therefore the reliability of the pixel can be determined to be low. Note that areas where the normal parallax pn and weighted parallax pw differ are areas where parallax error has been removed by removing the diffuse light component according to the present invention.
しかし、実施例2でも述べた通り、視差マッチング部142bの出力である重みづけ視差pwは拡散光成分の含まれる画素を除去して視差マッチングしていることに等しく、視差マッチングに使用されている画素の数が通常より少なく、信頼度が落ちる。合わせて、この時の差分が大きいほど拡散光成分の影響が大きいと考えられるため、重みづけによって影響を除去しきれていない可能性を考慮し、信頼度をより低く設定する。以上の思想で設定された信頼度マップMを、信頼度算出部143の最終出力とする。 However, as described in Example 2, the weighted parallax pw output by the parallax matching unit 142b is equivalent to performing parallax matching by removing pixels containing diffuse light components, and the number of pixels used for parallax matching is smaller than usual, resulting in a lower reliability. Additionally, since the larger the difference at this time, the greater the influence of the diffuse light components is considered to be, and therefore the reliability is set lower, taking into account the possibility that the influence has not been completely removed by weighting. The reliability map M set based on the above ideas is used as the final output of the reliability calculation unit 143.
あるいは、視差比較部143bで視差pを見比べることなく、左右レンズの拡散特性Fから直接信頼度を算出しても良い。この時の信頼度算出部143の機能ブロック図を図17に示す。ここに示す信頼度算出部143は、拡散度推定部143cと、拡散特性による信頼度生成部143dを有する。以下、図17の信頼度算出部143による信頼度の算出方法を詳細に説明する。 Alternatively, the reliability may be calculated directly from the diffusion characteristics F of the left and right lenses, without comparing the parallax p using the parallax comparison unit 143b. Figure 17 shows a functional block diagram of the reliability calculation unit 143 in this case. The reliability calculation unit 143 shown here has a diffusion estimation unit 143c and a diffusion characteristic-based reliability generation unit 143d. The method of calculating the reliability using the reliability calculation unit 143 in Figure 17 will be described in detail below.
まず、事前のカメラ組み立て工程などにおいて、実際に点光源Sを撮像してレンズ21の拡散特性Fを計測する。 First, during a preliminary camera assembly process, an actual point light source S is captured and the diffusion characteristic F of the lens 21 is measured.
次に、拡散度推定部143cにおいて、基準画像P0の各画像領域での拡散度を推定する。この拡散度は、画像の小領域の周波数成分・輝度勾配などを見ることで該領域のぼやけ具合を推定する処理であり、最終的にレンズ21の拡散特性Fと見比べて、該小領域が光源の撮像による拡散成分に似た成分を含むかどうかを判定する。 Next, the diffusion estimation unit 143c estimates the diffusion in each image region of the reference image P0. This diffusion is a process that estimates the degree of blur in a small region of the image by looking at the frequency components, brightness gradient, etc. of that region, and ultimately compares this with the diffusion characteristic F of the lens 21 to determine whether the small region contains components similar to the diffusion components caused by imaging a light source.
そして、拡散特性による信頼度生成部143dでは、レンズ21の拡散特性Fに似た成分を持つ領域においては、物体が存在することによるテクスチャではなく、光源が拡散することで疑似的に撮像された拡散光成分が視差算出に影響を与えていると判断する。すなわち、
このような領域においては、信頼度が低いと判断する。そのため、レンズ21の拡散特性Fに似た領域であるほど信頼度を下げるように信頼度生成部143dを設計する。
Then, the diffusion characteristic reliability generation unit 143d determines that in an area having a component similar to the diffusion characteristic F of the lens 21, it is not a texture due to the presence of an object, but rather a diffused light component captured pseudo-by diffusion from a light source that is affecting the parallax calculation.
In such a region, the reliability is determined to be low. Therefore, the reliability generation unit 143d is designed so that the reliability is lowered as the region becomes more similar to the diffusion characteristic F of the lens 21.
図16と図17の信頼度算出手法はいずれかのみを選択する必要はなく、同時に用いても良い。 It is not necessary to select only one of the reliability calculation methods shown in Figures 16 and 17; they may be used simultaneously.
本実施例によれば、拡散光成分によって信頼度の低下している視差pを抽出すると共に、それぞれの視差pの信頼度を表す信頼度マップMを出力することができ、ECU等での後段の処理では信頼度マップMを用いた処理を実行することができる。 According to this embodiment, it is possible to extract disparities p whose reliability has been reduced due to diffuse light components, and to output a reliability map M that indicates the reliability of each disparity p. This makes it possible to perform processing using the reliability map M in subsequent processing in the ECU, etc.
次に、図18を用いて、本発明の実施例4に係る画像処理装置1を説明する。なお、上記の実施例との共通点は重複説明を省略する。 Next, an image processing device 1 according to a fourth embodiment of the present invention will be described using Figure 18. Note that overlapping explanations of points common to the above embodiments will be omitted.
実施例4は実施例1の変化例であり、光源による影響の大小を周辺の明るさから判定する実施例である。本実施例によれば、夜間の強光源など、拡散光成分による影響の大きいシーンでは重みづけの勾配を大きくし、適切に影響を除去することができる。 Example 4 is a variation of Example 1, in which the magnitude of the influence of a light source is determined based on the brightness of the surrounding area. According to this example, in scenes where the influence of diffuse light components is significant, such as a strong light source at night, the weighting gradient is increased, making it possible to appropriately remove the influence.
本実施例における視差算出部142の機能ブロック図を図18に示す。ここに示すように、本実施例の視差算出部142は、実施例2の種別パラメタ設定部142cに代えて明るさパラメタ設定部142eを設けたものである。 A functional block diagram of the disparity calculation unit 142 in this embodiment is shown in Figure 18. As shown here, the disparity calculation unit 142 in this embodiment has a brightness parameter setting unit 142e instead of the type parameter setting unit 142c in Embodiment 2.
本実施例の明るさパラメタ設定部142eは、基準画像P0を入力として受け取り、明るさパラメタの設定値を出力する。ここで、明るさパラメタとは、対象物体に対する測距の重要度から本発明の重みづけ処理の軽重を決定する重みである。そして、基準画像P0の画面全体の輝度値から周辺の明るさを判定し、周辺が暗いと判定した場合には、重みマージ部142dでは、重みづけを強く実施し、拡散光成分を強く除去する。一方、周辺が明るいと判定した場合には、拡散光成分は他の光に対して十分に小さいと考えられるため、重みマージ部142dでは、重みづけを弱くし、情報の減少を防ぐ。重みマージ部142dでの重みづけの強弱がもたらす効果については、実施例2における光源種別と同様である。 The brightness parameter setting unit 142e in this embodiment receives the reference image P0 as input and outputs a setting value for the brightness parameter. Here, the brightness parameter is a weight that determines the degree of importance of the weighting process of the present invention based on the importance of distance measurement for the target object. The brightness of the surroundings is then determined from the luminance value of the entire screen of the reference image P0, and if it is determined that the surroundings are dark, the weight merging unit 142d applies strong weighting and strongly removes diffuse light components. On the other hand, if it is determined that the surroundings are bright, the diffuse light components are considered to be sufficiently small compared to other light, so the weight merging unit 142d weakens the weighting to prevent a loss of information. The effect of the strength of weighting in the weight merging unit 142d is the same as for the light source type in Example 2.
ここでは画像から周辺の明るさを判定する実施例について述べたが、例えば外部から時刻情報を取得できる場合は朝昼夜の情報から明るさパラメタを決定しても良いし、GPSやマップ情報がある場合は、トンネル内外などの情報から決定しても良い。 Here we have described an example in which the surrounding brightness is determined from an image, but if time information can be obtained from an external source, the brightness parameters can be determined from information on morning, noon, and night, or if GPS or map information is available, the brightness parameters can be determined from information such as whether the vehicle is inside or outside a tunnel.
本実施例によれば、周辺の明るさ変化による拡散光成分の影響の度合いに合わせた重みづけを実施し、拡散光成分の除去が特に必要な夜間において適切に拡散光成分を除去した視差マッチングを行うことができる。 According to this embodiment, weighting is performed according to the degree of influence of diffuse light components due to changes in ambient brightness, making it possible to perform parallax matching that appropriately removes diffuse light components at night, when removal of diffuse light components is particularly necessary.
なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明を分かりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、ある実施例の構成の一部を他の実施例の構成に置き換えることが可能であり、また、ある実施例の構成に他の実施例の構成を加えることも可能である。また、各実施例の構成の一部について、他の構成の追加・削除・置換をすることが可能である。 The present invention is not limited to the above-described embodiments, and includes various modifications. For example, the above-described embodiments have been described in detail to clearly explain the present invention, and are not necessarily limited to those including all of the described configurations. Furthermore, it is possible to replace part of the configuration of one embodiment with the configuration of another embodiment, and it is also possible to add the configuration of another embodiment to the configuration of one embodiment. Furthermore, it is possible to add, delete, or replace part of the configuration of each embodiment with other configurations.
また、上記の各構成は、それらの一部又は全部が、ハードウェアで構成されても、プロセッサでプログラムが実行されることにより実現されるように構成されてもよい。また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。 Furthermore, each of the above components may be configured in part or in whole as hardware, or may be configured to be realized by a program being executed by a processor. Furthermore, the control lines and information lines shown are those considered necessary for the explanation, and do not necessarily represent all control lines and information lines in the product. In reality, it can be assumed that almost all components are interconnected.
1 画像処理装置
11 ステレオカメラ
12 メモリ
13 演算処理部
14 画像処理部
141 光源領域特定部
141a 監視領域設定部
141b 輝度変化判定部
142 視差算出部
142a 重み設定部
142b 視差マッチング部
142c 種別パラメタ設定部
142d 重みマージ部
142e 明るさパラメタ設定部
143 信頼度算出部
143a 通常視差マッチング部
143b 視差比較部
143c 拡散度推定部
143d 拡散特性による信頼度生成部
15 外部出力部
16 通信ライン
2 カメラ
21 レンズ
22 撮像素子
2L 左カメラ
2R 右カメラ
S 点光源
F 拡散特性
Pi 点光源の理想的な画像
Pr 点光源の実際の画像
P0 基準画像
P1 参照画像
p 視差
R 光源領域
R’ 非光源領域
I 物体識別結果
1 Image processing device 11 Stereo camera 12 Memory 13 Arithmetic processing unit 14 Image processing unit 141 Light source area identification unit 141a Monitoring area setting unit 141b Brightness change determination unit 142 Parallax calculation unit 142a Weight setting unit 142b Parallax matching unit 142c Type parameter setting unit 142d Weight merging unit 142e Brightness parameter setting unit 143 Reliability calculation unit 143a Normal parallax matching unit 143b Parallax comparison unit 143c Diffusion degree estimation unit 143d Reliability generation unit based on diffusion characteristics 15 External output unit 16 Communication line 2 Camera 21 Lens 22 Imaging element 2L Left camera 2R Right camera S Point light source F Diffusion characteristics Pi Ideal image of point light source Pr Actual image of point light source P0 Reference image P1 Reference image p Parallax R Light source area R' Non-light source area I Object identification result
Claims (15)
光源領域の画素の輝度値に応じて当該画素に重みづけを行い、重みづけされた各画素を用いて、光源領域の視差マッチングを行うことで視差を求める視差算出部と、
を持つことを特徴とする、画像処理装置。 a light source area specifying unit that specifies an area where a light source is captured in each of a plurality of images simultaneously acquired by a plurality of cameras having overlapping fields of view;
a parallax calculation unit that weights pixels in a light source area according to the luminance values of the pixels, and calculates parallax by performing parallax matching of the light source area using the weighted pixels;
An image processing device comprising:
前記視差算出部は、輝度値が高い画素に対して、輝度値が低い画素よりも、前記視差マッチングに与える影響が大きくなるように重みづけることを特徴とする、画像処理装置。 2. The image processing device according to claim 1,
The image processing device according to claim 1, wherein the parallax calculation unit weights pixels with high luminance values so that they have a greater influence on the parallax matching than pixels with low luminance values.
前記視差算出部は、光源領域全体の輝度値を一律に減算したうえで視差マッチング処理を行うことを特徴とする、画像処理装置。 2. The image processing device according to claim 1,
The image processing device is characterized in that the parallax calculation unit performs parallax matching processing after uniformly subtracting luminance values from the entire light source area.
前記視差算出部は、輝度値及び輝度勾配が高いほど視差マッチングに与える影響が大きくなるように重みづけることを特徴とする、画像処理装置。 2. The image processing device according to claim 1,
The image processing device, wherein the parallax calculation unit weights the luminance values and luminance gradients so that the higher the luminance values and luminance gradients, the greater the influence they have on parallax matching.
前記視差算出部は、光源の種別に応じて重みの変化度合いを変更することを特徴とする、画像処理装置。 2. The image processing device according to claim 1,
The image processing device, wherein the parallax calculation unit changes the degree of change in weight depending on the type of light source.
前記光源領域特定部は、撮像された画像のうち輝度値が閾値以上である領域を検出することを特徴とする、画像処理装置。 2. The image processing device according to claim 1,
The image processing device is characterized in that the light source area specifying unit detects an area in the captured image where the luminance value is equal to or greater than a threshold value.
前記閾値は、画像全体が明るいほど高くなるよう動的に変化することを特徴とする、画像処理装置。 7. The image processing device according to claim 6,
10. An image processing device, comprising: an image processing unit configured to dynamically change the threshold value so that the threshold value increases as the entire image becomes brighter.
前記光源領域特定部は、発光可能性のある物体であると識別された物体識別結果を外部から取得し、該物体識別結果により特定される領域の輝度値を時系列に監視し、輝度値が大きくなった際に先行車両に取り付けられた光源が発光したと判定することを特徴とする、画像処理装置。 2. The image processing device according to claim 1,
The light source area identification unit acquires from an external device an object identification result that identifies an object as having the potential to emit light, monitors the luminance value of the area identified by the object identification result in time series, and determines that a light source attached to a preceding vehicle has emitted light when the luminance value becomes large.
さらに前記視差算出部で得られたそれぞれの視差に対応する信頼度を示す信頼度マップを算出する信頼度マップ算出部を備えることを特徴とする、画像処理装置。 2. The image processing device according to claim 1,
The image processing device further comprises a reliability map calculation unit that calculates a reliability map indicating reliability corresponding to each of the parallaxes obtained by the parallax calculation unit.
前記信頼度マップ算出部は、前記重みを用いずに視差算出を行い、重みを用いた視差算出結果と比較し、差分があるほど信頼度が低くなる信頼度マップを算出することを特徴とする、画像処理装置。 10. The image processing device according to claim 9,
The image processing device is characterized in that the reliability map calculation unit calculates disparity without using the weight, compares it with the disparity calculation result using the weight, and calculates a reliability map in which the greater the difference, the lower the reliability.
前記信頼度マップ算出部は、事前に計測しておいた複数のカメラの拡散特性差が大きいほど、あるいは対象となる光源の明るさが明るいほど、信頼度が低くなる信頼度マップを算出することを特徴とする、画像処理装置。 10. The image processing device according to claim 9,
The reliability map calculation unit calculates a reliability map in which the reliability decreases as the difference in diffusion characteristics between multiple cameras measured in advance increases or the brightness of the target light source increases.
前記視差算出部は、周辺の明るさ情報によって、暗いほど重みの変化度合いが大きくなるように設定する明るさパラメタ設定部を備えることを特徴とする、画像処理装置。 2. The image processing device according to claim 1,
The image processing device, wherein the parallax calculation unit includes a brightness parameter setting unit that sets the degree of change in weight to be greater as the surrounding brightness information becomes darker.
前記明るさパラメタ設定部は、外部から取得した時刻情報あるいは地図情報を用いて明るさパラメタを決定することを特徴とする、画像処理装置。 13. The image processing device according to claim 12,
The image processing device is characterized in that the brightness parameter setting unit determines the brightness parameter using time information or map information obtained from an external source.
前記明るさパラメタ設定部は、基準画像の輝度値によって明るさパラメタを決定することを特徴とする、画像処理装置。 13. The image processing device according to claim 12,
The image processing device is characterized in that the brightness parameter setting unit determines the brightness parameter according to a luminance value of a reference image.
光源領域の画素の輝度値に応じて当該画素に重みづけを行い、重みづけされた各画素を用いて、光源領域の視差マッチングを行うことで視差を求める視差算出ステップと、
を持つことを特徴とする、画像処理方法。 a light source area specifying step of specifying an area where a light source is captured in each of a plurality of images simultaneously acquired by a plurality of cameras having overlapping fields of view;
a parallax calculation step of weighting pixels in a light source area according to luminance values of the pixels, and using the weighted pixels to perform parallax matching of the light source area to obtain parallax;
An image processing method comprising:
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022108907A JP7818478B2 (en) | 2022-07-06 | 2022-07-06 | Image processing device and image processing method |
| DE112023002242.9T DE112023002242T5 (en) | 2022-07-06 | 2023-05-11 | IMAGE PROCESSING DEVICE AND IMAGE PROCESSING METHOD |
| CN202380049749.2A CN119422035A (en) | 2022-07-06 | 2023-05-11 | Image processing device and image processing method |
| PCT/JP2023/017731 WO2024009605A1 (en) | 2022-07-06 | 2023-05-11 | Image processing device and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022108907A JP7818478B2 (en) | 2022-07-06 | 2022-07-06 | Image processing device and image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2024007678A JP2024007678A (en) | 2024-01-19 |
| JP7818478B2 true JP7818478B2 (en) | 2026-02-20 |
Family
ID=89452996
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022108907A Active JP7818478B2 (en) | 2022-07-06 | 2022-07-06 | Image processing device and image processing method |
Country Status (4)
| Country | Link |
|---|---|
| JP (1) | JP7818478B2 (en) |
| CN (1) | CN119422035A (en) |
| DE (1) | DE112023002242T5 (en) |
| WO (1) | WO2024009605A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002216125A (en) | 2001-01-23 | 2002-08-02 | Toshiba Corp | Image correction apparatus and method |
| JP2002267441A (en) | 2001-03-07 | 2002-09-18 | Fuji Heavy Ind Ltd | Stereo matching method and monitoring device |
| JP2003158751A (en) | 2001-11-20 | 2003-05-30 | Fuji Heavy Ind Ltd | Stereo camera adjustment device |
| WO2016072490A1 (en) | 2014-11-07 | 2016-05-12 | オリンパス株式会社 | Imaging system |
| JP2017062173A (en) | 2015-09-25 | 2017-03-30 | 日立オートモティブシステムズ株式会社 | Stereo camera device |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000283753A (en) | 1999-03-31 | 2000-10-13 | Fuji Heavy Ind Ltd | Device for measuring distance using stereographic picture |
-
2022
- 2022-07-06 JP JP2022108907A patent/JP7818478B2/en active Active
-
2023
- 2023-05-11 CN CN202380049749.2A patent/CN119422035A/en active Pending
- 2023-05-11 WO PCT/JP2023/017731 patent/WO2024009605A1/en not_active Ceased
- 2023-05-11 DE DE112023002242.9T patent/DE112023002242T5/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002216125A (en) | 2001-01-23 | 2002-08-02 | Toshiba Corp | Image correction apparatus and method |
| JP2002267441A (en) | 2001-03-07 | 2002-09-18 | Fuji Heavy Ind Ltd | Stereo matching method and monitoring device |
| JP2003158751A (en) | 2001-11-20 | 2003-05-30 | Fuji Heavy Ind Ltd | Stereo camera adjustment device |
| WO2016072490A1 (en) | 2014-11-07 | 2016-05-12 | オリンパス株式会社 | Imaging system |
| JP2017062173A (en) | 2015-09-25 | 2017-03-30 | 日立オートモティブシステムズ株式会社 | Stereo camera device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2024007678A (en) | 2024-01-19 |
| WO2024009605A1 (en) | 2024-01-11 |
| CN119422035A (en) | 2025-02-11 |
| DE112023002242T5 (en) | 2025-03-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3861781B2 (en) | Forward vehicle tracking system and forward vehicle tracking method | |
| US7957559B2 (en) | Apparatus and system for recognizing environment surrounding vehicle | |
| JP6023216B2 (en) | In-vehicle image processing device | |
| CN107852465B (en) | Vehicle Environment Recognition Device | |
| JP7498364B2 (en) | Correcting camera images in the presence of rain, light and dirt | |
| CN111448591A (en) | System and method for locating a vehicle in poor lighting conditions | |
| CN112926476B (en) | Vehicle identification method, device and storage medium | |
| JP7594539B2 (en) | Gating camera, automobile, vehicle lighting device, image processing device, and image processing method | |
| US20170220875A1 (en) | System and method for determining a visibility state | |
| US9524645B2 (en) | Filtering device and environment recognition system | |
| CN112485807B (en) | object recognition device | |
| JP7818478B2 (en) | Image processing device and image processing method | |
| JP2021051347A (en) | Distance image generation apparatus and distance image generation method | |
| US12530906B2 (en) | System for avoiding accidents caused by wild animals crossing at dusk and at night | |
| JP7652897B2 (en) | Image processing device and image processing method | |
| CN113538546B (en) | Target detection method, device and equipment for automatic driving | |
| JP5310162B2 (en) | Vehicle lighting judgment device | |
| JP7322576B2 (en) | Information processing device, imaging device, and moving object | |
| KR20230003953A (en) | Vehicle lightweight deep learning processing device and method applying environment variance adaptive feature generator | |
| WO2025099908A1 (en) | Image processing device | |
| JP7805201B2 (en) | Object recognition method and object recognition device | |
| JP2021051348A (en) | Object distance estimation apparatus and object distance estimation method | |
| KR102953842B1 (en) | Correction of camera images with rain, light flare, and dust | |
| US20250159122A1 (en) | External environment recognition device and external environment recognition method | |
| EP4382968A1 (en) | Gating camera, vehicular sensing system, and vehicular lamp |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20250306 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20251028 |
|
| 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: 20260113 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20260209 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7818478 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |