JP2013115739A - Inter-image difference device and inter-image difference method - Google Patents
Inter-image difference device and inter-image difference method Download PDFInfo
- Publication number
- JP2013115739A JP2013115739A JP2011262499A JP2011262499A JP2013115739A JP 2013115739 A JP2013115739 A JP 2013115739A JP 2011262499 A JP2011262499 A JP 2011262499A JP 2011262499 A JP2011262499 A JP 2011262499A JP 2013115739 A JP2013115739 A JP 2013115739A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- difference
- image
- value
- target
- 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.)
- Granted
Links
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B62—LAND VEHICLES FOR TRAVELLING OTHERWISE THAN ON RAILS
- B62D—MOTOR VEHICLES; TRAILERS
- B62D1/00—Steering controls, i.e. means for initiating a change of direction of the vehicle
- B62D1/24—Steering controls, i.e. means for initiating a change of direction of the vehicle not vehicle-mounted
- B62D1/28—Steering controls, i.e. means for initiating a change of direction of the vehicle not vehicle-mounted non-mechanical, e.g. following a line or other known markers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C5/00—Registering or indicating the working of vehicles
- G07C5/008—Registering or indicating the working of vehicles communicating information to a remotely located station
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Chemical & Material Sciences (AREA)
- Combustion & Propulsion (AREA)
- Transportation (AREA)
- Mechanical Engineering (AREA)
- Image Processing (AREA)
- Closed-Circuit Television Systems (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、2つの画像間の差分を算出する画像間差分技術に関する。 The present invention relates to an inter-image difference technique for calculating a difference between two images.
画像間差分は画像処理分野において非常によく用いられる方法である。例えば、特許文献1の技術では、撮影範囲が部分的に重複する複数台の撮像装置によって撮像された画像を仮想視点から見た鳥瞰図画像に変換し、それぞれの鳥瞰図画像間の差分を求めることにより、障害物を検出する技術にも用いられている。また、特許文献2の技術では、背景のみが撮影された背景画像と、背景と移動体とが撮影された画像との差分画像を2値化し、時系列に沿ったこの2値化画像に基づいて移動体の動きを検出している。
Difference between images is a method that is very often used in the field of image processing. For example, in the technique of
このような技術をはじめとして、画像処理においては、高精度に移動体や障害物を検出するためには、外乱の影響等を受けにくいロバストな画像間差分技術が求められている。しかしながら、上述の特許文献では単に画素値間の差分を行っているだけで、画像間差分におけるロバスト性の向上には言及していない。 In such image processing, in order to detect moving objects and obstacles with high accuracy, a robust inter-image difference technique that is hardly affected by disturbances or the like is required. However, the above-mentioned patent document merely performs a difference between pixel values, and does not mention improvement of robustness in the difference between images.
本発明は上記課題に鑑みてなされたものであり、その目的は、外乱の影響を受け難いロバストな画像間差分技術を提供することである。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a robust inter-image difference technique that is hardly affected by disturbance.
上記課題を解決するため、本発明の画像間差分装置は、画像を構成する各々の画素の画素位置における画素値の勾配方向を求める勾配方向算出部と、各々の前記画素を対象画素として設定するとともに、当該対象画素の周囲に所定の大きさの領域をヒストグラム算出領域として設定し、当該ヒストグラム算出領域に含まれる前記画素の画素位置における前記勾配方向の度数分布を当該対象画素の画素位置におけるヒストグラムとして生成するヒストグラム生成部と、第1の前記画像の差分対象となる前記画素の画素位置における第1の前記ヒストグラムと、第2の前記画像の比較対象となる前記画素の画素位置における第2の前記ヒストグラムと、の差分値を当該差分対象となる画素と当該比較対象となる画素との画素差分値として算出する画素差分部と、前記差分対象となる画素の画素位置における画素値を前記画素差分値に基づいて設定することにより差分画像を生成する画像差分部と、を備えている。 In order to solve the above problems, the inter-image difference device of the present invention sets a gradient direction calculation unit that obtains a gradient direction of a pixel value at a pixel position of each pixel constituting an image, and sets each of the pixels as a target pixel. In addition, a region having a predetermined size is set as a histogram calculation region around the target pixel, and the frequency distribution in the gradient direction at the pixel position of the pixel included in the histogram calculation region is represented as a histogram at the pixel position of the target pixel. A first histogram at the pixel position of the pixel to be compared with the first image, and a second pixel position at the pixel position to be compared with the second image. The difference value from the histogram is calculated as a pixel difference value between the pixel that is the difference target and the pixel that is the comparison target. And element differential unit, and a, and an image difference unit for generating a difference image by setting based on a pixel value at the pixel position of the pixel to be the difference object to said pixel difference values.
この構成では、画像間差分を算出する際の特徴量として、画素位置における画素値の勾配方向のヒストグラム(以下、HOG(Histgrams of Oriented Gradients)と称する)を用いている。このHOGは、注目する画素を含む所定の大きさの領域に含まれる画素の画素位置における画素値の勾配方向の度数分布を表している。画素値の勾配方向とは、ある画素の画素値とその画素に隣接する画素の画素値との関係を示すものである。そのため、例えば、ある画像と、その画像全体の輝度を明るくした画像とでは、上述のHOGは略同一となる。したがって、HOGを特徴量とすることにより、画素値変化等に対してロバストな画像間差分を行うことができる。 In this configuration, a histogram of the gradient direction of the pixel value at the pixel position (hereinafter referred to as HOG (Histgrams of Oriented Gradients)) is used as the feature amount when calculating the inter-image difference. This HOG represents a frequency distribution in the gradient direction of pixel values at pixel positions of pixels included in a region of a predetermined size including the pixel of interest. The gradient direction of the pixel value indicates the relationship between the pixel value of a certain pixel and the pixel value of a pixel adjacent to the pixel. Therefore, for example, the above-described HOG is substantially the same for an image and an image in which the luminance of the entire image is increased. Therefore, by using HOG as a feature amount, it is possible to perform an inter-image difference that is robust against changes in pixel value and the like.
本発明の画像間差分装置の好適な実施形態の一つでは、第1のカメラと、当該第1のカメラの撮影範囲と部分的に重複する撮影範囲を有する第2のカメラと、により撮影された撮影画像を取得する画像取得部と、前記第2のカメラにより撮影された前記撮影画像を前記第1のカメラの視点位置から撮影された画像に視点変換した視点変換画像を生成する視点変換部と、を備え、前記第1の画像が前記第1のカメラにより撮影された前記撮影画像であり、前記第2の画像が前記視点変換画像である。 In one of the preferred embodiments of the inter-image difference device of the present invention, the image is captured by the first camera and the second camera having a shooting range that partially overlaps the shooting range of the first camera. An image acquisition unit that acquires the captured image, and a viewpoint conversion unit that generates a viewpoint-converted image obtained by converting the captured image captured by the second camera into an image captured from the viewpoint position of the first camera. The first image is the captured image captured by the first camera, and the second image is the viewpoint-converted image.
この構成では、視点変換を施されていない画像と、視点変換を施されている画像との間で画像間差分が行われる。視点変換を行う場合には画素値の補間処理等が行われるため、そのような処理を施された画素周辺では、画像の歪等が生じる。そのため、単に輝度値等に基づいた画像間差分を行うと、そのような歪を生じた箇所では正確な差分値が得られ難く、誤検出等の原因となる。これに対して、本発明では、上述したようにHOGを特徴量として用いているため、そのような歪が生じた場合でも、安定した画像間差分を行うことができる。 In this configuration, an inter-image difference is performed between an image that has not been subjected to viewpoint conversion and an image that has been subjected to viewpoint conversion. When performing viewpoint conversion, pixel value interpolation processing or the like is performed, and therefore, image distortion or the like occurs around the pixels subjected to such processing. Therefore, if an inter-image difference based simply on a luminance value or the like is performed, it is difficult to obtain an accurate difference value at a location where such distortion occurs, which may cause erroneous detection. On the other hand, in the present invention, as described above, HOG is used as a feature amount, so that even when such distortion occurs, stable inter-image difference can be performed.
本発明の画像間差分装置の好適な実施形態の一つでは、前記第2の画像における前記差分対象となる前記画素の周囲に所定の大きさの領域を設定し、前記画素差分部に対して当該領域に含まれる画素を順次前記比較対象となる画素として設定することにより、前記第1の画像の前記差分対象となる画素と前記第2の画像の前記領域に含まれる各々の画素との前記画素差分値を算出させ、当該各々の画素差分値に基づいて前記差分対象となる画素の画素位置における前記画素差分値を算出する領域差分部を備えている。 In one preferred embodiment of the inter-image difference device of the present invention, an area of a predetermined size is set around the pixel to be the difference target in the second image, and the pixel difference unit By sequentially setting the pixels included in the region as the pixels to be compared, the pixel to be the difference target of the first image and each pixel included in the region of the second image An area difference unit is provided that calculates a pixel difference value and calculates the pixel difference value at the pixel position of the pixel that is the difference target based on each pixel difference value.
この構成では、差分対象となる画素に対する画素差分値を算出する際に、その差分対象となる画素の画素位置におけるHOGと、一の比較対象となる画素の画素位置におけるHOGとだけを比較するのではなく、差分対象となる画素位置におけるHOGと、差分対象となる画素の周囲に設定された領域に含まれる各々の画素の画素位置におけるHOGとに基づいて差分値を算出している。換言すると、画素対画素の比較を行うのではなく、画素対領域の比較により画素差分値を算出している。これにより、2つの画像間で多少の位置ずれ等が生じていても、安定した画像間差分を行うことができる。 In this configuration, when calculating the pixel difference value for the pixel that is the difference target, only the HOG at the pixel position of the pixel that is the difference target is compared with the HOG at the pixel position of the one pixel that is the comparison target. Instead, the difference value is calculated based on the HOG at the pixel position to be the difference target and the HOG at the pixel position of each pixel included in the area set around the pixel to be the difference target. In other words, the pixel difference value is calculated not by comparing pixel-to-pixel but by comparing pixel-to-region. As a result, even if there is a slight misalignment between two images, a stable difference between images can be performed.
上述のように、画素と領域とを比較して差分値を算出すると、演算量の増大により処理速度が低下するため、好ましくない。そのため、本発明の画像間差分装置の好適な実施形態の一つでは、前記領域差分部は、画素差分部によって前記第1の画像の前記差分対象となる画素と前記第2の画像の前記領域に含まれる各々の画素との前記画素差分値を算出する際に、算出された当該差分対象となる画素と当該領域に含まれる前記比較対象となる画素との前記画素差分値が所定の閾値以下であれば、当該差分対象となる画素と当該領域に含まれる前記画素との前記画素差分値の算出を打ち切り、前記差分対象となる画素の画素位置における画素差分値として差異がないことを示す値を設定する。 As described above, if the difference value is calculated by comparing the pixel and the region, the processing speed decreases due to an increase in the amount of calculation, which is not preferable. Therefore, in one preferred embodiment of the inter-image difference device according to the present invention, the region difference unit is configured such that the pixel difference unit causes the pixel to be the difference target of the first image and the region of the second image. When calculating the pixel difference value between each pixel included in the pixel, the calculated pixel difference value between the pixel serving as the difference target and the pixel serving as the comparison target included in the region is equal to or less than a predetermined threshold value. If so, a value indicating that there is no difference as a pixel difference value at a pixel position of the pixel to be the difference target, by canceling the calculation of the pixel difference value between the pixel to be the difference target and the pixel included in the region. Set.
この構成では、領域差分部が差分対象画素と第2画像において設定された領域に含まれる各々の画素とから各々の画素差分値を算出する際に、算出された画素差分値が閾値以下となった場合に、それ以降の画素差分値の算出を打ち切り、差異がないことを示す値を差分対象画素に対する画素差分値として設定する。これにより、不要な画素差分値の算出を回避することができ、演算量および速度低下を抑制することができる。 In this configuration, when the region difference unit calculates each pixel difference value from the difference target pixel and each pixel included in the region set in the second image, the calculated pixel difference value is equal to or less than the threshold value. In this case, the calculation of the subsequent pixel difference value is terminated, and a value indicating that there is no difference is set as the pixel difference value for the difference target pixel. Thereby, calculation of an unnecessary pixel difference value can be avoided, and a calculation amount and a decrease in speed can be suppressed.
単調な風景を撮影したような画像では、勾配方向が得られない(すなわち、無方向)画素が多くなり、そのような画像においてHOGを算出すると無方向の度数が優位となる。本発明の画像間差分装置の好適な実施形態の一つでは、このような画像の特性に鑑みて、前記勾配方向は無方向および複数の有方向を含み、前記画素差分部は、前記第1のヒストグラムの前記無方向の度数と前記第2のヒストグラムの前記無方向の度数との差を算出し、当該差の絶対値が所定の閾値よりも大きい場合には、前記有方向の度数の差を算出せずに、前記第1のヒストグラムと前記第2のヒストグラムとが差異を有することを示す値を前記画素差分値とする。 An image in which a monotonous landscape is photographed has many pixels in which the gradient direction cannot be obtained (that is, non-directional), and the non-directional frequency is dominant when HOG is calculated in such an image. In one preferred embodiment of the inter-image difference device of the present invention, in view of such image characteristics, the gradient direction includes a non-directional direction and a plurality of directional directions, and the pixel difference unit includes the first difference unit. When the difference between the non-directional frequency of the histogram and the non-directional frequency of the second histogram is calculated, and the absolute value of the difference is larger than a predetermined threshold, the difference in the directional frequency Is calculated, and a value indicating that there is a difference between the first histogram and the second histogram is set as the pixel difference value.
この構成では、HOGどうしの差異を算出する際に、最初に無方向の度数どうしの差を算出し、その差の絶対値が閾値よりも大きい場合に、以降の演算を打ち切り、第1のヒストグラムと第2のヒストグラムとが差異を有することを示す値を画素差分値として出力している。これにより、演算量および速度低下を抑制することができる。 In this configuration, when calculating the difference between the HOGs, the difference between the non-directional frequencies is calculated first, and when the absolute value of the difference is larger than the threshold, the subsequent calculation is aborted, and the first histogram is calculated. A value indicating that there is a difference between the second histogram and the second histogram is output as a pixel difference value. Thereby, it is possible to suppress a calculation amount and a decrease in speed.
また、上記課題を解決するため、本発明の画像間差分方法は、第1の画像の各画素位置における画素値の勾配方向を求めるステップと、第2の画像の各画素位置における画素値の勾配方向を求めるステップと、前記第1の画像を構成する各画素を対象画素とするとともに、当該対象画素の周囲に所定の大きさの領域をヒストグラム算出領域として設定し、当該ヒストグラム算出領域に含まれる当該画素の画素位置における前記勾配方向の度数分布を当該対象画素の画素位置におけるヒストグラムとして生成するステップと、前記第2の画像を構成する各画素を対象画素とするとともに、当該対象画素の周囲に所定の大きさの領域をヒストグラム算出領域として設定し、当該ヒストグラム算出領域に含まれる当該画素の画素位置における前記勾配方向の度数分布を当該対象画素の画素位置におけるヒストグラムとして生成するステップと、前記第1の画像の各画素を差分対象画素とし、当該第1の画像の当該差分対象画素の画素位置における第1のヒストグラムと、前記第2の画像の比較対象となる前記画素の画素位置における第2のヒストグラムと、の差分値を当該差分対象となる画素と当該比較対象となる画素との画素差分値として算出するステップと、前記差分対象となる画素の画素位置における画素値を前記画素差分値に基づいて設定することにより差分画像を生成するステッププと、を備えている。当然ながら、このような画像間差分方法にも、上述した画像間差分装置の付加的特徴を適用することができる。 In order to solve the above problem, the inter-image difference method of the present invention includes a step of obtaining a gradient direction of a pixel value at each pixel position of the first image, and a gradient of the pixel value at each pixel position of the second image. A step of obtaining a direction, and each pixel constituting the first image is set as a target pixel, and an area of a predetermined size is set as a histogram calculation area around the target pixel, and is included in the histogram calculation area Generating a frequency distribution in the gradient direction at the pixel position of the pixel as a histogram at the pixel position of the target pixel, and setting each pixel constituting the second image as a target pixel, and surrounding the target pixel An area having a predetermined size is set as a histogram calculation area, and the gradient at the pixel position of the pixel included in the histogram calculation area is set. Generating a frequency distribution in the direction as a histogram at the pixel position of the target pixel, and setting each pixel of the first image as a difference target pixel, and a first position at the pixel position of the difference target pixel of the first image The difference value between the histogram and the second histogram at the pixel position of the pixel to be compared with the second image is calculated as a pixel difference value between the pixel to be compared and the pixel to be compared. And a step of generating a difference image by setting a pixel value at a pixel position of the pixel to be differenced based on the pixel difference value. Of course, the above-described additional features of the inter-image difference device can also be applied to such an inter-image difference method.
以下に、図面を用いて本発明の画像間差分装置の実施形態を説明する。本実施形態では、画像間差分装置を車両周辺撮影装置に適用している。図1は本実施形態の車両周辺撮影装置を搭載した車両Vの平面図である。本実施形態の車両Vは、前方,後方,右方および左方をそれぞれ撮影するフロントカメラF,リアカメラR,右サイドカメラSR,左サイドカメラSLを備えている。なお、特にこれらを区別する必要がない場合は、カメラCと総称する。 Embodiments of the inter-image difference device of the present invention will be described below with reference to the drawings. In this embodiment, the inter-image difference device is applied to a vehicle periphery photographing device. FIG. 1 is a plan view of a vehicle V equipped with the vehicle periphery photographing apparatus of the present embodiment. The vehicle V of the present embodiment includes a front camera F, a rear camera R, a right side camera SR, and a left side camera SL that respectively photograph front, rear, right, and left sides. In addition, when it is not necessary to distinguish between these, the camera C is collectively referred to.
カメラCは、車両Vの周辺の情景、特に、車両Vの周囲に存在する立体物である障害物を撮影可能に設置されている。そのため、カメラCは、その光軸が水平よりも少し下方に向くように設置されている。 The camera C is installed so as to be able to photograph a scene around the vehicle V, in particular, an obstacle which is a three-dimensional object existing around the vehicle V. Therefore, the camera C is installed so that its optical axis is slightly below the horizontal.
また、カメラCは広角レンズを備えており、隣接するカメラCの撮影範囲は互いに部分的に重複している。図1には、カメラCとともにその撮影範囲および撮影範囲が重複する領域(ハッチング部分)を示している。例えば、フロントカメラFの撮影範囲と右サイドカメラSRの撮影範囲とは車両Vの右前方において重複している。すなわち、フロントカメラFおよび右サイドカメラSRはいずれも、車両Vの右前方を撮影することができる。 In addition, the camera C includes a wide-angle lens, and the shooting ranges of the adjacent cameras C partially overlap each other. In FIG. 1, the photographing range and the region where the photographing range overlaps (hatched portion) are shown together with the camera C. For example, the shooting range of the front camera F and the shooting range of the right side camera SR overlap on the right front side of the vehicle V. That is, both the front camera F and the right side camera SR can photograph the right front of the vehicle V.
なお、フロントカメラFと右サイドカメラSR、右サイドカメラSRとリアカメラR、リアカメラRと左サイドカメラSL、左サイドカメラSLとフロントカメラFのそれぞれの組み合わせが本発明の第1のカメラ(以下、第1カメラと称する)と第2のカメラ(以下、第2カメラと称する)となる。なお、第1カメラと第2カメラとは入れ換えても構わない。 Each combination of the front camera F and the right side camera SR, the right side camera SR and the rear camera R, the rear camera R and the left side camera SL, and the left side camera SL and the front camera F is the first camera ( Hereinafter, they are referred to as a first camera) and a second camera (hereinafter referred to as a second camera). Note that the first camera and the second camera may be interchanged.
本実施形態では、カメラCは、CCD(charge coupled device)やCIS(CMOS image sensor)などの撮像素子を用いて、毎秒15〜30フレームの2次元画像を撮影し、デジタル変換して動画データを出力するデジタルカメラを用いている。 In the present embodiment, the camera C uses an image sensor such as a CCD (charge coupled device) or CIS (CMOS image sensor) to take a two-dimensional image of 15 to 30 frames per second, and converts it into digital data by converting it into digital data. The output digital camera is used.
また、図2に示すように、車両Vの車内には各種表示を行うディスプレイDが備えられている。本実施例では、ディスプレイDは、ナビゲーションシステムのモニタ装置を兼用している。そのため、ディスプレイDは、表示部Daおよび表示部Da上に形成されたタッチパネルDbを有している。表示部Daは液晶ディスプレイによって構成することができ、タッチパネルDbは、表示部Daと共に形成され、指などによる接触位置をロケーションデータとして出力することができる感圧式や静電式の指示入力装置により構成することができる。 Further, as shown in FIG. 2, a display D for performing various displays is provided in the vehicle V. In the present embodiment, the display D also serves as a monitor device for the navigation system. Therefore, the display D has the display part Da and the touch panel Db formed on the display part Da. The display unit Da can be configured by a liquid crystal display, and the touch panel Db is formed by a pressure-sensitive or electrostatic instruction input device that is formed together with the display unit Da and can output a contact position by a finger or the like as location data. can do.
図2は、本実施例における車両周辺撮影装置のシステム構成図である。本実施例における車両周辺撮影装置は、CPU(central processing unit)を中核としてメモリ、その他の周辺回路と共に構成されたECU(electronic control unit)1を備えている。当然ながら、CPUに代えて、DSP(digital signal processor)など、他の論理演算プロセッサや論理回路を中核として構成しても構わない。 FIG. 2 is a system configuration diagram of the vehicle periphery photographing apparatus according to the present embodiment. The vehicle periphery photographing apparatus in the present embodiment includes an ECU (electronic control unit) 1 configured with a memory (CPU) and other peripheral circuits with a central processing unit (CPU) as a core. Of course, instead of the CPU, another logic operation processor or logic circuit such as a DSP (digital signal processor) may be used as a core.
カメラCにより撮影された車両Vの周辺の情景はこのECU1に入力される。また、ECU1は、各種情報やカメラCによって撮影された撮影画像や撮影画像を処理した画像等を表示部Daに表示したり、運転者がタッチパネルDbを操作した情報を取得したりする機能を備えている。
A scene around the vehicle V photographed by the camera C is input to the
また、ECU1は車内ネットワーク(図示せず)を介して種々のシステムやセンサと通信可能に接続されている。車内ネットワークとしてはCAN(controller area network)を用いることができる。
The
図に示すように、ECU1は、制御部10と、カメラCによって撮影された撮影画像を取得する画像取得部11と、取得した撮影画像に前処理を施す前処理部12と、撮影画像を任意の視点から撮影された画像に視点変換した視点変換画像を生成する視点変換部13と、画像間の差分を算出する画像差分部14と、各カメラCにより撮影された画像を合成する画像合成部20と、を備えている。なお、これらの機能部は、ソフトウェアとCPUとが協働することにより実現されているが、ハードウェアを用いて実現しても構わない。
As shown in the figure, the
制御部10は、ECU1に構成されている各機能部全体の処理の流れの制御をはじめとして、各種制御を行う。
The
画像取得部11は、フロントカメラF,リアカメラR,右サイドカメラSR,左サイドカメラSLのそれぞれから画像を取得する。なお、上述したように、本実施形態のカメラCは撮影画像としてデジタル動画を出力するものであるため、画像取得部11はカメラCから取得した動画から1フレームを抽出して静止画像(以下、画像と略称する)を生成する。このとき、全てのカメラCの動画から同じタイムフレームを抽出することが望ましい。
The
前処理部12は、取得した画像に対して前処理を施す。本実施形態では、前処理として平滑化処理を施しており、これにより、路面のアスファルト等のざらつきによる障害物の誤検出を抑制している。平滑化処理は、Gaussianフィルタ等の公知の方法を用いることができる。また、前処理部12では必要に応じて他の画像処理を行っても構わない。
The preprocessing
視点変換部13は、画像の視点変換を行い、視点変換画像を生成する。例えば、カメラCにより撮影された画像を、車両Vの上方に鉛直下向きの視点を有する仮想的なカメラから撮影された画像(以下、トップビュー画像と称する)に変換したり、一のカメラCにより撮影された画像を他のカメラCの視点位置から撮影された画像に視点変換したりする。後者の場合には、例えば、左サイドカメラSLにより撮影された画像をフロントカメラFの視点位置から撮影された画像に視点変換する。なお、視点変換は、公知の方法を用いることができる。
The
本発明の画像間差分装置としての画像差分部14は、2つの画像間の差分を算出し、差分画像を生成する。画像間差分部14は、画像の各画素位置におけるHOGに基づいて差分を行っている。そのため、画像差分部14は、画像の各画素位置における画素値の勾配方向を算出する勾配方向算出部14a、画像の各画素位置におけるHOGを算出するヒストグラム生成部14b、2つの画像の各画素位置におけるHOGに基づいて、その画素位置における差分値を算出する画素差分部14cを備えている。
The
勾配方向算出部14aは、画像を構成する各画素の画素位置における画素値の勾配方向を算出する。なお、本実施形態では、画素値として輝度値を用い、カメラCがカラーカメラの場合には、前処理部12において画像をモノクロ変換しておく。例えば、画素位置(x,y)における画素値をf(x,y)とすると、画素位置(x,y)におけるx方向の変化量ΔxはΔx=2f(x+1,y)−2f(x−1,y)、y方向における変化量ΔyはΔy=2f(x,y+1)−2f(x,y−1)と表すことができ、勾配角度θはθ=tan―1(Δy/Δx)となる。ただし、この算出方法では、実際の勾配方向がθであるかθ+πであるかが不明である。そのため、本実施形態では、Δxが正の場合のθ(−π/2<θ<π/2)を4段階に符号化した値を勾配方向するとともに、Δxが負の場合のθ(−π/2≦θ≦π/2)を4段階に符号化した値を勾配方向としている。具体的には、0≦θ<π/4およびπ/4≦θ<π/2のそれぞれに対して符号(勾配方向)0,1を割り当て、−π/2<θ≦−π/4および−π/4<θ<0のそれぞれに対して勾配方向6,7を割り当てる。そして、Δxが負の場合には、(勾配方向+4)mod8を勾配方向とする。ここで、「mod」は剰余を算出する演算子である。これにより、算出された勾配角度θは8段階の勾配方向に符号化される。なお、ΔxおよびΔyがともに0の場合には、無方向(=8)としている。したがって、本実施形態では、勾配方向は、無方向と、8つの方向(有方向)とのいずれかである。
The gradient
ヒストグラム生成部14bは、勾配方向算出部14aにより算出された勾配方向に基づいて、画像の各画素位置におけるHOGを求める。具体的には、注目画素の周囲に領域(以下、ヒストグラム生成領域と称する)を設定し、そのヒストグラム生成領域に含まれる各画素の画素位置における勾配方向を取得し、勾配方向毎の度数を積算する。この度数分布が注目画素の画素位置におけるHOGとなる。注目画素を走査することにより、画像の各画素位置におけるHOGを求めることができる。なお、本実施形態では、ヒストグラム生成領域は、注目画素を中心とする5×5の大きさとしているが、ヒストグラム生成領域の設定は適宜変更可能である。
The
画素差分部14cは、第1の画像の差分対象となる画素(以下、差分対象画素と称する)の画素位置におけるHOGと第2の画像の比較対象となる画素(以下、比較対象画素と称する)におけるHOGとに基づいて、差分対象画素と比較対象画素との差分値(以下、画素差分値と称する)を算出する。具体的には、第1の画像の差分対象画素の画素位置におけるHOGと第2の画像の比較対象画素の画素位置におけるHOGとの差異を求めて、その差分対象画素の画素位置における画素差分値とする。なお、本実施例では、差分対象画素の画素位置と比較対象画素の画素位置とは同じである。
The
HOGどうしの差異は、各勾配方向における度数の差の絶対値和を用いることができる。すなわち、勾配方向をi(=0〜8)、第1の画像の差分対象画素の画素位置におけるHOGをHOG1、第2の画像の比較対象画素の画素位置におけるHOGをHOG2とし、HOGの勾配方向iの度数をHOG[i]とすると、差分対象画素の画素位置における画素差分値dは、
画像差分部14は、画素差分部14cに対して、画像の各画素を順次差分対象画素として設定することにより、全画素位置における画素差分値を取得し、その画素差分値に応じて設定された画素値を持つ差分画像を生成する。
The
画像合成部20は、各カメラCにより撮影された画像を合成した合成画像を生成する。
The
以下に、図3のフローチャートを用いて本実施例における車両周辺撮影装置の処理の流れを説明する。なお、以下の説明では、フロントカメラFを第1カメラ、左サイドカメラSLを第2カメラとした場合のみを説明するが、他のカメラCについても同様の処理が行われる。 The processing flow of the vehicle periphery photographing apparatus in the present embodiment will be described below using the flowchart of FIG. In the following description, only the case where the front camera F is the first camera and the left side camera SL is the second camera will be described, but the same processing is performed for the other cameras C.
本実施形態では、運転者がタッチパネルDbを操作して、車両周辺撮影装置の作動を明示的に指示した場合に以下の処理が実行されるが、車両Vに搭載されている各種センサ等の出力に基づいて、制御部10が処理を実行するか否かを判断する構成としても構わない。
In the present embodiment, the following processing is executed when the driver operates the touch panel Db to explicitly instruct the operation of the vehicle periphery photographing device, but outputs from various sensors and the like mounted on the vehicle V The
まず、運転者がタッチパネルDbを操作して、車両周辺撮影装置の作動を指示すると、その指示は制御部10により取得され、指示を取得した制御部10は、画像取得部11に対して画像を取得する旨の指示を送る。これに対して、画像取得部11は第1カメラおよび第2カメラから画像を取得する(#01)。以下、これらの画像をそれぞれ主撮影画像および副撮影画像と称する。取得された主撮影画像および副撮影画像はメモリ(図示せず)に記憶される。
First, when the driver operates the touch panel Db to instruct the operation of the vehicle periphery photographing apparatus, the instruction is acquired by the
画像の取得が完了すると、制御部10は、視点変換部13に対して、副撮影画像を主カメラの視点から撮影した画像に視点変換するよう指示を送る。これに対して、視点変換部13は、公知の方法により、副撮影画像から視点変換画像を生成する(#02)。生成された視点変換画像は、メモリに記憶される。なお、各カメラCの視点位置(車両座標系中におけるカメラ原点の座標および光軸方向)または、視点変換のための変換テーブルは予めメモリ等に記録されており、視点変換処理に用いられる。
When the image acquisition is completed, the
視点変換画像の生成が完了すると、制御部10は、画像差分部14に対して、主撮影画像と視点変換画像との差分を算出するように指示を送る。これに対して、画像差分部14は主撮影画像と視点変換画像との差分画像を生成し、メモリに記憶させる(#03)。
When the generation of the viewpoint conversion image is completed, the
図4は本実施形態における画像間差分の処理の流れを表すフローチャートである。ここでは、画像間差分を行う2つの画像を第1画像および第2画像と称し、本実施形態では主撮影画像が第1画像であり、視点変換画像が第2画像である。まず、勾配方向算出部14aは、上述の方法により、第1画像および第2画像の各画素位置における輝度値の勾配方向を算出し、2次元配列形式でメモリに記憶する(#21,#22)。
FIG. 4 is a flowchart showing the flow of the inter-image difference processing in this embodiment. Here, the two images that perform inter-image differences are referred to as a first image and a second image. In the present embodiment, the main captured image is the first image, and the viewpoint conversion image is the second image. First, the gradient
次に、ヒストグラム生成部14bは、上述の処理により算出した各画素位置における勾配方向を用いて、上述の処理により、第1画像および第2画像の各画素位置におけるHOGを算出する(#23,#24)。各画素位置におけるHOGは9の要素を持つ1次元配列であるため、算出された全画素位置におけるHOGは3次元配列形式でメモリに記憶される。
Next, the
画像差分部14は、第1画像から順次1つの画素を差分対象画素として選択し、画素差分部14cに対して差分対象画素の画素位置における画素差分値を算出するよう指示を送る。
The
具体的には、まず、画像差分部14は第1画像から位置の画素を差分対象画素として選択する(#25)。選択された差分対象画素の画素位置は画像差分部14から画素差分部14c送られる。上述したように、本実施例では差分対象画素の画素位置と比較対象画素の画素位置とは同一であるため、差分対象画素の画素位置を取得した画素差分部14cは、メモリから第1画像の差分対象画素の画素位置におけるHOGと第2画像の差分対象画素の画素位置におけるHOGとを取得し、上述の式(1)により画素差分値dを算出する(#26)。算出された画素差分値dは画像差分部14に送られる。
Specifically, first, the
画像差分部14は、メモリ上に画素差分値を記憶するための2次元配列を確保しておき、その2次元配列の差分対象画素の画素位置に対応する位置に取得した画素差分値dを記憶させる。これにより、差分画像が生成される。なお、算出された画素差分値dをそのまま差分画像の画素値として使用するのではなく、正規化等の処理を施しても構わない。また、算出された画素差分値dと所定の閾値とを比較することにより、差分画像を真値と偽値とを有する2値画像としても構わない。この場合、真値を有する画素の画素位置は差異があり、偽値を有する画素の画素位置は差異がないことを示している。
The
上述の処理が完了すると、画像差分部14は未処理、すなわち、差分対象画素として選択していない画素の有無を判定し(#27)、未処理画素が存在すれば(#27のYes分岐)、処理を#25に移行して上述の処理を繰り返す。
When the above processing is completed, the
図5(a)および(b)に、主撮影画像としてのフロントカメラFにより撮影された画像と、副撮影画像としての左サイドカメラSLにより撮影された画像をフロントカメラFの視点位置から撮影された画像に視点変換した視点変換画像の例を示す。また、図6は図5(a)の画像と図5(b)の画像との差分画像である。なお、図5(b)の視点変換画像は、図5(a)と位置合せを行った後、図5(a)と重複する部分のみをクリッピングしたものである。図に示すように、主撮影画像および視点変換画像には白線Wと障害物Aとが含まれている。また、図5から明らかなように、主撮影画像中の白線Wと視点変換画像中の白線Wとは、略同じ位置となっている。したがって、主撮影画像と視点変換画像との画像間差分をとると、図6に示すように、白線Wに対応する領域では優位な画素差分値は算出されない。一方、図6に示すように、障害物Aに対応する領域、特に、障害物Aの上部に対応する領域では優位な画素差分値が算出される。したがって、差分画像内に優位な画素差分値を有する領域があるか否かを判定すれば、車両Vの周辺に障害物が存在するか否かを判定することができる。 5A and 5B, an image photographed by the front camera F as the main photographed image and an image photographed by the left side camera SL as the sub-photographed image are photographed from the viewpoint position of the front camera F. 2 shows an example of a viewpoint-converted image obtained by converting the viewpoint to an image. FIG. 6 is a difference image between the image of FIG. 5A and the image of FIG. Note that the viewpoint-converted image in FIG. 5B is obtained by clipping only the portion overlapping with FIG. 5A after alignment with FIG. 5A. As shown in the figure, the main photographed image and the viewpoint conversion image include a white line W and an obstacle A. Further, as is clear from FIG. 5, the white line W in the main captured image and the white line W in the viewpoint conversion image are substantially at the same position. Therefore, when the inter-image difference between the main photographed image and the viewpoint conversion image is taken, a dominant pixel difference value is not calculated in the region corresponding to the white line W as shown in FIG. On the other hand, as shown in FIG. 6, a dominant pixel difference value is calculated in the area corresponding to the obstacle A, particularly in the area corresponding to the upper part of the obstacle A. Therefore, it can be determined whether there is an obstacle around the vehicle V if it is determined whether there is a region having a dominant pixel difference value in the difference image.
この差分画像を運転者に提示することにより、運転者は車両Vの周辺に存在する障害物の有無を判断することはできるが、より運転者の判断が容易になるように、本実施形態では、表示部Daにトップビュー画像を表示し、その画像中に障害物を示す指標を重畳表示している。 By presenting this difference image to the driver, the driver can determine the presence or absence of obstacles around the vehicle V, but in the present embodiment, the driver's determination becomes easier. A top view image is displayed on the display unit Da, and an index indicating an obstacle is superimposed on the image.
そのため、差分画像が生成されると、制御部10は、画像合成部20に対して、トップビュー画像の生成、および、トップビュー画像に障害物を示す指標を重畳させるよう指示を送る。これに対して、画像合成部20は、視点変換部12を用いて、各カメラCの撮影画像および差分画像をトップビュー画像に視点変換する(#10)。なお、差分画像は主撮影画像を基準として生成されたものであるため、主撮影画像と同じ視点変換処理を受ける。
Therefore, when the difference image is generated, the
また、画像合成部20は差分画像から障害物を検出する(#11)。上述したように、障害物は差分画像中で優位な画素値を有する領域である。そのため、差分画像に対して2値化および領域分割を施せば、障害物の領域が検出できる。また、差分画像に対してエッジ抽出および2値化を施せば、障害物の輪郭を抽出することができる。画像合成部20は、このようにして障害物を検出し、上述の処理により合成したトップビュー画像に対して、障害物の位置を示す指標を合成する(#12)。このようにして生成された画像はメモリに記憶され、制御部10の指示によって表示部Daに表示される(#13)。
Further, the
図7は上述の処理によって表示部Daに表示される表示画像の例である。図7(a)では、トップビュー画像に対して障害物Aの輪郭を表す指標Eを合成している。一方、図7(b)では、トップビュー画像に対して障害物Aの路面との接地位置を示す指標Eを合成している。なお、この例では、トップビュー画像を合成する際に、フロントカメラFの撮影範囲と左サイドカメラSLの撮影範囲との重複する範囲は双方の画像を合成しているため、障害物Aの形状は実際の形状とは異なっている。 FIG. 7 is an example of a display image displayed on the display unit Da by the above-described processing. In FIG. 7A, an index E representing the contour of the obstacle A is synthesized with the top view image. On the other hand, in FIG.7 (b), the parameter | index E which shows the contact position with the road surface of the obstruction A is synthesize | combined with respect to the top view image. In this example, when the top view image is combined, the overlapping range of the shooting range of the front camera F and the shooting range of the left side camera SL combines both images, so the shape of the obstacle A Is different from the actual shape.
本実施例における車両周辺撮影装置は、画像差分部14の処理の流れが実施例1と異なっている。実施例1では、第1画像の差分対象画素と、第2の画像の比較対象画素とのHOGを比較することにより画素差分値を算出した。すなわち、実施例1では画素と画素とを比較することによって画素差分値を算出した。これに対して、本実施例では、画素と領域とを比較することにより画素差分値を算出している。そのため、本実施例における画像差分部14は、図8の機能ブロック図に示すように領域差分部14dを備えている。
The vehicle periphery photographing apparatus in the present embodiment is different from the first embodiment in the processing flow of the
領域差分部14dは、第2画像において差分対象画素の周囲に所定の大きさの領域(以下、比較対象領域と称する)を設定し、画素差分部14cに対して、比較対象領域に含まれる各々の画素を順次比較対象画素として設定することにより、差分対象画素と比較対象領域に含まれる各々の画素との画素差分値を算出する。さらに、領域差分部14dは、これらの画素差分値に基づいて、最終的な差分対象画素に対する画素差分値を算出する。
The region difference unit 14d sets a region of a predetermined size (hereinafter referred to as a comparison target region) around the difference target pixel in the second image, and each included in the comparison target region with respect to the
以下に、本実施例における画像差分部14の処理の流れを説明する。なお、本実施例における画像差分部14の全体の処理は実施例1と略同様であり、画素差分値を算出する#26の処理が図9のフローチャートの処理に置き換えられる。したがって、ここではこの画素差分値を算出する処理を中心に説明する。
Below, the flow of the process of the
#21から#25の処理により、第1画像および第2画像の各画素位置におけるHOGが算出され、第1画像中の一の画素が差分対象画素として設定される。このとき、領域差分部14dは、第2画像の差分対象画素の周囲に所定の大きさの比較対象領域を設定する(#31)。本実施例では、比較対象領域は差分対象画素を中心とする5×5の領域としている。すなわち、差分対象画素の画素位置を(x,y)とすると比較対象領域は(x−2,y−2)と(x+2,y+2)とを結ぶ直線を対角線にもつ矩形領域である。なお、比較対象領域における差分対象画素の位置や比較対象領域の大きさは適宜変更可能である。 By the processing from # 21 to # 25, the HOG at each pixel position of the first image and the second image is calculated, and one pixel in the first image is set as the difference target pixel. At this time, the area difference unit 14d sets a comparison target area having a predetermined size around the difference target pixel of the second image (# 31). In this embodiment, the comparison target area is a 5 × 5 area centered on the difference target pixel. That is, when the pixel position of the difference target pixel is (x, y), the comparison target area is a rectangular area having a diagonal line connecting (x-2, y-2) and (x + 2, y + 2). The position of the difference target pixel in the comparison target region and the size of the comparison target region can be changed as appropriate.
次に、領域差分部14dは、比較対象領域に含まれる一の画素を比較対象画素として設定し(#32)、画素差分部14cにより、第1画像の差分対象画素と第2画像の比較対象画素との画素差分値を算出する(#33)。この処理を、比較対象領域に含まれる全ての画素に対して行う(#34のYes分岐)。
Next, the region difference unit 14d sets one pixel included in the comparison target region as a comparison target pixel (# 32), and the
上記の処理により、比較対象領域に含まれる画素と同数の画素差分値が得られる。本実施例では、25の画素差分値が得られる。領域差分部14dは、この複数の画素差分値から、差分対象画素に対する最終的な画素差分値を算出する(#35)。具体的には、算出された複数の画素差分値の全てが所定の閾値よりも大きければ、真値を差分対象画素に対する画素差分値とし、一つでも所定の閾値以下の画素差分値があれば、偽値を差分対象画素に対する画素差分値dとする。 With the above processing, the same number of pixel difference values as the pixels included in the comparison target region are obtained. In this embodiment, 25 pixel difference values are obtained. The area difference unit 14d calculates a final pixel difference value for the difference target pixel from the plurality of pixel difference values (# 35). Specifically, if all of the calculated plurality of pixel difference values are larger than a predetermined threshold value, the true value is set as a pixel difference value for the difference target pixel, and there is at least one pixel difference value equal to or smaller than the predetermined threshold value. The false value is the pixel difference value d for the difference target pixel.
本実施例における画素差分値dの算出を数式化すると式(2)のようになる。ここで、diは#33において算出される各々の画素差分値である。 When the calculation of the pixel difference value d in the present embodiment is expressed as a formula, the formula (2) is obtained. Here, d i is the pixel difference value for each calculated in # 33.
このように、差分対象画素に対する画素差分値を算出することにより、第2画像中の差分対象画素に対応する画素が位置ずれしていた場合であっても、その画素が比較対象領域に含まれていれば、その差分対象画素に対する画素差分値は偽値となる。したがって、本実施例のようにして差分対象画素に対する画素差分値を算出すれば、位置ずれに対してロバストな画像間差分を行うことができる。 Thus, by calculating the pixel difference value for the difference target pixel, even if the pixel corresponding to the difference target pixel in the second image is misaligned, the pixel is included in the comparison target region. If so, the pixel difference value for the difference target pixel is a false value. Therefore, if the pixel difference value for the difference target pixel is calculated as in the present embodiment, it is possible to perform an inter-image difference that is robust against positional deviation.
このように、本実施例では一の差分対象画素に対して複数の画素差分値を算出することにより、位置ずれに対するロバスト性を向上させている。しかしながら、比較対象領域を5×5に設定すると、一の差分対象画素に対する画素差分値を求めるための計算コストは、単純計算で実施例1の25倍となる。このような計算コストの増大は、処理速度の低下やより高速なCPUを必要とするなど、好ましくない状況を招く。そのため、計算コストを低減することによる高速化が必要となる。以下に、高速化手法を説明する。 As described above, in this embodiment, the robustness against the positional deviation is improved by calculating a plurality of pixel difference values for one difference target pixel. However, when the comparison target region is set to 5 × 5, the calculation cost for obtaining the pixel difference value for one difference target pixel is 25 times that of the first embodiment in a simple calculation. Such an increase in calculation cost leads to an unfavorable situation such as a decrease in processing speed and a need for a faster CPU. Therefore, it is necessary to increase the speed by reducing the calculation cost. Hereinafter, the speed-up method will be described.
〔高速化手法1〕
ここでは、計算の打ち切りによる高速化について説明する。図10は、計算の打ち切り処理を導入した差分対象画素に対する画素差分値の算出処理の流れを表すフローチャートである。なお、#41から#43の処理は#31から#33の処理と同様であるため説明は省略する。
[Speedup method 1]
Here, a description will be given of the speeding up by the truncation of calculation. FIG. 10 is a flowchart showing the flow of a pixel difference value calculation process for a difference target pixel into which a calculation truncation process is introduced. Note that the processing from # 41 to # 43 is the same as the processing from # 31 to # 33, and the description thereof will be omitted.
差分対象画素と比較対象画素との画素差分値diが算出されると(#43)、算出された画素差分値diと所定の閾値THとが比較される(#43)。このとき、算出された画素差分値diが閾値TH以下の場合には(#44のYes分岐)、式(2)における論理式(di>TH)が偽となり、式(2)により算出される画素差分値dはそれ以降の画素差分値diに関係なく、必ず偽値となる。そのため、算出された画素差分値diが閾値TH以下の場合には(#44のYes分岐)、差分対象画素の画素差分値を偽値に設定し(#45)、処理を終了する。すなわち、閾値以下の画素差分値diが算出されると、その比較対象画素に含まれる画素に対する画素差分値diの算出を打ち切る。これにより、不要な演算を削減し、処理を高速化することができる。 When the pixel difference value d i between the difference target pixel and the comparison target pixel is calculated (# 43), the calculated pixel difference value d i is compared with a predetermined threshold TH (# 43). At this time, when the calculated pixel difference value d i is equal to or smaller than the threshold value TH (Yes branch of # 44), the logical expression (d i > TH) in the expression (2) becomes false and is calculated by the expression (2). The pixel difference value d is always a false value regardless of the pixel difference value d i thereafter. Therefore, when the calculated pixel difference value d i is equal to or smaller than the threshold value TH (Yes branch of # 44), the pixel difference value of the difference target pixel is set to a false value (# 45), and the process ends. That is, when the threshold value or less of the pixel difference value d i are calculated, aborting the calculation of the pixel difference values d i for the pixel included in the comparison pixel. Thereby, unnecessary operations can be reduced and the processing speed can be increased.
一方、算出された画素差分値diが閾値THよりも大きければ(#44のNo分岐)、比較対象領域の全ての画素を比較対象画素として設定するまで上記の処理を繰り返す(#43〜#46)。そして、未処理の画素が存在しなくなると(#46のNo分岐)、差分対象画素に対する画素差分値dを真値に設定する(#47)。 On the other hand, if the pixel difference value d i calculated is greater than the threshold TH (No branch of # 44), the above processing is repeated until the set as a comparison target pixels all the pixels of the comparison regions (# 43 to # 46). When there is no unprocessed pixel (No branch at # 46), the pixel difference value d for the difference target pixel is set to a true value (# 47).
〔別実施形態〕
(1)式(1)における算出処理を以下のようにしても構わない。まず、無方向の度数の差分の絶対値|HOG1[8]−HOG2[8]|を算出し、この値が所定の閾値TH1よりも大きければ、画素差分値dを真値とし、この値が所定の閾値以下の場合は式(1)により算出した値dを論理式(d>TH2)に代入した結果を画素差分値とする構成としても構わない。ここで、TH2は画素間の差異の有無を判定するための閾値である。この方法は、路面のような画素値の変化が小さな領域を多く含む画像のような、無方向となる画素値の勾配方向を多く有する画像に対しては演算量の削減を図ることができるため、好ましい。
[Another embodiment]
(1) The calculation process in equation (1) may be performed as follows. First, the absolute value | HOG1 [8] −HOG2 [8] | of the non-directional frequency difference is calculated. If this value is larger than a predetermined threshold value TH1, the pixel difference value d is set to a true value, and this value is When the value is equal to or less than the predetermined threshold value, the pixel difference value may be obtained by substituting the value d calculated by Expression (1) into the logical expression (d> TH2). Here, TH2 is a threshold value for determining whether there is a difference between pixels. This method can reduce the amount of calculation for an image having many gradient directions of pixel values that are non-directional, such as an image including many regions with small pixel value changes such as road surfaces. ,preferable.
(2)上述の実施形態では、予め画像の全画素位置におけるHOGを算出してメモリに記憶させていた。しかしながら、上述したように、HOGの記憶には3次元配列が必要なため、メモリ容量の小さな装置においてHOGを記憶させておくとメモリ容量を圧迫して好ましくない。そのため、画素差分値を算出する際に、逐次HOGを算出するように構成しても構わない。ただし、このように構成すると実施例2のように領域単位で比較を行うと、HOGの算出が重複して行われ、演算量が増加し、速度低下を招く。この場合には、以下のようにして、重複する演算を回避することにより、演算量の増加を抑制することが望ましい。 (2) In the above-described embodiment, the HOG at all pixel positions of the image is calculated and stored in the memory in advance. However, as described above, since a three-dimensional array is required for storing the HOG, it is not preferable to store the HOG in an apparatus having a small memory capacity because it compresses the memory capacity. Therefore, when calculating the pixel difference value, the HOG may be calculated sequentially. However, with this configuration, when comparison is performed in units of regions as in the second embodiment, the calculation of HOG is performed redundantly, the amount of calculation increases, and the speed decreases. In this case, it is desirable to suppress an increase in the amount of calculation by avoiding overlapping calculations as follows.
まず、実施例2の処理により、一の差分対象画素(以下、第1差分対象画素と称する)の画素位置におけるHOGが算出され、第1差分対象画素に対する比較対象領域(以下、第1比較対象領域)が設定される。そして、第1比較対象領域内の各画素位置におけるHOGを算出する。ここで算出した各HOGは各画素位置に関連付けてメモリに記憶される。このようにして、HOGが算出されると、実施例2の方法により、第1差分対象画素に対する画素差分値が算出される。 First, the HOG at the pixel position of one difference target pixel (hereinafter referred to as the first difference target pixel) is calculated by the processing of the second embodiment, and the comparison target region (hereinafter referred to as the first comparison target) with respect to the first difference target pixel is calculated. Area) is set. Then, the HOG at each pixel position in the first comparison target area is calculated. Each HOG calculated here is stored in the memory in association with each pixel position. When the HOG is calculated in this manner, the pixel difference value for the first difference target pixel is calculated by the method of the second embodiment.
次に、第1比較対象領域に含まれる一の差分対象画素(以下、第2差分対象画素と称する)が選択され、第2差分対象画素の画素位置におけるHOGが算出される。また、その第2差分対象画素に対する比較対象領域(以下、第2比較対象領域と称する)が設定される。 Next, one difference target pixel (hereinafter referred to as a second difference target pixel) included in the first comparison target region is selected, and the HOG at the pixel position of the second difference target pixel is calculated. In addition, a comparison target region (hereinafter referred to as a second comparison target region) for the second difference target pixel is set.
ここで、第2比較対象領域内の各画素位置におけるHOGの算出を行うが、第1比較対象領域と第2比較対象領域とは部分的に重複しており、第1比較対象領域内の各画素位置におけるHOGはメモリに記憶されている。したがって、ここでは、第1比較対象領域と第2比較対象領域との重複領域内の各画素位置におけるHOGはメモリから取得できるため、算出は不要である。すなわち、第1比較対象領域と第2比較対象領域とが重複していない領域内の各画素位置におけるHOGのみを算出すればよい。 Here, the HOG is calculated at each pixel position in the second comparison target region. However, the first comparison target region and the second comparison target region partially overlap, and each of the first comparison target region The HOG at the pixel position is stored in the memory. Therefore, since the HOG at each pixel position in the overlapping region between the first comparison target region and the second comparison target region can be acquired from the memory, no calculation is necessary here. That is, it is only necessary to calculate HOG at each pixel position in a region where the first comparison target region and the second comparison target region do not overlap.
例えば、比較対象領域を5×5とし、第1差分対象画素の画素位置を(x,y)、第2差分対象領域の画素位置を(x+1,y)とすると、第2比較対象領域の25の画素のうち、20画素が第1比較対象領域に含まれている。したがって、5つのHOGを算出すれば済むことになる。 For example, if the comparison target area is 5 × 5, the pixel position of the first difference target pixel is (x, y), and the pixel position of the second difference target area is (x + 1, y), 25 of the second comparison target area. Among these pixels, 20 pixels are included in the first comparison target region. Therefore, it is sufficient to calculate five HOGs.
(3)上述の実施形態では、主撮影画像を第1画像、視点変換画像を第2画像として画像間差分を行った。実施例1において、これらの関係を入れ換えても結果は同じであるが、実施例2において、これらの関係を入れ換えると結果が異なる可能性がある。そこで、主撮影画像を第2画像、視点変換画像を第2画像として第1差分画像を算出するとともに、視点変換画像を第1画像、主撮影画像を第2画像として第2差分画像を算出し、第1差分画像および第2差分画像のいずれも差異がないことを示す値(偽値)であれば、その画素の画素値を差異がないことを示す値とし、少なくとも一方が差異があることを示す値(真値)であれば、その画素の画素値を差異があることを示す値(真)とする。すなわち、第1差分画像および第2差分画像の座標位置(x、y)における画素値をそれぞれf1(x,y),f2(x,y)とすると、最終的な差分画像の座標位置(x,y)における画素値は
f(x,y)=f1(x,y) or f2(f,y)
となる。このように、双方向から比較することにより、ロバスト性を向上させることができる。
(3) In the above-described embodiment, the difference between images is performed using the main captured image as the first image and the viewpoint conversion image as the second image. In Example 1, the result is the same even if these relationships are interchanged. However, in Example 2, the results may be different if these relationships are interchanged. Accordingly, the first difference image is calculated using the main captured image as the second image and the viewpoint converted image as the second image, and the second difference image is calculated using the viewpoint converted image as the first image and the main captured image as the second image. If the value indicates that there is no difference in both the first difference image and the second difference image (false value), the pixel value of the pixel is set as a value indicating that there is no difference, and at least one of them is different. If the value indicates true (true value), the pixel value of the pixel is set to a value (true) indicating that there is a difference. That is, if the pixel values at the coordinate positions (x, y) of the first difference image and the second difference image are f1 (x, y) and f2 (x, y), respectively, the coordinate position (x , Y) has a pixel value of f (x, y) = f1 (x, y) or f2 (f, y)
It becomes. Thus, robustness can be improved by comparing from both directions.
本発明は、障害物検出をはじめとして移動体検出やオプティカルフロー検出等の演算を行う際の画像間差分技術に適用することができる。 The present invention can be applied to an inter-image difference technique when performing calculations such as obstacle detection and moving object detection and optical flow detection.
C:カメラ
C1:第1カメラ
C2:第2カメラ
F:フロントカメラ
R:リアカメラ
SR:右サイドカメラ
SL:左サイドカメラ
13:視点変換部
14:画像差分部
14a:勾配方向算出部
14b:ヒストグラム生成部
14c:画素差分部
14d:領域差分部
C: camera C1: first camera C2: second camera F: front camera R: rear camera SR: right side camera SL: left side camera 13: viewpoint conversion unit 14:
Claims (6)
各々の前記画素を対象画素として設定するとともに、当該対象画素の周囲に所定の大きさの領域をヒストグラム算出領域として設定し、当該ヒストグラム算出領域に含まれる前記画素の画素位置における前記勾配方向の度数分布を当該対象画素の画素位置におけるヒストグラムとして生成するヒストグラム生成部と、
第1の前記画像の差分対象となる前記画素の画素位置における第1の前記ヒストグラムと、第2の前記画像の比較対象となる前記画素の画素位置における第2の前記ヒストグラムと、の差分値を当該差分対象となる画素と当該比較対象となる画素との画素差分値として算出する画素差分部と、
前記差分対象となる画素の画素位置における画素値を前記画素差分値に基づいて設定することにより差分画像を生成する画像差分部と、を備えた画像間差分装置。 A gradient direction calculation unit for obtaining a gradient direction of a pixel value at a pixel position of each pixel constituting the image;
Each of the pixels is set as a target pixel, a region having a predetermined size is set as a histogram calculation region around the target pixel, and the frequency in the gradient direction at the pixel position of the pixel included in the histogram calculation region A histogram generation unit that generates a distribution as a histogram at the pixel position of the target pixel;
The difference value between the first histogram at the pixel position of the pixel that is the difference target of the first image and the second histogram at the pixel position of the pixel that is the comparison target of the second image. A pixel difference unit that calculates a pixel difference value between the pixel to be compared and the pixel to be compared;
An image difference device comprising: an image difference unit that generates a difference image by setting a pixel value at a pixel position of the pixel to be a difference target based on the pixel difference value.
前記第2のカメラにより撮影された前記撮影画像を前記第1のカメラの視点位置から撮影された画像に視点変換した視点変換画像を生成する視点変換部と、を備え、
前記第1の画像が前記第1のカメラにより撮影された前記撮影画像であり、前記第2の画像が前記視点変換画像である請求項1記載の画像間差分装置。 An image acquisition unit that acquires a captured image captured by the first camera and a second camera having a capturing range that partially overlaps the capturing range of the first camera;
A viewpoint conversion unit that generates a viewpoint conversion image obtained by converting the captured image captured by the second camera into an image captured from the viewpoint position of the first camera;
The inter-image difference device according to claim 1, wherein the first image is the captured image captured by the first camera, and the second image is the viewpoint conversion image.
前記画素差分部は、前記第1のヒストグラムの前記無方向の度数と前記第2のヒストグラムの前記無方向の度数との差を算出し、当該差の絶対値が所定の閾値よりも大きい場合には、前記有方向の度数の差を算出せずに、前記第1のヒストグラムと前記第2のヒストグラムとが差異を有することを示す値を前記画素差分値とする請求項1から4のいずれか一項に記載の画像間差分装置。 The gradient direction includes a non-directional direction and a plurality of directional directions,
The pixel difference unit calculates a difference between the non-directional frequency of the first histogram and the non-directional frequency of the second histogram, and when the absolute value of the difference is larger than a predetermined threshold value 5. The pixel difference value according to claim 1, wherein a value indicating that the first histogram and the second histogram have a difference is calculated as the pixel difference value without calculating the difference in frequency in the directional direction. The inter-image difference device according to one item.
第2の画像の各画素位置における画素値の勾配方向を求めるステップと、
前記第1の画像を構成する各画素を対象画素とするとともに、当該対象画素の周囲に所定の大きさの領域をヒストグラム算出領域として設定し、当該ヒストグラム算出領域に含まれる当該画素の画素位置における前記勾配方向の度数分布を当該対象画素の画素位置におけるヒストグラムとして生成するステップと、
前記第2の画像を構成する各画素を対象画素とするとともに、当該対象画素の周囲に所定の大きさの領域をヒストグラム算出領域として設定し、当該ヒストグラム算出領域に含まれる当該画素の画素位置における前記勾配方向の度数分布を当該対象画素の画素位置におけるヒストグラムとして生成するステップと、
前記第1の画像の各画素を差分対象画素とし、当該第1の画像の当該差分対象画素の画素位置における第1のヒストグラムと、前記第2の画像の比較対象となる前記画素の画素位置における第2のヒストグラムと、の差分値を当該差分対象となる画素と当該比較対象となる画素との画素差分値として算出するステップと、
前記差分対象となる画素の画素位置における画素値を前記画素差分値に基づいて設定することにより差分画像を生成するステップと、を備えた画像間差分方法。 Determining a gradient direction of the pixel value at each pixel position of the first image;
Determining a gradient direction of the pixel value at each pixel position of the second image;
Each pixel constituting the first image is set as a target pixel, a region having a predetermined size is set as a histogram calculation region around the target pixel, and the pixel position of the pixel included in the histogram calculation region is set at the pixel position. Generating a frequency distribution in the gradient direction as a histogram at the pixel position of the target pixel;
Each pixel constituting the second image is set as a target pixel, a region having a predetermined size is set as a histogram calculation region around the target pixel, and the pixel position of the pixel included in the histogram calculation region is set at the pixel position. Generating a frequency distribution in the gradient direction as a histogram at the pixel position of the target pixel;
Each pixel of the first image is set as a difference target pixel, and the first histogram at the pixel position of the difference target pixel of the first image and the pixel position of the pixel to be compared with the second image Calculating a difference value between the second histogram and the pixel to be compared as a pixel difference value between the pixel to be compared and the pixel to be compared;
A difference image is generated by setting a pixel value at a pixel position of the pixel to be the difference based on the pixel difference value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011262499A JP5891751B2 (en) | 2011-11-30 | 2011-11-30 | Inter-image difference device and inter-image difference method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011262499A JP5891751B2 (en) | 2011-11-30 | 2011-11-30 | Inter-image difference device and inter-image difference method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013115739A true JP2013115739A (en) | 2013-06-10 |
JP5891751B2 JP5891751B2 (en) | 2016-03-23 |
Family
ID=48467565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011262499A Expired - Fee Related JP5891751B2 (en) | 2011-11-30 | 2011-11-30 | Inter-image difference device and inter-image difference method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5891751B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016002163A1 (en) * | 2014-07-03 | 2016-01-07 | 株式会社デンソー | Image display device and image display method |
JP2017211765A (en) * | 2016-05-24 | 2017-11-30 | アイシン精機株式会社 | Object recognition device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05143156A (en) * | 1991-11-21 | 1993-06-11 | Mazda Motor Corp | Device for recognizing environment |
JPH099249A (en) * | 1995-06-16 | 1997-01-10 | Hitachi Cable Ltd | Intrusion monitoring method using picture processing |
JP2011210087A (en) * | 2010-03-30 | 2011-10-20 | Panasonic Corp | Vehicle circumference monitoring device and vehicle circumference monitoring method |
-
2011
- 2011-11-30 JP JP2011262499A patent/JP5891751B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05143156A (en) * | 1991-11-21 | 1993-06-11 | Mazda Motor Corp | Device for recognizing environment |
JPH099249A (en) * | 1995-06-16 | 1997-01-10 | Hitachi Cable Ltd | Intrusion monitoring method using picture processing |
JP2011210087A (en) * | 2010-03-30 | 2011-10-20 | Panasonic Corp | Vehicle circumference monitoring device and vehicle circumference monitoring method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016002163A1 (en) * | 2014-07-03 | 2016-01-07 | 株式会社デンソー | Image display device and image display method |
JP2016013793A (en) * | 2014-07-03 | 2016-01-28 | 株式会社デンソー | Image display device and image display method |
JP2017211765A (en) * | 2016-05-24 | 2017-11-30 | アイシン精機株式会社 | Object recognition device |
Also Published As
Publication number | Publication date |
---|---|
JP5891751B2 (en) | 2016-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6371553B2 (en) | Video display device and video display system | |
US8928736B2 (en) | Three-dimensional modeling apparatus, three-dimensional modeling method and computer-readable recording medium storing three-dimensional modeling program | |
JP5003395B2 (en) | Vehicle periphery image processing apparatus and vehicle periphery state presentation method | |
JP2015197745A (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
JP7123736B2 (en) | Image processing device, image processing method, and program | |
JP4872769B2 (en) | Road surface discrimination device and road surface discrimination method | |
JPWO2011115142A1 (en) | Image processing apparatus, method, program, and recording medium | |
JP7159384B2 (en) | Image processing device, image processing method, and program | |
JP2013164351A (en) | Stereo parallax calculation device | |
JP5163165B2 (en) | Vehicle periphery image processing apparatus and vehicle periphery state presentation method | |
JP5935435B2 (en) | Image processing apparatus and image processing method | |
JP6239205B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP6617150B2 (en) | Object detection method and object detection apparatus | |
JP2001208524A (en) | Image processor and image processing method | |
JP5906696B2 (en) | Vehicle periphery photographing apparatus and vehicle periphery image processing method | |
JP2012252501A (en) | Traveling path recognition device and traveling path recognition program | |
JP2015230703A (en) | Object detection device and object detection method | |
JP5891751B2 (en) | Inter-image difference device and inter-image difference method | |
JP2008026999A (en) | Obstacle detection system and obstacle detection method | |
JP2013200840A (en) | Video processing device, video processing method, video processing program, and video display device | |
JP6320165B2 (en) | Image processing apparatus, control method therefor, and program | |
JP7064400B2 (en) | Object detection device | |
JP5446641B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP6762779B2 (en) | Image processing equipment, imaging equipment, image processing methods, and programs | |
JP2015216542A (en) | Information processing apparatus, information processing method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141010 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150615 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150709 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150805 |
|
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: 20160126 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160208 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5891751 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |